Skip to content
Back to formatted view

Raw Message

Message-ID: <6F57CFB4-A013-427A-829D-9180CD314BE6@comcast.net>
Date: 2009-11-16T19:32:53Z
From: David Winsemius
Subject: fitting a logistic regression with mixed type of variables
In-Reply-To: <124ea520911161122q327051c7ga383ba33bb6e2a8a@mail.gmail.com>

On Nov 16, 2009, at 2:22 PM, Jack Luo wrote:

> Hi,
>
> I am trying to fit a logistic regression using glm, but my explanatory
> variables are of mixed type: some are numeric, some are ordinal,  
> some are
> categorical, say
>
> If x1 is numeric, x2 is ordinal, x3 is categorical, is the following  
> formula
> OK?

The formula's certainly "OK". What may be non-OK will be your  
understanding of the output. The default handling of ordinal factors  
is a common source of questions to R-help, so read up first.
>
> *model <- glm(y~x1+x2+x3, family=binomial(link="logit"),  
> na.action=na.pass)*

Why have you chosen that na.action option?

-- 
David Winsemius, MD
Heritage Laboratories
West Hartford, CT