[R] Error when using polr() in MASS

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Thu Jan 23 14:38:02 CET 2003


That example works here (once I make skugg an ordered factor):

Call:
polr(formula = skugg ~ grupp, data = dat, weights = frekv)

Coefficients:
     Value Std. Error    t value 
 -3.287802   1.252344  -2.625318 

Intercepts:
    Value   Std. Error t value
1|2 -5.8783  1.5565    -3.7765
2|3 -0.6973  0.7062    -0.9875

Residual Deviance: 25.76504 
AIC: 31.76504 

BTW, there is no point in including points with zero weight.


On Wed, 22 Jan 2003, Tord Snall wrote:

> Dear all,
> 
> I get an error message when I use polr() in MASS. These are my data:
> 
>    skugg grupp frekv
> 4      1   gr3     0
> 5      2   gr3     3
> 6      3   gr3     6
> 10     1   gr5     1
> 11     2   gr5    12
> 12     3   gr5     1
> > 
> > summary(polr(skugg ~ grupp, weights=frekv, data= skugg.cpy1.dat))
> Error in optim(start, fmin, gmin, method = "BFGS", hessian = Hess, ...) : 
>         non-finite value supplied by optim
> 
> Does this depend on the very few observations in skugg 1 - the
> proportional-odds assumption doesn't hold (p 231, MASS 3ed)? If so, I would
> be happy for a recommendation on another approach.
> 
> And I also have a similar data set where only the skugg classes 2 and 3 are
> observed. Would you recommend glm, family= binomial for that analysis?
> 
> I use R 1.6.2, MASS 7.0-10, Win 2000. 
> 
> 
> Thanks in advance!
> 
> Please reply also to me because I'm on the once a day-list
> 
> 
> Sincerely,
> Tord
> 
> -----------------------------------------------------------------------
> Tord Snäll
> Avd. f växtekologi, Evolutionsbiologiskt centrum, Uppsala universitet
> Dept. of Plant Ecology, Evolutionary Biology Centre, Uppsala University
> Villavägen 14			
> SE-752 36 Uppsala, Sweden
> Tel: 018-471 28 82 (int +46 18 471 28 82) (work)
> Tel: 018-25 71 33 (int +46 18 25 71 33) (home)
> Fax: 018-55 34 19 (int +46 18 55 34 19) (work)
> E-mail: Tord.Snall at ebc.uu.se
> Check this: http://www.vaxtbio.uu.se/resfold/snall.htm!
> ------------------------------------------------------------------------
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 

-- 
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