• a printout of the graph in part (b) that is produced by your script (black and white copy is sufficient), and • a printout of your Surname_out.txt file (see below) containing output to parts (d), (e) and (f) produced by your R script. Your R script should be saved in...
(1)理解: 各类型变量间相互的影响程度(数字,正负表示) ①cor(data , method=) 默认为pearson(线性相关程度) 也可以为spearman(定序相关) states <-state.x77[,1:6] cor(states)Population Income Illiteracy Population 1.00000000 0.2082276 0.1076224 Income 0.20822756 1.0000000 -0.4370752 Illiteracy 0.10762237 -0...
#1colnames(data)=c("fev", "height","inhaler", "age", "exercise")#给列名赋值summary(data) cor(data)#查看各个变量之间的关系plot(data) attach(data)#绑定数据boxplot(fev ~ inhaler,col="yellow",main="inhaler与fev箱线图",xlab="inhaler",ylab="fev",xlim= c(0,3), ylim = c(5,9), ya...
l=negll(c(1,3),data) #用极大似然法估计negll函数的参数