R Error in solve.default(V) : 'a' is 0-diml in regTermTest function

这一生的挚爱 提交于 2019-12-07 16:07:03

问题


I'm trying to use regTermTest function in R survey package to test the significance of each variables for logistic regression.

However, I got a solver error for one of my variable, "fun". The error is

Error in solve.default(V) : 'a' is 0-diml

My code for the logistic regression is

model2 <-
glm(decision~samerace+race_o+field+goal+attr+sinc+intel+fun+amb+shar+like+prob,data=trg2, family=binomial) 
regTermTest(model2, "fun")

I also encountered p = NA result for another variable "amb".

regTermTest(model2, "amb")

Wald test for amb
in glm(formula = decision ~ samerace + race_o + field + goal + attr + 
          sinc + intel + fun + amb + shar + like + prob, family = binomial, 
        data = trg2)
 #F =  NA  on  1  and  5977  df: p= NA

My fun & amb variable are both numeric/integer from 1 to 10. They are a rating scale and their types are the same as some other variables such as sinc, attr etc. (the function works well for the other variables except "fun" & "amb")

来源:https://stackoverflow.com/questions/40216353/r-error-in-solve-defaultv-a-is-0-diml-in-regtermtest-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!