使用 logit.reg 函数进行逻辑回归

时间:2021-04-17 05:19:30

标签: r

成功加载和分区我的数据后,我正在尝试运行以下代码

*logit.reg <- glm(Financial.Condition ~ ., data = train.df, family = "binomial")
options(scipen = 999)
summary(logit.reg)*

但我收到以下错误消息:

*> logit.reg <- glm(Financial.Condition ~ ., data = train.df, family = "binomial")
Error in model.matrix.default(mt, mf, contrasts) : 
  variable 1 has no levels
> options(scipen = 999)
> summary(logit.reg)
Error in summary(logit.reg) : object 'logit.reg' not found*

logit.reg 函数的正确写法是什么?

0 个答案:

没有答案