Re: [R] GLM: Classification problem. Help!

2009-11-18 Thread David Winsemius
On Nov 18, 2009, at 5:12 PM, J_Laberga wrote: Hello, I need help with this. Let's say that I have n features that I want to use to predict which class an observation belongs to. Using training data I try to do the following: training$result <- as.factor(training$result) model <- glm(res

Re: [R] GLM: Classification problem. Help!

2009-11-18 Thread Max Kuhn
> What am I missing? A trip to the help page. predict.glm has details on the "type" argument specific to this situation: "the type of prediction required. The default is on the scale of the linear predictors; the alternative "response" is on the scale of the response variable. Thus for a default

[R] GLM: Classification problem. Help!

2009-11-18 Thread J_Laberga
Hello, I need help with this. Let's say that I have n features that I want to use to predict which class an observation belongs to. Using training data I try to do the following: > training$result <- as.factor(training$result) > model <- glm(result ~., family=binomial("logit"), data = training)

[R] GLM: Classification problem. Help!

2009-11-18 Thread John
Hello, I need help with this. Let's say that I have n features that I want to use to predict which class an observation belongs to. Using training data I try to do the following: > training$result <- as.factor(training$result) > model <- glm(result ~., family=binomial("logit"), data = training) H