Related Experiment Video
Updated: Oct 28, 2025

An R-Based Landscape Validation of a Competing Risk Model
Published on: September 16, 2022
CRTpowerdist: An R package to calculate attained power and construct the power distribution for cross-sectional
Yongdong Ouyang1, Liang Xu1, Mohammad Ehsanul Karim1
1School of Population and Public Health, University of British Columbia, 2206 E Mall, Vancouver, BC Canada V6T 1Z3; Centre for Health Evaluation & Outcome Sciences, 588 - 1081 Burrard Street, St. Paul's Hospital Vancouver, BC Canada V6Z 1Y6.
Background:
The attained power, calculated conditional on the realized allocation, of a clinical trial may differ from the expected power, obtained pre-randomization through averaging over all potential allocations that could be generated by the randomization algorithm (RA). For example, a two-arm trial using a RA that is expected to allocate 20 participants to each arm will attain less than the expected power if by chance it allocates 25 and 15 participants to the arms. Cluster randomized trials with unequal cluster sizes have elevated risk of realizing an allocation that yields an attained power much lower than the expected power when modest numbers of clusters are randomized.
Method:
We developed the R package CRTpowerdist, which implements both simulations and approximate analytic formulae to calculate the attained powers associated with different realized allocations and constructs the pre-randomization power distribution associated with the RA to facilitate assessing the risk of obtaining inadequate power. The package covers unequal cluster-size, cross-sectional stepped-wedge and parallel cluster randomized trials, with or without stratification. Allowed outcome types are: continuous (Gaussian), binary (Binomial) and count (Poisson). The analytic formulae-based calculations are also implemented in a Shiny app.
Results:
The functionality of the CRTpowerdist is illustrated for each type of trial design. The examples show how to obtain the attained power, the power distribution, and the risk of low attained power, using both simulation and analytic formulae.
Conclusion:
For cluster randomized trials with unequal cluster sizes, the CRTpowerdist package can assist users in identifying an appropriate randomization algorithm by enabling the user to assess the risk that a randomization algorithm will lead to an allocation with inadequate attained power. The Shiny app makes these assessments accessible to researchers who are unable or do not wish to use the CRTpowerdist package.
More Related Videos
06:46Competing-Risk Nomogram for Predicting Cancer-Specific Survival in Multiple Primary Colorectal Cancer Patients after Surgery
Published on: September 27, 2024
06:55Inverse Probability of Treatment Weighting Propensity Score using the Military Health System Data Repository and National Death Index
Published on: January 8, 2020
Related Concept Videos
Statistical Software for Data Analysis and Clinical Trials
Parametric Survival Analysis: Weibull and Exponential Methods
Weibull Distribution
The Weibull distribution is a flexible model used in parametric survival analysis. It can handle both increasing and decreasing hazard rates, depending on its shape parameter...
Comparing the Survival Analysis of Two or More Groups
Distributions to Estimate Population Parameter
Cancer Survival Analysis
Survival Tree
Building a Survival Tree
Constructing a...