bonferroniIntervals: Compute Bonferroni Intervals

Description Usage Arguments Details Value See Also Examples

Description

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

Usage

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

Details

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

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.

See Also

asymmetricIntervals, bootstrapIntervals

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="")
bonferroniIntervals(Xmat, alpha=0.1, k=4)

Example output

Loading required package: boot
            fit        lwr       upr
p.5  0.36769295 -0.4417671 1.1771530
p.1  0.35725884 -0.4522012 1.1667189
p.4  0.09390776 -0.7155523 0.9033678
p.2 -0.16182108 -0.9712811 0.6476390

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