摘要:
rm(list = ls()) library(car) library(MASS) library(openxlsx) A = read.xlsx("data141.xlsx") head(A) fm = lm(y~x1+x2+x3+x4 , data=A ) #判断多重共线性 vif(fm) > vif(fm) x1 x2 x3 x4 38.49621 254.42317 46.86839 2 阅读全文
摘要:
> vif(fm) #查看模型是否存在共线性 x1 x2 x3 21.631451 21.894402 1.334751 结果显示存在共线性 结果: > summary(fm) Call:lm(formula = y ~ x1 + x2 + x3, data = A) Residuals: Min 阅读全文