critVal: Calculate critical value for multiple contrast test

Description Usage Arguments Value References See Also Examples

View source: R/planMCPMod.R

Description

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

Usage

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# 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)

Example output

Loading required package: mvtnorm
Loading required package: lattice
[1] 2.08292
[1] 2.559324

MCPMod documentation built on March 26, 2020, 7:28 p.m.