s-news
[Top] [All Lists]

Re: polr

To: "C. Spanou" <cs369@cam.ac.uk>
Subject: Re: polr
From: Chuck Cleland <ccleland@optonline.net>
Date: Sat, 19 Jun 2004 06:03:58 -0400
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <Prayer.1.0.11.0406191026250.27140@maroon.csi.cam.ac.uk>
References: <Prayer.1.0.11.0406191026250.27140@maroon.csi.cam.ac.uk>
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040608
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

<Prev in Thread] Current Thread [Next in Thread>