wild.boot: Wild Bootstrap in Linear Models

Description Usage Arguments Details Value Author(s) References Examples

Description

This function performs the wild/external bootstrap in linear models as described by Wu (1986) <doi:10.1214/aos/1176350142>. Linear models incorporating categorical and/or quantitative predictor variables with a quantitative response are allowed. The function output creates the bootstrap sampling distribution for each coefficient. Estimation is performed via least squares.

Usage

1
wild.boot(formula, B = 1000, data = NULL, seed = NULL, bootDistn = "normal")

Arguments

formula

input a linear model formula of the form response~predictors as you would in the lm() function. All variables must contain non-missing entries.

B

number of bootstrap samples. This should be a large, positive integer value.

data

optionally, input the name of the dataset where variables appearing in the model are stored.

seed

optionally, set a value for the seed for the bootstrap sample generation. The default NULL will pick a random value for the seed.

bootDistn

distribution used to create the wild bootstrap weights for the residuals. Allowed distributions include "normal", "uniform", "exponential", "laplace", "lognormal", "gumbel", "t5", "t8", and "t14". The numbers after the t-distributions indicate the degrees of freedom. Any selected distribution creates weights with mean 0 and variance 1 from the named distribution.

Details

Currently, the user must manipulate the output of the function to conduct hypothesis tests and create confidence intervals for the predictor coefficients. More convenient/streamlined output is expected in future package versions.

Value

bootEstParam

matrix containing the bootstrap parameter estimates. Each column corresponds to a coefficient. There are B rows, each corresponding to a bootstrap sample.

origEstParam

vector containing the least squares parameter estimates. These are the same as estimates obtained from lm.

seed

numerical value set for the seed. This is associated with the set of bootstrap parameter estimates and helps the process to be reproducible.

bootDistn

type of distribution used to generate the wild bootstrap weights for the residuals

Author(s)

Megan Heyman, heyman@rose-hulman.edu

References

Wu, C.F.J. (1986). "Jackknife, Bootstrap, and Other Resampling Methods in Regression Analysis." Annals of Statistics. Vol. 14, No. 4, pp.1261 - 1295.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
Seed <- 14
set.seed(Seed)
y <- rnorm(20) #randomly generated response
x <- rnorm(20) #randomly generated predictor
WildObj <- wild.boot(y~x, B=100, seed=Seed) #perform the wild bootstrap

#plot the sampling distribution of the slope coefficient
hist(WildObj$bootEstParam[,2], main="Wild Bootstrap Sampling Distn.",
     xlab="Slope Estimate") 

#bootstrap 95% CI for slope parameter (percentile method)
quantile(WildObj$bootEstParam[,2], probs=c(.025, .975))

Example output

sh: 1: cannot create /dev/null: Permission denied
      2.5%      97.5% 
-0.4409904  0.4166194 

lmboot documentation built on June 3, 2019, 5:03 p.m.