Linear regression via lmSource:
stats::lm() uses ordinary least squares to fit models with numeric outcomes.
For this engine, there is a single mode: regression
## Linear Regression Model Specification (regression) ## ## Computational engine: lm ## ## Model fit template: ## stats::lm(formula = missing_arg(), data = missing_arg(), weights = missing_arg())
Factor/categorical predictors need to be converted to numeric values
(e.g., dummy or indicator variables) for this engine. When using the
formula method via
fit(), parsnip will
convert factor columns to indicators.
This model can utilize case weights during model fitting. To use them,
see the documentation in case_weights and the examples
However, the documentation in
that is specific type of case weights are being used: “Non-NULL weights
can be used to indicate that different observations have different
variances (with the values in weights being inversely proportional to
the variances); or equivalently, when the elements of weights are
w_i, that each response
y_i is the mean of
unit-weight observations (including the case that there are w_i
observations equal to
y_i and the data have been summarized). However,
in the latter case, notice that within-group variation is not used.
Therefore, the sigma estimate and residual degrees of freedom may be
suboptimal; in the case of replication weights, even wrong. Hence,
standard errors and analysis of variance tables should be treated with
care” (emphasis added)
Depending on your application, the degrees of freedown for the model (and other statistics) might be incorrect.
This model object contains data that are not required to make predictions. When saving the model for the purpose of prediction, the size of the saved object might be substantially reduced by using functions from the butcher package.