Changelog
Source:NEWS.md
regressinator 0.1.3
CRAN release: 2024-01-11
This version fixes several bugs that arose during classroom use.
-
Simulation functions (
model_lineup()
,parametric_boot_distribution()
, andsampling_distribution()
) now check to determine if the model being simulated from was fit using thedata =
argument, and issue an error if it was not. The simulations work by callingupdate(fit, data = ...)
with newly simulated data, andupdate()
uses this to call the model fit function again with the specifieddata =
argument. But if the model was fit without one, the argument is unused, and the simulations just reuse the original data.For example, if you fit this model:
bad_fit <- lm(cars$dist ~ cars$speed)
the simulation functions cannot work correctly because even with a different
data =
argument, the model fit will still refer tocars
. The model should be fit like this:good_fit <- lm(dist ~ speed, data = cars)
To prevent simulation problems, a suitable error is issued, so the user can refit the model correctly.
response()
now correctly detects when theerror_scale
argument was missing and issues the appropriate error.augment_longer()
now supports models with factor predictors. If there are some factors and some continuous predictors, the factors are omitted from the result; if the predictors are all factors, they are kept.parametric_boot_distribution()
now supports simulations whenalternative_fit
uses predictors that were not used infit
. Previously, these would fail because the simulated data frame only contained the predictors used infit
. Supply the newdata
argument to specify the data frame used in simulations.