[R] polr function, Error in if (all(pr > 0)) -sum(wt * log(pr)) else Inf
Clifton Emery
clifkorea at yahoo.com
Wed May 4 01:12:44 CEST 2005
I am trying to run a proportional odds model
with the code:
reg22<-polr(as.factor(dp29)~subid+cohort+wave+sex+ses_nc+age+educ_pc+mstat_pc+famsize+salary+employ+wiscraw+age1_pc+cc61+intern2+extern2+tcbcl+sv1a0+sv3a0+sv7a0+dp1+dp5+dp7+dp26+dp27+dp31+dp34+hg106+hg113+hg55+hg54+hg123+hg126+hg129+hg20+hg120+sr2a1+sb23+minorviolfem+sevviolfem+minorviolman+sevviolman+minabuse+sevabuse+crime,
data=misdat4, start=st)
Some of my models run, others (like the code above)
get an error indicating that the starting values are
infinite. Someone suggested I try putting in the
starting values myself. I created a vector which has
length 47 (45 predictors plus (3 levels of depvar) - 1
). This now gets the message:
Error in if (all(pr > 0)) -sum(wt * log(pr)) else Inf
:
missing value where TRUE/FALSE needed
Can anyone help me to understand what this means and
how I might fix it? Thanks!
Clif Emery
More information about the R-help
mailing list