bootstrapIntervals: Compute Bootstrap Intervals

Description Usage Arguments Details Value See Also Examples

Description

This function will apply the Bonferroni correction to bootstrap intervals of the mean of the selected populations.

Usage

1
2
bootstrapIntervals(X, alpha = 0.05, k = 2, R = 10,
  return.obj = "intervals", type = "basic", ...)

Arguments

X

is a matrix or data frame that contains the responses. Each column represents a different population.

alpha

denotes the significance level of the intervals to be formed.

k

corresponds to the number of populations to be selected.

R

denotes the number of bootstrap replicate samples to produce.

return.obj

is a character vector of length 1, indicating if this function should return the output of the boot() function, or proceed to compute the bootstrap confidence intervals and return those.

type

is a character vector of length one. It should be one of the following: "norm","basic", "stud", "perc" or "bca".

...

denotes further arguments that will be passed to the boot function.

Details

The bootstrap that is carried out is the stratified bootstrap, since there are p population in consideration. Within each population, sampling with replacement is carried out, and the largest k sample means are returned.

The user can use any of the 5 confidence interval methods that are present in the boot.ci function. However, a Bonferroni correction will be carried out in order to ensure that the intervals hold simultaneously.

Value

If return.obj is set to be "boot", then the function returns an object of class "boot". Otherwise, if return.obj is set to be "intervals", then this function returns a matrix with k rows and 3 columns. This is similar to the output of the predict.lm function of R.

See Also

bonferroniIntervals, asymmetricIntervals

Examples

1
2
3
4
5
set.seed(18)
p <- 10; n <- 10
Xmat <- matrix(rnorm(p*n), nrow=n, ncol=p)
colnames(Xmat) <- paste("p.", 1:p, sep="")
bootstrapIntervals(Xmat, alpha=0.1, k=4)

popKorn documentation built on May 2, 2019, 8:31 a.m.