全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
3870 5
2016-11-15
summary(merg1)

SUBJECT_ID            chlo                  score   
Min.   :    3              Min.   :-Inf          0:40784  
1st Qu.:13637       1st Qu.: 106       1: 1966  
Median :27358       Median : 110            
Mean   :37620        Mean   :-Inf            
3rd Qu.:61949       3rd Qu.: 113            
Max.   :99999         Max.   : 155      

> fitm<-glm(score~chlo,data = merg1,family = binomial())

Error in glm.fit(x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  :
  NA/NaN/Inf in 'x'
在merg1数据集中,以score为因变量(score是“0”和“1”的因子),chlo为自变量作logistic回归,出现了这种错误是什么原因呢?该怎么解决?(数据集太大了,所以把summary呈现给大家看)

求大神帮忙!!

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2016-11-15 11:31:23
去除缺失值,再做回归吧
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2016-11-15 12:04:44
chlo怎么最小值为负无穷?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2016-11-15 13:58:25
jiangbeilu 发表于 2016-11-15 11:31
去除缺失值,再做回归吧
缺失值已经去除了/蓝瘦/
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2016-11-15 13:58:48
飞天玄舞6 发表于 2016-11-15 12:04
chlo怎么最小值为负无穷?
我也很困惑,难道问题出在这儿?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2020-11-2 20:18:24
请问您知不知道 这个是什么原因?谢谢

ologm1<-polr(as.factor(newcgss$online_engagement)~
+                agegroup+yeareducate+newsex+newnation+political+internet_frq,
+              method="logistic",data=newcgss)
> summary(ologm1)

错误提示:

Re-fitting to get Hessian

Error in polr(formula = as.factor(newcgss$online_engagement) ~ agegroup +  :
  'start' is not of the correct length

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群