Learn R Programming

popKorn (version 0.3-0)

bonferroniIntervals: Compute Bonferroni Intervals

Description

This function will compute apply the Bonferroni correction to the selected populations.

Usage

bonferroniIntervals(X, alpha = 0.05, k = 2)

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.

Value

The function returns a matrix with k rows and 3 columns. This is similar to the output of the predict.lm function of R.

Details

If there are p populations, then the Bonferroni correction will be applied by using $\alpha / p$ instead of just p.

See Also

asymmetricIntervals, bootstrapIntervals

Examples

Run this code
set.seed(18)
p <- 10; n <- 10
Xmat <- matrix(rnorm(p*n), nrow=n, ncol=p)
colnames(Xmat) <- paste("p.", 1:p, sep="")
bonferroniIntervals(Xmat, alpha=0.1, k=4)

Run the code above in your browser using DataLab