factorial2x2 (version 0.1.0)

crit2x2: Critical values for the 2/3-1/3, 1/3-1/3-1/3, and 1/2-1/2 procedures

Description

Computes the critical values for null hypotheses rejection and corresponding nominal two-sided significance levels for the 2/3-1/3, 1/3-1/3-1/3, and 1/2-1/2 procedures.

Usage

crit2x2(corAa, corAab, coraab, dig = 2, alpha = 0.05, niter = 5,
  abseps = 1e-05, tol = 1e-04)

Arguments

corAa

correlation between the overall A and simple A log hazard ratio estimates

corAab

correlation between the overall A and simple AB log hazard ratio estimates

coraab

correlation between the simple A and simple AB log hazard ratio estimates

dig

number of decimal places to which we roundDown the critical value

alpha

two-sided familywise error level to control

niter

number of times we compute the critical values to average out the randomness from the pmvnorm function call

abseps

abseps setting in the pmvnorm function call

tol

tol setting in the uniroot function call

Value

crit23A

2/3-1/3 procedure's critical value for the overall A statistic

sig23A

two-sided nominal significance level corresponding to crit23A

crit23ab

2/3-1/3 procedure's critical value for the simple AB statistic

sig23ab

two-sided nominal significance level corresponding to crit23ab

crit13

1/3-1/3-1/3 procedure's critical value for all three test statistics

sig13

two-sided nominal significance level corresponding to crit13

crit12

1/2-1/2 procedure's critical value for the simple A and AB statistics

sig12

two-sided nominal significance level corresponding to crit12

Details

pmvnorm uses a random seed in its algorithm. To smooth out the randomness, pmvnorm is called niter times. The roundDown function is used in conjunction with the dig argument to insure that any rounding of the (negative) critical values will be done conservatively to control the familywise type I error at the desired level.

References

Leifer, E.S., Troendle, J.F., Kolecki, A., Follmann, D. Joint testing of overall and simple effect for the two-by-two factorial design. 2019. Submitted.

Slud, E.V. Analysis of factorial survival experiments. Biometrics. 1994; 50: 25-38.

See Also

roundDown. eventProb, lgrkPower, strLgrkPower, pmvnorm

Examples

Run this code
# NOT RUN {
# Example 1:  Compute the nominal significance levels for rejection using
# the asymptotic correlations derived in Slud (1994)
corAa  <- 1/sqrt(2)
corAab <- 1/sqrt(2)
coraab <- 1/2

crit2x2(corAa, corAab, coraab, dig = 2, alpha = 0.05, niter = 5)
# crit23A
# [1] -2.13

# sig23A
# [1] 0.03317161

# crit23ab
# [1] -2.24

# sig23ab
# [1] 0.02509092

# crit13
# [1] -2.32

# sig13
# [1] 0.02034088

# crit12
# [1] -2.22

# sig12
# [1] 0.02641877

# Example 2:  Compute the nominal critical values and significance levels for rejection
# using the estimated correlations for simdat.
corAa  <- 0.6123399
corAab <- 0.5675396
coraab <- 0.4642737

crit2x2(corAa, corAab, coraab, dig = 2, alpha = 0.05, niter = 5)
# $crit23A
# [1] -2.13

# $sig23A
# [1] 0.03317161

# $crit23ab
# [1] -2.3

# $sig23ab
# [1] 0.02144822
#
# $crit13
# [1] -2.34
# $sig13
# [1] 0.01928374

# $crit12
# [1] -2.22
# }

Run the code above in your browser using DataLab