r descr_models("linear_reg", "lm")

Tuning Parameters

This engine has no tuning parameters.

Translation from parsnip to the original package

linear_reg() %>% 
  set_engine("lm") %>% 
  translate()

Preprocessing requirements


Case weights


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 freedown for the model (and other statistics) might be incorrect.

Saving fitted model objects


Examples

The "Fitting and Predicting with parsnip" article contains examples for linear_reg() with the "lm" engine.

References



Try the parsnip package in your browser

Any scripts or data that you put into this service are public.

parsnip documentation built on June 24, 2024, 5:14 p.m.