Companion code for "Sample size considerations for comparing dynamic treatment regimens in a sequential multiple-assignment randomized trial with a continuous longitudinal outcome"
The code in this repository is in active development. To view or use stable code, see the appropriate releases:
- v1.0.0: Release accompanying initial submission to Statistical Methods in Medical Research.
- sampleSize.R: Contains function to compute sample size for a SMART with a longitudinal outcome in which the primary aim is to compare two embedded DTRs.
- functions.R: Helper functions for simulations and parameter estimation.
- generativeFunctions.R: Helper functions for data generation.
- generateSMART.R: Main function used to generate data from a SMART.
- simulateSMART.R: Wrapper to generateSMART and helper functions to enable iterative data generation and parameter estimation.
- init.R: Script to initialize R environment for simulations
- resultFunctions.R: Helper functions for compiling results and tables
The Simulations folder contains scripts to perform simulations under all scenarios compiled in the manuscript (ArXiv). Simulations are designed to be run in parallel in an environment where all available cores can be dedicated to this task; as such, we recommend appropriately modifying simulateSMART.R before running simulation scripts on, say, a laptop rather than a high-performance cluster.