# %CRTFASTGEEPWR: A SAS macro for power of generalized estimating equations
analysis of multi-period cluster randomized trials with application to stepped
wedge designs

Ying Zhang
UNC-Chapel Hill  &John S. Preisser
UNC-Chapel Hill  Fan Li
Yale School of Public Health &Elizabeth L. Turner
Duke University &Paul J. Rathouz
University of Texas at Austin

###### Abstract

Multi-period cluster randomized trials (CRTs) are increasingly used for the
evaluation of interventions delivered at the group level. While generalized
estimating equations (GEE) are commonly used to provide population-averaged
inference in CRTs, there is a gap of general methods and statistical software
tools for power calculation based on multi-parameter, within-cluster
correlation structures suitable for multi-period CRTs that can accommodate
both complete and incomplete designs. A computationally fast, non-simulation
procedure for determining statistical power is described for the GEE analysis
of complete and incomplete multi-period cluster randomized trials. The
procedure is implemented via a SAS macro, %CRTFASTGEEPWR, which is applicable
to binary, count and continuous responses and several correlation structures
in multi-period CRTs. The SAS macro is illustrated in the power calculation of
two complete and two incomplete stepped wedge cluster randomized trial
scenarios under different specifications of marginal mean model and within-
cluster correlation structure. The proposed GEE power method is quite general
as demonstrated in the SAS macro with numerous input options. The power
procedure and macro can also be used in the planning of parallel and crossover
CRTs in addition to cross-sectional and closed cohort stepped wedge trials.

_K_ eywords correlation decay, group randomized trial, intraclass correlation,
marginal models, SAS macro

##  1 Introduction

Cluster randomized trials (CRTs) are studies designed to evaluate
interventions that operate at a group level, manipulate the physical or social
environment, or cannot be delivered to individuals (Murray et al., 2004).
Regarding the different schedules of recruiting participants, CRTs are
classified with cross-sectional, closed-cohort and open-cohort designs (Copas
et al., 2015). Cross-sectional designs recruit a unique set of individuals in
each period, whereas closed-cohort designs follow the same individuals in
clusters with repeated observations across periods. The open-cohort design,
however, allows the attrition of members from and addition of new members to
an existing cohort in each period. On the other hand, there are different
types of CRT designs, including parallel, crossover, and stepped-wedge
designs. Among CRTs with outcomes measured in multiple periods, a stepped-
wedge cluster randomized trial (SW-CRT) is a type of CRT such that clusters
switch from control condition to treatment at randomly assigned time points
(Hussey and Hughes, 2007). Logistical and ethical considerations such as the
need to deliver the intervention in stages and the desire to implement the
intervention in all clusters are factors involved in the choice to use a SW-
CRT (Turner et al., 2017). SW-CRTs may be preferred over other designs because
they may facilitate cluster recruitment or offer increased power over other
cluster randomized designs even with a limited number of clusters (Hemming and
Taljaard, 2020). Most study planning methods are for complete SW-CRTs where
all clusters have outcome data in all periods. However, incomplete stepped
wedge designs are increasingly being deployed, whereby some cluster-periods do
not record data due to logistical, resource, and patient-centered
considerations (Kasza and Forbes, 2019). Specifically, researchers may choose
not to collect data in a cohort design or enroll new participants in a cross-
sectional design during some cluster-periods. Hemming et al. (2015) described
two types of incompleteness in stepped wedge designs, one involving
implementation periods and the other staggered study entry or termination of
clusters.

Population-averaged models with GEE analysis have several advantages for the
design and analysis of CRTs (Preisser et al., 2003). In contrast to
generalized linear mixed models, the intervention effect from a population-
averaged model describes how the average response changes across the subsets
of population defined by the treated and control cluster-periods.
Additionally, because models for mean and correlation structures are
separately specified, the interpretation of the marginal mean regression
parameters remains the same regardless of the specification of working
correlation model (Preisser et al., 2008). The link function is chosen to
obtain inference on the target parameter of choice; for binary responses, the
target parameters could be the odds ratio via the logit link, the risk ratio
via the log link, or the risk difference via the identify link. Another
advantage in using GEE for CRTs is that the estimation of mean model
parameters is robust to misspecification of correlation structures in large
samples. However, the specification of working independence correlation
structure may result in efficiency loss that can be substantial when the
cluster-period sizes are not all equal (Tian et al., 2021). Furthermore, an
over-simplified exchangeable correlation structure may give inaccurate power
calculations when there is correlation decay in multi-period CRTs (Li, 2020;
Kasza et al., 2019). Thus, correlation structures informed by the study design
are recommended for both study design and data analysis of stepped wedge and
other multi-period CRTs.

Because CRTs are usually less powerful than individually randomized trials,
determination of the proper number and allocation of study participants is
critically important. In the case of population-averaged models with GEE
analysis, simple-to-use sample size formulae for continuous responses and non-
simulation procedures for binary responses have recently been proposed for
complete, cross-sectional and cohort SW-CRTs within the framework of GEE (Li
et al., 2018). The methods extend earlier sample size formulae for GEE
analysis of parallel-groups CRTs, including cross-sectional and cohort CRTs
(Preisser et al., 2003, 2007) and multi-level CRTs (Reboussin et al., 2012;
Teerenstra et al., 2010; Wang et al., 2021). Prior work (Li et al., 2018; Li,
2020) has shown that the analytical power for marginal mean (e.g,
intervention) parameters in complete SW-CRTs agrees well with simulated power
based on GEE with finite-sample sandwich variance estimators for as few as
eight clusters (Li et al., 2018). Those studies focus on the empirical
performance of the analytical power rather than software tools to implement
the method for different multi-period CRT designs.

This article implements a comprehensive, analytical power method for both
complete and incomplete SW-CRTs. The proposed GEE power procedure is motivated
by the Connect-Home trial, which uses an incomplete, cross-sectional stepped
wedge design to test an intervention to improve outcomes for rehabilitation
patients transitioning from skilled nursing facilities (SNFs) to home-based
care (Toles et al., 2021). The primary component of the intervention is an
individualized Transition Plan of Care that SNF staff create to support the
patient and caregiver at home. The incomplete design with six SNFs (clusters)
and four patients per cluster-period (360 patients total), shown in Figure 1,
was chosen based on considerations of internal validity and power under
restrictions placed by available resources and logistical considerations. The
black and orange boxes represent cluster-periods where no patients are
enrolled, giving an incomplete design. Staggered enrollment of SNFs (clusters)
is used to initiate data collection in stages with limited research staff
resulting in the black boxes. The orange boxes represent the implementation
phase, where two months are needed to activate the intensive intervention
through training nursing home and home health care staff. The Connect-Home
study design is distinct in several aspects. First, the number of periods
$(J=22)$ is much greater than the number of sequences $(S=6)$, as compared to
the standard SW-CRT in which $J=S+1$ (Hussey and Hughes, 2007; Hemming et al.,
2015; Li et al., 2018). Next, the incompleteness of the design adds to the
complexity of power calculation.

Thus, the Connect-Home trial inspires an extension of the computationally
fast, non-simulation procedures for determining sample size and statistical
power for GEE analysis from complete SW-CRTs (Li et al., 2018) to incomplete
SW-CRTs. Specifically, we introduce a SAS(Inc., 2016) macro %CRTFASTGEEPWR as
a computationally efficient, non-simulation based routine for determining the
statistical power in multi-period CRTs by further accommodating incompleteness
at the design stage. For its implementation, the SAS macro %CRTFASTGEEPWR is
developed to accommodate binary, count and continuous responses in stepped
wedge and other multi-period CRTs with a collection of commonly-seen
multilevel intra-cluster correlation structures and numerous options for
planning complete and incomplete cross-sectional and cohort designs. To the
best of our knowledge, %CRTFASTGEEPWR is by far the most comprehensive SAS
macro for power calculation in multi-period CRTs based on marginal models, and
is distinct from existing computing software such as R package swdpwr (Chen et
al., 2022), which currently does not allow for decaying correlation
structures, incomplete designs, count outcomes and alternative marginal mean
models beyond the average intervention effects model.

The remainder of this article is organized as follows. Section 2 describes the
population-averaged models of interest with special consideration of
correlation structures suitable for cross-sectional and cohort multi-period
CRTs. Section 3 summarizes the general power procedure for GEE analysis with
the application to complete and incomplete stepped wedge designs. Section 4
presents the SAS macro details and four examples for complete and incomplete
SW-CRTs.

Figure 1: The trial diagram of the Connect Home trial: the blue, orange and
green cells denote control, implementation and intervention cluster-periods,
respectively

##  2 GEE Analysis of multi-period CRTs

A unifying population-averaged model framework is described below for the
design and statistical analysis of multi-period CRTs. The following notations
apply to both cross-sectional and cohort multi-period CRTs, where there are
$J$ periods, $S$ sequences, $I$ clusters and $I_{s}$ clusters in sequence $s$,
such that $I=\sum^{S}_{s=1}I_{s}$. Let $y_{ijk}$ denote the response of the
$k$th individual from cluster $i$ during period $j$ for $i=1\ldots I,j=1\ldots
J_{i}$, and $k=1\ldots N_{ij}$, noting that $J_{i}\leq J$ is the number of
observed periods (i.e., with data collection) for cluster $i$, and $N_{ij}$ is
the cluster-period size. Let $\mu_{ijk}$ denote the marginal mean response of
$y_{ijk}$, which is related to the intervention effect $\delta$ and $j$th
categorical period effect $\beta_{j}$ with link function $g(.)$ via the
marginal mean model

$g(\mu_{ijk})=\beta_{j}+u_{ij}\delta$ (1)

For multi-period CRTs with fewer clusters than the number of periods ($I<J$),
categorical period effects in the equation (1) can be replaced with linear
period effects:

$g(\mu_{ijk})=\beta_{0}+\beta_{1}(t_{ij}-1)+u_{ij}\delta$ (2)

where $\beta_{0}$ is the intercept, and $\\{t_{ij}:j=1,\ldots,J_{i}\\}$ are
integer-valued calendar periods from the study design such that $\beta_{1}$ is
the increment in the mean response on the scale of the link function for a
unit increase in calendar period, and $u_{ij}$ is the treatment status in
cluster $i$ at period $j$.

Three types of intervention effect models are implemented in the SAS macro,
the widely used average intervention effects model (Hussey and Hughes, 2007;
Hemming et al., 2015; Li et al., 2018), the incremental intervention effects
model (Hughes et al., 2015) and the extended incremental intervention effects
model. In the average intervention effects model, $u_{ij}$ is the period-
specific treatment indicator (1=intervention; 0=control) for cluster $i$ and
$\delta$ is the intervention effect, irrespective of time on treatment, on the
link function scale. With the specification of $u_{ij}$, population-averaged
models could be used for different types of multi-period CRTs. In multi-period
CRTs with parallel designs, $u_{ij}=0$ for all clusters under baseline period
$j$, and $u_{ij}=0,1$ in subsequent post-baseline periods depending on the
treatment status. In the case of complete SW-CRTs, clusters switch from
control condition to intervention at different periods. Thus, $u_{ij}=0$ in
the control period, $j=1,...,b_{i}$ and $b_{i}$ is the total periods under the
control condition in cluster $i$, whereas, in intervention periods,
$u_{ij}=1,j=b_{i}+1,...,J_{i}$. Conversely, the incremental intervention
effects model assumes a gradual uptake of the intervention such that its
effect depends on time-on-treatment. Assuming a complete SW-CRT is specified
with the incremental intervention effects model, the treatment status is
$u_{ij}=0$ in the control period and $u_{ij}=(j-b_{i})/q,j=b_{i}+1,...,J_{i}$
in the intervention period, where $q>0$ is chosen to scale the intervention
effect $\delta$ according to user specification. In the Connect-Home trial
(Figure 1), $q=10$ so that $\delta$ is defined as the full intervention effect
on the link function scale after 10 periods, which corresponds to the number
of intervention periods for the first SNF. Finally, an extended incremental
intervention effects model is considered for designs additionally having a
maintenance phase after the active intervention phase with $q$ periods. In SW-
CRTs with a maintenance phase, one research question relates to whether the
patient benefit from the intervention as captured by the outcome is maintained
after the active intervention period has ceased. The treatment status is
$u_{ij}=(j-b_{i})/q,j=b_{i}+1,...,b_{i}+q$ in the active intervention periods
and $u_{ij}=1$ in the maintenance phase, for $j>b_{i}+q$.

Specification of the marginal model is completed with the covariance structure
of all individual responses in each cluster. Variance of the individual-level
response is $\mbox{var}(y_{ijk})=v_{ijk}\phi$ where $v_{ijk}$ is the variance
function and $\phi$ is the dispersion parameter. For binary responses,
$v_{ijk}=\mu_{ijk}(1-\mu_{ijk})$ and $\phi=1$, while for continuous responses
following typical normal model assumptions, $v_{ijk}=1$ and $\phi$ is the
constant variance. For count outcomes with Poisson distribution,
$v_{ijk}=\phi\mu_{ijk}$ and $\phi$ is the dispersion parameter. The macro
assumes GEE is used to estimate the marginal mean parameters
$\bm{\theta}=(\beta_{1},...,\beta_{p},\delta)$ as well as the working
correlation matrix parameters; common multilevel correlation structures for
multi-period CRTs will be presented in section 4.1 during the SAS macro
description.

##  3 Fast GEE power for multi-period CRTs

###  3.1 Overview of the fast GEE power method

The two-sided test of the intervention effect $H_{0}$: $\delta=0$ vs $H_{1}$:
$\delta\neq 0$ is based upon the asymptotic normal distribution of
$\sqrt{I}(\hat{\delta}-\delta)$ with mean zero and variance determined by the
$(p,p)$-th element of cov$(\sqrt{I}(\hat{\bm{\theta}}-\bm{\theta}))$ , when
$I$ is sufficiently large (Li et al., 2018). In turn, the Wald-test statistic
$\hat{\delta}/\operatorname{var}(\hat{\delta})$ has an asymptotically standard
normal distribution under the null hypothesis. Thus, power to detect an
intervention effect of size $\delta\neq 0$ with a nominal type I error rate
$\alpha$ is
$\Phi\left(z_{\alpha/2}+|\delta|/\sqrt{\operatorname{var}(\hat{\delta})}\right)$
where $\Phi(\cdot)$ is the standard normal cumulative distribution function
and $z_{\alpha/2}$ is the normal quantile such that
$\Phi(z_{\alpha/2})=\alpha/2$. However, for CRTs with a small number of
clusters, the $t$-test is a good alternative with power modified as
$\Phi_{t,I-p}\left(t_{\alpha/2,I-p}+|\delta|/\sqrt{\operatorname{var}(\hat{\delta})}\right)$
where $t_{\alpha/2,I-p}$ is the $\alpha/2\%$ quantile of the $t$-distribution
with $I-p$ degrees of freedom. Typically, the degrees of freedom of the
$t$-statistic in CRTs is set to $I-p$, where $p=\text{dim}(\bm{\theta})$ is
the number of estimated marginal mean model parameters in equation (1); some
authors have used $I-2$, which is sometimes preferred for multi-period CRTs
with fewer number of clusters than periods (Li, 2020; Ford and Westgate,
2020). The model-based variance of the intervention effect
$\mbox{var}(\hat{\delta})$ in the determination of power is defined as the
$(p,p)$-th element in the model-based covariance matrix
$\text{cov}_{\text{MB}}(\hat{\boldsymbol{\theta}})$. We refer to this general
analytical power method (Rochon, 1998) as “fast GEE power” because it is a
computationally fast power calculation procedure for CRTs with GEE analysis.

###  3.2 Adaption of the fast GEE power for incomplete SW-CRTs

The fast GEE power procedure has been previously investigated for complete SW-
CRTs for the average intervention effects marginal mean model with categorical
period effects (Li et al., 2018). Motivated by Connect-Home, we define a class
of incomplete designs for which Connect-Home is an archetype allowing for
implementation periods and/or staggered entry/termination. Let $b_{i0}$ and
$b_{i1}$ denote the first and last calendar periods of data collection for
cluster $i$ in the control condition ($b_{20}=2$ and $b_{21}=7$ for the second
sequence, $s=2$, in Figure 1), such that there are $b_{i}=b_{i1}-b_{i0}+1$
total periods in the control condition; $q_{i0}$ and $q_{i1}$ as the first and
last calendar periods of data collection for cluster $i$ in the intervention
condition (e.g., $q_{20}=10$ and $q_{21}=18$, $s=2$) such that there are
$q_{i}=q_{i1}-q_{i0}+1$ total periods in the intervention condition; and
$c_{i}$ implementation periods occurring in calendar periods $b_{i1}+1,\ldots
b_{i1}+c_{i}$ where $c_{i}=q_{i0}-b_{i1}-1$.

