lm()
lm()
The
lm()
function fits a linear model to data.
Example 1:
# fits an empty model
lm(
Thumb
~ NULL, data =
Fingers
)
Example of output from running the code above:
Example 2:
# fits a model with one explanatory variable
lm(
Thumb
~
Gender
, data =
Fingers
)
Example of output from running the code above: