I'm trying to make linear models in R, using the practicing datasets (sim1, sim2, sim3, sim4). So I used this code,
mod1 <- lm(y ~ x1 + x2, data = sim3)
mod1
And it printed this one.
Coefficients:
(Intercept) x1 x21 x22
1.8717 -0.1967 2.8878 4.8057
x23
2.3596
But I have no idea what x21, x22, x23 means. Can anyone tell me about it?
x2variable is a character-valued covariate with four levels. For each level after the third, you get a coefficient. The coefficients are estimates of the formula of your model. – Michael M Nov 26 '23 at 12:09