A key step in applying the fast GEE power computation to incomplete SW-CRTs is
the generation of cluster-level design matrices, consisting of covariates in
equation (1) or (2). For incomplete SW-CRTs, we specify a Design Pattern (DP)
matrix by the notation of $\\{b_{i0},b_{i1},q_{i0},q_{i1},i=1,\ldots,I\\}$ to
represent the experimental design analogous to the power analysis of
continuous responses in linear mixed models (Hemming et al., 2015). Each
element in the DP matrix corresponds to a representative cluster-period in the
SW-CRT design with entries of 0 for control condition, 1 for intervention
condition and 2 for cluster-periods in sequences without data collection. To
illustrate the specification of DP matrix, an example of incomplete SW-CRT
(Hemming et al., 2015) is used here with $S=2$ treatment sequences, $T=4$
periods, and an implementation period that occurs in period 2 for the first
sequence and in period 3 for the second sequence. The incomplete design is
specified by $(b_{10},b_{11},q_{10},q_{11})=(1,1,3,4)$ for $s=1$ and
$(b_{20},b_{21},q_{20},q_{21})=(1,2,4,4)$ for $s=2$. Then

$\text{DP}=\left(\begin{array}[]{cccc}0&2&1&1\\\ 0&0&2&1\end{array}\right).$

The DP matrix serves to modify the design matrix obtained under the complete
design to more accurately determine $\text{cov}_{\text{MB}}(\hat{\theta})$ and
thus $var(\hat{\delta})$ in the power calculation for CRTs with incomplete
design.

##  4 The SAS macro details

###  4.1 Input arguments in the macro

A SAS macro %CRTFASTGEEPWR that implements the fast GEE power method is
developed for multi-period CRTs with complete and incomplete designs and
available at
http://www.bios.unc.edu/$\sim$preisser/ personal/software.html.

Macro Variable* |  Input |  Description
---|---|---
DESIGNPATTERN |  Variable |  A matrix with dimension S x T of 0, 1 and 2,
|  |  with 0 representing control periods,1 standing for intervention periods, 2 presenting periods without data collection.
CP_SIZE_MATRIX |  Variable |  Number of cluster-period sizes, a matrix vector with dimension SxT
M |  Variable |  Number of clusters in each sequence, a vector with dimension Sx1
DIST |  =BINARY |  The distribution for the outcomes
|  =POISSON |
|  =NORMAL |
LINK |  =LOGIT |  Link function for the outcomes. For binary,
|  =LOG |  count, and continuous responses, the default
|  =IDENTITY |  link is logit, log and identity, respectively
PHI |  Variable |  The dispersion parameter
INTERVENTION_EFFECT_TYPE |  =AVE |  Average intervention effects model
|  =INC |  Incremental intervention effects model
|  =INC_EX |  Extended incremental intervention effects model
PERIOD_EFFECT_TYPE |  =CAT |  Categorical period effects model
|  =LIN |  Linear period effects model
DELTA |  Variable |  The parameters of intervention
BETA_PERIOD_EFFECTS |  Variable |  The parameters for period effects:
|  |  A Tx1 vector for categorical period effect
|  |  A 2x1 vector for continuous period effect
CORR_TYPE |  =NE/ED |  NE:Nested Exchangeable, ED:Exponential decay,
|  /BE/PD |  BE:Block exchangeable, PD:Proportional decay
ALPHA0 |  Variable |  The within-period correlation in exponential decay and proportional decay correlation structure
R0 |  Variable |  Correlation decay rate over time in exponential decay and proportional decay correlation structure
ALPHA1 |  Variable |  The within-period correlation in nested exchangeable and block exchangeable correlation structure
ALPHA2 |  Variable |  The inter-period correlation in nested exchangeable and block exchangeable correlation structure
ALPHA3 |  Variable |  The within-subject correlation in block exchangeable correlation structure
MAX_INTERVENTION_PERIOD |  Variable |  The number of intervention periods to reach full intervention effects in incremental intervention
|  |  effects model and extended incremental intervention effects model
ALPHA |  Variable |  Significance level with two sided test, default at 0.05
DF_CHOICE |  =1 |  Degree of freedom method (df), df = I-p, p is the number of parameters in marginal mean model (at default)
|  =2 |  df = I-2
Table 1: Arguments in the SAS macro CRTFASTGEEPWR. *All required arguments are
in boldface

Table 1 provides required and optional arguments in the macro, which are
classified into three aspects: describing the characteristics of the multi-
period CRT, parameterizing the marginal mean model and choosing the working
correlation structure.

First, users are required to describe the characteristics of the multi-period
CRT through the design pattern matrix, specified by DESIGNPATTERN, containing
the number of sequences and periods, numerical indicators for treatment
status, and the incompleteness in the design. The SAS macro applies to cross-
sectional and closed-cohort multi-period CRT designs but not to closed cohort
designs. Specifically, the SAS macro allows a varying number of participants
across cluster periods for cross-sectional designs through the specification
of CP_SIZE_MATRIX. For closed cohort designs, each column of CP_SIZE_MATRIX
should be the same such that cluster-period sizes may vary across sequences
but not within rows. The number of clusters in sequences are specified by a
vector M to allow varying cluster numbers across sequences.
Marginal mean model options include binary, count, and continuous responses
with three link functions, specified by DIST and LINK, respectively. Note that
the default link function is the canonical link. Meanwhile, the categorical
period effects model or the linear period effects model is selected by
specifying PERIOD_EFFECT_TYPE. The user also needs to choose one of three
intervention effects models introduced in Section 2, specified by
INTERVENTION_EFFECT_TYPE. For the incremental intervention effects model,
MAX_INTERVENTION_PERIOD should be filled with the number of periods at which
the full treatment effect $\delta$ is reached. For the extended incremental
intervention effects model, the MAX_INTERVENTION_PERIOD is the number of
periods under active intervention phase and there should be at least one
maintenance period in each sequence. The intervention effect size and period
effects at the scale of link function are all required with the choice of
specific intervention and period effects model through DELTA and
BETA_PERIOD_EFFECTS .

Four within-cluster correlation structures commonly used for multi-period CRTs
are considered in the SAS macro (Table 2) through specification of CORR_TYPE
and corresponding intra-cluster correlations (ICCs). Specifically, there are
two distinct correlation structures for each of the cohort and cross-sectional
design. Each structure incorporates the usual ICC, which measures the
correlation between responses from different individuals within the same
cluster during the same period:
$\text{corr}\left(y_{ijk},y_{ijk^{\prime}}\right)=\alpha_{0}$ or $\alpha_{1}$,
$k\neq k^{\prime}$. For cross-sectional designs, the nested exchangeable
correlation structure additionally specifies a correlation parameter
$\alpha_{2}$ for observation pairs collected from different periods.
Alternatively, exponential decay assumes the between-period correlation
between responses from different individuals within the same cluster in the
$j_{th}$ and $j^{\prime}_{th}$ periods decays over time as
$\alpha_{0}r_{0}^{|j-j^{\prime}|}$. For cohort designs, the block exchangeable
correlation structure distinguishes between-period correlations for pairs of
individuals, $\alpha_{2},$ from a constant intra-individual correlation for
repeated observations, $\alpha_{3}$ (Li et al., 2018; Preisser et al., 2008).
On the other hand, the proportional decay correlation structure (Li, 2020;
Lefkopoulou et al., 1989) allows for correlation decay over time, where the
intra-individual correlation
$\text{corr}\left(y_{ijk},y_{ij^{\prime}k}\right)=r_{0}^{|j-j^{\prime}|},j\neq
j^{\prime}$ has a first-order auto-regressive structure decay rate $r_{0}$ and
the between-period correlation among responses from different individuals
within the same cluster is $\alpha_{0}r_{0}^{|j-j^{\prime}|},j\neq
j^{\prime},k\neq k^{\prime}$. Note that the nested exchangeable correlation
for cross-sectional designs is a special case of block exchangeable
correlation when $\alpha_{2}=\alpha_{3}$. Finally, the simple exchangeable
correlation (Hussey and Hughes, 2007) additionally specifies that within- and
between-period correlations are equal $\alpha_{1}=\alpha_{2}$.

