Skip to content
Prev 360835 / 398506 Next

factor variables in logistic regression

On 05/11/2016 08:00 AM, ch.elahe via R-help wrote:
First of all, lm() is for linear regression, not logistic regression. 
For logistic regression you need to use glm() and make sure you set the 
correct family (see ?glm). I don't recall if glm() accepts a factor 
outcome but if not, you would need to re-code it to 0/1.

Kevin