[R] GLM: Classification problem. Help!

Max Kuhn mxkuhn at gmail.com
Thu Nov 19 03:44:04 CET 2009


> 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 binomial model the default
predictions are of log-odds (probabilities on logit scale) and type =
"response" gives the predicted probabilities. The "terms" option
returns a matrix giving the fitted values of each term in the model
formula on the linear predictor scale."

You will have to do the conversion to the class estimate.

-- 

Max




More information about the R-help mailing list