bootLM | R Documentation |
Nonparametric bootstrap (sampling cases with replacement) method for parameter estimation and confidence interval of a linear model.
bootLM(formula, data = NULL, R = 10000, alpha = 0.05)
formula |
a formula of type |
data |
an optional data frame, list or environment containing the variables in the model. |
R |
number of bootstrap samples. |
alpha |
the α-level to use as the threshold border. |
For all (x_i, y_i) datapoints, linear models are created by sampling R
times - with replacement - from n \in \{1 … N\} and building models Y_n = X_nβ + \varepsilon. This is also known as the .632-bootstrap, because the samples will, on average, contain 1 - e^{-1} = 0.632 unique elements.
Parameter estimates are obtained from each sampling, from which the average \overline{P_{n}} and standard error \frac{σ}{√ n} is calculated as well as a quantile based confidence interval. p-values are calculated through inversion of the confidence interval (boot.pval
).
A dataframe containing the estimated coefficients, their standard error, lower an upper confidence values and p-values.
Andrej-Nikolai Spiess
An Introduction to the Bootstrap.
Efron B, Tibshirani R.
Chapman & Hall (1993).
The Bootstrap and Edgeworth Expansion.
Hall P.
Springer, New York (1992).
Modern Statistics with R.
Thulin M.
Eos Chasma Press, Uppsala (2021).
## Example #1 with single influencers and insignificant model (p = 0.115). ## Jackknife estimates are robust w.r.t. outlier #18. set.seed(123) a <- 1:20 b <- 5 + 0.08 * a + rnorm(20, 0, 1) LM1 <- lm(b ~ a) bootLM(LM1, R = 1000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.