About This Code
This code calculates the minimum sample size necessary for a SMART with a longitudinal, count outcome, in which the primary aim is a comparison of the mean count between two adaptive interventions starting with different interventions.
How can a behavioral scientist use this code?
Behavioral intervention scientists can use this code to calculate the sample size for a SMART with a longitudinal, count outcome.
What method does this code implement?
This code enables users to calculate the relationship between the sample size and power by simulation experiment (the empirical power across Monte Carlo simulations). The data analysis method is a weighted least squares regression approach with a negative binomial link function (which is often used to analyze count outcomes with overdispersion). In a SMART, the weights (which are potentially impacted by treatment) are known, by design.