[R] polr question
Prof Brian D Ripley
ripley at stats.ox.ac.uk
Sun Mar 12 09:10:00 CET 2000
On Sat, 11 Mar 2000, Troels Ring wrote:
> Dear friends.
> Do Polr in Mass change the sign of the coefficients ? Example (McCullagh 1980)
No, but there are at least three conventions here. The simplest way to
interpret a polr model is as a discretized linear model with a logistic
error distribution, and that is what polr does. So think of the
coefficients as being those of the variation with x of the (mean, mode) of
the underlying logistic, and the intercepts as the breakpoints for the
discretization.
> options(contrasts=c("contr.treatment","contr.poly"))
> library(Mass)
(Um, it's MASS, and you are only getting away with this on Windows.
Don't trust what is displayed in Explorer by default.)
> freq <- c(19,29,24,497,560,269)
> yy <- ordered(gl(3,1,6))
> z4 <- polr(yy~x,weights=freq)
> > z4
> Call:
> polr(formula = yy ~ x, weights = freq)
>
> Coefficients:
> x2
> -0.6026492
>
> Intercepts:
> 1|2 2|3
> -1.1111584 0.7600705
>
> Residual Deviance: 2955.49
> AIC: 2961.49
>
> - since as specified the logit for the non-carrier for being in the
lower categories is higher ?
I don't see any mention of a carrier here, nor of x? But if you had
the table
y= 1 2 3
x=0 19 29 24
x=1 497 560 269
I can reproduce your results, and the larger x does tend to give a lower
response. (That does seem the natural sign for the x coefficient to me.)
Note that glm will give the same sign (apart from the intercepts) as polr:
> glm(yy ~ x, weights=freq, family=binomial)
Call: glm(formula = yy ~ x, family = binomial, weights = freq)
Coefficients:
(Intercept) x
1.0258 -0.5142
> glm((yy>2) ~ x, weights=freq, family=binomial)
Call: glm(formula = (yy > 2) ~ x, family = binomial, weights = freq)
Coefficients:
(Intercept) x
-0.6931 -0.6753
The sign of the intercepts are different, as you need to subtract the
breakpoint to get a zero-breakpoint model.
> as also got from Lindsey's library:
[...]
I think that has one of the other conventions, which are logistic models
for P(Y <= k | x) or P(Y > k | x).
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list