January 2018
Beginner to intermediate
422 pages
9h 47m
English
We previously said that the lm() function creates a LinearModel object, comprising used data, model description, diagnostic information, and fitted coefficients for a linear regression. Now, we will use some of these properties to extract further knowledge from the model.
The values in the lm object depend on the type of model we have built. In this regard, it should be noted that the lm() function can be used to carry out regression, single stratum analysis of variance, and analysis of covariance. To see exactly what a linear model fit produces, try the names function:
names(LModel)
For LModel, the result are shown as follows:
> names(LModel) [1] "coefficients" "residuals" "effects" "rank" "fitted.values" "assign" ...
Read now
Unlock full access