Description Usage Arguments Value Examples
comp_mms_var
returns a list containing the requested estimates of the
variance, together with the assumptions behind which these estimates are
consistent.
1 2 3 4 5 6 7 | comp_mms_var(
mod_fit,
boot_emp = NULL,
boot_sub = NULL,
boot_res = NULL,
boot_mul = NULL
)
|
mod_fit |
An lm (OLS) object |
boot_emp |
(list) In the case of empirical bootstrap the expected input
is of the form #' |
boot_sub |
(list) TODO: ADD |
boot_res |
(list) : In the case of residual bootstrap the expected
input is of the form |
boot_mul |
(list) : In the case of multiplier bootstrap the expected
input is of the form |
A list containing the several types of variance estimates requested
by the user, including the sandwich and the the variance returned by
lm
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
# Simulate data from a linear model
set.seed(35542)
n <- 1e2
X <- stats::rnorm(n, 0, 1)
y <- 2 + X * 1 + stats::rnorm(n, 0, 1)
# Fit the linear model using OLS (ordinary least squares)
mod_fit <- stats::lm(y ~ X)
# Run the multiplier bootstrap on the fitted (OLS) linear model
set.seed(162632)
out <- comp_mms_var(mod_fit,
boot_mul = list(B = 100, weights_type = "rademacher"),
boot_sub = list(B = 100, m = 50))
# print output
print(out)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.