check_data_arg | R Documentation |
We simulate by passing simulated data arguments to update(). If the original fit does not use the data argument, and instead refers directly to variables in the environment, the simulations will not behave as expected. This may result in the "simulated" fits all using the original data, for instance.
check_data_arg(fit)
fit |
A fitted model object, whose call is to be examined |
For example, in lm(mtcars$mpg ~ mtcars$drat)
, simulating new data and
providing it in data =
will not change the data used for fitting.
Detect a missing data
argument and abort. It is still possible to provide
data
but also refer directly to the calling environment, but this is harder
to detect.
No value. Raises an error if no data
argument was used in fit
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.