R/ols-boot-residual.R
comp_boot_res.Rd
comp_boot_res
is a wrapper for the empirical bootstrap of
a fitted lm
model.
comp_boot_res(mod_fit, B = 100)
mod_fit | An object of class |
---|---|
B | Bootstrap repetitions or number of bootstrap samples to be drawn. |
A list containing the following elements.
var_type
: The type of estimator for the variance of the coefficients
estimates. An abbreviated string representing the
type of the estimator of the variance (var_type_abb
).
var_summary
: A tibble containing the summary statistics for the model:
terms (term
), standard errors (std.error
),
statistics (statistic
), p-values (p.values
). The format
of the tibble is exactly identical to the one generated by
tidy
, but the standard errors and p-values are computed
via the bootstrap.
var_assumptions
: The assumptions under which the estimator of the
variance is consistent.
cov_mat
: The covariance matrix of the coefficients estimates.
boot_out
: A tibble of the model's coefficients estimated (term
and
estimate
) on the bootstrapped datasets,
the size of the original dataset (n
), and the number of the
bootstrap repetition (b
). In case of empirical bootstrap, it will
also contain the size of each bootstrapped dataset (m
).
The residual bootstrap consists of fitting the chosen statistical
model (mod_fit
) B
times. Each of the B
datasets
consists of the original independent variables and of dependent variable
given by the sum of the estimates of the original model and a
bootstrap versions of the residuals.