crt.varexplore {powertools} | R Documentation |
Variance exploration for cluster randomized trials with binary outcomes
Description
This function can be used to help select a plausible value for the variance/SD of the random intercept for cluster in a cluster randomized trial with a binary outcome. Based on user-supplied values of the outcome proportions in the two arms, the function outputs, for a range of possible values of the SD of the random intercept, the intervals within which we expect about 95% of the cluster-level proportions to lie in each arm.
Usage
crt.varexplore(pc, pt, print = TRUE)
Arguments
pc |
The probability of the outcome in control clusters. |
pt |
The probability of the outcome in treatment clusters. |
print |
Whether or not to print the results in a table; defaults to TRUE. To retrieve the results even when print = FALSE, assign the function output to an object. |
Details
The use of this function is illustrated in Crespi CM (2025) Power and Sample Size in R.
Value
A list of the arguments and a dataframe of outputs.
Examples
crt.varexplore(pc = 0.25, pt = 0.15)
output <- crt.varexplore(pc = 0.25, pt = 0.15, print = FALSE)
output$pc