coefficientPlots: Visualize bootstrapped sampling distribution for linear...

Description Usage Arguments Details Author(s) Examples

View source: R/coefficientPlots.R

Description

Visualize the bootstrapped sampling distribution for linear regression coefficients (Description)

Usage

1
coefficientPlots(lmodObs, bootList)

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}.

Details

This function plots the bootstrapped sampling distributions of linear regression coefficients obtained using six different 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. Each plot contains (k+1) facets where k is the number of predictors in the model. The least squares estimate of each regression coefficient is denoted with a red dashed line.

Author(s)

Natalie DelRocco

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)
coefficientPlots(lmodObs=lmod, bootList=bootsamps)

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