[Rd] nobs.glm

Wincent ronggui.huang at gmail.com
Tue Apr 24 15:36:35 CEST 2012


Hi all,

The nobs method  of (MASS:::polr class) takes into account of weight,
but nobs method of glm does not. I wonder what is the rationale of
such design behind nobs.glm. Thanks in advance. Best Regards.

> library(MASS)
> house.plr <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)
> house.logit <- glm(I(Sat=='High') ~ Infl + Type + Cont, binomial,weights = Freq, data = housing)
> nobs(house.plr)
[1] 1681
> nobs(house.logit)
[1] 72


-- 
Wincent Ronggui HUANG
Sociology Department of Fudan University
PhD of City University of Hong Kong
http://homepage.fudan.edu.cn/rghuang/cv/



More information about the R-devel mailing list