Skip to content

Latest commit

 

History

39 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

2by2HTE

This repository provides R code for sample size calculations and simulations for hierarchical 2 × 2 factorial designs with treatment effect heterogeneity across clusters. Sample size is expressed as the number of clusters.

The code accompanies the paper “Addressing Cluster-Level Treatment Effect Heterogeneity in Sample Size Determination for Hierarchical 2 × 2 Factorial Designs” by Jiaqi Tong, Fan Li, and Guangyu Tong, published in Biometrical Journal (2026).

Repository contents

File Description
SSCode.R Sample size functions and supporting calculations. nc() uses a series expansion approximation, and nc_na() uses a simple approximation.
SimulationCode.R Simulation code for the random slope model.

Citation

Tong J, Li F, Tong G. Addressing Cluster-Level Treatment Effect Heterogeneity in Sample Size Determination for Hierarchical 2 × 2 Factorial Designs. Biometrical Journal. 2026;68(3):e70146. doi:10.1002/bimj.70146.

About

R code for sample size calculations and random slope simulations in hierarchical 2 × 2 factorial trials with treatment effect heterogeneity. Companion to Tong, Li, and Tong (Biometrical Journal, 2026).

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages