Description Usage Arguments Details Value Author(s) References Examples
This function performs the paired bootstrap in linear models as described by Efron (1979, ISBN:978-1-4612-4380-9). 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.
1 | paired.boot(formula, B = 1000, seed = NULL, data = NULL)
|
formula |
input a linear model formula of the form |
B |
number of bootstrap samples. This should be a large, positive integer value. |
seed |
optionally, set a value for the seed for the bootstrap sample generation. The default |
data |
optionally, input the name of the dataset where variables appearing in the model are stored. |
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.
bootEstParam |
matrix containing the bootstrap parameter estimates. Each column corresponds to a
coefficient. There are |
origEstParam |
vector containing the least squares parameter estimates. These are the same as
estimates obtained from |
seed |
numerical value set for the seed. This is associated with the set of bootstrap parameter estimates and helps the process to be reproducible. |
Megan Heyman, heyman@rose-hulman.edu
Efron, B. (1979). "Bootstrap methods: Another look at the jackknife." Annals of Statistics. Vol. 7, pp.1-26.
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
PairObj <- paired.boot(y~x, B=100, seed=Seed) #perform the paired bootstrap
#plot the sampling distribution of the slope coefficient
hist(PairObj$bootEstParam[,2], main="Paired Bootstrap Sampling Distn.",
xlab="Slope Estimate")
#bootstrap 95% CI for slope parameter (percentile method)
quantile(PairObj$bootEstParam[,2], probs=c(.025, .975))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.