Design | Correlation Structure | Label | $j=j^{\prime}$ | $j\neq j^{\prime}$,$k\neq k^{\prime}$ | $j\neq j^{\prime}$ ,$k=k^{\prime}$
---|---|---|---|---|---
Cross Sectional | Nested Exchangeable | NE | $\alpha_{1}$ | $\alpha_{2}$ | -
| Exponential Decay | ED | $\alpha_{0}$ | $\alpha_{0}r_{0}^{|j-j^{\prime}|}$ | -
Cohort | Block Exchangeable | BE | $\alpha_{1}$ | $\alpha_{2}$ | $\alpha_{3}$
| Proportional Decay | PD | $\alpha_{0}$ | $\alpha_{0}r_{0}^{|j-j^{\prime}|}$ | $r_{0}^{|j-j^{\prime}|}$
Table 2: Intra-cluster correlation:
$\operatorname{corr}\left(y_{ijk},y_{ij^{\prime}k^{\prime}}\right)$ under
different correlation structures for SW-CRTs (i=cluster, j=period,
k=individual)

The significance level for two-sided tests, specified by ALPHA is optional
with a default value of 0.05. In the degrees of freedom determination, the
number of clusters minus the number of marginal mean parameters, $df=I-p$, is
the default formula. Another degrees of freedom determination $df=I-2$ in Li
(2020) is also available, specified by DF_CHOICE.

There are some consistency checks in SAS macro %CRTFASTGEEPWR to ensure
parameters are reasonably specified for the power calculation. First, if there
are cluster periods in the design pattern matrix with no data collection (i.e.
2 in DESIGNPATTERN), the corresponding locations in the CP_SIZE_MATRIX need to
be 0. Second, BETA_PERIOD_EFFECTS should match the selected period effects
model. For the linear period effects model, there are two period effects
parameters. While for the categorical period effects model, the number of
period effects parameters is equal to the column size of the Design pattern
matrix DESIGNPATTERN. Finally, the marginal mean outcome $\mu_{ijk}$ needs to
be within the rational range based on the specific outcome type, such as
$\mu_{ijk}$ within (0,1) for binary outcomes and $\mu_{ijk}$ are non-negative
for count outcomes. Specifically, for binary outcomes, the Frèchet bounds are
also checked based on the specification of working correlation structures and
the marginal means to ensure their compatibility (Qaqish, 2003).

### 4.2: Multi-period CRT examples of SAS macro %CRTFASTGEEPWR

In the section, we focus on illustrating the power calculation of two complete
and two incomplete stepped wedge cluster randomized trials using the SAS macro
%CRTFASTGEEPWR, with different outcome types, specification of marginal mean
models and correlation structures.

The first example illustrates power calculation based on the Connect-Home
trial design (Figure 1) with linear period effects for a continuous outcome,
patient preparedness for home care (a scale with range 0 to 100) assessed 7
days after discharge from the SNF. There are 6 sequences with 22 periods in
the study, having 7 periods without patient enrollment and 15 periods with
patient enrollment in each cluster. In the power calculation, there is 1
cluster in each sequence and 360 subjects in the trial, in which 4 patients
enrolled in each non-missing cluster period. In CP_SIZE_MATRIX, 0 means no
patients enrolled in the specific sequence and period, which corresponds to
locations with 2 in the design pattern matrix. We assume the baseline patient
preparedness score as $\beta_{0}=68$ and a gently increasing linear period
effect such that $\beta_{1}=0.1$ for $J=1,...,22$ with common variance
$\phi=64$ (standard deviation = 8). The full effect size is reached at 10
months on intervention condition $(q=10)$ for the incremental intervention
effects model with $\delta=10$. ICCs are specified with
$(\alpha_{1},\alpha_{2})=(0.1,0.05)$ under nested exchangeable correlation
structure to indicate a moderate within-cluster correlation for the cross-
sectional design. The power is calculated using $z$-test with normal
approximation and $t$-test with $df=3$. From the results, the power using the
z-test is much greater than the $t$-test. Simulation studies have shown that
the $z$-test is too optimistic and tends to have an inflated test size in SW-
CRTs with a small number of clusters (Li et al., 2018). Thus, we recommend
calculating power with the $t$-test for the Connect Home study.

⬇

1%CRTFASTGEEPWR(alpha=0.05, m =%str(J(6,1,1)), corr_type = NE,alpha1 = 0.03,

2alpha2 = 0.015, intervention_effect_type=INC, delta = 10,
period_effect_type=LIN,

3max_intervention_period=10, beta_period_effects =%str({68,0.1}), dist =
normal,

4phi=64,

5CP_size_matrix = %str({4 4 4 4 4 0 0 4 4 4 4 4 4 4 4 4 4 0 0 0 0 0,

6 0 4 4 4 4 4 4 0 0 4 4 4 4 4 4 4 4 4 0 0 0 0,

7 0 0 4 4 4 4 4 4 4 0 0 4 4 4 4 4 4 4 4 0 0 0,

8 0 0 0 4 4 4 4 4 4 4 4 0 0 4 4 4 4 4 4 4 0 0,

9 0 0 0 0 4 4 4 4 4 4 4 4 4 0 0 4 4 4 4 4 4 0,

10 0 0 0 0 0 4 4 4 4 4 4 4 4 4 4 0 0 4 4 4 4 4}),

11

12DesignPattern = %str({0 0 0 0 0 2 2 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2,

13 2 0 0 0 0 0 0 2 2 1 1 1 1 1 1 1 1 1 2 2 2 2,

14 2 2 0 0 0 0 0 0 0 2 2 1 1 1 1 1 1 1 1 2 2 2,

15 2 2 2 0 0 0 0 0 0 0 0 2 2 1 1 1 1 1 1 1 2 2,

16 2 2 2 2 0 0 0 0 0 0 0 0 0 2 2 1 1 1 1 1 1 2,

17 2 2 2 2 2 0 0 0 0 0 0 0 0 0 0 2 2 1 1 1 1 1}));

⬇

1Output of Example 1:The fast GEE power of normal outcomes with nested
exchangeable

2correlation structure and (alpha1,alpha2):(0.03, 0.015) under incremental

3intervention effects model and delta = 10

4

5T S clusters df theta totaln Dist Link stddel zpower tpower

622 6 6 3 68 360 NORMAL IDENTITY 3.9139 0.9746 0.7413

7 0.1

8 10

The second example aims to calculate the power for a count outcome based on
the Connect-Home trial design (Figure 1), which is the number of days of acute
care use for patients within 60 days after discharge from the SNF. In this
example, an average intervention effect model is specified with the same
linear period effect model as in the first example. The design is identical to
the first example but the number of clusters increases from 6 to 12 clusters
to achieve enough power for the count outcome. For the parameters in the
marginal mean model with log link, baseline number of acute care use is
assumed to be 1.24 days with an slightly decreasing period effect over time,
giving $\beta_{0}=\log(1.24)=0.215$ and $\beta_{1}=-0.01$ with the dispersion
parameter $\phi=1.2$. Assuming the intervention reduces the mean number of
acute care days by 40%, the intervention effect under the average intervention
effects model is $\delta=\log(0.6)=-0.511$. ICCs are specified with
$(\alpha_{0},r_{0})=(0.03,0.8)$ under exponential decay correlation structure
to indicate a small within-cluster correlation for the cross-sectional design.
The power is calculated using the $z$-test with normal approximation and the
$t$-test with $df=9$. Compared to the first example that had only six
clusters, power using the two tests are closer in values and exceed 79%.

⬇

