January 2018
Beginner to intermediate
422 pages
9h 47m
English
In the previous section, we adopted an algebraic approach to calculating the regression line. More generally, to create a linear regression model, we use the lm() function. This function creates a LinearModel object. The object of class lm has a series of properties that can be immediately viewed by simply clicking on it. These types of objects can be used for residual analysis and regression diagnosis.
LinearModel is an object comprised of data, model description, diagnostic information, and fitted coefficients for a linear regression.
Models for the lm() function are specified symbolically. In fact, the first argument of the function is an object of class formula. A typical formula object has the following ...