From ?polr you find:
"The response should be a factor (preferably an ordered factor),
which will be interpreted as an ordinal response, with levels
ordered as in the factor."
See ?ordered for how to create an ordered factor from your variable.
C. Spanou wrote:
Hello Splus users, I really need your help on this one. I am trying to
fit the polr model in library(MASS) again. I have a variable taking
values 1,2 and 3 where 1:motorways 2:urban roads and 3:trunk roads. I
was wondering if I could leave the variable as it is and fit the model
or I need first to treat it as a factor. In the case I leave it as it is
(I mean numeric) is it wrong? Thank you Charis
--
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 452-1424 (M, W, F)
fax: (917) 438-0894
|