bootstrapConfInt: Compare bootstrapping methods for linear regression...

Description Usage Arguments Details Author(s) References Examples

View source: R/bootstrapConfInt.R

Description

Compare bootstrapped confidence intervals for linear regression coefficients.

Usage

1
bootstrapConfInt(lmodObs, bootList, level)

Arguments

lmodObs

The observed linear model estimated by least squares. A fitted model object of class inheriting from 'lm'.

bootList

A list containing the bootstrapped sampling distributions of linear regression coefficients. Each element in the list should contain a data frame obtained using one of the six supported bootstrapping methods of size B x (k+1) where k is the number of predictors in the model. Column i of the data frame will be a sample of size B from the sampling distribution of β_{i}.

level

The confidence level required. A real number between 0 and 1.

Details

This function compares the confidence intervals for linear regression coefficients obtained using each of six methods: case resampling, residual resampling, Wild bootstrap with Mammen's Two-Point Distribution, Wild bootstrap with Mammen's Continuous Distribution, Wild boostrap with Rademacher Distribution, and Wild bootstrap with Standard Normal Distribution. These are also compared to the model based confidence interval. Model based, normal approximation, and bootstrap percentile intervals are considered.

Author(s)

Natalie DelRocco

References

Davison, A.C. and Hinkley, D.V. (1997) Bootstrap Methods and Their Application. Cambridge University Press.

Examples

1
2
3
4
5
6
library(faraway)
data(prostate)
lmod <- lm(lpsa ~ lcavol + age + lweight, prostate)
bootsamps <- bootstrapSamples(lmodObs=lmod, formula='lpsa ~ lcavol + age + lweight',
                              data=prostate, B=1000)
bootstrapConfInt(lmodObs=lmod, bootList=bootsamps, level=0.95)

ndelrocco/lmBootCompare documentation built on Dec. 10, 2019, 12:38 p.m.