Re: [R] logistic regression: categorical value, and multinomial

From: John Fox <>
Date: Thu 28 Jul 2005 - 03:33:30 EST

Dear Ed,

See ?glm for fitting binomial logit models, and ?multinom (in the nnet package) for multinomial logit models. Neither function will handle a character ("text") variable as the response, but you could easily convert the variable to a factor.


John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4

> -----Original Message-----
> From:
> [] On Behalf Of Haibo Huang
> Sent: Wednesday, July 27, 2005 11:23 AM
> To:
> Subject: [R] logistic regression: categorical value, and multinomial
> I have two questions:
> 1. If I want to do a binomial logit, how to handle the
> categorical response variable? Data for the response
> variables are not numerical, but text.
> 2. What if I want to do a multinomial logit, still with
> categorical response variable? The variable has 5
> non-numerical response levels, I have to do it with a
> multinomial logit.
> Any input is highly appreciated! Thanks!
> Ed mailing list PLEASE do read the posting guide! Received on Thu Jul 28 03:37:30 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:34:05 EST