Allows user to calculate the required number of clusters per treatment group of a cluster-randomized trial with two co-primary outcomes given a set of study design input values, including the statistical power, and cluster size. Uses the conjunctive intersection-union test approach.Code is adapted from "calSampleSize_ttestIU()" from https://github.com/siyunyang/coprimary_CRT written by Siyun Yang.
calc_K_conj_test(
dist = "T",
power,
m,
alpha = 0.05,
beta1,
beta2,
varY1,
varY2,
rho01,
rho02,
rho1,
rho2,
r = 1,
cv = 0,
deltas = c(0, 0),
two_sided = FALSE
)
A data frame of numerical values.
Specification of which distribution to base calculation on, either 'T' for T-Distribution or 'MVN' for Multivariate Normal Distribution. Default is T-Distribution.
Desired statistical power in decimal form; numeric.
Individuals per cluster; numeric.
Type I error rate; numeric.
Effect size for the first outcome; numeric.
Effect size for the second outcome; numeric.
Total variance for the first outcome; numeric.
Total variance for the second outcome; numeric.
Correlation of the first outcome for two different individuals in the same cluster; numeric.
Correlation of the second outcome for two different individuals in the same cluster; numeric.
Correlation between the first and second outcomes for two individuals in the same cluster; numeric.
Correlation between the first and second outcomes for the same individual; numeric.
Treatment allocation ratio - K2 = rK1 where K1 is number of clusters in experimental group; numeric.
Cluster variation parameter, set to 0 if assuming all cluster sizes are equal; numeric.
Vector of non-inferiority margins, set to delta_1 = delta_2 = 0; numeric vector.
Specification of whether to conduct two 2-sided tests, 'TRUE', or two 1-sided tests, 'FALSE', default is FALSE; boolean.
calc_K_conj_test(power = 0.8, m = 300, alpha = 0.05,
beta1 = 0.1, beta2 = 0.1, varY1 = 0.23, varY2 = 0.25,
rho01 = 0.025, rho02 = 0.025, rho1 = 0.01, rho2 = 0.05)
Run the code above in your browser using DataLab