1%CRTFASTGEEPWR(alpha=0.05, m =%str(J(6,1,2)), corr_type = ED,alpha0 = 0.03,

2R0 = 0.8, intervention_effect_type=AVE, delta = -0.511,
period_effect_type=LIN,

3beta_period_effects =%str({0.215,-0.01}) ,dist = poisson,phi=1.2,

4CP_size_matrix = %str({4 4 4 4 4 0 0 4 4 4 4 4 4 4 4 4 4 0 0 0 0 0,

5 0 4 4 4 4 4 4 0 0 4 4 4 4 4 4 4 4 4 0 0 0 0,

6 0 0 4 4 4 4 4 4 4 0 0 4 4 4 4 4 4 4 4 0 0 0,

7 0 0 0 4 4 4 4 4 4 4 4 0 0 4 4 4 4 4 4 4 0 0,

8 0 0 0 0 4 4 4 4 4 4 4 4 4 0 0 4 4 4 4 4 4 0,

9 0 0 0 0 0 4 4 4 4 4 4 4 4 4 4 0 0 4 4 4 4 4}),

10

11DesignPattern = %str({0 0 0 0 0 2 2 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2,

12 2 0 0 0 0 0 0 2 2 1 1 1 1 1 1 1 1 1 2 2 2 2,

13 2 2 0 0 0 0 0 0 0 2 2 1 1 1 1 1 1 1 1 2 2 2,

14 2 2 2 0 0 0 0 0 0 0 0 2 2 1 1 1 1 1 1 1 2 2,

15 2 2 2 2 0 0 0 0 0 0 0 0 0 2 2 1 1 1 1 1 1 2,

16 2 2 2 2 2 0 0 0 0 0 0 0 0 0 0 2 2 1 1 1 1 1}));

⬇

1Output of Example 2: The fast GEE power of poisson outcomes with exponential
decay

2correlation structure and (alpha0,r0):(0.03, 0.8) under average intervention

3effects model and delta = -0.511

4

5T S clusters df theta totaln Dist Link stddel zpower tpower

622 6 12 9 0.215 720 POISSON LOG 3.1096 0.8749 0.7906

7 -0.01

8 -0.511

The third example illustrates power calculation for a cross-sectional SW-CRT
to improve pre-operative decision-making, by the use of a patient-driven
question prompt list intervention (Taylor et al., 2017; Schwarze et al.,
2020). In the third example, 480 patients enrolled across six periods are
clustered within 40 surgeons who are randomized to transition from control
(blue cells) to intervention condition (green cells) at one of five randomly
assigned sequences (8 surgeons per sequence; Figure 2). We calculate the power
for a binary primary outcome regarding whether the patient has a post-
treatment regret. We assume a balanced and complete design for the study, 12
patients for each surgeon with two patients in each cluster period. In the
marginal mean model for the binary outcome with logit link and average
intervention effects model, the control is assumed to have 2.2 times the odds
of reporting post treatment regret compared to the intervention group, given
by $\delta=\log(1/2.2)=-0.789$. The average probability of post treatment
regret at baseline is assumed to be 0.22, such that
$\beta_{0}=\log(0.22/0.78)=-1.266$ with an consistent increasing period
effects $\beta_{i}=0.01,i=1,\ldots,5$. For the working correlation structure,
we used the exponential decay correlation structure with ICCs
$(\alpha_{0},r_{0})=(0.03,0.8)$. Power using the $t$-test and the $z$-test
both reach 80% and are similar to one another considering the moderately large
number of clusters.

Figure 2: The trial diagram of the decision-making trial: the study includes
40 clusters and each treatment sequence includes 8 clusters. The blue and
green cells denote control and intervention cluster-periods, respectively

⬇

1%CRTFASTGEEPWR(alpha=0.05, m =%str(J(5,1,8)), corr_type = ED, alpha0 = 0.03,

2R0 = 0.8, intervention_effect_type=AVE, delta =-0.789,
period_effect_type=CAT,

3beta_period_effects =%str({-1.266,0.01,0.01,0.01,0.01,0.01}), dist =
binary,phi=1,

4CP_size_matrix =%str(J(5,6,2)),

5DesignPattern =%str({ 0 1 1 1 1 1,

6 0 0 1 1 1 1,

7 0 0 0 1 1 1,

8 0 0 0 0 1 1,

9 0 0 0 0 0 1}));

⬇

1Output of Example 3: The fast GEE power of binary outcomes with exponential
decay

2correlation structure and (alpha0,r0):(0.03, 0.8) under average intervention

3effects model and delta = -0.789

4

5T S clusters df theta totaln Dist Link stddel zpower tpower

66 5 40 33 -1.266 480 BINARY LOGIT 2.9170 0.8307 0.8081

7 0.01

8 0.01

9 0.01

10 0.01

11 0.01

12 -0.789

The fourth example is based on the Heart Health NOW study for which we assume
a complete, stratified, SW-CRT evaluating the effect of primary care practice
support on evidence-based cardiovascular disease (CVD) prevention,
organizational change process measures, and patient outcomes, the latter
captured by electronic health records (EHR) (Weiner et al., 2015). Medical
practices are randomized to receive the intervention at one of three time
points (steps) within two strata defined by high (the first three treatment
sequences, Figure 3) or low (last three rows) readiness for change. After four
quarters in the intervention phase (green boxes), each practice enters a
maintenance phase (gray boxes) for two to six quarters depending upon the
allocated treatment sequence. HHN was a quality improvement research project
whereby the intervention of practice facilitation aimed to bring about
enduring change in the patient-centered and organizational outcomes. We
consider a combined binary outcome regarding whether there is hospitalization
due to stroke, acute myocardial infarction, or angina for patients. We assume
that there are 30 medical practices (clusters) in each sequence (practice
cohort) with 100 patients enrolled in each cluster period; thus 1100 patients
will be enrolled in each cluster. If the baseline probability of
hospitalization is 0.05, making $\beta_{0}=\log(0.05/0.95)=-2.944$ with an
consistent decreasing period effects $\beta_{1}=-0.01$. Under the extended
incremental intervention effects model, the intervention effect is assumed to
decrease the odds of hospitalization at the end of 4 quarters by 25% under the
active intervention condition, $\delta=\log(0.75)=-0.288$, maintaining the
same effect size in the maintenance periods. The working correlation structure
for the binary outcome is a nested exchangeable correlation structure with
ICCs $(\alpha_{1},\alpha_{2})=(0.03,0.015)$. Considering the large cluster
size and number of clusters, powers is very similar under the $z$-test and
$t$-test, reaching 78%.

Figure 3: The study design of the HHN study: the blue, green and grey cells
denote control, active intervention and maintenance cluster-periods,
respectively

⬇

1%CRTFASTGEEPWR(alpha=0.05, m=%str(J(6,1,30)), corr_type=NE, alpha1=0.03,

2alpha2=0.015, intervention_effect_type=INC_EX, period_effect_type=LIN,

3delta=-0.288,
max_intervention_period=4,beta_period_effects=%str({-2.944,-0.01}),

4dist = binary,phi=1, CP_size_matrix =%str(J(6,11,100)),

5DesignPattern=%str({0 1 1 1 1 1 1 1 1 1 1,

6 0 0 1 1 1 1 1 1 1 1 1,

7 0 0 0 1 1 1 1 1 1 1 1,

8 0 0 0 1 1 1 1 1 1 1 1,

9 0 0 0 0 1 1 1 1 1 1 1,

10 0 0 0 0 0 1 1 1 1 1 1}));

⬇

1Output of Example 4: GEE power of binary outcomes with nested exchangeable

2correlation structure and (alpha1,alpha2):(0.03, 0.015) under extended
incremental

3intervention effects model and delta = -0.288

4

5T S clusters df theta totaln Dist Link stddel zpower tpower

611 6 180 177 -2.944 198000 BINARY LOGIT 2.7477 0.7846 0.7801

7 -0.01

8 -0.288

In the appendix, we also describe the power calculation of multi-period
parallel cluster randomized trials, as well as SAScodes to calculate powers
under varying effect sizes using the SAS macro.

##  5 Discussion

This article proposes a fast GEE power method for binary, count, and
continuous responses of complete and incomplete multi-period CRTs, including
parallel-arm longitudinal CRTs, cluster randomized crossover trials and SW-
CRTs. The fast GEE power approach was illustrated in the planning of four
complete and incomplete cross-sectional stepped wedge designs for binary,
count and continuous outcomes, with different correlation structures. The SAS
macro %CRTFASTGEEPWR is novel in several aspects. Through specification of the
Design Pattern matrix in the spirit of Hemming et al. (Hemming et al., 2015)
and Rochon, (Rochon, 1998), the general GEE power method in the SAS macro is
implemented for complete and incomplete multi-period CRTs. We have also
considered four multilevel correlation structures proposed in the recent
literature for multi-period CRTs. To our knowledge, there is no other single
statistical software that unifies the four multilevel correlation structures
in an approach for designing cross-sectional and cohort CRTs. This proposed
software for power of multi-period CRTs based on marginal models fills a gap
by adding to the literature of power calculators based on mixed models.
(Hughes et al., 2015; Hemming et al., 2020)

