Skip to content

retrieving weights from a polr object

3 messages · John Fox, Yihui Xie

#
Dear list members,

The polr() function in the MASS package takes an optional weights argument
for case weights. Is there any way to retrieve the case weights from the
fitted "polr" object? Examining both the object and the code, I don't see
how this can be done, but perhaps I've missed something.

Any help would be appreciated.

John

------------------------------
John Fox, Professor
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
web: socserv.mcmaster.ca/jfox
#
Hi John,

Aren't they in the component 'model' of the fitted object?

##
Sat   Infl  Type Cont (weights)
1    Low    Low Tower  Low        21
2 Medium    Low Tower  Low        21
3   High    Low Tower  Low        28
4    Low Medium Tower  Low        34
5 Medium Medium Tower  Low        22
6   High Medium Tower  Low        36
[1] 21 21 28 34 22 36 10 11 36 61 23 17 43 35 40 26 18 54 13  9 10  8
 8 12  6  7  9 18  6  7 15 13 13  7  5 11 14 19 37 17 23 40  3  5 23
78 46 43 48 45 86
[52] 15 25 62 20 23 20 10 22 24  7 10 21 57 23 13 31 21 13  5  6 13
##

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin University of China, Beijing, 100872, China
On Sun, Sep 28, 2008 at 3:00 AM, John Fox <jfox at mcmaster.ca> wrote:
#
Dear Yihui,

Yes, that's right. The reason that I missed it is that I checked a model
that had been fit without a weights argument, that doesn't work even for an
"lm" object (but does for a "multinom" object, produced by multinom() in the
nnet package, which is what threw me off).

Thank you very much,
 John
housing)
argument
see