Supplement 1. SAS code containing the algorithms described in our paper.
Power trends grouped counts analytical.sas -- SAS code.
Power trends grouped counts simulation.sas -- SAS code.
Power trends grouped counts analytical.sas uses the analytical method described in the main article for approximating standard errors, precision, and power associated with detecting trends across grouped count data. Power trends grouped counts simulation.sas uses simulations and repeated calls to a nonlinear mixed model to estimate power to detect trends across grouped count data. Parameters are defined at the bottom of the macro. Both files must be run using SAS statistical software. Further details are provided in the macros, and in the original paper.