The accuracy of the fast GEE power method based on the GEE model-based
variance matrix has been validated in simulation studies based on GEE with the
bias-corrected variance estimator proposed by Kauerman and Carroll. (Li et
al., 2021; Kauermann and Carroll, 2001) For researchers interested in GEE
analysis with bias-corrected variance estimators for CRTs, the SAS macro
GEECORR by Shing and Preisser (Shing et al., 2021) is available for binary
responses. A SAS macro GEEMAEE developed by the authors for binary, count, and
continuous outcomes additionally applies bias-corrections in the estimation of
ICCs and their variance estimators, which is desired for reporting ICC
parameters as recommended by the CONSORT statement for stepped wedge trials
(Hemming et al., 2018). GEECORR and GEEMAEE are all available at
http://www.bios.unc.edu/$\sim$preisser/ personal/software.html.

## Acknowledgments

The Connect-Home trial was funded by the National Institute of Nursing
Research of the National Institutes of Health under award number
1R01NR017636-01. The content is solely the responsibility of the authors and
does not necessarily represent the official views of the National Institutes
of Health.

Research in this article was funded through a Patient-Centered Outcomes
Research Institute® (PCORI® Award ME-2019C1-16196).The statements presented in
this article are solely the responsibility of the authors and do not
necessarily represent the views of PCORI®, its Board of Governors or
Methodology Committee.

## References

  * Chen et al. (2022) Jiachen Chen, Xin Zhou, Fan Li, and Donna Spiegelman.  swdpwr: A sas macro and an r package for power calculations in stepped wedge cluster randomized trials.  _Computer methods and programs in biomedicine_ , 213:106522, Jan 2022.
  * Copas et al. (2015) Andrew J Copas, James J Lewis, Jennifer A Thompson, Calum Davey, Gianluca Baio, and James R Hargreaves.  Designing a stepped wedge trial: three main designs, carry-over effects and randomisation approaches.  _Trials_ , 16:352, August 2015.  ISSN 1745-6215.  doi: 10.1186/s13063-015-0842-7.  URL https://europepmc.org/articles/PMC4538756.
  * Ford and Westgate (2020) Whitney P. Ford and Philip M. Westgate.  Maintaining the validity of inference in small-sample stepped wedge cluster randomized trials with binary outcomes when using generalized estimating equations.  _Statistics in Medicine_ , 39(21):2779–2792, 2020\.  doi: https://doi.org/10.1002/sim.8575.  URL https://onlinelibrary.wiley.com/doi/abs/10.1002/sim.8575.
  * Hemming and Taljaard (2020) Karla Hemming and Monica Taljaard.  Reflection on modern methods: when is a stepped-wedge cluster randomized trial a good study design choice?  _International Journal of Epidemiology_ , 49(3):1043–1052, 05 2020.  ISSN 0300-5771.  doi: 10.1093/ije/dyaa077.  URL https://doi.org/10.1093/ije/dyaa077.
  * Hemming et al. (2015) Karla Hemming, Richard Lilford, and Alan J. Girling.  Stepped-wedge cluster randomised controlled trials: a generic framework including parallel and multiple-level designs.  _Statistics in medicine_ , 34:181–96, 2015.
  * Hemming et al. (2018) Karla Hemming, Monica Taljaard, Joanne E McKenzie, Richard Hooper, Andrew Copas, Jennifer A Thompson, Mary Dixon-Woods, Adrian Aldcroft, Adelaide Doussau, Michael Grayling, Caroline Kristunas, Cory E Goldstein, Marion K Campbell, Alan Girling, Sandra Eldridge, Mike J Campbell, Richard J Lilford, Charles Weijer, Andrew B Forbes, and Jeremy M Grimshaw.  Reporting of stepped wedge cluster randomised trials: extension of the consort 2010 statement with explanation and elaboration.  _BMJ_ , 363, 2018.  ISSN 0959-8138.  doi: 10.1136/bmj.k1614.  URL https://www.bmj.com/content/363/bmj.k1614.
  * Hemming et al. (2020) Karla Hemming, Jessica Kasza, Richard Hooper, Andrew Forbes, and Monica Taljaard.  A tutorial on sample size calculation for multiple-period cluster randomized parallel, cross-over and stepped-wedge trials using the shiny crt calculator.  _International journal of epidemiology_ , 49:979–995, Jun 2020.
  * Hughes et al. (2015) James P. Hughes, Tanya S. Granston, and Patrick J. Heagerty.  Current issues in the design and analysis of stepped wedge trials.  _Contemporary clinical trials_ , 45:55–60, Nov 2015.
  * Hussey and Hughes (2007) Michael A. Hussey and James P. Hughes.  Design and analysis of stepped wedge cluster randomized trials.  _Contemp Clin Trials._ , 28(2):182–191, 2007\.
  * Inc. (2016) SAS Institute Inc.  _SAS Software, Version 9.4_.  Cary, NC, 2016.  URL http://www.sas.com/.
  * Kasza et al. (2019) J. Kasza, K. Hemming, R. Hooper, Jns Matthews, and A. B. Forbes.  Impact of non-uniform correlation structure on sample size and power in multiple-period cluster randomised trials.  _Statistical methods in medical research_ , 28:703–716, Mar 2019.
  * Kasza and Forbes (2019) Jessica Kasza and Andrew B. Forbes.  Information content of cluster–period cells in stepped wedge trials.  _Biometrics_ , 75(1):144–152, 2019.  doi: https://doi.org/10.1111/biom.12959.  URL https://onlinelibrary.wiley.com/doi/abs/10.1111/biom.12959.
  * Kauermann and Carroll (2001) Göran Kauermann and Raymond J Carroll.  A note on the efficiency of sandwich covariance matrix estimation.  _Journal of the American Statistical Association_ , 96(456):1387–1396, 2001.  doi: 10.1198/016214501753382309.  URL https://doi.org/10.1198/016214501753382309.
  * Lefkopoulou et al. (1989) Myrto Lefkopoulou, Dirk Moore, and Louise Ryan.  The analysis of multiple correlated binary outcomes: Application to rodent teratology experiments.  _Journal of the American Statistical Association_ , 84(407):810–815, 1989.  ISSN 01621459.
  * Li (2020) Fan Li.  Design and analysis considerations for cohort stepped wedge cluster randomized trials with a decay correlation structure.  _Statistics in medicine_ , 39(4):438–455, 2020\.
  * Li et al. (2018) Fan Li, Elizabeth L. Turner, and John S. Preisser.  Sample size determination for gee analyses of stepped wedge cluster randomized trials.  _Biometrics_ , 74(4):1450–1458, 2018.
  * Li et al. (2021) Fan Li, Hengshi Yu, Paul J. Rathouz, Elizabeth L. Turner, and John S. Preisser.  Marginal modeling of cluster-period means and intraclass correlations in stepped wedge designs with binary outcomes.  _Biostatistics (Oxford, England)_ , Feb 2021.
  * Murray et al. (2004) David M. Murray, Sherri P. Varnell, and Jonathan L. Blitstein.  Design and analysis of group-randomized trials: a review of recent methodological developments.  _American journal of public health_ , 94:423–32, Mar 2004\.
  * Preisser et al. (2003) John S. Preisser, Mary L. Young, Daniel J. Zaccaro, and Mark Wolfson.  An integrated population-averaged approach to the design, analysis and sample size determination of cluster-unit trials.  _Statistics in medicine_ , 22:1235–54, Apr 2003.
  * Preisser et al. (2007) John S. Preisser, Beth A. Reboussin, Eun-Young Song, and Mark Wolfson.  The importance and role of intracluster correlations in planning cluster trials.  _Epidemiology (Cambridge, Mass.)_ , 18:552–60, Sep 2007\.
  * Preisser et al. (2008) John S. Preisser, Bing Lu, and Bahjat F. Qaqish.  Finite sample adjustments in estimating equations and covariance estimators for intracluster correlations.  _Statistics in Medicine_ , 27(27):5764–5785, 2008\.
  * Qaqish (2003) Bahjat F. Qaqish.  A family of multivariate binary distributions for simulating correlated binary variables with specified marginal means and correlations.  _Biometrika_ , 90(2):455–463, 2003.  ISSN 00063444.
  * Reboussin et al. (2012) BA Reboussin, JS Preisser, E-Y Song, and M Wolfson.  Sample size estimation for alternating logistic regression analysis of multilevel randomized community trials of underage drinking.  _Journal of the Royal Statistical Society, Series A_ , 175:691–712, 2012.
  * Rochon (1998) James Rochon.  Application of gee procedures for sample size calculations in repeated measures experiments.  _Statistics in Medicine_ , 17(14):1643–1658, 1998\.
  * Schwarze et al. (2020) Margaret L. Schwarze, Anne Buffington, Jennifer L. Tucholka, Bret Hanlon, Paul J. Rathouz, Nicholas Marka, Lauren J. Taylor, Christopher J. Zimmermann, Anna Kata, Nathan D. Baggett, Daniel A. Fox, Andrea E. Schmick, Ana Berlin, Nina E. Glass, Anne C. Mosenthal, Emily Finlayson, Zara Cooper, and Karen J. Brasel.  Effectiveness of a question prompt list intervention for older patients considering major surgery: A multisite randomized clinical trial.  _JAMA surgery_ , 155:6–13, Jan 2020.
  * Shing et al. (2021) Tracie L. Shing, John S. Preisser, and Richard C. Zink.  Geecorr: A sas macro for regression models of correlated binary responses and within-cluster correlation using generalized estimating equations.  _Computer Methods and Programs in Biomedicine_ , 208:106276, 2021.  ISSN 0169-2607.  doi: https://doi.org/10.1016/j.cmpb.2021.106276.  URL https://www.sciencedirect.com/science/article/pii/S0169260721003503.
  * Taylor et al. (2017) Lauren J. Taylor, Paul J. Rathouz, Ana Berlin, Karen J. Brasel, Anne C. Mosenthal, Emily Finlayson, Zara Cooper, Nicole M. Steffens, Nora Jacobson, Anne Buffington, Jennifer L. Tucholka, Qianqian Zhao, and Margaret L. Schwarze.  Navigating high-risk surgery: protocol for a multisite, stepped wedge, cluster-randomised trial of a question prompt list intervention to empower older adults to ask questions that inform treatment decisions.  _BMJ open_ , 7:e014002, May 2017.
  * Teerenstra et al. (2010) Steven Teerenstra, Bing Lu, John S. Preisser, Theo van Achterberg, and George F. Borm.  Sample size considerations for gee analyses of three-level cluster randomized trials.  _Biometrics_ , 66:1230–7, Dec 2010.
  * Tian et al. (2021) Zibo Tian, John S. Preisser, Denise Esserman, Elizabeth L. Turner, Paul J. Rathouz, and Fan Li.  Impact of unequal cluster sizes for gee analyses of stepped wedge cluster randomized trials with binary outcomes.  _Biometrical journal. Biometrische Zeitschrift_ , Oct 2021.
  * Toles et al. (2021) M. Toles, C. Colón-Emeric, LC. Hanson, M. Naylor, M. Weinberger, J. Covington, and JS. Preisser.  Transitional care from skilled nursing facilities to home: study protocol for a stepped wedge cluster randomized trial  Trials.  pages 22–120, 2021.
  * Turner et al. (2017) Elizabeth L. Turner, Fan Li, John A. Gallis, Melanie Prague, and David M. Murray.  Review of recent methodological developments in group-randomized trials: Part 1-design.  _American journal of public health_ , 107:907–915, Jun 2017\.
  * Wang et al. (2021) Xueqi Wang, Elizabeth L. Turner, John S. Preisser, and Fan Li.  Power considerations for generalized estimating equations analyses of four-level cluster randomized trials.  _Biometrical journal. Biometrische Zeitschrift_ , Dec 2021.
  * Weiner et al. (2015) Bryan J. Weiner, Michael P. Pignone, C. Annette DuBard, Ann Lefebvre, Janet L. Suttie, Janet K. Freburger, and Samuel Cykert.  Advancing heart health in north carolina primary care: the heart health now study protocol.  _Implementation Science_ , 10(1):160, 2015.  ISSN 1748-5908.  doi: 10.1186/s13012-015-0348-4.  URL https://doi.org/10.1186/s13012-015-0348-4.

