[R] what does summary(polr(...)) really call? --- and obscure buglet

ivo welch ivo.welch at gmail.com
Mon May 13 22:31:08 CEST 2013


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



More information about the R-help mailing list