Re: [R] Problem with ordered logistic regression using polr function.

From: Thomas Lumley <>
Date: Thu 20 Jul 2006 - 01:11:33 EST

On Wed, 19 Jul 2006, Debarchana Ghosh wrote:

> Hi,
> I'm trying to fit a ordered logistic regression. The response variable
> (y) has three levels (0,1,2).
> The command I've used is:
> /ordlog<-polr(y~x1+x2+x3+x4, data=finalbase, subset=heard, weight=wt,
> na.action=na.omit)
> /

> (There are no NA's in y but there are NA's in X's)
> The error I'm getting is:
> /Warning messages:
> 1: non-integer #successes in a binomial glm! in: eval(expr, envir, enclos)
> 2: design appears to be rank-deficient, so dropping some coefs in:
> polr(right.ans ~ S107 + children + work + rel + media + V013 +
> /

Those are not errors. They are warnings (and I told you yesterday that the first one would happen and would be harmless with probability weights). The second warning may indicate a real problem or not: you can tell by looking at which coefficients have been dropped.

Also, if that is the warning message then the polr() call you used is not the one you said you were using.

> Also, if I write
> /summary(ordlog)/
> I'm getting the following error:
> /Re-fitting to get Hessian
> Error in if (all(pr > 0)) -sum(wt * log(pr)) else Inf :
> missing value where TRUE/FALSE needed
> /Could anybody point out the problem?

You can specify Hess=TRUE in the original polr() call so that refitting would not be necessary. This is sensible anyway if you know you are going to be computing standard errors.


Thomas Lumley			Assoc. Professor, Biostatistics	University of Washington, Seattle

______________________________________________ mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu Jul 20 01:18:12 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 20 Jul 2006 - 02:16:58 EST.

Mailing list information is available at Please read the posting guide before posting to the list.