R linear-model formula
= R linear-model formula
{c}
In R, `lm(y ~ 1, data=d)` fits an intercept-only linear model, `lm(y ~ x1 + x2, data=d)` adds quantitative predictors, and a factor predictor is expanded into indicator columns.
= R linear-model formula
{c}
In R, `lm(y ~ 1, data=d)` fits an intercept-only linear model, `lm(y ~ x1 + x2, data=d)` adds quantitative predictors, and a factor predictor is expanded into indicator columns.