`对比< -`(`* tmp *`,value = contr.funs [1 + isOF [nn]])出错:对比只能应用于2级或更多级别的因子

时间:2017-09-08 18:28:01

标签: r regression lm

同时应用线性模型训练所有变量的数据集。

reglm <- lm(SalePrice~., data = num_train)

我收到此错误:

Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) :    contrasts can be applied only to factors with 2 or more levels

火车组有两种类型的整数和因子。所有因子变量都至少有2个变量。

0 个答案:

没有答案
相关问题