R语言逐步回归(Stepwise)
最后发布时间:2022-03-23 18:18:29
浏览量:
states <- as.data.frame(state.x77[,c("Murder", "Population","Illiteracy", "Income", "Frost")])
fit <- lm(Murder ~ Population + Illiteracy + Income + Frost, data=states)
stepAIC(fit, direction="backward")