## Appendix

In the appendix, we will illustrate the use of SAS macro %CRTFASTGEEPWR for a
parallel cluster trial, based on the Enforcing Underage Drinking Laws (EUDL)
Program [Preisser et al., 2003]. The EDUL program funded interventions at the
community level to enforce laws related to alcohol use by underage person to
reduce the underage drinking. Moreover, the study used a non-randomized trial
design because the intervention communities were selected by the
administrative units in states. The control communities were selected by the
propensity score method to match the intervention communities based on US
census data. There are three periods: one baseline assessment and two follow-
up assessments for participants in the communities participating in the EUDL
program. We will use the design of the EUDL study to calculate the power under
the assumption that all confounded covariates were balanced in control and
intervention groups. The main outcome is the binary outcome of self-reported
last 30-day alcohol use for an underage person. We assume there are 40
clusters in total with 20 clusters per intervention group and 30 participants
enrolled in each cluster-period. Assuming the baseline probability of self-
reported last 30-day alcohol use for an underage person is 0.6, we set
$\beta_{0}=\log(0.6/0.4)=0.405$ with an consistent decreasing period effects
$\beta_{1}=-0.01$. Under the average intervention effects model, the
intervention effect is assumed to decrease the odds of underage drinking by
30% on average, $\delta=\log(0.7)=-0.357$. Moreover, a nested exchangeable
correlation structure is used with ICCs $(\alpha_{1},\alpha_{2})=(0.02,0.01)$.
From the power calculation results, power is close to 90% given the
parameters. Thus, this example further illustrates the flexibility of the SAS
macro in calculating power for multi-period cluster randomized trials with
different designs.

⬇

1

2%CRTFASTGEEPWR(alpha=0.05, m =%str(J(2,1,20)), corr_type = NE,alpha1 = 0.02,

3alpha2 = 0.01,intervention_effect_type=AVE, delta =
-0.357,period_effect_type=CAT,

4beta_period_effects =%str({0.405,-0.01,-0.01}) ,dist = binary,phi=1,

5CP_size_matrix = %str(J(2,3,30)),DesignPattern =%str({0 1 1,

6 0 0 0}));

⬇

1Output of EUDL design: The fast GEE power of binary outcomes with nested

2exchangeable correlation structure and (alpha1,alpha2):(0.02, 0.01)

3under average intervention effects model and delta = -0.357

4

5T S clusters df theta totaln Dist Link stddel zpower tpower

63 2 40 36 0.405 3600 BINARY LOGIT 3.2624 0.9036 0.8875

7 -0.01

8 -0.01

9 -0.357

We provide SAScodes to calculate and compare powers using GEE analysis bases
on different effect sizes. In the example codes, %CRTFASTGEEPWR is used to
calculate powers under varying effect sizes, reducing the odds of underage
drinking in the EDUL study by $(20\%,25\%,30\%,35\%,40\%)$ on average, leading
to
$\delta=log(20\%,25\%,30\%,35\%,40\%)=(-0.223,-0.288,-0.357,-0.431,-0.511)$.
Outputs of the SAScodes are attached below the codes.

⬇

1%macro multi_effectsizes(effectsizes);

2 %local index value;

3 %do index = 1 %to %sysfunc(countw(&effectsizes,%str( )));

4 %let value =%scan(&effectsizes,&index,%str( ));

5 %CRTFASTGEEPWR(alpha=0.05, m =%str(J(2,1,20)), corr_type = NE,alpha1 = 0.02,

6 alpha2 = 0.01 ,intervention_effect_type=AVE, delta = &value,

7 period_effect_type=CAT, beta_period_effects =%str({0.405,-0.01,-0.01}) ,

8 dist = binary,phi=1,CP_size_matrix = %str(J(2,3,30)),

9 DesignPattern = %str({0 1 1,

10 0 0 0}));

11 %end;

12%mend;

13%multi_effectsizes(-0.223 -0.288 -0.357 -0.431 -0.511);

⬇

1Outputs: The fast GEE power of binary outcomes with nested exchangeable

2correlation structure and (alpha1,alpha2):(0.02, 0.01) under average

3intervention effects model and delta = -0.223

4

5T S clusters df theta totaln Dist Link stddel zpower tpower

63 2 40 36 0.405 3600 BINARY LOGIT 2.0482 0.5352 0.5080

7 -0.01

8 -0.01

9 -0.223

