View source: R/bootstrap_lm_null.R
bootstrap_residual_null | R Documentation |
This is the workhorse for the compare_models()
function when a linear
model is specified. Given two linear models, one nested within the other, the
null distribution of the test statistic comparing the two models is estimated
via a residual bootstrap (or wild bootstrap). This is not meant to be called
by the user directly.
bootstrap_residual_null(fit1, fit0, reps, wild, construct)
fit1 |
|
fit0 |
|
reps |
scalar; number of bootstrap replications to perform. |
wild |
boolean; if |
construct |
string defining the type of construct to use when generating
from the distribution for the wild bootstrap (see |
vector of length reps
containing the test statistic from each
bootstrap replication. It also has an attribute containing an ANOVA table
comparing the two models.
## Not run:
fit1 <- lm(mpg ~ hp, data = mtcars)
fit0 <- lm(mpg ~ 1, data = mtcars)
boot_residual_null(fit1, fit0, reps = 4999, wild = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.