critVal {MCPMod}R Documentation

Calculate critical value for multiple contrast test

Description

This function calculates the critical value for a multiple contrast test via numerical integration (using the methods implemented in the mvtnorm package).

Usage

critVal(cMat, n, alpha = 0.025, control = mvtnorm.control(),
        twoSide = FALSE, corMat = NULL)

Arguments

cMat

A matrix with the contrasts in the columns

n

A vector giving the sample size per group. If only one number is specified it is assumed that the sample sizes are balanced.

alpha

Level of significance (defaults to 0.025)

control

A list of options for the pmvt and qmvt functions as produced by mvtnorm.control

twoSide

Logical indicating if two or one-sided critical value should be calculated.

corMat

Optional: correlation of contrasts matrix can be specified

Value

Critical value

References

Bretz, F., Pinheiro, J. and Branson, M. (2005), Combining Multiple Comparisons and Modeling Techniques in Dose-Response Studies, Biometrics, 61, 738–748

Hothorn, T., Bretz, F., and Genz, A. (2001), On multivariate t and Gauss probabilities in R, R News, 1, 27–29

See Also

planMM, mvtnorm.control

Examples

# Calculation of critical value for Dunnett test
# Set up contrast matrix (3 active doses)
CM <- rbind(-1,diag(3))
# 30 patients per group, one-sided alpha 0.05
critVal(CM, n=30, alpha = 0.05)
# Example from R News 1(2) p. 28, 29
CM <- c(1, 1, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0,
       1, 0, 0, 0, -1, -1, 0, 0, -1, 0, 0)
CM <- t(matrix(CM, ncol = 5))
critVal(CM, n=c(26, 24, 20, 33, 32), alpha = 0.05, 
    twoSide = TRUE)

[Package MCPMod version 1.0-10.1 Index]