[R] Problem in using confint method on polr model object
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed May 3 14:58:40 CEST 2006
On Wed, 3 May 2006, Ulrich Halekoh wrote:
> I fit a proportional odds model
> with the polr-function of the MASS package from
> Venables and Ripley
>
>
> Applying the confint method to calculate confidence intervals for the
> parameters I get
> the following error message
>
>
> Waiting for profiling to be done...
> Re-fitting to get Hessian
> Error in X[, -i, drop = FALSE] : incorrect number of dimensions
>
> Can someone explain the error-message?
This is a single-coefficient model, and in profile.polr
it needs to be
X <- model.matrix(fitted)[, -1, drop = FALSE]
>
> (The data are from McCullagh (1980), JRSS,B)
>
>
>
> tonsiles<-data.frame(carrier=factor(rep(c('yes','no'),each=3)),
> size=ordered(rep(c(1,2,3),2)),
> count=c(19,29,24,497,560,269))
> library(MASS)
> m<-polr(size~carrier,data=tonsiles,weights=count)
> confint(m)
>
>
> Ulrich
>
>
> platform i386-pc-mingw32
> arch i386
> os mingw32
> system i386, mingw32
> status
> major 2
> minor 3.0
> year 2006
> month 04
> day 24
> svn rev 37909
> language R
> version.string Version 2.3.0 (2006-04-24)
>
>
> Ulrich Halekoh
> Danish Institute of Agricultural Sciences
> Unit of Statistics and Decision Analysis
> Denmark
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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
>
--
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 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list