1、相关分析(两种提取数据集方法
提取出相关系数最大变量做回归分析
t3 <- a[,9:16]
cor(t3,use = "pairwise.complete.obs",method = "pearson")
var <- c("Height","Weight","BMI","LEG","ARML","ARMC","WAIST","SAD")
t3 <- a[var]
cor(t3,use = "pairwise.complete.obs",method = "pearson")
#自变量WAIST 0.91581744
plot(a$BMI,a$WAIST) #散点图看趋势
c <- lm(BMI~WAIST,data = a)
summary(c)
网友评论