O'Reilly logo

Practical Predictive Analytics by Ralph Winters

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

Linear regression using GLM

In Chapter 1, Getting Started with Predictive Analytics, our original example that we used to predict womens' heights based upon womens' weights used the lm package. We could also have used the glm package, specifying family=Gaussian as the link function:

lm_output <-  lm(women$height ~ women$weight) 

or:

glm_output <-  glm(women$height ~ women$weight,family=gaussian) 

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