10

11The fast GEE power of binary outcomes with nested exchangeable

12correlation structure and (alpha1,alpha2):(0.02, 0.01) under average

13intervention effects model and delta = -0.288

14

15T S clusters df theta totaln Dist Link stddel zpower tpower

163 2 40 36 0.405 3600 BINARY LOGIT 2.6395 0.7516 0.7276

17 -0.01

18 -0.01

19 -0.288

20

21The fast GEE power of binary outcomes with nested exchangeable

22correlation structure and (alpha1,alpha2):(0.02, 0.01) under average

23intervention effects model and delta = -0.357

24

25T S clusters df theta totaln Dist Link stddel zpower tpower

263 2 40 36 0.405 3600 BINARY LOGIT 3.2624 0.9036 0.8875

27 -0.01

28 -0.01

29 -0.357

30

31The fast GEE power of binary outcomes with nested exchangeable

32correlation structure and (alpha1,alpha2):(0.02, 0.01) under average

33intervention effects model and delta = -0.431

34

35

36T S clusters df theta totaln Dist Link stddel zpower tpower

373 2 40 36 0.405 3600 BINARY LOGIT 3.9239 0.9752 0.9670

38 -0.01

39 -0.01

40 -0.431

41

42The fast GEE power of binary outcomes with nested exchangeable

43correlation structure and (alpha1,alpha2):(0.02, 0.01) under average

44intervention effects model and delta = -0.511

45

46T S clusters df theta totaln Dist Link stddel zpower tpower

473 2 40 36 0.405 3600 BINARY LOGIT 4.6296 0.9962 0.9933

48 -0.01

49 -0.01

50 -0.511


* Tan et al. [2021] Sijun Tan, Jibang Wu, Xiaohui Bei, and Haifeng Xu.  Least square calibration for peer reviews.  _Advances in Neural Information Processing Systems_ , 34:27069–27080, 2021.
  * Tomkins et al. [2017] Andrew Tomkins, Min Zhang, and William D Heavlin.  Reviewer bias in single-versus double-blind peer review.  _Proceedings of the National Academy of Sciences_ , 114(48):12708–12713, 2017.
  * Veblen [2017] Thorstein Veblen.  _The theory of the leisure class_.  Routledge, 2017.
  * Verhallen [1982] Theo MM Verhallen.  Scarcity and consumer choice behavior.  _Journal of Economic Psychology_ , 2(4):299–322, 1982.
  * Wagner and Alexander [2013] Caroline S Wagner and Jeffrey Alexander.  Evaluating transformative research programmes: A case study of the nsf small grants for exploratory research programme.  _Research Evaluation_ , 22(3):187–197, 2013.
  * Wang et al. [2021] Jingyan Wang, Ivan Stelmakh, Yuting Wei, and Nihar B Shah.  Debiasing evaluations that are biased by evaluations.  In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 35, pages 10120–10128, 2021.
  * Yan et al. [2023] Yuling Yan, Weijie J Su, and Jianqing Fan.  The isotonic mechanism for exponential family estimation.  _arXiv preprint arXiv:2304.11160_ , 2023.

##  Appendix A Appendix

###### Proof of Proposition 1.

We prove that for any ownership instance
$\mathcal{O}=\\{\mathcal{I}^{j}\\}_{j\in[m]}$, we can construct a different
ownership instance
$\mathcal{O}^{\prime}=\\{\overline{\mathcal{I}}^{j}\\}_{j\in[m]}$ such that
any $L$-strong partition ${\mathcal{S}}$ in $\mathcal{O}$ is a 1-strong
partition in $\mathcal{O}^{\prime}$.

Pick any bipartite graph $\mathcal{G}=(\mathcal{A},\mathcal{P},\mathcal{E})$
from the ownership instance $\mathcal{O}=\\{\mathcal{I}^{j}\\}_{j\in[m]}$.
Suppose we were to find $L$-strong partition ${\mathcal{S}}$ in $\mathcal{G}$.
We can construct a bipartite graph
$\mathcal{G}^{\prime}=(\mathcal{A}^{\prime},\mathcal{P}^{\prime},\mathcal{E}^{\prime})$,
where the item set remains the same $\mathcal{P}^{\prime}=\mathcal{P}$, the
owner set $\mathcal{A}^{\prime}$ corresponds to all the $L$ element subsets of
$\mathcal{A}$,
$\mathcal{A}^{\prime}=\\{\ell|u^{\ell}\subseteq\mathcal{A},|u^{\ell}|=L\\}$
and the edge set captures the commons items of every $L$ owners,
$\mathcal{E}^{\prime}=\\{(i,\ell)|i\in\bigcap_{j\in
u^{\ell}}\mathcal{I}^{j}\\}$. We show that for any $L$-strong partition
${\mathcal{S}}=\\{{\mathcal{S}}_{1},{\mathcal{S}}_{2},\dots,{\mathcal{S}}_{K}\\}$
of $\mathcal{G}$, there is an equivalent $1$-strong greedy partition
${\mathcal{S}}^{\prime}=\\{{\mathcal{S}}^{\prime}_{1},{\mathcal{S}}^{\prime}_{2},\dots,{\mathcal{S}}^{\prime}_{K}\\}$
of $\mathcal{G}^{\prime}$ such that
${\mathcal{S}}_{k}={\mathcal{S}}^{\prime}_{k},\forall k\in K$.

The proof is a straightforward verification of this bipartite graph
construction. Pick any ${\mathcal{S}}_{k}\in{\mathcal{S}}$ with
$|{\mathcal{T}}_{k}|\geq L$ in $\mathcal{G}$, there exists an
${\mathcal{S}}^{\prime}_{k}$ with $|{\mathcal{T}}^{\prime}_{k}|=1$ in
$\mathcal{G}^{\prime}$. That is, we have
${\mathcal{T}}^{\prime}_{k}=\\{\ell\\}$ for some
$u^{\ell}\subseteq{\mathcal{T}}_{k}$, then
${\mathcal{S}}^{\prime}_{k}={\mathcal{S}}_{k}\subseteq\bigcap_{j\in
u^{\ell}}\mathcal{I}^{j}$ by construction. Therefore,
${\mathcal{S}}_{k}={\mathcal{S}}^{\prime}_{k},\forall k\in[K]$. ∎

###### Proof of Proposition 2.

We consider the weight function $w(x)=\mathop{max}\\{x,1\\}-1$. For any
partition with $K$ blocks, the objective function is
$\operatorname{obj}({\mathcal{S}})=n-K$. We show that finding the optimal
partition under such an objective function is at least as hard as finding the
minimum set. We prove via a standard hardness reduction argument: for any set
cover instance, we can construct a bipartite graph instance in which the
partition that maximizes the objective function is
$\operatorname{obj}({\mathcal{S}})=n-K$ can be turned into a minimum set
cover.

Pick arbitrary set cover instance with $m$ subsets of $n$ item,
$\mathcal{V}_{1},\mathcal{V}_{2},\dots,\mathcal{V}_{m}$. We construct a
bipartite graph $\mathcal{G}=(\mathcal{A},\mathcal{P},\mathcal{E})$ where
$\mathcal{A}=[m],\mathcal{P}=[n]$ and
$\mathcal{E}=\\{(p_{i},a_{j})|p_{i}\in\mathcal{V}_{j},j\in[m]\\}$. There
exists an optimal partition ${\mathcal{S}}^{*}$ with
$\operatorname{obj}({\mathcal{S}}^{*})=n-K^{*}$, if and only if the minimum
set cover has size $K^{*}$. For the “if” direction, we construct a partition
${\mathcal{S}}^{*}$ with $\operatorname{obj}({\mathcal{S}}^{*})=n-K^{*}$ from
the set cover of size $K^{*}$. For each subset selected by the set cover, we
construct a partition block with items in the subset minus the items already
in the partition. This partition must be valid and have $K^{*}$ blocks. For
the “only if” direction, we construct the set cover of size $K^{*}$ from the
optimal partition ${\mathcal{S}}^{*}$. For every block ${\mathcal{S}}_{k}^{*}$
of the optimal partition ${\mathcal{S}}^{*}$, we pick any vertex
$a_{j}\in{\mathcal{T}}_{k}^{*}$ from the corresponding owner set. Based on the
$K*$ distinct vertices, we select the subsets with the same indices, and it
forms a set cover of all $n$ items by construction. ∎