[R] polr function, Error in if (all(pr > 0)) -sum(wt * log(pr)) else Inf

From: Clifton Emery <clifkorea_at_yahoo.com>
Date: Wed 04 May 2005 - 09:12:44 EST

      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

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed May 04 09:18:03 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:33 EST