O'Reilly logo

Regression Analysis with R by Giuseppe Ciaburro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Model fitting

After carefully analyzing the data, it is time to build the logistic regression model to obtain a tool capable of predicting the class of new observations. To fit the logistic regression model, we can use the glm() function. This function is used to fit generalized linear models, specified by giving a symbolic description of the linear predictor and a description of the error distribution.

Generalized linear models are extensions of traditional regression models that allow the mean to depend on the explanatory variables through a link function, and the response variable to be any member of a set of distributions called the exponential family (such as Binomial, Gaussian, Poisson, and others).

The first thing to do is set up the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required