r descr_models("linear_reg", "lm")
This engine has no tuning parameters.
linear_reg() %>% set_engine("lm") %>% translate()
However, the documentation in [stats::lm()] assumes 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 positive integers w_i
, that each response y_i
is the mean of w_i
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 freedom for the model (and other statistics) might be incorrect.
The "Fitting and Predicting with parsnip" article contains examples for linear_reg()
with the "lm"
engine.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.