Learn R Programming

clusterPower (version 0.6.111)

crtpwr.2mean: Power calculations for simple cluster randomized trials, continuous outcome

Description

Compute the power of a simple cluster randomized trial with a continuous outcome, or determine parameters to obtain a target power.

Usage

crtpwr.2mean(alpha = 0.05, power = 0.8, m = NA, n = NA, cv = 0,
  d = NA, icc = NA, varw = NA, method = c("taylor", "weighted"),
  tol = .Machine$double.eps^0.25)

Arguments

alpha

The level of significance of the test, the probability of a Type I error.

power

The power of the test, 1 minus the probability of a Type II error.

m

The number of clusters per condition. It must be greater than 1.

n

The mean of the cluster sizes, or a vector of cluster sizes for one arm.

cv

The coefficient of variation of the cluster sizes. When cv = 0, the clusters all have the same size.

d

The difference in condition means.

icc

The intraclass correlation.

varw

The within-cluster variation.

method

The method for calculating variance inflation due to unequal cluster sizes. Either a method based on Taylor approximation of relative efficiency ("taylor"), or weighting by cluster size ("weighted")

tol

Numerical tolerance used in root finding. The default provides at least four significant digits.

Value

The computed argument.

Details

Exactly one of alpha, power, m, n, nsd, d, icc, and varw must be passed as NA. Note that alpha, power, and nsd have non-NA defaults, so if those are the parameters of interest they must be explicitly passed as NA.

If n is a vector the values, m and cv will be recalculated using the values in n. If n is a vector and method is "taylor", the exact relative efficiency will be calculated as described in van Breukelen et al (2007).

References

Eldridge SM, Ukoumunne OC, Carlin JB. (2009) The Intra-Cluster Correlation Coefficient in Cluster Randomized Trials: A Review of Definitions. Int Stat Rev. 77: 378-394.

Eldridge SM, Ashby D, Kerry S. (2006) Sample size for cluster randomized trials: effect of coefficient of variation of cluster size and analysis method. Int J Epidemiol. 35(5):1292-300.

van Breukelen GJP, Candel MJJM, Berger MPF. (2007) Relative efficiency of unequal versus equal cluster sizes in cluster randomized and multicentre trials. Statist Med. 26:2589-2603.

Examples

Run this code
# NOT RUN {
# Find the number of clusters per condition needed for a trial with alpha = .05, 
# power = 0.8, 10 observations per cluster, no variation in cluster size, a difference 
# of 1 unit,  icc = 0.1 and   a variance of five units.
crtpwr.2mean(n=10 ,d=1, icc=.1, varw=5)
# 
# The result, showimg m of greater than 15, suggests 16 clusters per condition should be used.
# }

Run the code above in your browser using DataLab