montecarlo {rPowerSampleSize} | R Documentation |
Monte carlo computation of power.
Description
This function approximates the power for a given sample size using a Monte Carlo simulation.
Usage
montecarlo(method, M = 100000, nE, r, m, nCovernE = 1, muC,
muE, d = rep(0.0, m), SigmaE, SigmaC, alpha =
0.05, q = 1, nbcores = parallel::detectCores() - 1, alternative =
"greater",
orig.Hochberg = FALSE)
Arguments
method |
"Bonferroni", "Holm" or "Hochberg". When |
M |
number of Monte Carlo repetitions. Dmitrienko et al. (2013)
suggested to take |
nE |
integer. Sample size for the experimental (test) group. |
r |
integer, r = 1, ..., m. Desired number of endpoints to be declared significant. |
m |
integer. Number of endpoints. |
nCovernE |
ratio of |
muC |
vector of length |
muE |
vector of length |
d |
vector of length |
SigmaE |
matrix indicating the covariances between the |
SigmaC |
matrix indicating the covariances between the |
alpha |
a value which corresponds to the chosen q-gFWER type-I control bound. |
q |
integer. Value of 'q' (q = 1, ..., m) in the q-gFWER of Romano et
al., which is the probability to make at least |
nbcores |
number of cores to use for the computations. |
alternative |
NOT USED YET. Character string specifying the alternative hypothesis, must be one of "two.sided", "greater" or "less". |
orig.Hochberg |
logical. To use the standard Hochberg's procedure. |
Value
rpowBonf or rpowHoch or rpowHolm |
List with one element giving the computed power. |
Author(s)
P. Lafaye de Micheaux, B. Liquet and J. Riou
References
Delorme P., Lafaye de Micheaux P., Liquet B., Riou, J. (2015). Type-II Generalized Family-Wise Error Rate Formulas with Application to Sample Size Determination. Submitted to Statistics in Medicine.
Romano J. and Shaikh A. (2006) Stepup Procedures For Control of Generalizations of the Familywise Error Rate. The Annals of Statistics, 34(4), 1850–1873.