From: Anneley on
I am looking for a function to undertake a logistic regression where the dependent variable is binary 0 or 1, and the independent variables are continuous, with one categorical dataset. The problem I'm coming across is that if I use 'mnrfit' it states that Y should contain positive integer category numbers. Do I just change my dependent variable to be 1 or 2 instead, or am I using the wrong function?
From: Tom Lane on
>I am looking for a function to undertake a logistic regression where the
>dependent variable is binary 0 or 1, and the independent variables are
>continuous, with one categorical dataset. The problem I'm coming across is
>that if I use 'mnrfit' it states that Y should contain positive integer
>category numbers. Do I just change my dependent variable to be 1 or 2
>instead, or am I using the wrong function?

You can change the category numbers. You may find it simpler, though, to use
glmfit.

Either way, you'll want to create dummy variables for the categorical
variable, if it is to be used as a predictor. (I can't tell from your note
if that is the case.)

-- Tom