Description Usage Arguments Details Value Note Authors References Examples
View source: R/cpa.irgtt.binary.R
Compute the power of an individually randomized group treatment trial (IRGTT) design with a binary outcome, or determine parameters to obtain a target power.
1 2 3 4 5 6 7 8 9 10 11 12 |
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. |
nclusters |
The number of clusters in the intervention arm. |
nsubjects |
The number of subjects in each cluster in the intervention arm. |
ncontrols |
The number of subjects in the control arm. |
ICC |
The intracluster correlation coefficient, the correlation in outcome measurements between two individuals from the same cluster in the intervention arm. |
p2 |
The expected probability of the outcome in the intervention arm. |
p1 |
The expected probability of the outcome in the control arm. |
decrease |
Whether or not the proportion in the intervention arm is expected to be less than the proportion in the control arm. If TRUE it is assumed p2 < p1, while FALSE implies p2 > p1. |
tol |
Numerical tolerance used in root finding. The default provides at least four significant digits. |
Exactly one of alpha
, power
, nclusters
, nsubjects
,
ncontrols
, ICC
, p2
, and p1
must be passed as NA
. Note that alpha
and power
have non-NA
defaults, so if those are the parameters of
interest they must be explicitly passed as NA
.
The computed argument.
This function was inspired by work from Stephane Champely (pwr.t.test) and Peter Dalgaard (power.t.test). As with those functions, 'uniroot' is used to solve power equation for unknowns, so you may see errors from it, notably about inability to bracket the root when invalid arguments are given.
Jonathan Moyer (jon.moyer@gmail.com), Ken Kleinman (ken.kleinman@gmail.com)
Moerbeek, M. and Wong, W. K. (2008) Sample size formulae for trials comparing group and individual treatments in a multilevel model. Statist. Med., 27:2850-2864. doi: 10.1002/sim.3115.
1 2 3 4 5 6 7 8 9 10 11 | # Find the required number of subjects per intervention cluster an IRGTT with alpha = 0.05,
# power = 0.80, nclusters = 23, ncontrols = 146, ICC = 0.05, p2 = 0.397, and p1 = 0.243.
cpa.irgtt.binary(nclusters=23, ncontrols = 146,
ICC = 0.05, p2 = 0.397, p1 = 0.243, decrease = FALSE)
#
# The result, nsubjects = 7.96624, suggests 8 subjects per cluster
# in the intervention arm should be recruited.
# This means that the total number of subjects in the
# study is nclusters * nsubjects + ncontrols = 23 * 8 + 146 = 330.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.