Title: | Sample Size Estimation Functions for Cluster Randomized Trials |
---|---|
Description: | Sample size estimation in cluster (group) randomized trials. Contains traditional power-based methods, empirical smoothing (Rotondi and Donner, 2009), and updated meta-analysis techniques (Rotondi and Donner, 2012). |
Authors: | Michael A Rotondi <[email protected]> |
Maintainer: | Michael A Rotondi <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.2 |
Built: | 2024-11-03 06:39:44 UTC |
Source: | CRAN |
This function provides detailed sample size estimation information to determine the number of subjects that must be enrolled in a cluster randomized trial to test for a significant difference in incidence rates.
n4incidence(le, lc, m, t, CV, alpha=0.05, power = 0.80, AR=1, two.tailed=TRUE, digits=3)
n4incidence(le, lc, m, t, CV, alpha=0.05, power = 0.80, AR=1, two.tailed=TRUE, digits=3)
le |
The anticipated incidence rate, |
lc |
The anticipated incidence rate, |
m |
The anticipated average (or actual) cluster size. |
t |
The planned follow-up time for the study (in weeks, months, etc.) |
CV |
The coefficient of variation, assumed constant over both the treatment and control groups.
Note that CV = |
AR |
The Allocation Ratio: AR |
alpha |
The desired type I error rate. |
power |
The desired level of power, recall power = 1 - type II error. |
two.tailed |
Logical, If TRUE calculations are based on a two-tailed type I error, if FALSE, a one-sided calculation is performed. |
digits |
Number of digits to round calculations. |
This function provides detailed information, similar to PROC POWER in SAS, but with less
functionality and more concise output. It is used for sample size estimation in
a cluster randomized trial where the outcome of interest is an incidence rate. A simple example may include
whether a new treatment can successfully reduce the incidence of heart attacks over a six month period.
In epidemiological terms, and
are the expected incidence rate of the outcome in the experimental and control group. Note that if the results suggest a small number of clusters is required, an iterative
procedure will include the T distribution instead of the normal critical value for alpha, iterating
until convergence. In some cases, such as small ICC values, the algorithm may fail to converge and may need to be stopped.
nE |
The minimum number of clusters required in the experimental group. |
nC |
The minimum number of clusters required in the control group. |
le |
The anticipated incidence rate, |
lc |
The anticipated incidence rate, |
m |
The anticipated average (or actual) cluster size. |
t |
The planned follow-up time for the study. |
CV |
The coefficient of variation. |
AR |
The Allocation Ratio: One implies an equal number of subjects per treatment and control groups. |
alpha |
The desired type I error rate. |
power |
The desired level of power. |
AR |
The Allocation Ratio. |
Michael Rotondi, [email protected]
Matthews JNS. Introduction to Randomized Controlled Clinical Trials (2nd Ed.) Chapman & Hall: New York, 2006.
Donner A and Klar N. Design and Analysis of Cluster Randomization Trials in Health Research. Arnold: London, 2000.
## Not run: Suppose a new drug is thought to reduce the incidence of HIV from 0.01 per person-year to 0.005 per person-year. Assume the coefficient of variation is 0.25 and that 1000 subjects will be followed for a two year period. Calculate the required number of subjects that must be enrolled in a study to detect this difference with alpha = 0.05 and power = 0.80. ## End(Not run) n4incidence(le=0.01, lc=0.005, m=1000, t=2, CV=0.25);
## Not run: Suppose a new drug is thought to reduce the incidence of HIV from 0.01 per person-year to 0.005 per person-year. Assume the coefficient of variation is 0.25 and that 1000 subjects will be followed for a two year period. Calculate the required number of subjects that must be enrolled in a study to detect this difference with alpha = 0.05 and power = 0.80. ## End(Not run) n4incidence(le=0.01, lc=0.005, m=1000, t=2, CV=0.25);
This function provides detailed sample size estimation information to determine the number of subjects that must be enrolled in a cluster randomized trial to compare two means.
n4means(delta, sigma, m, ICC, alpha=0.05, power=0.8, AR=1, two.tailed=TRUE, digits=3)
n4means(delta, sigma, m, ICC, alpha=0.05, power=0.8, AR=1, two.tailed=TRUE, digits=3)
delta |
The minimum detectable difference between population means. |
sigma |
The standard deviation of the outcome. |
m |
The anticipated average (or actual) cluster size. |
ICC |
The anticipated value of the intraclass correlation coefficient, |
AR |
The Allocation Ratio: AR=1 implies an equal number of subjects per treatment and control group (maximum efficiency), AR > 1, implies more subjects will be enrolled in the control group (e.g. in the case of costly intervention), AR < 1 implies more subjects in the treatment group (rarely used). |
alpha |
The desired type I error rate. |
power |
The desired level of power, recall power = 1 - type II error. |
two.tailed |
Logical, If TRUE calculations are based on a two-tailed type I error, if FALSE, a one-sided calculation is performed. |
digits |
Number of digits to round calculations. |
This function provides detailed sample size information, similar to PROC POWER in SAS, but with less functionality and more concise output, and adapted for the design of cluster randomized trial. It is used for sample size estimation in a cluster randomized trial where the outcome is continuous, e.g. blood pressure, or weight. Note that if the results suggest a small number of clusters is required, an iterative procedure will include the T distribution instead of the normal critical value for alpha, iterating until convergence. In some cases, such as small ICC values, the algorithm may fail to converge and may need to be stopped.
nE |
The minimum number of clusters required in the experimental group. |
nC |
The minimum number of clusters required in the control group. |
delta |
The minimum detectable difference between population means. |
sigma |
The standard deviation of the outcome. |
alpha |
The desired type I error rate. |
power |
The desired level of power, recall power = 1 - type II error. |
AR |
The Allocation Ratio. |
Michael Rotondi, [email protected]
Matthews JNS. Introduction to Randomized Controlled Clinical Trials (2nd Ed.) Chapman & Hall: New York, 2006.
Donner A and Klar N. Design and Analysis of Cluster Randomization Trials in Health Research. Arnold: London, 2000.
## Not run: Suppose we wish to test whether a blood pressure medication reduces diastolic blood pressure by 10 mm Hg, at standard significance and power, assume the standard deviation is 10 mm Hg. ## End(Not run) n4means(delta=10, sigma=1, m=25, ICC=0.05, alpha=0.05, power=0.80);
## Not run: Suppose we wish to test whether a blood pressure medication reduces diastolic blood pressure by 10 mm Hg, at standard significance and power, assume the standard deviation is 10 mm Hg. ## End(Not run) n4means(delta=10, sigma=1, m=25, ICC=0.05, alpha=0.05, power=0.80);
This function provides detailed sample size estimation information to determine the required number of clusters that must be enrolled in a cluster randomized trial using the empirical smoothing density for the ICC. The method applies a smoothed density function (including optional weighting) to obtain an empirical distribution for the ICC. Output includes quantiles of values of the required number of clusters to obtain a prespecified power level. This version assumes the outcome of interest is continuous.
n4meansEB(ICC, varICC=0, delta, from, to, sigma, m, iter=1000, alpha=0.05, power=0.8, two.tailed=TRUE, digits=3, plot=TRUE)
n4meansEB(ICC, varICC=0, delta, from, to, sigma, m, iter=1000, alpha=0.05, power=0.8, two.tailed=TRUE, digits=3, plot=TRUE)
ICC |
A vector of possible ICC values, obtained from a reasonable number of independent studies. These values form the basis of the empirical density function for the ICC. |
varICC |
A vector of variances of the ICC estimates. In some cases, it may be desirable to give greater weight (smaller variances) to estimates of the ICC that are obtained from larger samples. The default value is zero, which implies that all estimates are weighted equally. |
delta |
The anticipated mean difference in the planned study. |
from |
A lower limit representing the lowest plausible value for the ICC. This is used in the estimation of the ICC's empirical density function. The default value is zero as the ICC is assumed to be non-negative. |
to |
An upper bound for the plausible range of the ICC. A default value is not specified as this may range depending on the circumstances. |
sigma |
The anticipated variance in each group. |
m |
The anticipated average (or actual) cluster size. |
iter |
The total number of iterations. |
alpha |
The desired type I error rate. |
power |
The desired level of power, recall power = 1 - type II error. |
two.tailed |
Logical, If TRUE calculations are based on a two-tailed type I error, if FALSE, a one-sided calculation is performed. |
digits |
Number of digits to round calculations. |
plot |
Logical: Would you like a plot of the estimated density of the ICC and Histogram? |
This function estimates an empirical density for the ICC using the Gaussian kernel. Weights can be incorporated through the use of the varICC parameter. Values are sampled from this empirical density a large (iter) number of times and the resulting number of clusters that must be randomized to achieve a pre-specified power level is then calculated. The resulting output is the quantiles of the required number of clusters, illustrating the most likely values of the ICC and number of clusters required. Additional details are in Rotondi and Donner (2009).
ResRho |
A vector of values of sampled values of the ICC. This is of length iter. |
ResK |
A vector of values of the required number of clusters k, using the ICC values in ResRho. This is also of length iter. |
pe |
The anticipated proportion of individuals in the experimental group with the outcome. |
pc |
The anticipated proportion of individuals in the control group with the outcome. |
ICC |
The specified vector of values for the ICC. |
varICC |
A vector of variances of the ICC (study weights). |
from |
Lower bound in the ICC density estimation. Default of zero. |
to |
Upper bound in ICC Density Estimation. |
m |
The size of each cluster. |
alpha |
The desired type I error rate. |
power |
The desired level of power, recall power = 1 - type II error. |
two.tailed |
TRUE or FALSE; Depending on whether the alpha level is one or two sided. |
digits |
Number of digits to round results. |
Michael Rotondi, [email protected]
Matthews JNS. Introduction to Randomized Controlled Clinical Trials (2nd Ed.) Chapman & Hall: New York, 2006.
Donner A and Klar N. Design and Analysis of Cluster Randomization Trials in Health Research. Arnold: London, 2000.
Rotondi M and Donner A. (2009) Sample Size Estimation in Cluster Randomized Trials: An Empirical Bayes Approach, Journal of Educational and Behavioral Statistics, 34:229-237.
## Not run: ICC values are from Rotondi and Donner (2009). Suppose classrooms of size 25 are randomized with hypothetical experimental rates of 0.05 and control rates of 0.18. Plots are suppressed, and iter = 50 for testing purposes. ## End(Not run) n4meansEB(delta=0.5, sigma=1, m=25, ICC=c(0.162, 0.205, 0.234, 0.253), varICC= c(0.030, 0.032, 0.010, 0.026)^2, from=0.15, to=0.28, iter=50, plot=FALSE);
## Not run: ICC values are from Rotondi and Donner (2009). Suppose classrooms of size 25 are randomized with hypothetical experimental rates of 0.05 and control rates of 0.18. Plots are suppressed, and iter = 50 for testing purposes. ## End(Not run) n4meansEB(delta=0.5, sigma=1, m=25, ICC=c(0.162, 0.205, 0.234, 0.253), varICC= c(0.030, 0.032, 0.010, 0.026)^2, from=0.15, to=0.28, iter=50, plot=FALSE);
This function provides the empirical power/reduction in variance in an updated meta-analysis for a vector of number of clusters to randomize per group and a vector of estimates of the ICC.
n4meansMeta(data, model="fixed", k, ICC, ICCDistn="unif", lower=0, upper=0.25, varRed=FALSE, m, sdm, meanC, sdC, sdT=sdC, iter=1000, alpha=0.05)
n4meansMeta(data, model="fixed", k, ICC, ICCDistn="unif", lower=0, upper=0.25, varRed=FALSE, m, sdm, meanC, sdC, sdT=sdC, iter=1000, alpha=0.05)
data |
A matrix of individual studies (each row). The first column contains the estimate of the mean difference, second column contains the lower 95 % confidence limit and the third contains the upper 95 % confidence limit. |
model |
One of fixed or random, corresponding to the fixed or random effects meta-analysis models. Note that the random effects model is estimated according to the DerSimonian-Laird estimate of the between-study variance. |
k |
A vector of potential number of clusters to randomize to each of the treatment and control groups. Note that this function assumes an equal allocation to treatment and control group status. |
ICC |
A vector of potential values of the ICC, these can be obtained from the literature, pilot studies, etc. |
ICCDistn |
The hypothetical distribution of the ICC values. This can be set to "fixed" (note that only one ICC value is accepted for this option), "unif" on the range [lower, upper], "normal", corresponding to the truncated normal distribution (Turner et al, 2004), and "smooth" corresponding to the empirical smoothing option. (Rotondi and Donner, 2009) |
lower |
The lower bound for the smoothing or unif options. Default value is zero. |
upper |
The upper bound for the smoothing or unif options. Default value is 0.25. |
varRed |
Logical; If varRed is set to TRUE, the proportionate reduction of variance is displayed for the fixed effects meta-analysis. |
m |
The mean cluster size. |
sdm |
The standard deviation of the mean cluster size. This adds additional real-world variation in the simulated study. |
meanC |
The anticipated mean response level in the control group. The anticipated treatment mean is calculated from the simulated effect size of the preliminary meta-analysis. |
sdC |
The standard deviation of the control rate. This adds real-world variation in the simulated study and can be precise or imprecise depending on the investigators preference. |
sdT |
The standard deviation of the treatment rate. By default, this is set to the same sdC. |
iter |
The number of iterations for each value of k and the ICC. This has a large impact on computational time. Default is 1000. |
alpha |
The desired type I error rate for calculation of confidence limits for the meta-analysis model. Note that for simplicity, this function assumes that each of the inputed lower and upper limits are 95 % confidence limits and this cannot be changed. |
This function calculates the empirical power of an updated meta-analysis by a generalization of Sutton et al. (2007). The procedure is summarized in the accompanying manuscript (Rotondi and Donner, 2012). In short, a hypothetical new study of a given size is simulated, then added to the meta-analysis. The results are re-meta-analyzed and it is determined whether the result is statistically significant. Note that the proportion of variance reduction and power may not always strictly decrease with k, as the simulation exhibits individual-level variation. Moreover, the random effects model does not guarantee that future studies will result in higher power due to the presence of between-study heterogeneity.
power |
The power of the updated meta-analysis. Presented as a matrix of number of clusters by ICC values. |
data |
The data matrix is returned. |
newMean |
The preliminary fixed (or random) effects mean difference. |
newVar |
The variance of the preliminary fixed (or random) effects mean difference (MD). |
lF |
The 100(1 - |
uF |
The 100(1 - |
Var |
The variance of the effect measure. |
Sig |
Is the result statistically significant (Binary zero or one). |
k |
The number of clusters randomized per group (vector). |
ICC |
A vector of ICC values. |
ICCDistn |
The distributional assumption about the ICC. |
varRed |
Variance Reduction: Logical. |
varianceReduction |
The proportionate reduction in variance for the number of clusters in the fixed effects meta-analysis. |
m |
The mean cluster size. |
sdm |
The standard deviation of the mean cluster size. |
meanC |
The control mean. |
sdC |
The standard deviation of the control mean. |
alpha |
The desired type I error rate. |
iter |
The total number of iterations. |
Michael Rotondi, [email protected]
Matthews JNS. Introduction to Randomized Controlled Clinical Trials (2nd Ed.) Chapman & Hall: New York, 2006.
Donner A and Klar N. Design and Analysis of Cluster Randomization Trials in Health Research. Arnold: London, 2000.
Sutton AJ et al. (2007) Evidence-based sample size calculations based upon updated meta-analysis. Statistics in Medicine, 26(12):2479-2500.
Turner R et al. (2004) Allowing for imprecision in the intracluster correlation coefficient in the design of cluster randomized trials. Statistics in Medicine, 23(8):1195-1214.
Rotondi M and Donner A. (2009) Sample Size Estimation in Cluster Randomized Trials: An Empirical Bayes Approach. Journal of Educational and Behavioral Statistics. DOI: 10.3102/1076998609332756.
Rotondi M and Donner A. (2012) Sample Size Estimation in Cluster Randomized Trials: An Evidence-Based Perspective. Computational Statistics and Data Analysis 56:1174-1187.
## Not run: A brief example with 5 iterations. n4meansMeta(data=rbind(c(100, 50, 150), c(25, -100, 150), c(-90, -190, 10), c(-125, -200, -50)), model="fixed", k=c(10, 20), ICC=c(0.1, 0.15, 0.18), m=100, sdm=0, meanC=100, sdC=10, iter=5, alpha=0.05, varRed=TRUE, ICCDistn="smooth");
## Not run: A brief example with 5 iterations. n4meansMeta(data=rbind(c(100, 50, 150), c(25, -100, 150), c(-90, -190, 10), c(-125, -200, -50)), model="fixed", k=c(10, 20), ICC=c(0.1, 0.15, 0.18), m=100, sdm=0, meanC=100, sdC=10, iter=5, alpha=0.05, varRed=TRUE, ICCDistn="smooth");
This function provides detailed sample size estimation information to determine the number of subjects that must be enrolled in a cluster randomized trial with a binary outcome.
n4props(pe, pc, m, ICC, alpha=0.05, power = 0.80, AR=1, two.tailed=TRUE, digits=3)
n4props(pe, pc, m, ICC, alpha=0.05, power = 0.80, AR=1, two.tailed=TRUE, digits=3)
pe |
The anticipated proportion of individuals with the outcome of interest in the experimental group. |
pc |
The anticipated proportion of individuals with the outcome of interest in the control group. |
m |
The anticipated average (or actual) cluster size. |
ICC |
The anticipated value of the intraclass correlation coefficient, ICC. |
AR |
The Allocation Ratio: AR$=$1 implies an equal number of subjects per treatment and control group (maximum efficiency), AR $>$ 1, implies more subjects will be enrolled in the control group (e.g. in the case of costly intervention), AR $<$ 1 implies more subjects in the treatment group (rarely used). |
alpha |
The desired type I error rate. |
power |
The desired level of power, recall power = 1 - type II error. |
two.tailed |
Logical, If TRUE calculations are based on a two-tailed type I error, if FALSE, a one-sided calculation is performed. |
digits |
Number of digits to round calculations |
This function provides detailed information, similar to PROC POWER in SAS, but with less functionality and more concise output. It is used for sample size estimation in a cluster randomized trial where the outcome of interest is binary. A simple example may include whether an individual dies from a heart attack. In epidemiological terms, pe and pc can be thought of as the expected prevalence of the outcome in the experimental and control group. Note that if the results suggest a small number of clusters is required, an iterative procedure will include the T distribution instead of the normal critical value for alpha, iterating the procedure until convergence. Thus on some occasions, the algorithm may not converge. In some cases, such as small ICC values or proportions, this fails to converge and may need to be stopped.
nE |
The minimum number of clusters required in the experimental group. |
nC |
The minimum number of clusters required in the control group. |
pe |
The anticipated proportion of individuals in the experimental group with the outcome. |
pc |
The anticipated proportion of individuals in the control group with the outcome. |
alpha |
The desired type I error rate. |
power |
The desired level of power, recall power = 1 - type II error. |
AR |
The Allocation Ratio. |
Michael Rotondi, [email protected]
Matthews JNS. Introduction to Randomized Controlled Clinical Trials (2nd Ed.) Chapman & Hall: New York, 2006.
Donner A and Klar N. Design and Analysis of Cluster Randomization Trials in Health Research. Arnold: London, 2000.
## Not run: Suppose a new drug is thought to reduce heart attack mortality from 0.10 to 0.03. Calculate the required number of subjects that must be enrolled in a study to detect this difference with alpha = 0.05 and power = 0.80. ## End(Not run) n4props(pe=0.03, pc=0.10, m=25, ICC=0.20, AR=1, alpha=0.05, power=0.80);
## Not run: Suppose a new drug is thought to reduce heart attack mortality from 0.10 to 0.03. Calculate the required number of subjects that must be enrolled in a study to detect this difference with alpha = 0.05 and power = 0.80. ## End(Not run) n4props(pe=0.03, pc=0.10, m=25, ICC=0.20, AR=1, alpha=0.05, power=0.80);
This function provides detailed sample size estimation information to determine the required number of clusters that must be enrolled in a cluster randomized trial using the empirical smoothing model. The method applies a smoothed density function (including optional weighting) to obtain an empirical distribution for the ICC. Output includes quantiles of values of the required number of clusters to obtain a prespecified power level.
n4propsEB(ICC, varICC=0, from=0, to, pe, pc, m, iter=1000, alpha=0.05, power=0.8, two.tailed=TRUE, digits=3, plot=TRUE)
n4propsEB(ICC, varICC=0, from=0, to, pe, pc, m, iter=1000, alpha=0.05, power=0.8, two.tailed=TRUE, digits=3, plot=TRUE)
ICC |
A vector of possible ICC values, obtained from a reasonable number of independent studies. These values form the basis of the empirical density function for the ICC. |
varICC |
A vector of variances of the estimates of the ICC. In some cases, it may be desirable to give greater weight (smaller variances) to estimates of the ICC that are obtained from larger samples. The default value is zero, which implies that all estimates are weighted equally. |
from |
A lower limit representing the lowest plausible value for the ICC. This is used in the estimation of the ICC's empirical density function. The default value is zero as the ICC is assumed to be non-negative. |
to |
An upper bound for the plausible range of the ICC. A default value is not specified as this may range depending on the circumstances. |
pe |
The anticipated proportion of individuals in the experimental group with the outcome. |
pc |
The anticipated proportion of individuals in the control group with the outcome. |
m |
The anticipated average (or actual) cluster size. |
iter |
The total number of iterations. |
alpha |
The desired type I error rate. |
power |
The desired level of power, recall power = 1 - type II error. |
two.tailed |
Logical, If TRUE calculations are based on a two-tailed type I error, if FALSE, a one-sided calculation is performed. |
digits |
Number of digits to round calculations. |
plot |
Logical: Would you like a plot of the estimated density of the ICC and Histogram? |
This function estimates an empirical density for the ICC using a Gaussian kernel. Weights can be incorporated through specification of the varICC parameter. ICC values are sampled from this empirical density a large (iter) number of times and the resulting number of clusters that must be randomized to achieve a pre-specified power level is then calculated. The resulting output is the quantiles of the required number of clusters, illustrating the most likely values of the ICC and number of clusters required. Additional details are in Rotondi and Donner (2009).
ResRho |
A vector of values of sampled values of the ICC. This is of length iter. |
ResK |
A vector of values of the calculated required number of clusters k, using the ICC values in ResRho. This is also of length iter. |
pe |
The anticipated proportion of individuals in the experimental group with the outcome. |
pc |
The anticipated proportion of individuals in the control group with the outcome. |
ICC |
The specified vector of values for the ICC. |
varICC |
A vector of variances of the ICC, these can be used as study weights. |
from |
Lower bound in ICC Density Estimation. Default of zero. |
to |
Upper bound in ICC Density Estimation. Default of zero. |
m |
The size of each cluster |
alpha |
The desired type I error rate. |
power |
The desired level of power, recall power = 1 - type II error. |
two.tailed |
TRUE or FALSE; Depending on whether the alpha level is one or two sided. |
digits |
Number of digits to round results. |
Michael Rotondi, [email protected]
Matthews JNS. Introduction to Randomized Controlled Clinical Trials (2nd Ed.) Chapman & Hall: New York, 2006.
Donner A and Klar N. Design and Analysis of Cluster Randomization Trials in Health Research. Arnold: London, 2000.
Rotondi M and Donner A. (2009) Sample Size Estimation in Cluster Randomized Trials: An Empirical Bayes Approach. Journal of Educational and Behavioral Statistics, 34:229-237.
## Not run: ICC values are from Rotondi and Donner (2009). Suppose classrooms of size 25 are randomized with hypothetical experimental rates of 0.05 and control rates of 0.18. Plots are suppressed, and iter = 50 for testing purposes. ## End(Not run) n4propsEB(pe=0.10, pc=0.18, m=25, ICC=c(0.162, 0.205, 0.234, 0.253), varICC= c(0.030, 0.032, 0.010, 0.026)^2, from=0.15, to=0.28, iter=50, plot=FALSE);
## Not run: ICC values are from Rotondi and Donner (2009). Suppose classrooms of size 25 are randomized with hypothetical experimental rates of 0.05 and control rates of 0.18. Plots are suppressed, and iter = 50 for testing purposes. ## End(Not run) n4propsEB(pe=0.10, pc=0.18, m=25, ICC=c(0.162, 0.205, 0.234, 0.253), varICC= c(0.030, 0.032, 0.010, 0.026)^2, from=0.15, to=0.28, iter=50, plot=FALSE);
This function provides the empirical power/variance reduction of an updated meta-analysis for a vector of the number of clusters to randomize per group and a vector of estimates of the ICC with a binary outcome measured using the (log) relative risk or odds ratio.
n4propsMeta(data, measure="RR", model="fixed", k, ICC, ICCDistn="unif", lower=0, upper=0.25, varRed=FALSE, m, sdm, pC, sdpC, iter=1000, alpha=0.05)
n4propsMeta(data, measure="RR", model="fixed", k, ICC, ICCDistn="unif", lower=0, upper=0.25, varRed=FALSE, m, sdm, pC, sdpC, iter=1000, alpha=0.05)
data |
A matrix with completed studies in each row. The first column contains the estimate of the relative risk or odds ratio, the second column contains the 95 % lower limit and the third contains the 95 % upper limit. Note that the variance is estimated from the upper bound of these confidence intervals and risk differences are not permitted. |
measure |
Corresponds to the effect measure. Can be one of "RR" or "OR", corresponding to the Relative Risk or Odds Ratio. |
model |
One of fixed or random, corresponding to the fixed or random effects meta-analysis models. Note that the random effects model is estimated according to the DerSimonian-Laird estimate of the between-study variance. |
k |
A vector of the potential number of clusters to randomize to each of the treatment and control groups. Note that this function assumes an equal allocation to treatment and control group status. |
ICC |
A vector of potential values of the ICC, these can be obtained from the literature, pilot studies, etc. |
ICCDistn |
The hypothetical distribution of the ICC values. This can be set to "fixed" (note that only one ICC value is accepted for this option), "unif" on the range [lower, upper], "normal", corresponding to the truncated normal distribution (Turner et al, 2004), and "smooth" corresponding to the empirical smoothing option (Rotondi and Donner, 2009). |
lower |
The lower bound for the smoothing or unif options. Default value is zero. |
upper |
The upper bound for the smoothing or unif options. Default value is 0.25. |
varRed |
Logical; If varRed is set to TRUE, the proportionate reduction of variance is displayed for the fixed effects meta-analysis. |
m |
The mean cluster size. |
sdm |
The standard deviation of the mean cluster size. This adds additional real-world variation in the simulated study, using a normal model for large cluster sizes. |
pC |
The anticipated event in the control group. The anticipated treatment event is calculated from the simulated effect size of the preliminary meta-analysis. |
sdpC |
The standard deviation of the control rate. This is to generate real-world variation in the simulated study and can be precise or imprecise depending on the investigators preference. |
iter |
The number of iterations for each value of k and the ICC. This has a large impact on computational time. Default is 1000. |
alpha |
The desired type I error rate for calculation of confidence limits for the meta-analysis model. Note that for simplicity, this function assumes that each of the inputed lower and upper limits are 95 % confidence limits and this cannot be changed. |
This function calculates the empirical power of an updated meta-analysis by a generalization of Sutton et al. (2007) to the context of cluster randomized trials with a binary outcome. The procedure is summarized in the accompanying manuscript (Rotondi and Donner, 2012). In short, a hypothetical new study of a given size is simulated, then added to the meta-analysis. The results are re-meta-analyzed and it is verified whether the pooled result is statistically significant, or the appropriate reduction in variance of the pooled effect measure is recorded. Note that the proportion of variance reduction and power may not always (strictly) decrease with k, as the simulation exhibits individual-level variation. In addition, the random effects model does not guarantee that future studies will result in higher power due to the presence of between-study heterogeneity.
power |
The power of the updated meta-analysis. Presented as a vector corresponding to the number of clusters. |
varianceReduction |
The proportionate reduction in variance for the number of clusters in the fixed effects meta-analysis. |
m |
The mean cluster size. |
data |
The data matrix is returned. |
newMean |
The preliminary fixed (or random) effects log relative risk (RR) or odds ratio (OR). |
newVar |
The variance of the preliminary fixed (or random) effects log RR or log OR. |
lF |
The 100(1 - |
uF |
The 100(1 - |
Var |
The variance of the updated log RR/log OR. |
k |
The number of clusters randomized per group (vector). |
ICC |
A vector of ICC values. |
ICCDistn |
The distributional assumption about the ICC. |
varRed |
Variance Reduction: Logical. |
sdm |
The standard deviation of the mean cluster size. |
pC |
The mean control rate. |
sdpC |
The standard deviation of the control rate. |
alpha |
The desired type I error rate. |
iter |
The total number of iterations. |
Michael Rotondi, [email protected]
Matthews JNS. Introduction to Randomized Controlled Clinical Trials (2nd Ed.) Chapman & Hall: New York, 2006.
Donner A and Klar N. Design and Analysis of Cluster Randomization Trials in Health Research. Arnold: London, 2000.
Sutton AJ et al. (2007) Evidence-based sample size calculations based upon updated meta-analysis. Statistics in Medicine, 26(12):2479-2500.
Turner R et al. (2004) Allowing for imprecision in the intracluster correlation coefficient in the design of cluster randomized trials. Statistics in Medicine, 23(8):1195-1214.
Rotondi M and Donner A. (2009) Sample Size Estimation in Cluster Randomized Trials: An Empirical Bayes Approach. Journal of Educational and Behavioral Statistics, 34:229-237.
Rotondi M and Donner A. (2012) Sample Size Estimation in Cluster Randomized Trials: An Evidence-Based Perspective. Computational Statistics and Data Analysis 56:1174-1187.
## Not run: A brief example with 10 iterations and a simple initial meta-analysis of two studies with the following RRs and CIs: ## End(Not run) n4propsMeta(data=rbind(c(0.800, 0.551, 1.162), c(0.690, 0.342, 1.390)), model="fixed", measure="RR", k=c(20, 40, 60, 80, 100), ICC=0.011, m=100, sdm=0, pC=0.1, sdpC=0, iter=10, alpha=0.05, ICCDistn="fixed");
## Not run: A brief example with 10 iterations and a simple initial meta-analysis of two studies with the following RRs and CIs: ## End(Not run) n4propsMeta(data=rbind(c(0.800, 0.551, 1.162), c(0.690, 0.342, 1.390)), model="fixed", measure="RR", k=c(20, 40, 60, 80, 100), ICC=0.011, m=100, sdm=0, pC=0.1, sdpC=0, iter=10, alpha=0.05, ICCDistn="fixed");