[R] what does summary(polr(...)) really call? --- and obscure buglet
Duncan Mackay
mackay at northnet.com.au
Tue May 14 02:06:08 CEST 2013
Ivo
I think you should read the help page.
Firstly Y should be an ordered factor - you are fitting a
proportional odds model as the name suggests
Regards
Duncan
Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mackay at northnet.com.au
At 06:31 14/05/2013, you wrote:
>thx, everyone. this helped me debug further.
>
>It turns out summary.polr was not my problem, though. instead, I ran
>into a weird buglet with the name of my data.frame screwing up
>summary.polr.
>
>library(MASS)
>N <- 50
>pairs <- data.frame(y=as.factor(as.integer(rnorm(N)*10)),
>x=as.integer(rnorm(N)*10))
>print(head(pairs)) ## works
>p <- polr( y ~ x , method="probit", data=pairs)
>print(summary(p))
>
>pairs is saved as a name. eventually, summary.polr thinks it is the
>pair function, not the pair data frame.
>
>/iaw
>
>----
>Ivo Welch (ivo.welch at gmail.com)
>
>
>On Mon, May 13, 2013 at 11:43 AM, Achim Zeileis
><Achim.Zeileis at uibk.ac.at> wrote:
> > On Mon, 13 May 2013, ivo welch wrote:
> >
> >> dear R experts---how do I determine what summary(polr( y ~ x )) calls?
> >> it is not summary.lm(polr(y~x)) or summary.mlm or summary.glm, or
> >> stats:::summary.lm or ... in fact, none of the summary<esc> methods
> >> seem to invoke what summary invokes.
> >
> >
> > MASS:::summary.polr because polr() returns a "polr" object.
> >
> > Best,
> > Z
> >
> >> advice, as always, appreciated.
> >>
> >> regards,
> >>
> >> /iaw
> >>
> >> ----
> >> Ivo Welch (ivo.welch at gmail.com)
> >>
> >> ______________________________________________
> >> R-help at r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-help
> >> PLEASE do read the posting guide
> >> http://www.R-project.org/posting-guide.html
> >> and provide commented, minimal, self-contained, reproducible code.
> >>
> >
>
>______________________________________________
>R-help at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list