Paper Title: A Dirichlet stochastic block model for composition-weighted networks.



Leveraging PRS and PDSCH for Integrated Sensing and Communication Systems
 

This work was funded by the European Commission through the H2020 MSCA 5GSmartFact project under grant agreement number 956670. Also, this work was supported by the project 6G-DISAC under the European Union's Horizon research and innovation program with grant agreement number 101139130.

    Keivan Khosroshahi12, Philippe Sehier2, and Sami Mekki2,

1
Université Paris-Saclay, CNRS, CentraleSupélec, Laboratoire des Signaux et Systèmes, Gif-sur-Yvette, France

2 Nokia Standards, Massy, France

 keivan.khosroshahi@centralesupelec.fr, {philippe.sehier, sami.mekki}@nokia.com

    August 5, 2024
=============================================================================================================================================================================================================================================================================================================================================================================

§ ABSTRACT 
Network data are observed in various applications where the individual entities of the system interact with or are connected to each other, and very often these interactions are defined by their associated strength or importance. Clustering is a common task in network analysis that involves finding groups of nodes which display similarities in the way they interact with the rest of the network. However, most clustering methods use the strengths of connections between entities in their original form, ignoring the possible differences in the capacities of individual nodes to send or receive edges. This often leads to clustering solutions that are heavily influenced by the nodes' capacities. One way to overcome this is to analyse the strengths of connections in relative rather than absolute terms, expressing each edge weight as a proportion of the sending (or receiving) capacity of the respective node. This, however, induces additional modelling constraints that most existing clustering methods are not designed to handle. In this work we propose a stochastic block model for composition-weighted networks based on direct modelling of compositional weight vectors using a Dirichlet mixture, with the parameters determined by the cluster labels of the sender and the receiver nodes. Inference is implemented via an extension of the classification expectation-maximisation algorithm that uses a working independence assumption, expressing the complete data likelihood of each node of the network as a function of fixed cluster labels of the remaining nodes. A model selection criterion is derived to aid the choice of the number of clusters. An alternative approach to clustering in composition-weighted networks based on a mapping to the Euclidean space is also provided. The model is validated using a number of simulation studies, assessing the effect of various initialisation strategies on the model's performance, latent structure recovery, parameter estimation quality and model selection. Furthermore, it is showcased on network data from the Erasmus exchange program and a bike sharing network for the city of London.



Keywords  Compositional data, hybrid likelihood, statistical network analysis, stochastic block model, weighted networks



Acknowledgements This work was supported by the Science Foundation Ireland funded Insight Centre for Data Analytics (Grant number 12/RC/2289_P2).



§ INTRODUCTION
 

Networks are often used to represent relationships between entities, and in the recent past there has been a rapid increase in the collection and availability of such relational data. Network data appear in a diverse range of applications, such as the social sciences <cit.>, biology <cit.>, transportation <cit.>, and finance <cit.>. Given the wide availability of network data, the statistical analysis and modelling of networks is an active area of research, driven by the unique challenges that these data present, largely due to the dependence between entities. For a concise overview of the main models and methods for network data see <cit.>.

One common task in network analysis is clustering, which involves finding groups of nodes that share similar connectivity patterns or have similar characteristics. The two main families of approaches to clustering in networks are algorithm-based and model-based <cit.>. Algorithm-based methods, as the name suggests, involve a set of operations that partition the network into clusters. These methods are often based on some notion of distance or similarity between nodes <cit.>, spectral properties of the Laplacian matrix <cit.>, or an optimisation procedure <cit.>. Model-based methods assume the presence of sub-populations in the data, corresponding to the clusters, which are then modelled by means of probability distributions. As opposed to algorithm-based methods, model-based clustering approaches have the advantage of providing a principled framework where the clustering task is framed as an inferential task for a generative probability model <cit.>.

Stochastic block modelling is a popular model-based clustering framework for network data, which models the connectivity patterns between pairs of nodes, assuming their stochastic equivalence: the presence and the strength of a connection between two nodes is determined by their cluster membership rather than by the nodes themselves. The definition of a stochastic block model as a way to describe the a priori community structure in a network was introduced in <cit.> and <cit.>, and the first attempt to use this model as a clustering tool was made in <cit.>.

The stochastic block model (SBM) was originally developed for the analysis and clustering of binary network data. For this type of data, binary interactions are often defined on a pre-specified threshold or on a subjective evaluation of what constitutes an interaction between two nodes, resulting in a potential information loss. With network data becoming more widespread and complex in the recent years, a number of extensions of the SBM to networks with different edge types and characteristics have been proposed. Particular efforts have been focused on clustering models for weighted networks. For instance, <cit.> extended the SBM to allow for finite set valued edges, such as those taking values in {-1,0,1}. Count edge attributes or multiple edges between pairs of nodes were considered in <cit.>, <cit.>, <cit.>, and <cit.>. To cluster nodes in networks with continuous edge weights, <cit.> propose a weighted SBM based on Gamma distributions. More general frameworks encompassing a wider range of edge types and attribute distributions have been proposed by <cit.>, and <cit.>. We point the reader to <cit.> for a comprehensive review of extensions of the SBM for different data types as well as inferential approaches. An approach related to weighted SBMs is the one introduced by <cit.>. In <cit.>, the authors propose a general framework for performing model-based clustering on multi-layer networks. The approach uses a multivariate Gaussian distribution to model the weights, allowing the correlation between weights connecting pairs of nodes as well as between edge weights across different layers to be accounted for. This work can be seen as a generalisation of a weighted SBM <cit.> that takes into account the correlation structure between the weights.

All of the aforementioned approaches propose models for the analysis of the weights in their original form. However, in some applications, in particular those modelling flows in the network, such as transportation or trade, the observed edge weights are influenced by the nodes' capacities to send and receive edges, which can differ significantly across the network. This often results in clustering solutions that mimic the patterns related to the capacities of the sending and receiving nodes, rather than the weights connecting them. Taking as an example the Erasmus programme network presented in Section <ref>, suppose we are interested in grouping European countries based on similarities in students' preferences for exchange destinations. With the participating countries having very different populations, we expect larger countries, such as Germany, France and the UK, to have larger student populations and so larger volumes of students participating in the programme. These countries are also able to accommodate more incoming students. By contrast, the Nordic countries, like Denmark and Finland, are much smaller in population, and hence they send and receive significantly fewer students. If we were to perform clustering using the raw counts of students going on Erasmus exchange between these countries without taking the differences in population into account, the countries would be roughly divided into groups based on their population sizes, i.e. Germany, France and the UK as one cluster, and Denmark and Finland as another, due to differences in the scale of the weights. Even if the preference profile of the UK students is closer to those of the smaller Nordic countries, the volume of students the country sends is far too large for it to be assigned to the same cluster as Finland and Denmark. Similar issue can arise in flight networks, with small airports only being able to service a limited number of flights per day as opposed to international hubs with multiple runways, or international trade networks, where the value of goods traded is linked to country's GDP <cit.>. The differences in the magnitudes of edge weights can significantly affect the results, making it more challenging to draw conclusions. 

One way to address this is by using relative rather than absolute weights in the network. In the aforementioned cases, this can be done by calculating proportions of flow alongside each edge with respect to a sending (or receiving) node, leading to edge weights of relative size. In other applications, the absolute weights can simply be unavailable for the analysis as the interactions between nodes are measured in relative terms to begin with. For example, in epidemiological networks the edge weights could represent probabilities of interaction between agents, or in infrastructure networks they could correspond to proportions of liquid flowing between units. Networks with relative edge weights can also arise as a result of privacy protection policies, such as in <cit.>, where the absolute information could potentially be used to identify individual actors, banks in this case. 

The main challenge associated with the relative nature of edge weights in the network is their interdependence. Proportional data impose a constant-sum constraint, making the standard tools used for networks with independent weights invalid. To appropriately address this constraint, tools from compositional data analysis can be employed. Compositional data describe parts of some whole, such as percentages, probabilities, and proportions, and they can be naturally observed or constructed from other types of data, such as continuous or count data, by dividing individual components by their sum. There are two main families of approaches to compositional data analysis. The first involves mapping the compositions onto the real line, allowing one to use the standard machinery on the transformed data. Log-ratio transformations are a popular choice in the literature due to their sound theoretical properties, and other alternatives, such as standardisation, are also sometimes used in practice <cit.>. The second approach is based on direct modelling of compositional observations, which often uses the Dirichlet distribution to model the compositions in their original form <cit.>. Both approaches have their relative benefits, such as the scale-invariance of the log-ratio transformations, or desirable distributional properties that come with direct modelling, and so the choice of the most suitable approach is context dependent. For the discussion of the main methods and challenges in compositional data analysis, we suggest the review paper by <cit.>. 

The literature on models and methods for networks with weights of relative nature is very scarce, with most works addressing unique application-specific challenges, often related to biological networks. Examples of such works are <cit.> and <cit.>, where the centered log-ratio transformation is applied to the compositional data to eliminate the constant-sum constraint in an attempt to recover the microbiome interaction network. Another notable work by <cit.>, which is driven by a financial market application, uses direct modelling of proportions via the Dirichlet distribution and proposes a dynamic latent variable modelling framework for the analysis of interbank networks.

To the best of our knowledge, there have been no attempts to develop a general model-based clustering framework for composition-weighted networks. In this work, we propose an extension of the stochastic block model that utilises the relative rather than absolute strength of connections, by leveraging ideas from compositional data analysis. We model the set of edge weights from each node using a Dirichlet distribution, the parameters of which are determined by the cluster labels of the sender and each of the receivers. For inference, we consider the hybrid maximum likelihood approach developed by <cit.>, based on <cit.>, using a variant of the classification expectation-maximisation (EM) algorithm <cit.>. To address model selection, an integrated completed likelihood (ICL) criterion is derived <cit.>. We also briefly introduce an alternative approach to cluster nodes in composition-weighted networks by making use of the log-ratio transformation that maps compositional data onto the real line <cit.>. The code implementing the modelling framework in R <cit.> is available on https://github.com/iuliiapromskaia/dirSBMGitHub.

The structure of this paper is as follows: we start by describing the SBM with compositional Dirichlet-distributed edge weights in Section <ref>, and outline the inferential procedure based on a classification EM algorithm in Section <ref>; Section <ref> presents an alternative method to cluster nodes in the network with compositional edge weights by using the log-ratio transformation of the compositions and then utilising a standard weighted stochastic block model; we test the model performance on synthetic data in Section <ref>, assessing different initialisation strategies, parameter estimation quality, and clustering and model selection performance, also in comparison to alternative approaches; we then illustrate the use of the proposed model in application to the Erasmus programme data from <cit.> and the London bike sharing data from <cit.> in Section <ref>; Section <ref> concludes the paper with a discussion, highlighting the work's impact and the potential for further developments.



§ DIRICHLET STOCHASTIC BLOCK MODEL
 
This section introduces the Dirichlet stochastic block model (DirSBM) for networks with compositional edge weights.

Let 𝐘 be the weighted adjacency matrix of a directed network on n nodes with no self-loops with strictly positive entries, i.e. y_ij>0 for all i ≠ j and y_ii=0 for all i. Define the compositional counterpart of 𝐘, denoted 𝐗, whose row entries 𝐱_i are given by


    𝐱_i = ( y_i1/∑_j≠ i^ny_ij,  y_i2/∑_j≠ i^ny_ij,…,y_i(i-1)/∑_j≠ i^ny_ij,0,y_i(i+1)/∑_j≠ i^ny_ij,…,y_in/∑_j≠ i^ny_ij),


i.e. x_ij>0 for i≠ j and ∑_l x_il=1  ∀ i.  Note that x_ii=0 is due to the absence of self-loops in the original weighted network. Denote with 𝐱_i^* a subvector of 𝐱_i that excludes the zero entry x_ii, and with 𝐗^* the matrix formed by row vectors 𝐱_i^*, i=1,…,n. In practice, in some applications, the weighted adjacency matrix 𝐘 may be unavailable, with the compositional matrix 𝐗 being the only piece of data provided. The Dirichlet stochastic block model with K blocks assumes the following generative process for a network with compositional edge weights 𝐗^*:


    
  * Given a K-dimensional vector of cluster membership proportions θ, generate binary cluster allocations 𝐳_i ∼ Multinom(1,θ), for i=1,…,n. The entries of these vectors, i.e. z_ik=1 when node i is assigned to cluster C_k and 0 otherwise. Denote with 𝐙 an n× K matrix of binary cluster allocations of all nodes in the network, and with 𝐙_-i the (n-1)× K-dimensional matrix of cluster allocations of all nodes in the network that are not i. 
    
  * Let 𝐀={α_kh}_k,h=1^K be a K × K matrix with strictly positive values, corresponding to the Dirichlet distribution concentration parameters. Given the cluster allocations, generate (n-1)-dimensional compositional observations as 
    
    𝐱_i^*|𝐳_i, 𝐙_-i∼ Dir(𝐳_i 𝐀𝐙^⊤_-i),

    for i=1,…,n.


To aid understanding, consider the vector 𝐜 denoting the cluster labels of the nodes in the network, such that c_i = k if i is a member of cluster C_k. The above distribution can also be written as 


    𝐱_i^* |𝐜∼ Dir(α_c_i c_1,…,α_c_i c_i-1,α_c_i c_i+1,…,α_c_i c_n).


The intuition behind this formulation is as follows: for any sender i, the distribution of weights of the edges connecting it to other vertices depends on the cluster memberships of i itself and of all of the receiver nodes j ≠ i. If the sender i and the receiver j are members of the same cluster C_k, the corresponding parameter of the Dirichlet distribution is α_kk, and this parameter value is shared for all such receivers j ∈ C_k. If instead the receiver node is in a different cluster, j ∈ C_h, the corresponding parameter is α_kh.



 §.§ Properties of DirSBM


The model statement in Section <ref> implies that the distribution of weight vectors conditional on cluster labels in the whole network is shared among the nodes assigned to the same cluster, up to a permutation of the ordering of the nodes, which is assumed to be invariant for simplicity.

To illustrate this, consider, for example, the distribution of compositional weights of node i∈ C_1 and rearrange the order of the dimensions so that they are sorted by cluster assignment index in ascending order for ease of notation. Every vector of compositional weights of node i belonging to cluster C_1, denoted 𝐱^*_i ∈ C_1, conditional on the cluster assignments of all the remaining (n-1) nodes, is distributed as


    𝐱^*_i ∈ C_1|𝐙∼ Dir(α_11,…,α_11_(n_1-1) times, α_12,…,α_12_n_2 times, …,α_1h,…,α_1h_n_h times, …,α_1K,…,α_1K_n_K times),


where n_h denotes the membership count of cluster C_h. This is because any member of cluster C_1 is connected to the remaining (n_1-1) members of its own cluster, all n_2 members of cluster C_2, and so on. 

Generalising for a generic node in cluster C_k, k = 1, …, K, we obtain:

    𝐱^*_i ∈ C_k|𝐙∼ Dir(α_k1,…,α_k1_n_k times, …,α_kk,…,α_kk_(n_k - 1) times, …,α_kh,…,α_kh_n_h times, …,α_kK,…,α_kK_n_K times).

Therefore, all the nodes belonging to the same cluster are identically distributed and share the same Dirichlet distribution, whose parameter vector is determined by the cluster allocations of the remaining nodes. This property of the DirSBM can be seen as a counterpart of stochastic equivalence in other stochastic block models <cit.>. The nodes in the network are called stochastically equivalent if they have the same probability of being connected by an edge to any other node in the network, conditional on their cluster labels. In weighted SBMs, such as the ones proposed by <cit.> and <cit.>, this leads to identical distributions of edge weights for any pair of nodes i∈ C_k and j∈ C_h as the parameters of such distributions are only determined by the cluster labels of nodes. The DirSBM cannot be said to strictly exhibit stochastic equivalence as it does not model the probability of edge existence between nodes, but it does share the benefits that arise as a consequence of stochastic equivalence as the identical distribution property of a set of edge weights conditional on cluster labels still holds.



  §.§.§ Interpretation of parameters
 

The parameters of the Dirichlet distribution in their original form are usually difficult to interpret as they are not measured on the same scale as the compositional data. To relate the parameter values to the original compositions, we can compute the expected proportion sent from any node i∈ C_k to any node j∈ C_h, denoted w_kh. In our case, as the parameter values are shared among the pairs of nodes that belong to the same cluster pair, this expected value is given by:


    w_kh = 𝔼[X^*_ij] = α_kh/(n_k-1)α_kk+∑_g ≠ kn_g α_kg     i∈ C_k,j ∈ C_h.


We can use these values to construct a K× K matrix of expected exchange proportions, denoted 𝐖, that is more intuitive to interpret than the original Dirichlet parameter matrix 𝐀. Note that, although the entries of this matrix are proportions, the rows do not sum to 1, since these proportions are shared among all pairs of nodes with the same cluster labels.

It may also be insightful to learn the expected total shares of exchanges between clusters. To calculate these, we make use of the aggregation property of the Dirichlet distribution, which states that if the parts of the Dirichlet observation are added together, the distribution remains Dirichlet, with the updated parameter values being equal to the sum of the corresponding original values <cit.>. Using Equation (<ref>), we aggregate the parts from the same cluster pair, resulting in a compositional vector 

    𝐪_i|𝐙=(∑_j≠ i 
     j∈ C_1 x_ij, …, ∑_j≠ i 
     j∈ C_k x_ij, …∑_j≠ i 
     j∈ C_K x_ij) ∼ Dir(n_1α_k1,…,(n_k-1)α_kk,…,n_Kα_kK),

for i∈ C_k. Hence, the expected cluster-to-cluster exchange shares, denoted with v_kh, are given by:


    v_kh = 𝔼[q_il]  =  
       (n_k-1)α_kk(n_k-1)α_kk+∑_g ≠ kn_g α_kg if  h=k,
    n_hα_kh(n_k-1)α_kk+∑_g ≠ kn_g α_kg if  h≠ k.



The resulting matrix 𝐕={v_kh}_k,h=1^K exhibits a unit-row-sum property.



§ INFERENCE
 

The distribution of a set of edge weights 𝐗, conditional on the cluster indicator variable is


    p(𝐗|𝐙) = ∏_i=1^n p(𝐱_i| 𝐳_i,𝐙_-i) = ∏_i=1^n∏_k=1^K [Γ (∑_j≠ i^nα_j)/∏_j≠ i^nΓ (α_j)∏_j≠ i^n x_ij^α_j-1 ] ^z_ik,  where α_j=∑_h=1^K z_jhα_kh.

This is a product of probability densities of (n-1)-dimensional Dirichlet distributions with the respective parameter vectors determined by the cluster label of the sender node i and of the remaining nodes in the network. 

As usual in model-based clustering, inference proceeds by maximizing the marginal log-likelihood of the data 𝐗 with respect to the model parameters. However, this quantity involves summing over the set of all possible cluster allocations and is computationally intractable <cit.>. A popular algorithm used in model-based clustering is the expectation-maximisation (EM) algorithm <cit.>. It is employed to find the maximum of the marginal log-likelihood of the data by introducing latent variables corresponding to cluster labels and defining the joint log-likelihood of the data and the cluster labels, the complete data log-likelihood. Then, inference for the model consists of estimation of parameters and of the latent cluster assignments. The EM algorithm works by iteratively finding the expectation of the complete data log-likelihood with respect to the posterior distribution of the latent variables (E-step) and maximising this expectation with respect to the model parameters (M-step). 

In the case of the DirSBM, the complete data log-likelihood is:


    l_c(𝐀,θ)    = log p(𝐗,𝐙)
        = ∑_i=1^n∑_k=1^K z_ik [ logΓ (∑_j≠ i^nα_j) - ∑_j≠ i^nlogΓ (α_j) + ∑_j≠ i^n (α_j-1) log x_ij ] + ∑_i=1^n∑_k=1^K z_iklogθ_k.
 

Further details are provided in Appendix <ref>.

In stochastic block modelling, the E-step is often computationally intractable due to the fact that the latent variables are not independent a posteriori. To overcome this problem, the variational EM is often employed for inference in SBMs, which is based on an approximation of the posterior distribution of the latent variables <cit.>. 



 §.§ Hybrid log-likelihood
 

In the DirSBM, a new challenge arises when trying to employ the variational EM for inference, as it is standard in SBMs. This is due to the fact that, in order to derive the evidence lower bound <cit.> one is required to compute the expectation:


    𝔼_𝐙∼ q(𝐙)[ logΓ (∑_j≠ i^n∑_h=1^K z_jhα_kh) - ∑_j≠ i^nlogΓ (∑_h=1^K z_jhα_kh) ],


with respect to q(𝐙), the mean field approximation of the posterior distribution of the latent cluster allocations. This expectation is intractable, because, unlike in standard SBM, even conditional on their cluster labels, the distribution of node i is not independent of that of node j. In fact, due to the model formulation in (<ref>), one needs to know the cluster assignments of all the receiving nodes contained in 𝐙_-i to define the distribution of 𝐱_i given 𝐳_i.

For this reason, we employ the inferential approach based on a hybrid log-likelihood proposed by <cit.>. The approach uses a working independence assumption, whereby each of the latent variables corresponding to the cluster label c_i is seen as a function of fixed values of the remaining cluster labels 𝐜_-i, allowing factorization of the likelihood over the nodes. The observed hybrid log-likelihood, using the notation from (<ref>), is given by


    l^hyb(𝐀,θ) = ∑_i=1^nlog( ∑_k=1^Kθ_k p(𝐱_i | c_i=k,𝐜_-i=𝐜_-i) ),

where the notation 𝐜_-i is employed to indicate the fixed nature of the cluster labels of the remaining (n-1) nodes in the network when considering the contribution of node i to the log-likelihood.


Introducing the set of latent variables 𝐙, we arrive at the complete data hybrid log-likelihood:


    l^hyb_c(𝐀,θ)     = ∑_i=1^n∑_k=1^K z_iklog p(𝐱_i|z_ik=1,𝐙_-i=𝐙_-i) + ∑_i=1^n∑_k=1^K z_iklogθ_k 
       
            = ∑_i=1^n∑_k=1^K z_ik [ logΓ (∑_j≠ i^nα_j) - ∑_j≠ i^nlogΓ (α_j) + ∑_j≠ i^n (α_j-1) log x_ij ] + ∑_i=1^n∑_k=1^K z_iklogθ_k,

where 𝐙 is a binary matrix with entries z_ik=1{c_i=k} and α_j=∑_h=1^Kz_jhα_kh.

With the complete data hybrid log-likelihood, a working independence assumption allows one to implement a variant of the classification EM algorithm <cit.>, where the hard partition of the nodes that are not i is used to compute the cluster assignment probability for i. The steps of the algorithm are outlined below.



E-step: compute the probability of assignment of node i to cluster k at iteration t using


    ẑ_ik^(t) = (z_ik=1|𝐱_i,𝐙_-i^(t-1)) ∝θ̂_k^(t-1)Γ(∑_j≠ i^nα_j^(t-1))∏_j≠ i^nΓ (α_j^(t-1))∏_j≠ i^n x_ij^α_j^(t-1),

with α_j^(t-1)=∑_h=1^Kz_jh^(t-1)α̂_kh^(t-1). The quantity on the right hand side is normalised to fulfill the constraint ∑_k=1^Kẑ_ik^(t)=1.



C-step: following <cit.>, a greedy approach to the C-step is adopted. That is, for each node i=1,…,n, every label swap is considered and i is assigned to the cluster label producing the highest value of the observed hybrid log-likelihood, i.e. 


    c_i^(t) = k=1,…,Kmax∑_l=1^nlog( ∑_h=1^Kθ̂_h^(t-1) p(𝐱_l | c_l=k,𝐜_-l=𝐜_-l) ),


then 𝐜^(t) and 𝐙^(t) are updated. The update of cluster labels happens sequentially for the nodes in the network rather than simultaneously, so any changes in the cluster assignments of nodes before i affect 𝐜_-i and hence the cluster label for i. 



M-step: maximise the expectation of the complete data hybrid log-likelihood


    𝔼[l_c^hyb(𝐀,θ)] =    ∑_i=1^n∑_k=1^Kẑ_ik^(t) (logΓ (∑_j≠ i^nα_j^(t-1)) - ∑_j≠ i^nlogΓ (α_j^(t-1)) + ∑_j≠ i^n (α_j^(t-1) - 1) log x_ij ) 
        + ∑_i=1^n∑_k=1^Kẑ_ik^(t)logθ̂_k^(t-1).


Closed form solution is available for the mixing proportions, so these are updated using


    θ̂_k^(t) = ∑_i=1^nẑ_ik^(t)/n.

The updates for Dirichlet parameters are not available in closed form, so the set of estimates {α̂_kh^(t)}_k,h=1^K are found numerically using the R function optim <cit.>. Since the parameters of the Dirichlet distribution are strictly positive, we use the L-BFGS-B optimisation routine, which allows for optimization with parameters having a bounded range <cit.>. 

The steps above are iterated until the following convergence criterion is met:


    | l^hyb(Â^(t),θ̂^(t))-l^hyb(Â^(t-1),θ̂^(t-1))/l^hyb(Â^(t),θ̂^(t))| < ϵ.

In this work, ϵ=10^-5 was used. More details on the algorithm can be found in Appendix <ref>.



 §.§ Identifiability of parameter ordering

The DirSBM exhibits a minor non-idenfitiability issue related to the ordering of clusters and the ordering of parameters. In particular, once we obtain the final node partition and the parameter estimates using the algorithm described in Section <ref>, the ordering of rows of the estimated Dirichlet concentration matrix 𝐀̂ and of the entries of the mixing proportions vector θ̂ is not guaranteed to match the ordering of clusters in the partition.

To aid understanding, consider an example with 


    𝐜=(1,1,2,1,2), 𝐀 = [ α_11 α_12; α_21 α_22 ] and θ=(θ_1,θ_2).


For observation 1, 𝐱_1^* ∼θ_1 Dir(α_11,α_12,α_11,α_12) + θ_2 Dir(α_21,α_22,α_21,α_22). Now, consider the same partition of nodes with the same cluster order and reorder the rows of the parameter matrix 𝐀 and the entries of θ, i.e.


    𝐜=(1,1,2,1,2), 𝐀' = [ α_21 α_22; α_11 α_12 ] = [ α_11' α_12'; α_21' α_22' ] and θ'=(θ_2,θ_1)=(θ_1',θ_2').


Then, 


    𝐱_1^*    ∼θ_1' Dir(α_11',α_12',α_11',α_12') + θ_2' Dir(α_21',α_22',α_21',α_22') 
        = θ_2 Dir(α_21,α_22,α_21,α_22) + θ_1 Dir(α_11,α_12,α_11,α_12),

which will clearly give rise to the same likelihood value as the originally ordered parameters.

To address this, we create a hard partition based on probabilities 𝐙̂ from the E-step and use the order of clusters in this hard partition as reference since column entries of 𝐙̂ are tied to the individual terms of the Dirichlet mixture. Then we use the matchClasses() function in R <cit.> to match the order of clusters in the E-step to that in the C-step, and use this match to reorder the rows of 𝐀̂ and entries of θ̂ at the convergence of the algorithm.



 §.§ Algorithm initialisation
 
As in most mixture models, extra attention should be paid to the choice of the initialisation strategy since the objective function in question is not unimodal, and the algorithm is only guaranteed to converge to a local optimum <cit.>.

In this paper, we consider the following initialisation strategies, which are compared in the simulation study in Section <ref>:


    
  * Random: each node is assigned to one of K groups randomly with equal probability. Starting with a random partition of nodes gives us an idea of the performance of the algorithm when no information on the data is used when the initial partition is created. To reduce the risk of convergence to a poor local maximum, we run the algorithm with a number of random starting partitions and select the best based on the value of the observed hybrid log-likelihood. In the simulation study in Section <ref>, we set the number of random starting partitions equal to 5 as we want to strike a balance between performance and computational costs. A larger number of random starting partitions have been tested, providing only a marginal improvement on average, but at a higher computational cost. 
    
  * K-means: the k-means algorithm <cit.> is repeatedly used to perform clustering on the data matrix 𝐗^* to reduce the risk of convergence to a local maximum, and the clustering solution of the best run is used as an initial partition. This is a widely used initialisation strategy as it is computationally inexpensive. Since the k-means algorithm itself is initialised at random, we run it 50 times in order to find the initial cluster labels as part of the simulation study.
    
  * K-means on CLR-transformed data (CLR+K-means): as our data are compositional in nature, the centered log-ratio transformation is first applied to the data matrix 𝐗^* <cit.>, which maps the compositions to the real line, then the k-means algorithm is used in the same fashion as above to find an initial partition <cit.>.
    
  * Spectral clustering: eigendecomposition of 𝐗^* is performed and used for dimensionality reduction, then the k-means algorithm is used on the reduced data to get a set of initial cluster labels <cit.>. Spectral clustering is widely used for initialisation as it can handle more complex cluster shapes than k-means itself whilst maintaining low computational costs.
    
  * Binary SBM (BinSBM): a binary version of the network is created from 𝐗 by assigning binary edges where the weighted edge exceeds a pre-specified threshold. After empirical investigation, we selected as a threshold the mean weight, as it tends to provide a reasonably well-connected binary network that retains clustering structure. Once such a binary network is created, a Bernoulli stochastic block model is fitted using the R package blockmodels <cit.> and the clustering partition is used to initialise the algorithm.
    
  * Gaussian SBM (GausSBM): a Gaussian stochastic block model is fitted directly to 𝐗 using the R package blockmodels <cit.> and the obtained clustering solution is used for initialisation.
    



 §.§ Model selection
 
The modelling approach detailed in Section <ref> is only applicable when the number of clusters is set in advance. However, in reality, in many situations the number of clusters is unknown and needs to be inferred from the data. Therefore, a model selection criterion indicating how well models with varying numbers of clusters fit the data is required in order to choose the number of groups appropriately. 

One popular choice in stochastic block modelling is the integrated completed likelihood criterion <cit.>, typically employed for selecting the number of groups in this context; see for example <cit.>, <cit.>, and <cit.>. In the case of DirSBM, the ICL is given by


    ICL(K) = l^hyb_c(Â,θ̂|𝐗,Ẑ,K) - 1/2 K^2log n(n-1) -1/2(K-1)log n,

where l^hyb_c(Â,θ̂|𝐗,Ẑ,K) is the complete data hybrid log-likelihood from Equation (<ref>), evaluated using parameter estimates at convergence of the algorithm, used in place of the complete data log-likelihood following <cit.>. We fit the DirSBM with different numbers of clusters, and compute the respective values of the criterion. The highest ICL value corresponds to the optimal number of groups.

Appendix <ref> contains derivations of the ICL that follow closely the derivations of the original ICL for stochastic block models proposed in <cit.>. The simulation study concerning model selection performance using the proposed framework is contained in Section <ref>.



§ AN ALTERNATIVE APPROACH
 

As discussed in Section <ref>, there are two main approaches to working with compositions in compositional data analysis. One involves applying a transformation to the data that maps them to the Euclidean space, followed by the use of standard tools and models for independent data. The second is based on direct modelling of compositions <cit.>. The methodology proposed in Section <ref> aims to model the compositions directly, but since both approaches have their relative benefits, we propose an alternative that falls under the transformation-based approach, assessing its performance in Section <ref> for comparative purposes.

We first map the compositions onto the real line using the centered log-ratio (CLR) transformation proposed in <cit.>:

    𝐮_i=CLR(𝐱_i)=  ( logx_i1/x̅,…,0,…,logx_in/x̅),

where x̅ =  (∏_j≠ i^n x_ij) ^1/n-1 is the geometric mean of 𝐱, then apply SBM with Gaussian weights <cit.> to the transformed data, assuming that each individual edge weight follows


    u_ij|(z_ik=1,z_jh=1) ∼ N(μ_kh,σ^2).


The centered log-ratio transformation has been chosen for its property of preserving the dimensionality of the observations. That is, it maps the Aitchison simplex sample space 𝕊^n to the standard Euclidean space ℝ^n, unlike many other transformations that map to ℝ^n-1 <cit.>. In this case, each dimension of 𝐮_i corresponds to a transformed weight of an edge connecting node i to each of the other nodes in the network, so the reduction of dimensionality would require a choice of an edge to be dropped, leading to information loss.

The approach of fitting the Gaussain SBM on CLR-transformed data is implemented using the blockmodels and compositions packages in R <cit.>, and its clustering performance is assessed alongside the DirSBM in Section <ref>. This approach is a rather strong competitor for the DirSBM proposed in Section <ref>, in particular in simpler and smaller cases, such as in networks with relatively few nodes with a small number of clusters.

There are two major drawbacks of the alternative approach in comparison to the DirSBM. First of all, the normality assumption in Equation (<ref>) may not be appropriate as the mapping of compositional vectors to the real line (whether by using CLR or any other transformation) only eliminates a unit-sum constraint and does not guarantee convenient distributional behaviour of the resulting transformed data. This means that, in order to utilise this approach, one needs to check the appropriateness of the transformation and the type of weighted SBM to fit to the transformed data. The DirSBM, on the other hand, is a ready-to-use model that takes into account the unique behaviour of the compositional data as it models them directly. The second disadvantage of the transformation-based approach is interpretability. The parameters of the distribution in Equation (<ref>) (or of any other distribution selected to model the transformed data) refer to the auxiliary Euclidean space, and it is unclear how one could use these to understand the patterns present in the original simplex space. As presented in Section <ref>, the parameters of the DirSBM can be used to compute the expected exchange proportions between nodes as well as clusters, making the interpretation of results intuitive.



§ SIMULATION STUDIES
 

In this section, we consider various simulation studies to assess the performance of our model with respect to clustering, parameter estimation, and model selection. We also investigate the effect of the different initialisation strategies listed in Section <ref> on the quality of the final inferred clustering of the nodes.

Artificial data are generated according to the DirSBM presented in Section <ref>. Different numbers of clusters, K={2,3,5}, and network sizes, n={30,50,70,100} are considered. The parameter matrices 𝐀 are defined so that the entries have varying levels of homogeneity, resulting in indirect modifications to the degree of overlap between clusters in the compositions. The term “level of homogeneity" is used to describe the extent to which the between-cluster weight parameters, i.e. {α_kh}_h ≠ k, are close to the respective within-cluster weight parameters, α_kk. When the values of the between- and the within-cluster parameters are set to be more similar, the resulting compositional weights in the network become more homogeneous, thus making separating the clusters more challenging. On the other hand, the lower the homogeneity, the more separated the clusters. Further details on the parameter values used in the simulation studies can be found in Appendix <ref>.

Throughout this section, where relevant, clustering performance is evaluated using the adjusted Rand Index <cit.>, which measures the agreement between two partitions, adjusted for random chance, by comparing the estimated clustering against the true classification of the nodes.



 §.§ Choice of initialisation strategy
 
We consider the different initialisation strategies of Section <ref> and evaluate the model performance with respect to cluster label recovery on simulated data. We generate 50 networks with n=50 nodes with 3 similarly-sized clusters and the parameter matrix 𝐀 is chosen so that the resulting within- and between-cluster edge weights are reasonably, but not excessively, distinct:

    𝐀= [ 1.0 0.7 0.5; 0.9 1.5 0.6; 0.4 0.5 1.2 ].




We initialise the algorithm using the strategies outlined in Section <ref> and compute the ARI. The results of this simulation study are shown in Figure <ref>. From the figure, random initialisation seems to work best on average, with a mean ARI of 0.805, despite being the only strategy that is not informed by the data. It also exhibits relatively low variability in comparison to all but one other strategy, which is k-means on log-ratio transformed data that is clearly inferior, with a mean ARI of only 0.513. Further investigations also reveal that, as well as having the best average ARI and low variability, random initialisation has led to the highest observed hybrid log-likelihood value in 33 out of 50 instances. Given that the number of random partitions considered was only 5, this result also shows that the proposed algorithm is capable of recovering the clustering patterns fairly successfully even when the initial cluster labels are assigned randomly and are not based on some educated guess. 

It may come as a surprise to the reader that out of all the strategies considered, random initialisation performed best, as it gives a starting cluster partition that is completely uninformed. However, there are two aspects of the data modelled by the DirSBM that are worth remembering. Firstly, the data matrix 𝐗^* introduced in Section <ref> is quite unusual in its structure in the sense that the ordering of the dimensions in the compositional edge weight vectors is not fixed and is tied to the index of the sender node. For example, the first entry of observation 𝐱^*_1, i.e. x^*_11, refers to the weight of an edge from node 1 to node 2 (as there are no self-loops and so there is no weight corresponding to an edge from node 1 to itself), whereas, for any other node i ≠ 1, x^*_i1 is the edge weight from node i to node 1. The same shift along the dimensions happens across the whole set of compositional weight vectors as we take each node in turn to be the sender. This means that distance-based algorithms, such as k-means, would not necessarily compute the distances between the matching pairs of nodes' edge weights, e.g. the first set of distances for node 1 would involve the edge weight from node 1 to node 2, and for any other node i, it would involve the edge weight from node i to node 1. This can potentially lead to finding spurious clustering patterns, producing initial partitions that result in convergence to local maxima.

The second aspect is the fact that the edges in the networks are not independent, because the weights are defined in terms of compositions. Using initialisation strategies that assume independence between the edge weights, we risk identifying false patterns in the network and getting stuck in a local maximum as a result. For instance, the Gaussian SBM initialisation could give rise to a misleading initial partition as the unit-sum constraint is ignored. With repeated random initialisation, we are less likely to get stuck in one of the local maxima as we can control the exploration of the partition space by changing the number of random starts.

Throughout the simulation studies, we use random initialisation with 5 starts, and to increase the reliability of results for the real world data in sections <ref> and <ref> we increase the number of random partitions to 20.



 §.§ Parameter estimation performance
 
In this section we examine parameter estimation quality when the number of clusters is known in advance. We consider the cases with 2, 3 and 5 clusters as well as low, medium and high level of parameter homogeneity, as described at the start of Section <ref>. The size of the networks is also varied to inspect its effect on parameter estimation quality. 

The Frobenius distance <cit.> between the true parameter matrix 𝐀 and its estimate Â is calculated for 50 synthetic data sets in each scenario, and the results are presented in Figure <ref>. As expected, larger networks lead to better parameter estimates, showing that the proposed hybrid log-likelihood classification EM leads to consistent parameter estimates as the size of the network increases. Notably, the biggest improvement occurs when we move from n=30 to n=50. This comes as no surprise since the performance of the model with regards to the recovery of latent clustering improves significantly when the number of nodes increases from 30 to 50 and above, as seen in Section <ref>. We can also note that higher homogeneity of Dirichlet parameters makes the estimation more challenging as a result of higher difficulty in separating the clusters, and the parameter estimates are closer to their true counterparts when the number of clusters is lower. This is again an expected result, as, when the number of clusters increases, recovering the underlying partition of the nodes is more challenging and each individual parameter is estimated from a smaller share of the data.






 §.§ Clustering structure recovery
 


To assess the quality of the clustering results, we compare the clustering performance of the following models using the ARI:

    
  * Binary SBM fitted on the binary version of the network (BinSBM): 

    We test the approach that is often taken in practice where a weighted network is transformed into a binary one. Following closely the description of using binary SBM as an initialisation strategy from Section <ref>, we construct a binary network and fit the Bernoulli SBM using the blockmodels package in R <cit.>. 
    
  * Naive Gaussian SBM (GausSBM):
    

    We fit SBM with Gaussian edge weights <cit.> directly to the data. This model is used to test the robustness to whether accounting for the constant-sum constraint on the sender edge weights or not in different scenarios, as similar naive approaches are sometimes implemented in applications.
    
  * Gaussian SBM on log-ratio transformed data (CLR+GausSBM): 

    The data are mapped onto the real line using a centered log-ratio transformation, then SBM with Gaussian weights is fitted to the transformed data, as described in Section <ref>.
    
  * DirSBM (DirSBM):
    

    We fit the DirSBM described in Section <ref> directly to the data.
    

Figure <ref> illustrates the performance of all 4 models on artificial data sets with 2, 3 and 5 clusters across multiple network sizes and varying levels of Dirichlet parameter homogeneity. Each boxplot is based on 50 networks. The DirSBM was initialised with 5 random cluster partitions based on the results of the simulation study in Section <ref>.

It is evident that the performance of all models improves with sample size, often approaching an ARI of 1 as we reach 100 nodes. In the case of BinSBM and GausSBM, this can be due to the fact that, in larger networks, the compositional samples are rather high-dimensional, and so the constant-sum constraint does not induce as much dependence between the individual dimensions as in smaller networks, resulting in a good fit of the models that assume independence between the weights. In the case of CLR+GausSBM and DirSBM, the improvement of performance with sample size can be associated with more accurate parameter estimation. Smaller networks present a greater challenge, due to both stronger dependence between the dimensions of compositions and the limited amount of data available for parameter estimation.

The CLR+GausSBM and DirSBM tend to outperform the competitors in terms of clustering structure recovery, and the gap in performance is significantly wider for smaller networks and higher homogeneity of Dirichlet parameters. It is also notable that the performance of BinSBM and the GausSBM on the raw compositional data often exhibits much higher variability indicated by wider boxplots.

With regards to the comparison between the DirSBM and the CLR+GausSBM, the two methods tend to perform similarly well. Looking at Figures <ref> and <ref>, we observe that in many scenarios the DirSBM performs better and with lower overall variability, making it a more a suitable model in the cases with larger number of clusters in the data. Considering Figure <ref>, where the number of underlying clusters is 2, we note that CLR+GausSBM tends to perform better than DirSBM. Albeit a simplistic approach, CLR+GausSBM seems to present a valid alternative when modelling compositional networks if it is expected that the number of clusters is small.



 §.§ Model selection performance
 
We assess the model selection performance using the integrated completed likelihood (ICL) detailed in Section <ref>. Table <ref> reports the confusion matrices of the true number of clusters K and the optimal number of clusters K̂ as selected by ICL.






We observe that ICL is successful in selecting the correct number of clusters in larger networks with any level of parameter homogeneity, which is to be expected provided that both the latent structure recovery and the parameter estimation improve with network size. It is also not surprising that, in smaller networks with higher levels of homogeneity and/or higher numbers of clusters, the model selection becomes a much more complex task, and the number of clusters tends to be underestimated by the ICL. This is due to the fact that in cases with medium and high levels of homogeneity the clusters are much harder to separate, coupled with the difficulty of accurately estimating the parameters in smaller networks, as seen in Sections <ref> and <ref> respectively.



§ APPLICATION TO REAL WORLD NETWORK DATA




 §.§ Erasmus programme data
 
The Erasmus programme is the most popular university student exchange programme in Europe, spanning thousands of Higher Education institutions in more than 30 countries. <cit.> have produced an extensive data set of student, staff and teacher mobility in the Erasmus network by combining data from a number of different sources.

The aim of our analysis is to understand global mobility patterns in the Erasmus network, focusing on student exchanges. Due to significant differences in the student populations of the European countries, analysis of raw counts of students per pair of countries may not provide particular insights regarding the popularity of destinations, as the biggest countries dominate simply due to their overall hosting capacity. 

After aggregating the student numbers to country level for the 2012-2013 academic year, a directed network with countries as nodes and proportions of students as edge weights is constructed, with the proportions summing to 1 for the sending countries. The Erasmus network is very dense (≈ 87% of all possible edges are present), and there is no reason to believe that the remaining edges are not allowed to exist since all countries in the Erasmus network are allowed to exchange students. Therefore, instead of treating the edges as truly missing, we assign a value of 0.001 to the interactions with zero count and treat the network as fully connected. In compositional data analysis, zero values present a great challenge and are an active area of research since standard tools are not designed to handle zero-valued compositional parts <cit.>. Replacing zeros by some small value is a standard approach in the case of zero counts that works generally well, especially considering its simplicity. Since in our case 0.001 is added to the original count data rather than to the compositions themselves, the final results should be robust relative to the magnitude of the added constant.

We implement DirSBM with K ranging from 1 to 6 and use the ICL to select the number of clusters. 
According to the ICL, the optimal number of clusters is 3 (ICL=3764), followed by a solution with 5 clusters (ICL=3718). As the Erasmus network is fairly small (33 nodes), the ICL might underestimate the number of clusters due to the penalty being too strong in the context of small n, as we saw in Section <ref>, therefore we examine the results of both K=3 and K=5 cases.

Figure <ref> illustrates the solution with 3 clusters on a map of Europe, noting the membership of each cluster on the side as smaller countries are difficult to see on the plot. Figure <ref> represents the total percentage flows between the clusters, based on the estimated matrix 𝐕̂. The estimate of the parameter matrix 𝐀 as well as the expected node-to-node and cluster-to-cluster exchange matrices Ŵ and 𝐕̂ from Equations (<ref>) and (<ref>) respectively are provided in Appendix <ref>. 



The clustered compositions are reasonably interpretable in a real-world context. The red group seems to dominate the student preference list across all clusters as indicated by high country-wise exchange percentages (12.6, 8.7 and 10 respectively) from the first column of Ŵ, and it consists of Germany, Spain, France, Italy and the UK. The red cluster collectively also notably receives the highest total percentages. The blue cluster can be described as containing countries that are still very popular exchange destinations, but not as popular as the likes of Germany and France, possibly due to their relatively small size or more challenging national language. Although roughly equal percentages of students are expected to be retained by the blue cluster and to be sent to the countries in the red cluster, 41.4% and 43.7% respectively, these shares are split between 11 countries instead of 5, hence each individual country in the blue cluster is expected to receive smaller shares in comparison to countries in the red cluster; for instance, any red cluster country is expected to receive 10% of students from any green cluster country, whereas for blue cluster countries this share is only 3%. The green cluster contains the less popular exchange destinations, such as Bulgaria and Slovakia, as indicated by significantly lower expected country-wise and cluster-wise exchange shares. Collectively, the green cluster also retains the least of students, as only 16.8% go on exchange within the cluster itself, while the remaining 83.2% go on exchange to the countries in the red and blue clusters. It can also be noted that the countries in the red cluster are generally closely co-located in geographical terms, as are most countries in the blue cluster, except for Portugal and Turkey, and the countries in the green cluster are more spread out.




The second best solution according to ICL with K=5 is presented in Figure <ref>, and the parameter estimates as well as matrices 𝐕̂ and Ŵ are available in Appendix <ref>.

The red cluster, now consisting of only Germany, Spain and France, is the cluster of countries receiving the highest percentages of students from the countries of all clusters, ranging between the expected 8.1% to 19.6% per country pair, and the second largest total shares, dominated by the blue cluster by a small margin. It should be noted that the total shares received by the red cluster are only split between 3 countries instead of 11 like in the case of the blue cluster. This cluster is also characterised by retaining 39.1% of its students, and sending 43.3% to the blue cluster, implying a lack of diversity of exchange destinations among its students. The blue cluster can be described as containing reasonably popular exchange destinations, but not quite as popular as the red countries, and, similarly to the red cluster, the majority of students go on exchange within the cluster itself (42.2%) or to the red cluster (38.1%). The green cluster, despite consisting of 9 countries (8 Eastern European countries and Cyprus), does not attract large shares of students (total cluster exchange shares are between 2.4% and 10.6%), which may be due to the fact that such countries are less well known exchange destinations. Green countries have a somewhat more diverse preference profile in comparison to the first two clusters, as the parameter estimates are much closer to each other, but there is still a strong preference for the red and blue cluster countries. Purple countries, which are Switzerland, Hungary, Ireland, Norway and Turkey, can be described as medium-preference exchange destinations. They have a strong preference for the red and blue cluster countries, and very limited interest in countries within its own cluster, as well as in green and orange clusters. The orange cluster is the one having the most homogeneous preferences, as indicated by the smallest differences between the parameter estimates, and its countries tend to be among the least popular destinations for exchange. This can possibly be explained by the fact that these countries are either very small, are located very far from the centre of Europe or are not members of the European Union (as of the 2012-2013 academic year). The green, purple and orange clusters retain very small shares or transfers, 14.2%, 2.4% and 5.6% respectively, while the majority of students from these clusters tend to go on exchange to countries in the red and blue clusters. A final observation is that there seems to be a connection between the exchange preferences of Erasmus students and the level of economic development of the hosting country or the prestige of going on exchange to specific destinations. The countries with stronger economies tend to be grouped together and to exhibit higher expected country-to-country exchange proportions, whereas countries with weaker economies or newer members of the programme, such as Turkey and Croatia, tend to be separated from the more established members.



 §.§ London bike sharing data
 

We illustrate DirSBM in application to the London bike sharing data from 2014 provided by the <cit.>. We start by counting the number of trips taken between pairs of stations and identifying the busiest stations for our analysis. To do so, we look at the top 100 start and end stations in terms of volume of bikes exchanged and consider their intersection, i.e. the stations that are both among the most popular start and end points of the journey, resulting in an overall network of 85 stations. The trips only between these 85 stations account for over 10% of the total year's trips. The network is very dense, with just under 2% of edges having zero weights, hence, similarly to the Erasmus programme network from Section <ref>, we set the weights of zero-weighted edges equal to 0.001. We then compute the compositional edge weights by dividing the count weights by the total number of trips taken from the start station. 

We fit the DirSBMs with number of clusters between 1 and 8 clusters and select the optimal number of clusters based on the ICL. According to the criterion, the solution with K=4 is optimal (ICL=27866), followed by the solution with K=3 (ICL=27608). Figure <ref> illustrates the solution with 4 clusters on a map of central London (an interactive version of the map is available https://www.google.com/maps/d/edit?mid=1Jjv8zwCHdPPvxdK6gBFqmf3vLng04mg   usp=sharinghere) as well as the chord diagram for total exchange proportions between clusters. The Dirichlet parameter matrix estimate Â as well as matrices 𝐕̂ and Ŵ are provided in Appendix <ref>.

Unlike the Erasmus network data presented in Section <ref>, the clustering structure is largely driven by stronger connections within clusters than those between clusters as the diagonal elements of Â tend to be dominant. The clusters are also much more balanced in terms of number of observations, with 24, 15, 26 and 20 stations in the green, blue, red and purple cluster, respectively. There is a geographical component to the clustering structure recovered, in the sense that the clusters are quite compact in space, indicating that more trips take place within the neighbouring areas of the city, and the neighboring clusters tend to exchange larger shares of trips in comparison to more distant ones.



The blue cluster is centered around Hyde Park and Kensington, which has the least geographical spread, and it retains the majority of its flow within the cluster (62.3% of trips), possibly due to the purpose of the journey being recreational cycling. A portion of 23.2% of trips departing from the blue cluster terminate in the neighboring red cluster, and significantly smaller shares arrive to the purple (8.6%) or the green clusters (5.9%).
The red cluster contains bike stations around Soho and Covent Garden regions of London that are known for entertainment and shopping, as well as stations near major tourist attractions (such as the British Museum) or large train stations (e.g. Euston station and King's Cross station). A significant 46.4% of trips take place within the cluster, and the green cluster receives the least trips starting from the red cluster, possibly due to the geographical distance between the two. The green and the purple clusters have strong connections with each other, exchanging 41.1% and 23.2% of their trips (in comparison to retaining 36.5% and 34.9% respectively), which can be due to the concentration of corporate buildings in this region of London and the employees living within cycling distance of their workplaces. Neither cluster is well connected to the blue cluster, likely due to the distance and availability of faster public transport options as well as the purpose of travel. A proportion of 34.3% of trips from stations in a purple cluster arrive in the red cluster, whilst 21.6% travel in the opposite direction. In summary, the clusters detected by DirSBM by modelling the proportions of transfers between the stations are interpretable in terms of geographical locations and neighbourhoods of London.



§ DISCUSSION
 

In this paper, we have introduced DirSBM, an extension of the stochastic block model to directed weighted networks with compositional edge weights that is based on direct modelling of compositional weights vectors using the Dirichlet distribution. To the best of our knowledge, no counterparts currently exist in the literature, making the proposed clustering methodology the first of its kind. We have developed an inferential procedure based on a variant of the classification expectation-maximisation algorithm for hybrid likelihood. Model selection is addressed using the integrated completed likelihood criterion. We have also proposed an alternative framework for clustering for composition-weighted networks via a log-ratio transformation of the data and subsequent application of the existing weighted SBM to the transformed data. In the simulation studies, we have shown the effectiveness of DirSBM in terms of parameter estimation and recovery of the clustering structure in a variety of settings, and have explored the use of ICL for model selection, which has proven to work reasonably well. The code implementing the modelling framework in R can be found on https://github.com/iuliiapromskaia/dirSBMGitHub.

The modelling approach can be extended in multiple directions. One important extension to the DirSBM is introducing structural zeros, to enable the ability to model the absence of guaranteed edges in the network. One could use the idea from <cit.> that concerns Dirichlet regression with zeros, where indicators are used to “discard" zero entries of compositional vectors and subsequently fit the model to the non-zero subset of compositional data. As well as making the model more realistic and applicable to a wider range of real world data, such an extension could lead to numerically more stable performance, since the dimension of the Dirichlet observations would not scale with the number of nodes. 

The use of the centered log-ratio transformation approach presented in Section <ref> has been shown to be a simple valid alternative to the DirSBM in simple scenarios with few clusters in small networks. With regards to this approach, transformations other than the centered log-ratio could be explored as well as other weighted SBMs. As for the incorporation of structural zeros, it is unclear how one could include such information in this methodology as the edges are treated as independent and the respective parameters of the distribution are estimated in the Euclidean space <cit.>. This implies that even if two nodes have similar weights in a compositional sense, the absence of edges for one of them can lead to assignment to different clusters, because the absent edges would make them appear more different than they actually are when mapped to the Euclidean space. To give a simple illustrative example, suppose we have two compositions, x_1=(0.2,0.5,0.28,0.01,0.01) and x_2=(0.2,0.5,0.3,0,0), and let the zero values be structural zeros, i.e. indicating a missing edge in the network. Then, applying the centered log-ratio transformation, u_1=clr(x_1)=(0.95,1.86,1.28,-2.05,-2.05) and u_2=clr(x_2)=(-0.44,0.48,-0.035,0,0) (using the convention log 0=0), a false impression is created that the compositions are quite different. 

Other developments could include investigating more educated and efficient initialisation strategies for the proposed algorithm. Although random initialisation allows to explore the solution space rather well by considering the most diverse set of starting points, thus reducing the risk of convergence to a local maximum, it does so at a computational cost. This cost could potentially be reduced if the algorithm was to be run from fewer, or ideally a single, more informed initial clustering allocation set. Other distributions for compositional data could be considered to model the sets of proportional edge weights in the network, such as the generalised Dirichlet distribution, which would be less restrictive on the compositional variance <cit.>.




§ COMPLETE DATA LOG-LIKELIHOOD
 

Recall that given the binary matrix of cluster allocations 𝐙, the compositional data 𝐗 has the following probability density:

    p(𝐗| 𝐙) = ∏_i=1^n p(𝐱_i| 𝐳_i,𝐙_-i) =  ∏_i=1^n∏_k=1^K [Γ (∑_j≠ i^nα_j)/∏_j≠ i^nΓ (α_j)∏_j≠ i^n x_ij^α_j-1 ] ^z_ik, where α_j=∑_h=1^K z_jhα_kh.

The latent variables have probability distribution:


    p(𝐳_i)=∏_k=1^Kθ_k^z_ik.

This results in the following complete data likelihood:


    ℒ_c(𝐀,θ) =  ∏_i=1^n∏_k=1^K
    p(𝐱_i,𝐳_i,𝐙_-i) =∏_i=1^n∏_k=1^K [ θ_k Γ (∑_j≠ i^nα_j)/∏_j≠ i^nΓ (α_j)∏_j≠ i^n x_ij^α_j-1 ] ^z_ik.

Taking the natural logarithm of Equation (<ref>), we arrive at the expression for the complete data log-likelihood from Equation (<ref>).



§ CLASSIFICATION EM WITH HYBRID LOG-LIKELIHOOD
 

The expectation of the complete data hybrid log-likelihood with respect to a single latent variable 𝐳_i is given by:


    𝔼 [l_c^hyb(𝐀,θ)] 
        = ∑_i=1^n∑_k=1^K𝔼[z_ik]  (logΓ (∑_j≠ i^nα_j) - ∑_j≠ i^nlogΓ (α_j) + ∑_j≠ i^n (α_j - 1) log x_ij ) + ∑_i=1^n∑_k=1^K𝔼[z_ik] logθ_k,

with α_j =∑_h=1^Kz_jhα_kh, where z_jh is the fixed cluster indicator z_jk = 1{c_j=k}.

The E-step can be found in standard EM fashion by using the Bayes rule:


    ẑ_ik = (z_ik=1|𝐱_i,𝐙_-i)   =p(z_ik=1|𝐙_-i)p(𝐱_i|z_ik=1,𝐙_-i)p(𝐱_i|𝐙_-i)
         =p(z_ik=1)p(𝐱_i|z_ik=1,𝐙_-i)∑_hp(z_ih=1)p(𝐱_i|z_ih=1,𝐙_-i)
       ∝ p(z_ik=1)p(𝐱_i|z_ik=1,𝐙_-i) 
        =
        θ_k ∏_j≠ i^n x_ij^α_jΓ(∑_j≠ i^nα_j)∏_j≠ i^nΓ (α_j),


as p(z_ik=1|𝐙_-i)=p(z_ik=1) due to the working independence assumption.

The M-step involves finding the estimates for the mixing proportions θ=(θ_1,...,θ_K) and the Dirichlet connectivity matrix 𝐀. The closed form solution for the mixing proportions is derived similarly to that in the standard EM algorithm by maximising 𝔼[l_c^hyb(𝐀,θ)], subject to constraint ∑_kθ_k = 1. Let


    f = 𝔼[l_c^hyb(𝐀,θ)] - λ (∑_k=1^Kθ_k - 1).


The partial derivative of f with respect to θ_k is


    1θ_k∑_i=1^nẑ_ik -λ = 0,


which gives λθ_k = ∑_i=1^nẑ_ik. Summing over k and using the unit-sum constraint for (θ_1,...,θ_K), we find that λ=n, producing the update for the mixing proportions from Equation (<ref>). 

The updates for the Dirichlet concentration parameter matrix 𝐀 are not available in closed form and so are found numerically using the R function optim <cit.>. L-BFGS-B optimisation procedure <cit.> is used to update the set of parameters {α_kh}_k,h=1^K as it allows a permitted range of values to be set; in the case of DirSBM, we are only interested in strictly positive solutions. 



§ INTEGRATED COMPLETED LIKELIHOOD
 

Following <cit.>, the exact complete-data integrated log-likelihood is given by


    log p(𝐗,𝐙|K) = log p(𝐗|𝐙,K) + log p(𝐙|K).


Following closely the derivations of the ICL for random graphs in <cit.>, we can find the first term of Equation (<ref>) using a BIC approximation:


    log p(𝐗|𝐙,K) = max_𝐀log p(𝐗|𝐙,𝐀,K) -1/2 K^2 log n(n-1),

where K^2 is the number of parameters in the model (elements of non-symmetric 𝐀 matrix), and n(n-1) is the number of edge weights in the network (with no self-loops).

The second term of Equation (<ref>) is derived in the same fashion as in <cit.>, using a non-informative Jeffrey prior and Stirling formula for an approximation of a Gamma function, leading to


    log p(𝐙|K) = max_θlog p(𝐙|θ,K) - 1/2 (K-1) log n,

with (K-1) being the number of free parameters in θ and n being the number of latent variables in the model.

Substituting the approximation results back and then replacing the complete data log-likelihood with its hybrid counterpart in the fashion of <cit.>, we arrive at 


    ICL(K)     = log p(𝐗|Ẑ,Â,K) - 1/2 K^2log n(n-1) + log p (Ẑ|θ̂,K) -1/2(K-1)log n 
        = log p(𝐗,Ẑ|Â,θ̂,K) - 1/2 K^2log n(n-1) -1/2(K-1)log n 
        = l^hyb_c(Â,θ̂|𝐗,Ẑ,K) - 1/2 K^2log n(n-1) -1/2(K-1)log n.




§ SIMULATION STUDIES: ADDITIONAL NOTES
 

Parameters used to generate data sets with different levels of parameter homogeneity, low, medium and high, denoted with subscripts L, M and H, respectively:

K=2

    𝐀_L= [ 1.0 0.6; 0.8 1.5 ], 
        𝐀_M= [ 1.0 0.6; 0.9 1.4 ], 
        𝐀_H= [ 1.0 0.8; 0.9 1.5 ];


K=3

    𝐀_L= [ 1.0 0.6 0.2; 0.6 1.5 0.5; 0.3 0.4 1.2 ], 𝐀_M= [ 1.0 0.7 0.5; 0.9 1.5 0.6; 0.4 0.5 1.2 ],     𝐀_H= [ 1.0 0.7 0.5; 0.9 1.3 0.7; 0.6 0.5 1.2 ];


K=5

    𝐀_L= [ 1.0 0.6 0.2 0.3 0.5; 0.6 1.5 0.5 0.4 0.7; 0.3 0.4 1.2 0.5 0.2; 0.7 0.5 0.3 1.4 0.4; 0.5 0.7 0.8 0.6 1.7 ],
        𝐀_M= [ 1.0 0.7 0.5 0.4 0.6; 0.9 1.5 0.6 0.5 0.7; 0.4 0.5 1.2 0.6 0.3; 0.8 0.6 0.4 1.4 0.5; 0.5 0.8 0.9 0.7 1.7 ],



    𝐀_H= [ 1.0 0.7 0.5 0.4 0.6; 0.9 1.3 0.7 0.5 0.8; 0.6 0.7 1.2 0.8 0.5; 0.8 0.6 0.4 1.4 0.7; 0.7 0.8 0.9 0.6 1.6 ].


The parameter values are constrained to be positive, but some care is needed when the parameter matrices for synthetic data sets are chosen if the intention is to use such data for model testing. Due to specification of the model based on the Dirichlet distribution whose dimensions grow with the size of the network, they cannot be too large, especially in the case of large number of nodes. The expression for the complete data hybrid log-likelihood involves a Gamma function term evaluated at the sum of all parameter values, and large parameters cause it to become too large to compute. The parameters also cannot be too close to 0 as we are required to evaluate the Gamma function at each individual parameter value.



§ ERASMUS PROGRAMME DATA: PARAMETER ESTIMATES
 


 §.§ K=3


The estimate of the Dirichlet parameter matrix 𝐀 of the 3-cluster DirSBM on the Erasmus programme data is


    Â=
        [ 7.019 1.893 0.410; 5.325 2.521 0.535; 1.347 0.410 0.142;       ].


The expected total cluster-to-cluster exchange share and the expected node-to-node exchange share matrices are (multiplied by 100 for convenience): 


    𝐕̂=
        [ 50.3 37.3 12.5; 43.7 41.4 14.9; 49.8 33.4 16.8 ],
        Ŵ=
        [ 12.6  3.4  0.7;  8.7  4.1  0.9; 10.0  3.0  1.1;      ].


The rows of these matrices correspond to the sending clusters, and the receiving clusters are along the columns. To give an example in the context of the Erasmus programme network, the entry v̂_12 = 37.3 indicates that 37.3% of students of cluster 1 collectively (which contains Germany, Spain, France, Italy and the UK) go on exchange to cluster 2 collectively (which includes countries like Austria and Belgium). The entry ŵ_31=10.0 can be read as 10.0% of Irish students (cluster 3) are expected to go to Germany (cluster 1), and the same percentage is expected to go from Norway (cluster 3) to Spain (cluster 1).



 §.§ K=5


Similarly, for the K=5 solution, 


    Â=
        [ 11.004  2.214  0.323  1.189  0.213; 12.197  4.057  0.847  1.984  0.282;  5.539  3.083  1.174  0.959  0.301;  3.035  1.298  0.231  0.158  0.105;  0.630  0.323  0.124  0.155  0.108;        ].


and


    𝐕̂=
        [ 39.1 43.3  5.2 10.6  1.9; 38.1 42.2  7.9 10.3  1.5; 25.1 51.2 14.2  7.2  2.3; 34.2 53.6  7.8  2.4  2.0; 24.3 45.8 14.4 10.0  5.6;      ],
        Ŵ=
        [ 19.6  3.9  0.6  2.1  0.4; 12.7  4.2  0.9  2.1  0.3;  8.4  4.7  1.8  1.4  0.5; 11.4  4.9  0.9  0.6  0.4;  8.1  4.2  1.6  2.0  1.4;      ].




§ BIKE SHARING DATA: PARAMETER ESTIMATES
 

Dirichlet parameter matrix 𝐀 estimate of the 4-cluster DirSBM on the bike sharing data is


    Â=
        [ 1.58 0.25 0.71 2.04; 0.22 3.96 0.79 0.38; 0.61 1.51 2.16 1.26; 1.23 0.64 1.67 2.33;      ],


and the expected cluster-to-cluster exchange shares and station-to-station exchange shares matrices are


    𝐕̂=
        [ 36.5  3.7 18.7 41.1;  5.9 62.3 23.2  8.6; 12.6 19.4 46.4 21.6; 23.2  7.6 34.3 34.9;      ],
        Ŵ=
        [ 1.6 0.2 0.7 2.1; 0.2 4.5 0.9 0.4; 0.5 1.3 1.9 1.1; 1.0 0.5 1.3 1.8;     ].








 Paper Title: A Bayesian Bootstrap Approach for Dynamic Borrowing for Minimizing Mean Squared Error.




Does the Source of a Warning Matter? Examining the Effectiveness of Veracity Warning Labels Across Warners
    
    Benjamin D. Horne

    August 5, 2024
==========================================================================================================



§ ABSTRACT 
For dynamic borrowing to leverage external data to augment the control arm of small RCTs, the key step is determining the amount of borrowing based on the similarity of the outcomes in the controls from the trial and the external data sources.  A simple approach for this task uses the empirical Bayesian approach, which maximizes the marginal likelihood (maxML) of the amount of borrowing, while a likelihood-independent alternative minimizes the mean squared error (minMSE).  We consider two minMSE approaches that differ from each other in the way of estimating the parameters in the minMSE rule.  The classical one adjusts for bias due to sample variance, which in some situations is equivalent to the maxML rule.  We propose a simplified alternative without the variance adjustment, which has asymptotic properties partially similar to the maxML rule,  leading to no borrowing if means of control outcomes from the two data sources are different and may have less bias than that of the maxML rule.  Consequently,  it may not lead to full borrowing, even if the two data sources are identical.  We argue that this may not be a practical problem, since more than often a cap of the amount of external data to be borrowed is applied anyway.  In contrast, the maxML rule may lead to full borrowing even when two datasets are moderately different, which may not be a desirable property.    
For inference, we propose a  Bayesian bootstrap (BB) based approach taking the uncertainty of the estimated amount of borrowing and that of pre-adjustment into account. 
The approach can also be used with a pre-adjustment on the external controls for population difference between the two data sources using, e.g., inverse probability weighting.   The proposed approach is computationally efficient and is implemented via a simple algorithm.  We conducted a simulation study to examine properties of the proposed approach, including the coverage of 95 percent confidence interval 
based on the Bayesian bootstrapped posterior samples, or asymptotic normality.  The approach is illustrated by an example of borrowing controls for an AML trial from another study.


Keywords: Bayesian dynamic borrowing; Mean squared error; Inverse probability weighting; Dirichlet distribution; Empirical Bayesian; Power prior



§ INTRODUCTION

When a randomized clinical trial (RCT) has a small control arm, external data, which may come from another clinical trial or real-world data (RWD), may be a valuable source for augmenting the control of the RCT.  This approach is often referred to as borrowing external controls.   Regulatory guidance documents on the use of RWD to aid drug development have been published <cit.>. However, the use of external data also introduces the risk of potential bias, as the historical control population may be rather different from the RCT. 
To mitigate the risk, the control arm in an RCT, may provide an internal reference for evaluating the difference in the outcomes between the internal and external control data sources. To address the population difference, the power prior approach <cit.>  can be used to discount historical data to mitigate the impact of bias.  The amount of borrowing, parameterized by the power prior parameter, can be fixed or determined based on the similarity of the outcomes or key prognostic factors of the two data sources, known as Bayesian dynamic borrowing.   

A simple dynamic borrowing approach based on the empirical Bayes approach determines the amount of borrowing by maximizing marginal likelihood of the power prior parameter based on normal or binomial likelihood functions <cit.>.  This approach will be referred to as the maxML approach, henceforth.   The combined estimator of the mean outcome under the augmented control is consistent even when the means of the outcomes in the internal and external controls are different <cit.>.  

The difference in outcomes may be partly due to the difference in baseline covariates between the two data sources.  Hence, approaches such as propensity score <cit.> based weighting, known as inverse probability weighting (IPW), matching or stratification can be used to reduce or eliminate the difference <cit.>. An alternative approach uses a linear outcome model that assumes exchangeability after covariate adjustment <cit.>.    However, often unobserved confounding factors exist; hence a considerable difference may still exist after adjustment and lead to a moderate bias.  Therefore, the dynamic power approach should still be used as a safeguard after adjustment. To take into account variability in both adjustment and determination of the amount of borrowing in a full Bayesian analysis, Wang et al. <cit.> proposed a Bayesian bootstrap (BB) based approach  <cit.> combining the maxML and IPW adjustment for approximate Bayesian inference.

As an alternative to maxML, we propose using likelihood-independent rules to determine the amount of borrowing by minimizing the posterior mean squared error (MSE) of the combined estimator, which will be referred to as the minMSE approach hereafter.   In fact, approaches for minimizing MSE has a long history; see Galwey <cit.> for previous works and his numerical results in a different setting, in which he showed that dynamic borrowing had minimum benefit even in the best scenarios.  The minMSE rule depends on unknown parameters to be estimated from the data.  The classical minMSE approach (cminMSE hereafter) plugs in an unbiased estimate for the squared mean difference to adjust for the variance component in it.  In the scenario of normal distributed response, the cminMSE and maxML rules are equivalent.  As an alternative, we propose a simple version which uses the squared sample mean difference without variance adjustment.   Consequently, this version of minMSE generally borrows less than the other version and may not borrow in full when the internal and external data sources are identical.  Nevertheless, we argue that this may not be a serious problem in practice, since often we need a cap on the amount of borrowing to mitigate the impact of external data. 

For statistical inference, we propose a  BB approach  taking into account the uncertainty of the estimated amount of borrowing. The approach does not depend on a full likelihood specification, and hence is simple and flexible <cit.>.  The simple minMSE rule is a continuous function of the sample mean and variance with bounded derivatives, hence the asymptotic properties of the BB estimator for treatment effect can be easily derived.    For small sample properties, our simulation shows that the minMSE approach may result in significantly lower MSE than maxML or cminMSE, except when the two data sources are very similar.   

The paper is organized as follows.  The next section introduces the framework of Bayesian borrowing for RCT.  Section 3 briefly reviews Bayesian borrowing approaches, in particular the maxML approach.  In the following section, we propose our minMSE approach that can be adapted for estimating different estimands using outcomes from different outcome distributions.  Section 5 describes the BB approach and a detailed algorithm for implementing it in minMSE.  A simulation study is reported in Section 6, followed by an application to illustrate the use of the minMSE approach to acute myeloid leukemia (AML) trials in Section 7.  We end with a discussion of the extension of our approach to include, e.g., covariate adjustment using different approaches.



§ CAUSAL TREATMENT ESTIMAND WITH BORROWING EXTERNAL CONTROLS

       Let Y_ij and Z_ij  denote the outcome and treatment indicator for subject i of population j, j=1 for the external data source; and j=0 otherwise. There are n_j subjects in the population j.
As an indicator, let Z_ij=t denote the test treatment and Z_ij=c denote the control.  In our situation, we have Z_i1=c; that is, the external source is only for control.
In addition, we use D_j to denote the dataset in population j, j=0, 1.

Our final estimand of interest is the causal treatment effect of the test treatment, compared with the control.   Formally, we take the Bayesian causal framework <cit.>, and are interested in the causal effect defined as
       
    τ=E(Y_i0(t))-E(Y_i0(c)) ≡μ^t-μ^c,

where Y_ij(t) and Y_ij(c) are the (counterfactual) outcomes of subject i from population j when treated with t and c, respectively.  The expectation is taken over the super trial population, not the finite population of the n_0 subjects, but we will drop "superscript" hereafter for simplicity.   The above estimand is also known as the average treatment effect of the treated (ATT), since the trial population is the target population for the test treatment. 
Although our final goal is inference for τ, as inference for μ^t can easily use data from the treated arm in the trial, the challenge is inference for μ^c using control subjects in both D_0 and D_1, which will be the focus of this paper.  As we will not deal with the test  arm, to simplify the notation, we ignore this arm and assume that all n_0 subjects are in the control arm.  For later use, we denote the means of control patients from  populations j=1 and j=0 by μ_1=E(Y_i1(c)) and μ_0=E(Y_i0(c)), respectively.  Due to randomization in the trial, we have μ^c=μ_0 and will use notation μ_0 rather than μ_c, hereafter.  Specifically,  our goal is to use data  D_0,D_1 for statistical inference regarding μ_0, or equivalently, μ_c.



§ POWER PRIOR AND BAYESIAN DYNAMIC BORROWING


For borrowing data D_1 to improve the inference of μ_0, 
Bayesian borrowing with the power prior is a powerful tool <cit.>. First, we introduce this approach in a general form and then describe the specific one for the inference of μ_c.  The approach is based on the likelihood function with parameters θ. Let L(θ|D) denote the likelihood function, given data D. The power prior, conditional on D_1,  is formulated as 

    π(θ|D_1, a_0) ∝ L(θ|D_1)^a_0π_0(θ) ,

where 0 ≤ a_0 ≤ 1 is the power prior (discounting) parameter in the likelihood of external data, and π_0(θ) is the initial prior for θ. The corresponding posterior distribution is

    π(θ|D_1, D_0, a_0) ∝ L(θ|D_0)L(θ|D_1)^a_0π_0(θ).

The power prior assumes the same parameters θ for D_1 and D_0.  The commensurate power priors contains separate parameters θ_1 and θ_0 for them: 

    π(θ_0, θ_1|D_1, a_0) ∝  L(θ_1|D_1)^a_0π_0(θ|θ_1) π_0(θ_1) ,

In the conditional prior π_0(θ|θ_1) one can introduce a parameter to represent commensurability between θ_0 and θ_1. 

With a fixed a_0, normally distributed outcomes Y_i0 and Y_i1, with common variance σ^2  respectively, and the prior assumptions as detailed in <cit.>, the posterior distribution of μ_0 is

    μ_0 ∼ N(μ̂(a_0), σ̂^2)

where

    μ̂_0 (a_0)   =σ̂^2 (a_0  σ^-2_1 y̅_1 + σ^-2_0 y̅_0)
    σ̂^2    = (a_0 σ^-2_1 +σ^-2_0)^-1
    
and y̅_j is the sample means of Y_ij with variances σ^2_j=σ_e^2/n_j, where σ^2_e=(Y_ij) is known.  In practice, the variances can be replaced by the sample variances.  Using a location-commensurate power prior <cit.> with  π_0(μ_0|μ_1) ∼ N(μ_1, η) in our situation, the posterior mean of μ_0 is also a weighted mean of y̅_1 and y̅_0 (Section 2.3, Ref <cit.>).  

For binomial outcomes, with a Beta(1,1) prior and a fixed a_0, the posterior distribution of μ_c can be written as

    μ_0 ∼ Beta(a_0 y_1.+y_0.+1,n_0+a_0(n_1-y_1.)-y_0.+1),

where y_1.=∑_i=1^n_1 y_i1 and y_0.=∑_i=1^n_0 y_i0 <cit.>. 

To determine a_0 based on the data, 
 maxML is a simple approach <cit.>.  This approach estimates a_0 by maximizing the marginal likelihood for a_0; π(a_0| D_1,D_0). For the normal distribution case above, such an a_0 has a closed form:

    â_0 =σ^2_1/max[(y̅_1-y̅_0)^2,  σ̂^2_1 + σ̂^2_0]- σ̂^2_0.

Then, we can estimate the mean of μ_c by plugging â_0 into   (<ref>) and (<ref>).  

The same approach can be used for binary outcomes. The marginal likelihood of a_0 is (Eq 4 of Ref <cit.>) 

    π(a_0|D_1,D_0) ∝Beta(a_0 y_1.+ y_0.+1,a_0(n_1-  y_1.)+n_0-  y_0.+1)/Beta(a_0  y_1.+1,a_0(n_1- y_1.)+1).

Gravestock & Held <cit.> proposed to use

    â_0=_a_0π(a_0|D_1,D_0)

within the range of [0, 1].  In practice, â_0 can be found with a grid search.   





§ BORROWING TO MINIMIZE MSE 

  Here, we consider how to combine the two data sources and determine the amount of borrowing to minimize the MSE of a linear combination estimator such as (<ref>).  This part is not Bayesian; hence we assume known parameter values to derive the amount of borrowing, then replace the unknown parameters with their estimates.  
Specifically, we consider a linear combination of μ̂_1 ≡y̅_1 and μ̂_0 ≡y̅_0  as an estimator of μ_c:

    μ̂_c(a) =μ̂_0 +a  μ̂_1/1+a.
 
This general form includes that of maxML (<ref>) in the normal case with a=a_0 σ^2_0/σ^2_1=a_0 n_1/n_0. Therefore, for full borrowing, i.e., a_0=1, we need a=n_1/n_0. We want to find the a that minimizes the posterior MSE of μ̂_c(a), that is,

    a^* =_a MSE(μ̂_c(a)),

where 

    MSE(μ_c(a))=(μ̂_c(a))+Δ^2(a)

and Δ(a)  = E(μ̂_c(a))-μ_0 is the bias of μ̂_c(a).
Denoting the mean difference by δ=E(μ̂_1)-E(μ̂_0)=μ_1- μ_0, with some simple derivation, the variance and bias of μ̂_c(a) can be written as  

    (μ̂^c(a)) =σ^2_0+a^2 σ^2_1/(1+a)^2;    Δ(a)  =a δ/1+a.
 
  These lead to

    MSE(μ̂^c(a))=σ_0^2 + a^2 (σ^2_1+δ^2)/(1+a)^2.
  
and the a that minimizes it is
  
    a^*=σ^2_0/(σ^2_1+ δ^2).

  With this a^*,  the bias can derived as 

    Δ (a^*) =δσ^2_0/σ_1^2+ σ_0^2+δ^2.

The Appendix shows that the maximum squared bias Δ^2 (a^*) occurs when  δ^2 =σ_1^2+ σ_0^2.

To use the minMSE estimators, we need to replace the variances and bias by their estimates. The cminMSE rule, which is examined in details in Galwey <cit.>, but proposed by others much earlier,  replaces  
δ^2 by its unbiased estimate δ̂^2- σ̂_1^2 -σ̂_0^2, leading to the cminMSE rule

    â^*_c=σ̂^2_0/[max(δ̂^2,σ̂^2_1+σ̂_0^2)-σ̂_0^2]=σ̂^2_0/max(δ̂^2-σ̂^2_0,σ̂_1^2).

Interestingly, it is equivalent to â_0 in(<ref>), considering the relationship a=a_0 σ^2_0/σ^2_1.   

The cminMSE approach may have  â^*_c=1 for moderate δ̂^2 relative to the total variance, which may lead to considerable bias.  To avoid this issue, we propose a our minMSE rule in which δ^2 is replaced by δ̂^2 without the variance correction, i.e.

    â^*=σ̂^2_0/(σ̂^2_1+ δ̂^2)
 
Note that (<ref>) is derived based on known parameter values, and hence neither the cminMSE nor minMSE rules truly minimize the MSE. 

Although both â_0 and â^* have no upper limit, in practice, it is advisable to set such a limit to control the impact of external data on μ̂_c(a).

Next, we consider the asymptotic properties of â^* in (<ref>)  and â^*_c, which is equivalent to  â_0, hence we can borrow the properties of the latter.   Reference <cit.>  proposed a criterion "information borrowing consistent", which applies to our context is that  â^* → 1 in probability when μ_1 =μ_0, and â^* → 0 when μ_1 μ_0 when n_j →∞.  
Without loss of generality,  we assume that the regularity conditions on Y_ij lead to δ̂→δ, a.s., and (y̅_j.) = σ^2_j= σ^2/n_j .   When  μ_1 μ_0, we have δ̂^2 →δ^2  0.  Taking it into (<ref>) and  (<ref>), we have â^* → 0 and â_c^* → 0, a.s., hence this part of the criterion is satisfied by both minMSE rules.   
When μ_1 =  μ_0, since δ̂^2 →σ^2_1+σ^2_0, we have max(δ̂^2-σ̂^2_0,σ̂_1^2) →σ^2_1, then â_c^* → n_1/n_0, which leads to full borrowing,  if there is no cap on it.  However,  â^* →σ^2_0/(2 σ^2_1+σ^2_0)=n_0^-1/(2 n_1^-1+n_0^-1)<n_1/n_0, a.s., and therefore â^* does not lead to full borrowing.   Although â^* has the inconsistency issue in this ideal situation,  it may not be a serious practical problem, since the amount of borrowing is often capped and full borrowing, which treats external data the same as internal ones, is often not desirable.  Our simulation evidence shows (Section 6) that for a wide range of parameter settings,  â^* results in a much lower MSE than â_0 (or equivalently â_c^*). 

  The minMSE rule works for a wide range of outcomes, including normal and binary outcomes,  since we only need to replace the mean and variance by their estimators in (<ref>).  For example, for binary outcomes, we can use μ̂_j=y_j./n_j and σ̂_j^2=y_j./n_j(1-y_j./n_j).    If appropriate, one may also use the cminMSE rule and  the variances in δ̂^2.  Finally, although we derived the minMSE rule as a frequentist approach, one can also replace δ and μ_j with their Bayesian estimates.



 §.§ Extensions of the minMSE approach

Although MSE is a good summary taking both bias and variability into account, people may want case-specific relative weights between them. 
The first extension of our approach is to minimize a weighted MSE 

    MSE(μ̂_c(a),η)=var(μ̂_c(a)) + η^2 Δ^2(a),

  where weight η represents the relative importance of the bias.
  The previous results can be easily adapted. Since

    Δ(a)= a  δ/1+a,

we can write

    MSE(μ̂_c(a),η)=     var(μ̂_c) + η^2 Δ^2(a),
    
         =   σ_0^2 + a^2 (σ^2_1+(ηδ)^2)/(1+a)^2,

which is the same as (<ref>), except that δ is replaced with ηδ.  Hence, to use the previous results, we only need to replace δ with ηδ in the other formulae.

In the minMSE estimator, we have used data D_1 to calculate μ̂_1 directly. When we observe  p key prognostic factors _ij and that are imbalanced between the two populations, adjustment can be carried out for subjects in D_1 so that μ_1 becomes more similar to μ_0 by eliminating the impact of difference in _ij between j=1 and j=0.  We briefly describe the IPW approach here, although other adjustment methods can also be used. The IPW approach <cit.> is based on the propensity score (PS) defined as

    e_i=P(j=0|_ij),

which can be estimated by a logistic regression to obtain ê_i for all subjects in D_1.  Then an IPW adjusted estimator is

    μ̂_1=n_1^-1∑_i=1^n_1ê_i/1-ê_i Y_i1.

Capistran et al. <cit.>  and Stephens et al. <cit.> showed how to obtain posterior BB samples using the IPW estimator and that μ̂_1 converges to the posterior mean.
  Even when the PS model is misspecified, an IPW adjustment may still reduce the difference between μ̂_0 and μ̂_1 and results in more borrowing and smaller MSE than that without adjustment. 



§ BAYESIAN BOOTSTRAP FOR APPROXIMATE BAYESIAN INFERENCE 

Here we propose using a BB approach for approximate Bayesian inference based on the estimator μ̂_c(a^*).  Since μ̂_c(â^*) contains multiple sources of variability, including those for estimating a^* and adjusting for X_ij.  Consequently, even if we are willing to assume the asymptotic normality of μ̂_c(â^*),  calculating its asymptotic variance is not easy.  BB provides a simple approach to approximate Bayesian inference by constructing a posterior sample of μ_c.  By "approximate" we mean that the BB approach cannot rely on small sample properties that some classical Bayesian methods enjoy when correct priors and models are specified.

Suppose that, based on the data D_0 and D_1, we can obtain BB posterior samples  μ_0^b ∼ F(μ|D_0) and μ_1^b ∼ F(μ|D_1), respectively. 
In particular, we have posterior means and variances, E(μ_0^b)=μ̂_0, E(μ_1^b)=μ̂_1 and (μ_0^b)=σ̂^2_0, (μ_1^b)=σ̂^2_1, which can replace the unknown parameters in (<ref>).  Here, we show that BB can be used to obtain posterior samples of μ_c for statistical inference.  

To this end, the first step is to obtain posterior samples of μ_1^b and μ_0^b using BB.  We draw weights from a non-informative Dirichlet distribution w_ij^b ∼ Dir(1,...,1) for all subjects in D_j, j=0,1;   b=1,...,B, respectively.
 Then BB posterior samples for μ_j and σ^2_j can be obtained as the weighted mean

 
    μ̂_j^b=   ∑_i=1^n_j w_ij^b Y_ij/n_j, 
    σ̂_j^2b=   ∑_i=1^n_j w_ij^b (Y_ij- μ̂_j^b)^2/(n_j-1)    j=0,1;   b=1,..., B.

Here, we assume that the weights w_ij^b have been normalized so that their sum is n_j rather than 1.  We obtain the posterior samples
μ̂_j^1, ..., μ̂_j^B, b=1,...,B,   j=0, 1.  Consequently, we can construct posterior samples of δ as δ̂^b=μ̂_1^b -μ̂_0^b and that of a^* by plugging μ̂_j^bs into (<ref>) to obtain â^*b.  Taking â^*b, μ̂_j^b and σ̂_j^2(b) to replace the sample means and variances in  (<ref>), we obtain the posterior samples μ̂^b_c(â^*b) as desired.  Then statistical inference can be based on an approximate normal distribution using posterior mean and variance, or on the empirical distribution of posterior samples μ̂_c^b.  

Although the posterior sample  μ̂_c^b can be used for inference without relying on the posterior distribution, it is a theoretical justification to examine its asymptotic distribution, since the minMSE rules do not depend on the full model specification. The asymptotic properties of the BB sample  can be found in the appendix together with justification of type I error control. 

For the estimation and inference of treatment effect τ based on BB, we also need to apply the BB step to treated subjects in the trial to obtain μ̂_t^b.  Then, one can obtain the posterior samples of τ by τ̂^b=μ̂_t^b-μ̂_c^b, b=1,...,B.
Algorithm <ref>  details all the steps, including possible pre-adjustment of D_1 data with IPW.





§ A SIMULATION STUDY


A simulation study is conducted to examine the performance of the minMSE approach compared to the maxML. Although minMSE can be extended to include pre-adjustment or using weighted MSE, the simulation focuses on the basic approach as this setting is sufficient to capture key features of the minMSE approach.  For example, if IPW pre-adjustment reduced δ from 0.3 to 0.2, then the simulation with δ=0.2 and δ=0.3 can reflect the impact of the adjustment.  In addition, we concentrate on the property of μ̂_c rather than τ̂ since the borrowing approach affects the latter only via the former.  

The following gives the parameters of the simulation setting.

    
  * As continuous outcomes, we generate Y_ij∼ N(μ_ij,1)  or Y_ij∼ t(μ_ij,df), with μ_ij=_ij^T  + j 
    Δ_x, where df=3, =0.5  1, 1 is vector of p ones and _ij∼ N(0,1) IID. With this setting, Δ_x represents the mean difference δ, hence is the key parameter for the performance of the combined estimators. 
    
  * As binary outcomes, we generate Y_ij∼ Bin(p_ij), p_ij=1/(1+exp(_ij^T  - p_j)) and p_j=log((p_0+ j Δ_p)/(1-p_0-j 
    Δ_p)), with =0.2 1 and varying Δ_p.  Using a smaller  than that for the normal distribution is to avoid extreme p_ij.  With this setting,  without the effect of _ij, we have p_i1=p_0+Δ_p and p_i0=p_0, hence Δ_p is the difference between p_i1 and p_i0.   
    
  * Performance measures that we are interested in are the variance, MSE, and coverage of 95% CI using either an asymptotic normal distribution or percentiles based on the two combined estimators.  For the normal approximation, the variances are estimated from the BB samples.
    
  * Sample sizes are n_0=50 or n_0=100, and n_1=n_0 or n_1=3 n_0.
    
  * To estimate the variance and MSE, 5000 simulations were run, each with 100 bootstraps. The calculation for the coverage of 95% CI used 300 bootstraps and 3000 simulation runs. 
    
  * The contribution of external data is capped at either 100% (C=1) or 50% (C=0.5) of internal data, regardless of n_1.



Figures <ref> and <ref> show the MSE and variance of the maxML and minMSE estimators for different Δ_p (binary outcome) and Δ_x (normal outcome)  when C=1, n_0=100, n_1=n_0 and n_1=3 n_0, respectively,  with the variance of the estimator without borrowing as a reference (horizontal line).  For both estimators,  their variances and MSEs are low when Δ_p or Δ_x is very small or very large, as expected, since moderate values of Δ_p or Δ_x make the worst scenarios. The maxML estimator has an advantage when Δ_x=0 or Δ_p=0, which is probably the consequence of full borrowing when Δ_p or Δ_x is small.  However, in general, the minMSE estimators have a lower MSE, especially when Δ_p or Δ_x has moderate values.    With small Δ_p or Δ_x, the minMSE estimators have a smaller MSE than the variance of no borrowing. With n_1=3 n_0, both estimators improve.   In particular, when Δ_x=0, the variance of maxML is close to the full borrowing one (0.008, half of that without borrowing), while that of minMSE is slightly higher.  This seems rather different from the simulation reported by <cit.>, in which a very limited benefit of borrowing is shown.  This may be due to the difference between a^* and a_n^*, which is the same as Gaywey's.

To examine the impact of using a lower cap, the same simulation was run with C=0.5 and the results are shown in Figures <ref> and <ref>. The change in C has a minimum impact when n_1=n_0, but when n_1=3 n_0 Figures <ref> show a slight loss of efficiency when Δ_x=0 or Δ_p=0, but better performance in the worst scenarios.

Figures <ref> and <ref> present the coverage of 95% CI based on asymptotic normality or percentiles of the BB sample using both estimators for normally distributed outcomes.  
When Δ_x=0 or Δ_p=0, the 95% CI based on the normal approximation has slightly higher coverage, while those based on percentiles have slightly lower coverage than the nominal level. In general, the normal approximation-based CI shows the lowest coverage, suggesting that the sample size may not be sufficient for using asymptotic normality, while the two percentile-based ones have a better coverage. The sample sizes have a large impact, especially for moderate Δ_p and Δ_x, around which the coverage of all CIs is generally closer to 95% when n_0=100 than it is when n_0=50.  Similar patterns are observed when n_1= 3 n_0, 
(Figure <ref>), with better performance than n_1=n_0 for moderate Δ_p and Δ_x. Setting a lower cap at C=0.5 improves coverage, except when Δ_x=0 or Δ_p=0  (Figures <ref> and <ref>). 

The same simulation was performed with binary outcomes and the coverage of 95% CIs are shown in Figures <ref>, 
 <ref>, <ref> and <ref>.  In general, similar patterns as those with normally distributed outcomes have been observed.   When n_1=n_0 (Figures <ref>), although the coverage is better for worst scenarios, the trend of improvement toward the high end of Δ_x or Δ_p are less obvious, especially when n_0=50. Interestingly, the nonparametric CI based on maxML performs better than the counterpart of the minMSE estimator. Unlike in the case of normally distributed outcomes,  increasing n_1 from n_1=n_0 to n_1=3 n_0 does not improve coverage in Figures <ref>, but lowering the cap to C=0.5 does (Figures <ref> and <ref>).

Finally, we performed a simulation with a t-distribution with df=3 for the error term for the normal distribution for the scenario of n_1=n_0 only (Figures <ref>).  Not much impact has been observed when n_0=100, but when n_0=50, the coverage rates did not converge to the nominal level at the high end of Δ_x or Δ_p.



§ AN ILLUSTRATIVE EXAMPLE


We illustrate our approach using two publicly available datasets that evaluate gemtuzumab ozogamicin (GO, a CD-33 targeted therapy) with chemotherapy for children and adolescents with AML: AML03P1 <cit.> (Cooper et al., 2012) and AML0531 <cit.> (Gamis et al., 2014). Both trials had a GO with the chemotherapy arm that consisted of a remission induction phase (course 1) followed by an intensification phase (course 2). We consider complete remission (CR) at the end of course 2, a binary indicator, as the outcome of interest.  There are 59 and 234 patients who had the outcome status ascertained from trial AML03P1 and AML0531 trials, respectively. 


Our aim is to borrow data from AML0531 to strengthen the small arm in AML03P1.  We use IPW to control the difference in the following baseline factors: log-age, log-bone marrow leukemic blast percentage (log-BM), central nervous system (CNS) disease, race, risk group and white blood count (WBC) at diagnosis. Table <ref> presents the fitted PS model together with the mean / percentage differences of the above covariates. There is a substantial difference in log-WBC and also smaller differences in race and risk group.  The weighted differences are generally much smaller, in particular in log-WBC, showing the effect of covariate balancing with IPW.    
    To apply the proposed approach, the algorithm presented in Section 3 is implemented in R.   Figure <ref> shows the posterior density, median, and 95% credible interval of the CR rate in AML03P1 with Bayesian dynamic borrowing with and without IPW adjustment, compared to those with full and no borrowing.  The density with full borrowing is rather different from the original AML03P1 one (no borrowing), while the density with dynamic borrowing is in between the two. The IPW-adjusted one is more similar to the original one, but with less variability. Table <ref> gives the posterior mean, median, SE and √(MSE) of CR rate with four methods that combine the two AML studies, compared to no-borrowing and full-borrowing.
These results show, when the difference between the trials is significant, the advantage of IPW adjustment before applying the Bayesian dynamic borrowing with both maxML and minMSE approaches. The minMSE approach has a lower MSE than that of maxML with and without IPW adjustment.



§ DISCUSSION

This work serves multiple purposes, but focus on minMSE rules as an alternative to the likelihood function based methods such as the empirical Bayesian rule, for borrowing external controls.  In addition to the cminMSE rule, we propose a simplified version which may have better performance in some practical scenarios.  
For statistical inference, we also proposed an approach to Bayesian inference with dynamic borrowing including determining the amount of borrowing and possibly pre-adjustment for covariate differences.   
One advantage of the minMSE approach is the property of minimum MSE, which holds for small sample sizes as well, as it does not depend on asymptotic normality, as we have shown in the simulation.  This property has been shown in almost all of our simulation results and the difference is often considerably large.
Our BB based approach together with the minMSE rule is simple and can be implemented easily, e.g., in R.  Our codes for the simulation in the appendix can be adapted for new simulation or other applications. 

For pre-adjustment for covariates, we only mentioned IPW adjustment in our approach for simplicity. Nevertheless, our approaches can also use, together with other adjustments, for example, the doubly robust (DR) adjustment.  The use of BB approach with DR has been proposed by Graham et al.<cit.>, therefore posterior samples of μ_c with DR adjustment can be easily obtained.  Wang et al. <cit.> detailed this approach for dynamic borrowing-based maxML.  The algorithm we proposed here is similar to that in theirs, with the major difference in the rule of determining a^*. 

To measure the performance of each approach, we have mainly focused on the MSE rather than the coverage of CI, although our simulation study shows that dynamic borrowing affects the coverage of 95% CI, due to the variability it introduced. This occurs in both the maxML and minMSE results.  But the impact is generally small on quantile-based CI when the mean outcomes are similar in two data sources and when â^* is capped. These results indicate the importance of pre-adjusting the external outcome with key prognostic factors and setting a low cap for â^*.  A practical implication is to lower the expectation of how much can be borrowed. Our experience is that the contribution of external data should be a small fraction of the internal data, which is still beneficial. 

Some previous work casts a critical view on dynamic borrowing over the difficulty of controlling type I error, including Galwey <cit.>,  Kopp-Schneider et al. <cit.>.  Indeed, without any assumption on external data, power gains are typically not possible
if strict type I error control is needed.  
However, one can calibrate the CI or rejection boundary to achieve it, e.g., as did Nikolakopoulos et al. <cit.>  in the normal outcome setting.  To our best knowledge, most dynamic borrowing approach did not use re-calibration, hence further investigation is needed in this direction. 

vancouver










































§ APPENDIX



 §.§ Derivation of minMSE rule

Here we give details of the derivation for Section 4.1. We start from Eq (<ref>)

    MSE(μ̂^c(a))=σ_0^2 + a^2 (σ^2_1+ δ^2)/(1+a)^2.

  Setting

    ∂ MSE(μ̂^c(a))/∂ a∝ [(1+a) a (σ_1^2+ δ^2)- σ_0^2-a^2 (σ_1^2+ δ^2)]=0

  yields optimal a^*: 
  
    a^*= σ^2_0/(σ^2_1+ δ^2),

  which is the same as that of Galwey (2017) in a different setting.  
  With this a^*, we have the following posterior mean of μ_c(a^*)

    μ_c(a^*) =μ_0 +a^*  μ_1/1+a^*.

The bias of μ̂^c(^*a)  is

    Δ (a^*)    =μ_c(a^*)-μ_0
       =a^*  δ/1+a^*
       =δσ^2_0/σ_1^2+ σ_0^2+δ^2

which tends to zero even when δ→∞.
The maximum squared bias can be found by letting

    ∂Δ^2(a^*)/∂δ^2   ∝ [σ_1^2+σ_0^2+δ^2 -2  δ^2]=0,

which leads to δ^2 =σ_1^2+ σ_0^2, that is, the maximum Δ^2 (a^*) occurs when  δ^2 equals the total variance.


 §.§ Asymptotic properties

We derive asymptotic properties of the posterior sample μ̂_c^b(â^*) based on the results in <cit.> when n_j →∞, j=0,1.  Without loss of generality, we assume that n_1=n_0=n.   First, we consider the asymptotic properties of μ̂_c^b(a) with fixed a. Since

    √(n) (μ̂^b_c(a)-μ̂_c(a)) =(1+a)^-1 [√(n) (μ̂_0^b-μ̂_0) +a √(n) (μ̂_1^b-μ̂_1) ] ∼_a (1+a)^-1 (Z_0 +a Z_1)

where Z_k ∼ N(0,σ_k^2) only depends on data D_k, based on Theorem 1, Ref <cit.>, and C_n ∼_a C means C_n weakly converges to C.  Because â^* → a^*, a.s., using the continuous mapping theorem (Section 2.7, <cit.>, we have 

    √(n) (μ̂^b_c(â^*b)-μ̂_c(â^*)) ∼_a (1+a^*)^-1 (Z_0 +a^* Z_1)

Theorem 1 in Ref <cit.> also states that  μ_c(a^*), given D_0, D_1 has the same asymptotic posterior distribution as μ̂^b_c(â^*b), that is,

    √(n) (μ_c(a^*)-μ̂_c(â^*)) ∼_a √(n) (μ̂^b_c(â^*b)-μ̂_c(â^*))

Therefore, inference based on μ̂^b_c(â^*b) is indeed an approximate Bayesian inference.  

Note that when μ_1 μ_0, â^* → 0 a.s.  and we have  

    √(n) (μ̂^b_c(â^*b)-μ̂_c(â^*)) ∼_a  Z_0

which is independent of  D_1.
Therefore, a test, eg., for H_0: μ_c=0 based on μ̂^b_c(â^*b) asymptotically controls the type I error.   This is a property of the elastic priors <cit.>.  Although â^* only has half of the information borrowing consistent property, the key request of type I error control still holds. Although asymptotic distributions can be derived, using the percentiles of BB posterior samples for CI may be a better choice than relying on asymptotic normality.  As shown by the simulation results, the former has better coverage especially with moderate Δ_x values.  



 §.§ R-code

The following codes produces Figure 1 
 

 


 Paper Title: Shape-restricted transfer learning analysis for generalized linear regression model.






Shape-restricted transfer learning analysis for generalized linear regression models
    Pengfei Li^1, Tao Yu^2, Chixiang Chen^3,  and Jing Qin^4
    
====================================================================================






^1Pengfei Li is Professor,
Department of Statistics and Actuarial Sciences,
University of Waterloo,
Waterloo, ON, Canada, N2L 3G1

(Email: pengfei.li@uwaterloo.ca)

^2Tao Yu is Associate Professor,
Department of Statistics and Data Science,
National University of Singapore, Singapore, 117546

(Email: yu.tao@nus.edu.sg)


^3Chixiang Chen is 
Assistant professor, Department of Epidemiology and Public Health,
University of Maryland School of Medicine, MD 21201, U.S.A.

 (Email: Chixiang.Chen@som.umaryland.edu)

^4Jing Qin is Mathematical Statistician, National Institute of Allergy and Infectious Diseases, National Institutes of Health, MD 20892, U.S.A.

 (Email: jingqin@niaid.nih.gov)





§ ABSTRACT 

Transfer learning has emerged as a highly sought-after and actively pursued research area within the statistical community. The core concept of transfer learning involves leveraging insights and information from auxiliary datasets to enhance the analysis of the primary dataset of interest.
In this paper, our focus is on datasets originating from distinct yet interconnected distributions. We assume that the training data conforms to a standard generalized linear model, while the testing data exhibit a connection to the training data based on a prior probability shift assumption. Ultimately, we discover that the two-sample conditional means are interrelated through an unknown, nondecreasing function. We integrate the power of generalized estimating equations with the shape-restricted score function, creating a robust framework for improved inference regarding the underlying parameters.
We theoretically establish the asymptotic properties of our estimator and demonstrate, through simulation studies, that our method yields more accurate parameter estimates compared to those based solely on the testing or training data. Finally, we apply our method to a real-world example. 











Keywords: Estimating equation; Generalized linear model; Prior Probability shift; Shape-restricted inference; Transfer learning



§ INTRODUCTION
 

In the era of big data and diverse sources of information, statistical transfer learning has emerged as a powerful paradigm to address challenges posed by data heterogeneity and limited sample sizes. Traditional statistical methods often assume that the training and testing data are drawn from the same distribution <cit.>, an assumption that may not hold true in many real-world scenarios. 
The motivation behind statistical transfer learning stems from the recognition that data collected from one domain can contain valuable information benefiting the learning process in another domain <cit.>. This is particularly relevant when the target domain has limited labeled data or exhibits different statistical properties compared to the source domain. By harnessing the wealth of knowledge from related domains, statistical transfer learning offers a way to enhance predictive accuracy, generalization, and interpretability in various applications, such as the development of precision medicine  <cit.>, language recognition <cit.>, medical diagnosis <cit.>, and recommender systems <cit.>.

The predictive accuracy of machine learning models is significantly impacted by the presence of data shift, which occurs when the distribution of the data used for model training differs substantially from the distribution of the data encountered during deployment. This issue is particularly pronounced in clinical AI systems, where machine learning algorithms play a crucial role in discerning patterns from clinical data. Dataset shift can lead to severe consequences, adversely affecting model performance and patient outcomes in such systems.
The impact of dataset shift becomes notably apparent in the case of the sepsis-alerting model at the University of Michigan Hospital <cit.>. 
Developed by Epic Systems, this model effectively identified potential sepsis cases using historical patient data.
However, during the coronavirus disease 2019 pandemic, the model's performance deteriorated due to shifts in patients' demographic characteristics and other relevant factors.
This dataset shift fundamentally altered the relationship between fevers and bacterial sepsis, resulting in spurious alerting. As a consequence, the hospital's clinical AI governing committee deactivated the model for patient safety reasons.
Therefore, it is crucial to explore methods that can appropriately combine data information from similar studies when conducting statistical learning across various scientific fields, including economics, machine learning, distributed statistical inferences, and others.



Data shift can manifest in various forms. One extensively studied transfer learning problem involves binary classification within the framework of domain adaptation. In this scenario, the distributions of data pairs 
(X, Y) are assumed to be drawn from related but distinct distributions defined on ^p×{0,1}. 
For simplicity, we focus on 
two distributions–namely, the training and testing distributions. In this framework, two general strategies are employed. The first strategy involves making no additional assumptions about the relationship between distributions but instead suggesting a measurement of the divergence of the distributions. This measurement is then used to establish and quantify the effectiveness of the classification rules  <cit.>. The second strategy involves imposing structural assumptions between the training and testing distributions. Common assumptions include covariate shift and label shift (or more generally, prior probability shift). 
The covariate shift refers to the change in the distribution of the covariates X in the training and testing data <cit.>. Label shift assumes that the distributions of the covariates X may remain similar, while the distributions of Y|X can be significantly different <cit.>. Under this assumption, <cit.> considered the linear regression model, i.e., Y = X^Tβ + ϵ, when Y is a continuous variable. In their approach, they proposed to estimate β by a weighted sum of the corresponding least square estimates of β from the training and testing data. By assuming that the regression coefficients are different, but model structures are the same, for training and testing data <cit.> and <cit.> considered the transfer learning method for high dimensional linear models and generalized linear models with a Lasso penalty. 

The transfer learning method for the generalized linear model in the context of “prior probability shift" has not been thoroughly explored in the literature. This paper aims to introduce a method under this setup that can effectively address the heterogeneity between the training and testing data. 
Specifically, we assume that the distributional difference between the training data and the testing data lies in the conditional distributions of Y|X, which is captured by the conditional density relationship:

    f^*(y|x) ∝π(y) f(y|x),

where π(y) is an unknown selection function, and f(y|x) and f^*(y|x) are the conditional densities of Y|X = x for the training and testing data, respectively.
In general, there is no strict requirement for the marginal densities of X in the training and testing data to be identical. Consequently, the conditional densities f(x | y) in the training and testing data might show variations. Essentially, our assumption is somewhat less stringent than the previously mentioned probability shift assumption.


We observe that Assumption (<ref>) is well-motivated in practical scenarios. Let D=1 or 0 denote whether an individual data point is observed or not. If

    P(D=1|X = x,Y=y)=P(D=1|Y=y)=π(y)

depending on the outcome Y only, then, by Bayes's formula, we can show that

    Y|{X = x, D=1}∼π(y)f(y|x)/∫π(y)f(y|x)dy.












In other words, if the selection bias function depends solely on the outcome, it leads to a scenario resembling a prior probability shift issue. 
It's worth noting that model (<ref>) demonstrates a high degree of flexibility. It accommodates situations where the testing data stem from a selection-biased variant of the training data. Furthermore, it allows for differences in covariate densities between the training and testing data. In practical applications, such as clinical trials conducted across various research institutes, variations in patient inclusion criteria can result in distinct covariate distributions.









The issue known as the prior probability shift problem transforms into what is commonly referred to as the label shift problem when the outcome Y is discrete. For example, when Y represents an individual's reported disease status and X encompasses symptoms and medical test outcomes obtained from standard equipment, this challenge is characterized as the label shift problem.
In some instances, it may be reasonable to assume that the distribution of X is consistent across various studies. However, given a specific set of observations X = x, the reported disease status from these studies may be influenced by Y. This influence can be attributed to various factors, such as differences in the knowledge and education backgrounds of doctors or environmental impacts. 
The aforementioned sepsis-alerting model <cit.> developed by the University of Michigan Hospital stands as a concrete example of this label shift phenomenon.


We assume that Equation (<ref>) holds, and that observations in the training data follow the exponential family with 
E(Y|X = x)=μ(x^Tβ). 
Under these assumptions, 
 we demonstrate  (refer to  Section <ref>) that for the testing data,

    E(Y|X = x) = ψ(μ(x^T β)),

with ψ(·) being a monotone function. This is inline with the development in <cit.>, in which they assumed that the regression models for binary outcomes Y in both the training and testing data are linked through a known nondecreasing link function and a low-dimensional transformation of the covariates. This innovative perspective draws inspiration from the Cox proportional hazard model.
In our current paper, we deviate from the assumption of a binary outcome and, instead, focus on more general regression functions in both the training and testing data. These functions are interconnected through an unknown monotone transformation, presenting an intriguing challenge. Essentially, this shift transforms our problem into a shape-restricted transfer learning scenario, paving the way for exciting avenues of exploration and investigation. Notably, shape-restricted inference has found applications in various domains, including AI <cit.>. In transfer learning scenarios, the incorporation of shape restrictions, such as monotonicity, proves particularly advantageous, as it enables us to align with prior knowledge and enforce domain-specific constraints.


It's worth noting that assuming a generalized linear model for the training data, Equation (<ref>) implies Equation (<ref>). However, Equation (<ref>) presents a more general condition than Equation (<ref>).
In particular, when the outcome variable Y is binary, <cit.> and <cit.> have made similar assumptions concerning a monotone link function for the transfer learning problem. Their primary focus has been on achieving minimax optimal rates of convergence in their respective studies.
This paper focuses on the assumption stated in Equation (<ref>).

The rest of the paper is organized as follows.  In Section <ref>, we present the model assumptions for both the training and testing data, and introduce our estimating equation-based method for β. This method incorporates information from both the training and testing data, assuming that ψ(·) in (<ref>) is unknown.
In Section <ref>, we theoretically establish the asymptotic normality of our β estimates. Section <ref> presents simulation studies, while Section <ref> applies our method to a real data example. Finally, Section <ref> concludes the paper with a discussion. For ease of presentation, technical details are provided in the Appendix and supplementary material.





§ ESTIMATION METHOD
 

Consider a set of training data: (Y_1,i, X_1,i), i=1, …, n, and a set of testing data: (Y_2,j, X_2,j), j=1, …, m.
Assume that the training data consists of independent and identically distributed (i.i.d.) copies of (Y_1, X_1), which follows a standard parametric generalized linear model <cit.>. Specifically, assume that the conditional density of Y_1 given the covariate X_1 = x belongs to a canonical exponential family:

    f(y|x) = exp{y θ(x) - b(θ(x))/a(ϕ)  +  c(y, ϕ)}.

Here, a(·), b(·), and c(·, ·)
are known functions,  θ(·) is the canonical parameter, and ϕ is the dispersion parameter. 
In the context of the parametric generalized linear model, we have E(Y_1|X_1=x) = μ_1(x^T β), where μ_1(·) is a known increasing function. 
Subsequently, the following relationships hold:

    μ_1(x^T β)    =    E(Y_1|X_1=x) = b'(θ(x)), 
    var(Y_1|X_1=x)    =    a(ϕ) b”(θ(x)) ≡ a(ϕ) · V(x^T β),

where V(·) is the variance function with a known function form. 
It is straightforward to check 

    ∂log f(y|x)/∂β = μ_1'(x^T β) /a(ϕ) V(x^T β)x{ y - μ_1(x^T β)}.

Assuming that the dispersion parameter ϕ is a constant across the observations, the maximum likelihood estimate for β can be obtain by solving the equations ψ_1,n(β) = 0, where 

    ψ_1,n(β)    =   1/n∑_i=1^n μ_1'(X_1,i^Tβ)/V(X_1,i^Tβ) X_1,i{ Y_1,i - μ_1(X_1,i^Tβ) }.


For the testing data (Y_2,j, X_2,j), j=1,…,m, we assume that they are i.i.d. copies of (Y_2, X_2). 
The conditional distribution of Y_2 is assumed to be related to that of the training data. Specifically, we assume that the conditional density of Y_2|X_2 = x, denoted by f^*(y|x), satisfies (<ref>), with π(y) representing an unknown selection function. 
Consequently,

    f^*(y|x) = π(y) f(y|x)/∫π(y) f(y|x) dy.

The following proposition holds. 
 
Assume the conditional density of Y_2|X_2 = x in (<ref>), with f(y|x) given by (<ref>). Then, there exists a nondecreasing function μ_2(·) such that

    E(Y_2|X_2 = x) = μ_2(x^T β).


Combining (<ref>) and (<ref>), we obtain 

    f^*(y|x)
        =   exp[ y θ(x)/a(ϕ)+{logπ(y)+c(y,ϕ)}]/∫exp[ y θ(x)/a(ϕ)+{logπ(y)+c(y,ϕ)}] dy
       =   exp[ y θ(x)-  b_π(θ(x), ϕ)/a(ϕ)+{logπ(y)+c(y,ϕ)}],

where 

    b_π(θ(x), ϕ) = a(ϕ) log∫exp[ y θ(x)/a(ϕ)+{logπ(y)+c(y,ϕ)}] dy.

Denote by E_Y_2|X_2 = x(·) the expectation with respect to Y_2 under the density f^*(y|x). 
Due to the fact E_Y_2|X_2 = x[ ∂log f^*(Y_2|x)/∂{θ(x) }] = 0,
we have

    E_Y_2|X_2 = x{Y_2 - ∂ b_π(θ(x), ϕ)/∂θ(x)} = 0,

or equivalently,

    E(Y_2|X_2 = x) = ∂ b_π(θ(x), ϕ)/∂θ(x).

Furthermore, based on the fact that 

    E_Y_2|X_2 = x[ ∂^2 log f^*(Y_2|x)/∂{θ(x) }^2] + E_Y_2|X_2 = x([ ∂log f^*(Y_2|x)/∂{θ(x) }]^2 ) = 0,

we have

    ∂^2 b_π(θ(x), ϕ)/∂{θ(x)}^2   =   1/a(ϕ)· E_Y_2|X_2 = x[{Y_2 - ∂ b_π(θ(x), ϕ)/∂θ(x)}^2] 
       =   var(Y_2|X_2 = x)/a(ϕ)≥ 0,

where “=" holds if and only if Y_2 = E(Y_2|X_2 = x) almost surely. Combining (<ref>) and (<ref>), we conclude that E(Y_2|X_2 = x) is a nondecreasing function of θ(x), and therefore is a nondecreasing function of x^T β.  We complete the proof of the proposition. 

With Proposition <ref>, the testing data can be analyzed using the monotone single index model <cit.>. Specifically, we can employ the following profiling procedure to establish a set of estimating functions based on the testing data. For each given β, we estimate μ_2(·) by

    μ_2,β(·) = min_μ_2∑_j=1^m {Y_2,j - μ_2(X_2,j^Tβ)}^2,

subject to μ_2(·) being a nondecreasing function. 
This can be solved by the standard PAVA algorithm <cit.>. Employing similar ideas as <cit.> and <cit.>, we can construct a set of estimating functions:

    ψ_2,m(β) = 1/m∑_j=1^m X_2,j{Y_2,j-μ_2,β(X_2,j^Tβ)}.

Based only on the testing data, a β estimate can be obtained by solving the equation ψ_2,m(β) = 0. 

Combining (<ref>) with (<ref>), let 

    ψ_n,m(β) = λ_n,mψ_1,n(β) + (1-λ_n,m) ψ_2,m(β),

where λ_n,m = n/(n+m). We hope to define β to be the root of ψ_n,m(β) = 0. However, ψ_n,m(·) may not be a continuous mapping, and its root may not exist. Similar to <cit.>, we define β to be the zero crossing of ψ_n,m(β). The zero crossing of a function (or a mapping) is defined below.


For a function ψ: →, x is called the zero-crossing of ψ if every open neighborhood of x contains x_1, x_2 such that ψ(x_1)ψ(x_2) ≤ 0.
For a mapping ψ: →^d for d≥ 2, x is called the zero-crossing of ψ if x is the zero-crossing of each component of ψ.


In most practical scenarios, it is reasonable to assume that the size of the training data, i.e., n, is less than or comparable to that of the testing data, i.e., m; in the sense λ_n,m→λ > 0. Some discussion on this assumption can be found in <cit.> and <cit.>. However, from both a methodological and theoretical standpoint, it is possible for n ≪ m or, more rigorously, for n/m → 0, resulting in λ_n,m→λ = 0. Intuitively, when λ_n,m is small, in other words, when we have much more testing data than training data, the contribution of the training data to the β estimation (through ψ_1,n(β)) is limited; therefore, β relies mainly on the testing data (through ψ_2,m(β)).
On the other hand, with only the testing data, model (<ref>) is identifiable only when a constraint is imposed on β, such as
β_2 = 1. Theoretically, the zero crossing of ψ_2,m(β) only exists asymptotically for p-1 out of its p components, such as the 2nd to pth component if β_0,1≠ 0, where β_0 denotes the true value of β, and β_0,1 denotes the first component of β_0. See Section <ref> and the corresponding technical developments in the supplementary material for details.
Practically, when λ_n,m is very small, we suggest estimating β as the zero crossing of  ψ_n,m(β)_2:p under the constraint β_2 = 1, where ψ_n,m(β)_2:p is a vector composed of the 2nd to pth component of ψ_n,m(β). 




§ ASYMPTOTIC PROPERTIES
 

In this section, we will establish the asymptotic properties of β. Besides the notations in Section <ref>, we need some additional notations. Let β_0 and μ_2,0(·) denote the true values of β and μ_2(·), respectively. Also, let φ_β(t) = E(X_2|X_2^Tβ = t), μ_2, β(t) = E(Y_2|X_2^Tβ = t); thus μ_2,0(·) = μ_2,β_0(t).  
Denote

    A(β_0)  
       =   λ E[ {μ_1'(X_1^Tβ_0)}^2/V(X_1^T β_0) X_1 X_1^T ] 
           + (1-λ)E[ {X_2 - φ_β_0(X_2^T β_0)}{X_2 - φ_β_0(X_2^T β_0)}^T μ_2,0'(X_2^Tβ_0 )   ], 
    Σ_1    =   var[ μ_1'(X_1^Tβ_0)/V(X_1^Tβ_0) X_1 { Y_1 - μ_1(X_1^T β_0) }],
    Σ_2    =   var[ {X_2 - φ_β_0(X_2^T β_0 ) }{Y_2 - μ_2,0(X_2^Tβ_0)}],

where μ'(t) = ∂μ(t)/∂ t for μ(t) being a function differentiable at t. Furthermore, let 

    lim_n→∞, m →∞λ_n,m = λ.

As discussed earlier, we need to consider two possibilities: λ > 0 and λ = 0. Let us first consider the case where λ >0. Note that this includes λ = 1 as a special case, which implies that we have much more training data than testing data.

We impose the following regularity conditions in the development of the theoretical results. They are not necessarily the weakest possible. 


 
β∈, F_X_1(x) and F_X_2(x) are supported on , where both  and  are compact subspaces of ^p, and F_X_s(·) for s=1 or 2 denotes the cumulative distribution function (c.d.f.) of X_s.  


 
There exists a universal constant C>0, such that for any β_1, β_2 ∈, 

    sup_t∈∫| I(β_1^T x≤ t) - I(β_2^T x≤ t )  | d F_X_2(x) ≤ C β_1 - β_2_1,

where ·_q denotes the l_q norm. 


 
The conditional probability density function f_X_2|X_2^Tβ = t (x) is continuously differentiable in β and t. 


 






μ_2,β(t) is continuously differentiable for both β∈ and t∈{x^Tβ: x∈, β∈}, and there exists a universal constant η_0 >0, such that 

    inf_t∈{x^Tβ: x∈, β∈}, β - β_0_2 ≤η_0∂μ_2,β(t)/∂ t> 0.



 
The density function of X_1, denoted by f_X_1(x), is continuously differentiable for x∈, and E(X_1X_1^T) is of full rank.  


 
For s=1 or 2, and any integer k≥ 2, E(|Y_s|^k|X_s) ≤ k! M^k-2 v/2 for some universal constants M and v.


 
For t ∈{x^Tβ: x∈, β∈}, μ_1(t) is nondecreasing and continuously differentiable, μ_1'(t) is bounded away from zero and infinity; and V(t) is continuously differentiable and is bounded away from 0 and ∞.  


 
For any β_1, β_2∈, such that β_1 ≠ c β_2, for all c ∈, and c≠ 0, we have, 

    E{var( β_1^T X_2 | β_2^T X_2 )} >0.

 

 
Note that Condition <ref> implies that if β_1 ≠ c β_2, for all c ∈, and c≠ 0, then,

    P(β_1^T X_2 ≠  E( β_1^T X_2 | β_2^T X_2 ) ) >0;

since otherwise, β_1^T X_2 = E( β_1^T X_2 | β_2^T X_2 ) almost surely, which implies 

    var( β_1^T X_2 | β_2^T X_2 ) =  E[{β_1^T X_2 -  E( β_1^T X_2 | β_2^T X_2 )}^2 | β_2^T X_2 ] = 0,

almost surely, which contradicts Condition <ref>. 





Theorem <ref> below establishes the existency and asymptotic properties of β when λ >0. 

 
Assume Conditions <ref>–<ref>. 
Denote by β the zero crossing of ψ_n,m(β) (if it exists).
We have the following:


  (1) When n→∞ and m →∞, a zero crossing β of ψ_n,m(β) exists with probability tending to 1. 

  (2) If β is a zero crossing of ψ_n,m(β), we have β→β_0 in probability.

  (3) For β being a zero crossing of ψ_n,m(β), we have

    √(n+m)( β- β_0 ) →  A_0(β_0)^-1· N(0, λΣ_1 + (1-λ) Σ_2   ),

in distribution. 



Next, we consider that λ = 0. In this case, we shall define β to be the zero crossing of ψ_n,m(β)_2:p under the constraint β_2 = 1; here for a vector x, x_i:j denotes the vector formed of the ith to jth entries of x. Theorem <ref> below establishes the asymptotic properties of this β. We need the following notation.

    A(β_0)  
       =    E[ {X_2 - φ_β_0(X_2^T β_0)}_2:p{X_2 - φ_β_0(X_2^T β_0)}_2:p^T μ_2, 0'(X_2^Tβ_0 )   ] 
          ×(β_0,2:pβ_0,2:p^T + I_p-1),
    Σ_2    =   var[ {(X_2)_2:p - φ_β_0(X_2^T β_0 )_2:p}{Y_2 - μ_2,0(X_2^Tβ_0)}].





 
Assume Conditions <ref>–<ref>. Suppose λ = 0 and β_0,1≠ 0. 
Denote by β the zero crossing of ψ_n,m(β)_2:p (if it exists) under the constraint β_2 = 1.
We have the following:


  (1)  There exists a universal constant c>0, such that when n→∞ and m →∞, a zero crossing β of ψ_n,m(β)_2:p with β_1 > c exists with probability tending to 1. 

  (2) Assume that β is a zero crossing of ψ_n,m(β)_2:p such that β_1 > c for a universal constant c>0, we have β→β_0 in probability.

  (3) For β given in Part (2), we have

    √(n+m)(β_2:p - β_0, 2:p)→A(β_0)^-1 N(0, Σ_2),

in distribution.




For presentational continuity, we sketch the proof for Part (3) of Theorems <ref> and <ref> in the Appendix, and relegate the lengthy technical details to the supplementary material. 


 


§ SIMULATION STUDY
 


 §.§ Data Simulation

We consider the following simulation setups. For both the training and testing data, we generate the covariate X_1,i and X_2,j for all i and j to be i.i.d. copies of X = (U_1, U_2, U_3)^T, where

    U_1∼Unif[-1.5,1.5],   U_2∼Bernoulli(0.5),    U_3∼ N(0,1),

where U_1, U_2, and U_3 are independent. Given X = x≡ (u_1, u_2, u_3)^T, the responses of the training and testing data are then simulated based on two models. 


  * Model 1 (Gamma model)

The training data are simulated from f(y|x), which is the Gamma distribution with mean exp(u_1 + u_2 + u_3) and shape parameter equal to 2. The testing data are simulated from f^*(y|x) ∝π(y) f(y|x) with 

    π(y)=exp(-0.5y)/1+exp(-0.5y).



  * Model 2 (Normal model)

The training data are simulated from

    Y=2+u_1+u_2+u_3+ϵ,   ϵ∼ N(0,1).

Therefore, f(y|x) is the density function of N(2+u_1 + u_2+u_3, 1). 
The testing data are simulated from f^*(y|x) ∝π(y) f(y|x) with 

    π(y)=exp(-0.5y)/1+exp(-0.5y).



Thus, for both models, we have β_0 = (1,1,1)^T. We examine three combinations of sample sizes:  (750,250), (500,500), and (250,750). For each model configuration, we perform 1000 repetitions. 



 §.§ Results


To illustrate the advantages of our method, which combines training and testing data to improve β estimation, we compare it to two other approaches: using only training data and using only testing data. Specifically, we consider 


    
  * the maximum likelihood estimate based only on the training data, called MLE estimate;
    
  * the estimating equation estimate based only on the testing data, called EE estimate;
    
  * the estimate based on the estimating equations (<ref>), which combine the training data and the testing data, called our estimate. 


To obtain the EE estimate, we impose the constraint β_2 = 1. Therefore, to compare the performance of the methods, we standardise the estimates by

    η_i=β_i/√(β_1^2+β_2^2+β_3^2),      i=1,2,3.

The true value of  (η_1,η_2,η_3) is given by  (1/√(3),1/√(3),1/√(3)). 

We use the relative bias (RB) and mean square error (MSE) as the comparison criteria. For a true parameter η_0 and the corresponding estimates η_1, …η_N based on N repetitions, its RB in percentage and MSE are defined to be

    RB = ∑_i=1^N (η_i - η_0 )/N× 100,   MSE = ∑_i=1^N (η_i - η_0 )^2 /N.


Table <ref> presents the RBs and MSEs of the parameter estimates obtained over 1000 repetitions. Our method, which combines information from both the training and testing data, consistently produces the smallest MSEs for all model configurations. When the sample size of the training data is much larger than that of the testing data, specifically with n=750, m=250, and λ_n,m = 0.75, our method yields significantly smaller MSEs compared to the EE method and slightly smaller MSEs than the MLE method. When n=250 and m=750, and λ_n,m = 0.25, our method achieves much smaller MSEs than both the MLE and EE methods. These results underscore the importance of transfer learning methods in the analysis of testing data, when one or more sets of training data are available. Our method effectively incorporates information from the training data to improve estimation and inference for the testing data.








§ A REAL DATA EXAMPLE
 

In this section, we apply our proposed method to study potential risk factors associated with blood pressure for the subcohort of white males whose ages are greater than or equal to 45 and less than 55 (in the range of middle age).


We consider two datasets: the UK Biobank data as the testing data and the data from the Atherosclerosis Risk in Communities (ARIC) study <cit.> as the training data. The UK Biobank is a remarkable resource that has significantly contributed to the field of biomedical research. The database's extensive collection of genetic and health information from a diverse group of half a million UK participants provides researchers with a wealth of data to explore and analyze. Its ongoing expansion and accessibility to approved researchers have facilitated crucial investigations into various diseases and health conditions.
The ARIC study by the National Heart, Lung, and Blood Institute is a comprehensive research initiative with the primary objective of delving into the causes and clinical consequences of atherosclerosis. The ARIC study focuses on studying a diverse group of adults residing in four distinct communities within the United States. By collecting extensive data on these individuals, researchers aim to uncover the underlying factors that contribute to the development and progression of atherosclerosis. This includes investigating genetic, environmental, and lifestyle factors that may influence an individual's susceptibility to atherosclerosis and its associated complications.





Both datasets appear to include several key variables related to health and risk factors. These variables are crucial for studying various aspects of health and disease. Here's a brief summary of the mentioned variables:


  * Systolic Blood Pressure (SBP): This variable measures the pressure in the arteries when the heart beats. It is typically measured in millimeters of mercury (mmHg) and is an important indicator of cardiovascular health.


  * Use of Anti-Hypertensive Medication (HYMD): This binary variable (1 for yes, 0 for no) indicates if the individual is taking medication to manage high blood pressure (hypertension).


  * Glucose Levels (Glucos): This variable measures glucose levels in the blood, often using NMR metabolomics. Glucose is a primary energy source for the body and plays a crucial role in diabetes and metabolic health.


  * Age (Age): Age is a fundamental demographic variable. It is often considered a significant factor in various health outcomes as many conditions are age-dependent.


  * Body Mass Index (BMI): BMI is a measure of body fat based on an individual's weight and height. It is commonly used to assess weight-related health risks.


  * Smoker (Smoker): This binary variable (1 for yes, 0 for no) indicates whether an individual smokes. Smoking is a known risk factor for various health issues, including cardiovascular disease and cancer.


The mention of data cleaning and filtering suggests that the datasets have been processed to remove errors or outliers, ensuring the quality and reliability of the data for research and analysis. Additionally, it's worth noting the sample sizes for each dataset: the UKBiobank dataset has 729 observations, while the ARIC dataset has 786 observations. These observations likely represent unique individuals, and researchers can use this data to explore relationships between these variables and various health outcomes.


As highlighted in the introduction section, model (<ref>) demonstrates remarkable flexibility. It accommodates the presence of selection bias and variations in covariate distributions, which are often attributed to differences in patient inclusion criteria between studies conducted in the UK and the USA. As a consequence, employing model (<ref>) would provide a more reliable approach than assuming that the UK Biobank data and ARIC data share an identical joint distribution.

We use log(SBP) as the continuous response and five other variables as risk factors. It is highly plausible that a prior probability shift issue exists between the UKBiobank and ARIC data due to different study designs and studied populations (USA vs Europe): the averages of SBP in UKBiobank and ARIC data are 135.5 and 115.6, respectively. We apply the three methods from our simulation study to analyze the two datasets: the MLE estimate based on the linear model for the ARIC data (training data); the EE estimate based on the UKBiobank data (testing data); the proposed estimate using both datasets. Table <ref> summarizes the point estimate, the corresponding bootstrap standard error (SE), and the 95% bootstrap percentile confidence interval (BPCI). For comparison, the coefficients for the five risk factors are standardized to have a length of 1.





In Table <ref>, we noticed that the proposed method leads to similar point estimates and detects the same significant risk factors at the 5% level as the MLE method based on the linear model for the ARIC data only, but with much smaller bootstrap SE and shorter BPCIs. The risk factors include HYMD, Glucos, Age, and BMI. In contrast, the EE method based on the UKBiobank data only fails to identify the risk factor HYMD at the 5% level, and furthermore, the lower bound of the 95% CI for the coefficient of the Age variable is close to 0. These results together show the advantage of the proposed method.


In Figure <ref>, the estimated regression function μ_2(t)=μ_2,β(t) in (<ref>),
 derived from the UK Biobank data, is presented. What is evident from this graph is that the relationship between the variables is not linear. This observation suggests that there is a notable difference or shift between the data from the UK Biobank and the ARIC study. Attempting to simply merge or combine these datasets by assuming they are drawn from identical distributions may lead to biased or inaccurate results.

The non-linearity in the estimated regression function suggests that there are likely different patterns or relationships between the variables in the two datasets. It's crucial for researchers to account for these differences and potential biases when conducting analyses or making comparisons between the two datasets. This recognition of dissimilarity can guide the use of more appropriate statistical methods and modeling approaches to address the unique characteristics of each dataset.














§ DISCUSSION
 

In machine learning literature, distribution shifts between the training and testing data are a very common problem. Common distribution shifts include covariate shift and prior probability shift. Dealing with covariate shift is a relatively easy problem since the conditional distribution of Y given X remains the same in both datasets. However, it poses a real challenging problem in the presence of prior probability shift since the conditional density changes from f(y| x) to π(y)f(y| x)/∫π(y)f(y| x)dy, where π(y) is the shift function or selection bias function. This predictive density generally depends on the shift function π(y). Without correcting this selection bias, we end up with a detrimented model.


In this paper, we have introduced a shape-restricted transfer learning approach that effectively merges training and testing data to enhance parameter estimation. This method integrates prior knowledge concerning shape restrictions seamlessly with various practical applications. The challenge of learning monotonic functions has been acknowledged for a long time, particularly when striving for top-tier performance on real-world issues that demand greater flexibility and the assurance of monotonicity across multiple features.

While the monotone single index model has been extensively discussed in statistical and econometric literature over the years, significant breakthroughs in semiparametric maximum likelihood estimation of index coefficients were only recently achieved, particularly by <cit.>. Notably, their work demonstrated that the monotone shape-restricted maximum likelihood of index coefficients is nearly root-n consistent. Moreover, they cleverly constructed a root-n zero-cross estimator using the estimated shape function, adding to the potential of this area of research.



The contributions of this paper open up new avenues for future research in shape-restricted transfer learning and monotonic function estimation, paving the way for improved solutions to various real-world challenges. By building upon these foundations, researchers can further enhance the understanding of complex datasets and unlock even greater potential for practical applications. The findings presented here represent a valuable step forward in the field of statistical and econometric modeling, and we hope they inspire further investigation and innovation in shape-constrained parameter estimation. As more researchers delve into this topic, we anticipate a deeper understanding of the theoretical and practical aspects, ultimately leading to more robust and accurate solutions in various domains.


There are multiple related topics that can be studied subsequently. Firstly, we assumed that the conditional density of Y given X = x between the training and testing data satisfied the relationship f^*(y|x) ∝π(y) f(y|x), and that the effects of X on Y were linear through X^Tβ with β being a common parameter between the training and testing data. It might be of interest to consider other relationships between the conditional densities, such as those explored in <cit.> and <cit.>, and explore the possibility that β might differ across different datasets.
Secondly, our method in this paper is applicable when the dimension p of X is low. We expect that within the framework of this paper, we can extend our method to consider datasets with high-dimensional covariates <cit.>.
Thirdly, we may also extend our method to consider survival data with the response Y being censored.
Lastly, in practice, the covariates of the training data and the testing data may consist of different variables. It could be of interest to consider the transfer learning method on such data.





§ APPENDIX: SKETCH OF THE PROOF FOR PART (3) OF THEOREMS  <REF> AND <REF>



For space limitations, we provide a blueprint of the proof for Part (3) of Theorems <ref> and <ref>. The detailed proof for Parts (1) and (2) of these theorems is presented in the supplementary material.

Besides the notations in Sections <ref> and <ref>, we need the following notations. Denote by F_X_1, Y_1(x, y) and _X_1,Y_1(x, y), respectively, the c.d.f. of (X_1, Y_1) and the empirical c.d.f. of {(X_1,i, Y_1,i}_i=1^n, the observations of the training data. Similarly, we can define F_X_2, Y_2(x, y), _X_2,Y_2(x, y), F_X_1(x), and  F_X_2(x). Let

    ψ(β) = λψ_1(β) + (1-λ) ψ_2(β),

with

    ψ_1(β)    =   ∫μ_1'(x^Tβ)/V(x^T β)x{μ_1(x^Tβ_0) - μ_1 (x^Tβ) } d F_X_1(x), 
    ψ_2(β)    =   ∫x{μ_2,0(x^Tβ_0) - μ_2,β(x^T β) } d F_X_2(x).

They are  the population versions of ψ_n,m(·), ψ_1,n(·), and ψ_2, m(·), respectively defined by (<ref>), (<ref>), and (<ref>). Recalling the definition of φ_β(t) = E(X_2|X_2^Tβ = t), and for any piece-wise constant function μ(·) with finitely many jumps τ_1 <τ_2 < …, we define

    φ̅_β, μ(t) = {[                                        φ_β(τ_i),  if μ_2,β(t)> μ(τ_i),  for all  t ∈ [τ_i, τ_i+1);                                          φ_β(s), if μ_2,β(s) = μ(τ_i),  for some  s∈ [τ_i, τ_i+1);                                      φ_β(τ_i+1),  if μ_2,β(t) < μ(τ_i),  for all  t∈ [τ_i, τ_i+1) ].,

which is a constant function for each i and t ∈ [τ_i, τ_i+1).


We first present two lemmas needed in our subsequent discussion. 

 
Assume Conditions <ref>, <ref>, <ref>, <ref>, and <ref>. We have the following:

    
  (1) ψ(β_0) = 0;
    
  (2) ψ_1'(β_0) = .∂ψ_1(β)/∂β|_β= β_0 exists with rank = p; ψ_2'(β_0) = .∂ψ_2(β)/∂β|_β= β_0 exists with rank = p-1;
    
  (3) We have
    
    ψ_1(β)    =   ψ_1'(β_0)· (β- β_0) + o(β- β_0)
    ψ_2(β)    =   ψ_2'(β_0)·(β - β_0) + o(β - β_0).




  
Assume Conditions <ref>, <ref>, and β_0,1≠ 0. For any λ∈ [0, 1), let 

    B(β_0) =  (  -β_0,2:p^T/β_0,1
     I_p-1),

then ψ_2'(β_0)_-1· B(β_0) has rank p-1.  


Lemma <ref> is Lemma 8, and Lemma <ref> is Lemma 10 in the supplementary material. 


Consider an estimator β̌ of β that satisfies 

    β̌ - β_0 = o_p(1).

We derive the asymptotic properties of 

    ψ_n,m(β̌) = λ_n,mψ_1,n(β̌) + (1-λ_n,m) ψ_2,m(β̌),

where ψ_1,n(·) and ψ_2,m(·) are defined by (<ref>) and (<ref>), respectively. 
Next, we consider the asymptotic properties of ψ_1,n(β̌) and  ψ_2,m(β̌) separately. For ψ_2,m(β̌), we have

    ψ_2,m(β̌)    =   1/m∑_j=1^m X_2,j{Y_2,j-μ_2,β̌(X_2,j^Tβ̌)}
        =    ∫x{y - μ_2,β̌(x^Tβ̌)} d _X_2,Y_2(x, y) 
       =   ∫{x - φ̅_β̌, μ_2, β̌(x^T β̌) }{y - μ_2,β̌(x^Tβ̌)} d _X_2,Y_2(x, y)
       =    J_1 + J_2,

where 

    J_1    =   ∫{x - φ_β̌(x^T β̌) }{y - μ_2,β̌(x^Tβ̌)} d _X_2,Y_2(x, y) ,
    
    J_2    =   ∫{φ_β̌(x^T β̌) -  φ̅_β̌, μ_2, β̌(x^T β̌)}{y - μ_2,β̌(x^Tβ̌)} d _X_2,Y_2(x, y).

In the derivation above, we have used the fact that 

    ∫φ̅_β̌, μ_2, β̌(x^T β̌) {y - μ_2,β̌(x^Tβ̌)} d _X_2,Y_2(x, y) = 0.

This is because φ̅_β̌, μ_2, β̌(x^T β̌) is a piece-wise constant function with the same jumps as μ_2,β̌(t). Recall the definition of μ_2,β̌(t): it is the slope of the greatest convex minorant of the corresponding cusum diagram, based on the values of Y_2,j in the order of X_2,j^Tβ̌ for j=1,…, m. Therefore, on every constant piece [τ_i, τ_i+1), 

    ∫_x^T β̌∈ [τ_i, τ_i+1){y - μ_2,β̌(x^Tβ̌)} d _X_2,Y_2(x, y) = 0.


We summarize the asymptotic properties of J_1 and J_2 in two separate lemmas: Lemmas <ref> and <ref> below.  
Lemma <ref> establishes the asymptotic properties of J_1, while Lemma <ref> considers those of J_2. They are Lemmas 12 and 13 in the supplementary material, and  their proofs are also provided there. 
Combining these two lemmas, we immediately obtain 

    ψ_2,m(β̌) = ψ_2(β̌) + ∫{x - φ_β_0(x^T β_0 ) }{y - μ_2,0(x^Tβ_0)}d_X_2,Y_2(x, y) + o_p(m^-1/2).


 
Assume Conditions <ref>–<ref>, and (<ref>). Referring to J_1 as defined by (<ref>), we have 

    J_1 = ψ_2(β̌) + ∫{x - φ_β_0(x^T β_0 ) }{y - μ_0(x^Tβ_0)}d_X_2,Y_2(x, y) + o_p(m^-1/2).




Assume Conditions <ref>–<ref>, and (<ref>).  Referring to J_2 as defined in (<ref>), we have

    J_2 = o_p(m^-1/2).



With a similar but simpler development as (<ref>) (details can be found in the supplementary material), we obtain 

    ψ_1,n = ψ_1(β̌) + ∫μ_1'(x^Tβ_0)/V(x^Tβ_0)x{ y - μ_1(x^T β_0) } d _X_1, Y_1(x, y) + o_p(n^-1/2).

Combining (<ref>), (<ref>), and (<ref>), we have

    ψ_n,m(β̌)    =   λ_n,mψ_1(β̌) + (1-λ_n,m) ψ_2(β̌) 
           + λ_n,m∫μ_1'(x^Tβ_0)/V(x^Tβ_0)x{ y - μ_1(x^T β_0) } d _X_1, Y_1(x, y) 
          + (1-λ_n,m) ∫{x - φ_β_0(x^T β_0 ) }{y - μ_2,0(x^Tβ_0)}d_X_2,Y_2(x, y) 
          + λ_n,m·  o_p( n^-1/2) + (1-λ_n,m) ·  o_p(m^-1/2) 
       =   λ_n,mψ_1(β̌) + (1-λ_n,m) ψ_2(β̌) 
           + λ_n,m∫μ_1'(x^Tβ_0)/V(x^Tβ_0)x{ y - μ_1(x^T β_0) } d _X_1, Y_1(x, y) 
          + (1-λ_n,m) ∫{x - φ_β_0(x^T β_0 ) }{y - μ_2,0(x^Tβ_0)}d_X_2,Y_2(x, y) 
          +  o_p((n+m)^-1/2).


With the same arguments as those in Section 4 of the supplementary material, we have consistent estimators of β: β^L and β^U, and 0 ≤α_n,m≤ 1 (in the proof for Part (1) of Theorems <ref> and <ref>). Furthermore, for λ > 0, based on (<ref>) and Lemma <ref>, we have

    0   =   α_n,mψ_n,m(β^L) + (I_p-α_n,m) ψ_n,m(β^U) 
        =    α_n,m{λ_n,mψ_1(β^L) + (1-λ_n,m) ψ_2(β^L)}
           + (I_p-α_n,m) {λ_n,mψ_1(β^U) + (1-λ_n,m) ψ_2(β^U)}
           + λ_n,m∫μ_1'(x^Tβ_0)/V(x^Tβ_0)x{ y - μ_1(x^T β_0) } d _X_1, Y_1(x, y) 
          + (1-λ_n,m) ∫{x - φ_β_0(x^T β_0 ) }{y - μ_2,0(x^Tβ_0)}d_X_2,Y_2(x, y) 
          +  o_p((n+m)^-1/2) 
       =    A(β_0) (β- β_0)  + λ_n,m∫μ_1'(x^Tβ_0)/V(x^Tβ_0)x{ y - μ_1(x^T β_0) } d _X_1, Y_1(x, y) 
          + (1-λ_n,m) ∫{x - φ_β_0(x^T β_0 ) }{y - μ_2,0(x^Tβ_0)}d_X_2,Y_2(x, y) 
          +  o_p((n+m)^-1/2) + o_p(β- β_0) 
       =    A(β_0) (β- β_0) + λ_n,m^1/2 (n+m)^-1/2 G_1,n + (1-λ_n,m)^1/2 (n+m)^-1/2 G_2,m
           +  o_p((n+m)^-1/2) + o_p(β- β_0),

where A(β_0) = λψ_1'(β_0) + (1-λ) ψ_2'(β_0),

    G_1,n   =   √(n)∫μ_1'(x^Tβ_0)/V(x^Tβ_0)x{ y - μ_1(x^T β_0) } d _X_1, Y_1(x, y),
    
    G_2,m   =   √(m)∫{x - φ_β_0(x^T β_0 ) }{y - μ_2,0(x^Tβ_0)}d_X_2,Y_2(x, y).

Based on Conditions <ref>–<ref> and the Central Limit Theorem, we have

    G_1,n→    N(0, Σ_1 ), 
    and    G_2,m→    N(0, Σ_2),

in distribution, where 

    Σ_1    =   var[ μ_1'(X_1^Tβ_0)/V(X_1^Tβ_0) X_1 { Y_1 - μ_1(X_1^T β_0) }]
    Σ_2    =   var[ {X_2 - φ_β_0(X_2^T β_0 ) }{Y_2 - μ_2,0(X_2^Tβ_0)}].

We, therefore, conclude that the c.d.f. of (G_1,n^T, G_2,m^T)^T is given by:

    P( (G_1,n^T, G_2,m^T)^T ≤ (g_1^T, g_2^T)^T ) 
        =     P(G_1,n≤ g_1) P( G_2,m≤ g_2 ) 
       →   Φ_Σ_1(g_1) Φ_Σ_2(g_2),

for any g_1, g_2 ∈^p, where Φ_Σ(·) denotes the c.d.f. for the N(0, Σ) distribution. This implies

    ( G_1,n
     G_2,m) → N(0, (Σ_1     0 
     0    Σ_2 ) ),

in distribution. Combining (<ref>) with (<ref>), applying Delta method, and based on the fact that λ_n,m→λ, we conclude 

    √(n+m)( β- β_0 ) → N(0, A_0(β_0)^-1{λΣ_1 + (1-λ) Σ_2 } A_0^-1(β_0) ),

in distribution, where 

    A(β_0)     =    -λψ_1'(β_0) - (1-λ) ψ_2'(β_0) 
       =   λ E[ {μ_1'(X_1^Tβ_0)}^2/V(X_1^T β_0) X_1 X_1^T ] 
           + (1-λ)E[ {X_2- φ_β_0(X_2^T β_0)}{X_2 - φ_β_0(X_2^T β_0)}^T μ_2,0'(X_2^Tβ_0 )   ].


For λ = 0, since β is a zero crossing of ψ_n,m(β)_2:p,  based on (<ref>) and Lemma <ref>, we have 

    0   =   α_n,mψ_n,m(β^L)_2:p + (I_p-1-α_n,m) ψ_n,m(β^U)_2:p
        =    α_n,m{λ_n,mψ_1(β^L) + (1-λ_n,m) ψ_2(β^L)}_2:p
           + (I_p-α_n,m) {λ_n,mψ_1(β^U) + (1-λ_n,m) ψ_2(β^U)}_2:p
           + λ_n,m∫μ_1'(x^Tβ_0)/V(x^Tβ_0)x_2:p{ y - μ_1(x^T β_0) } d _X_1, Y_1(x, y) 
          + (1-λ_n,m) ∫{x_2:p - φ_β_0(x^T β_0 )_2:p}{y - μ_2,0(x^Tβ_0)}d_X_2,Y_2(x, y) 
          +  o_p((n+m)^-1/2) 
       =   λ_n,mψ_1(β)_2:p + (1-λ_n,m) ψ_2(β)_2:p
           + λ_n,m^1/2 (n+m)^-1/2G_1,n + (1-λ_n,m)^1/2 (n+m)^-1/2G_2,m
          +  o_p((n+m)^-1/2) 
       =    - A(β_0)_2:p B(β_0) (β_2:p - β_0, 2:p)  
           + λ_n,m^1/2 (n+m)^-1/2G_1,n + (1-λ_n,m)^1/2 (n+m)^-1/2G_2,m
          +  o_p((n+m)^-1/2) + o_p(β_2:p - β_0, 2:p)
       =   ψ_2'(β_0)_2:p B(β_0) (β_2:p - β_0, 2:p)  
           + λ_n,m^1/2 (n+m)^-1/2G_1,n + (1-λ_n,m)^1/2 (n+m)^-1/2G_2,m
          +  o_p((n+m)^-1/2) + o_p(β_2:p - β_0, 2:p),

where 

    G_1,n   =   √(n)∫μ_1'(x^Tβ_0)/V(x^Tβ_0)x_2:p{ y - μ_1(x^T β_0) } d _X_1, Y_1(x, y), 
    G_2,m   =   √(m)∫{x_2:p - φ_β_0(x^T β_0 )_2:p}{y - μ_2,0(x^Tβ_0)}d_X_2,Y_2(x, y),
    
     B(β_0)    =   (  -β_0,2:p^T/β_0,1
     I_p-1).

Based on Lemma <ref>, ψ_2'(β_0)_2:p B(β_0) is of full rank. Based on Conditions <ref>–<ref>, we have G_1,n = O_p(1), and

    λ_n,m^1/2 (n+m)^-1/2G_1,n   =    o_p((n+m)^-1/2) 
    G_2,m   →     N(0, Σ_2),

with

    Σ_2    =   var[ {(X_2)_2:p - φ_β_0(X_2^T β_0 )_2:p}{Y_2 - μ_2,0(X_2^Tβ_0)}] = (Σ_2 )_-1,-1.


Combining (<ref>) with (<ref>) leads to 

    √(n+m)(β_2:p - β_0, 2:p)→{A(β_0) }^-1 N(0, Σ_2),

in distribution, where with straightforward evaluations, we have,

    A(β_0)     =    -ψ_2'(β_0)_2:p B(β_0) 
       =    E[ {X_2 - φ_β_0(X_2^T β_0)}_2:p{X_2 - φ_β_0(X_2^T β_0)}_2:p^T μ_2, 0'(X_2^Tβ_0 )   ] 
          ×(β_0,2:pβ_0,2:p^T + I_p-1).

We complete the proof for Part (3) of Theorems <ref>
and <ref>. 


apalike




 Paper Title: Randomized Controlled Trials of Service Interventions: The Impact of Capacity Constraints.

 












[=]=Endnotes
^
0pt0pt=1.75em
  . 








-






 










positioning,arrows.meta,,bending,arrows,automata
























s.t. 
C>c<L>l<R>r<[, ](),a,24pt and    
  treenode/.style = shape=rectangle,
                     draw, align=center,
  root/.style     = treenode, font=,
  env/.style      = treenode, font=,
  dummy/.style    = circle,draw[figure]font=scriptsizeRCT Design for Service InterventionsRandomized Controlled Trials of Service Interventions: The Impact of Capacity ConstraintsJustin J. BoutilierTelfer School of Management, University of Ottawa  boutilier@telfer.uottawa.eduJónas Oddur JónassonMIT Sloan School of Management, joj@mit.eduHannah LiColumbia Business School, hannah.li@columbia.eduErez YoeliKeheala, eyoeli@keheala.comBoutilier, Jónasson, Li, YoeliRandomized controlled trials (RCTs), or experiments, are the gold standard for intervention evaluation. However, the main appeal of RCTs—the clean identification of causal effects—can be compromised by interference, when one subject's treatment assignment can influence another subject's behavior or outcomes. In this paper, we formalise and study a type of interference stemming from the operational implementation of a subclass of interventions we term Service Interventions (SIs): interventions that include an on-demand service component provided by a costly and limited resource (e.g., healthcare providers or teachers). We show that capacity constraints, induced by staffing and recruitment decisions made by the experimenter, can mediate the effect size of the intervention.

We first show that in such a system, the capacity constraints induce dependencies across experiment subjects, where an individual may need to wait before receiving the intervention. By modeling these dependencies using a queueing system, we show how increasing the number of subjects without increasing the capacity of the system can lead to a nonlinear decrease in the treatment effect size. 
This has implications for conventional power analysis and recruitment strategies: increasing the sample size of an RCT without appropriately expanding capacity can decrease the study’s power. To address this issue, we propose a method to jointly select the system capacity and number of users using the square root staffing rule from queueing theory. We show how incorporating knowledge of the queueing structure can help an experimenter reduce the amount of capacity and number of subjects required while still maintaining high power. In addition, our analysis of congestion-driven interference provides one concrete mechanism to explain why similar protocols can result in different RCT outcomes and why promising interventions at the RCT stage may not perform well at scale.



Towards Variable-Length In-Network Caching
    
Gyuyeong Kim 
 Sungshin Women's University

    
================================================




§ INTRODUCTION




Randomized Controlled Trials (RCTs) are widely accepted as the gold standard for impact evaluation. In their simplest form, a researcher first recruits a pool of subjects to enroll. Then, the researcher randomly assigns the subjects to a treatment group and a control group, administers an intervention to the treatment group, and compares the average outcomes across the two groups. 
Usually, choosing to enroll more subjects in a trial will result in the experiment having increased statistical power (defined as the likelihood of the RCT detecting a difference between the groups if there is one). Motivated by a sequence of RCTs in digital health, we study RCTs of interventions with a capacity constrained structure—we label them service interventions, see below—where recruiting more subjects does not increase statistical power. In these settings, we find that the capacity constraints mediate the effect size of the intervention and the resulting statistical power of the RCT. Moreover, the experimenter can leverage this non-linear relationship to optimally select the system capacity and the number of recruited subjects in a way that ensures high power and low cost experiments.




 §.§ Motivation


We define service interventions as interventions that have an on-demand service component, where the service is provided by a capacity constrained resource (e.g., human servers). 
In other words, subjects in the treatment group are enrolled in a program that involves a stochastic component where the subject periodically (e.g., depending on their behavior, disease status, or engagement) becomes eligible for a service. Subjects in the control group do not receive the intervention.

One example of such service interventions are treatment adherence support programs, in which patients on a medical treatment 
become eligible for outreach from a human support sponsor when they stop adhering to the treatment plan. 
One such program, and our running example for this paper,
is Keheala, an organization that provides digital services to support treatment adherence among tuberculosis patients in Kenya. The organization has developed a mobile phone interface that provides information about the importance of treatment adherence and sends automated reminders to patients about adhering to their medication schedule. The enrolled patients are required to self-verify their treatment adherence daily (i.e., verify that they are in the desired state (adherence) as opposed to the undesired state (non-adherence)) and if they fail to do so they become eligible for support sponsor outreach (i.e., the service component of the intervention). The intervention has been evaluated in a randomized controlled trial <cit.> that demonstrated a significant reduction in treatment failure among the treated population, relative to a control group receiving the standard of care. 
Interestingly, despite the very strong performance of the intervention in the experiment, secondary analysis of the trial data has demonstrated that due to operational factors, the service component was not always available to the eligible patients as soon as they became eligible <cit.>. To the extent that this variation was generated by congestion effects, it highlights the issue at the core of this paper. 

The second example is in the context of medication adherence among myocardial infarction (also known as heart attack) patients. <cit.> describe an RCT of an intervention in which myocardial infarction survivors receive a combination of electronic pill bottles (for adherence monitoring), lottery incentives, automated reminders, as well as access to social work resources and a staff engagement advisor (the service component). The trial concludes that the compound intervention has no impact on adherence or hospital readmission. In this case, secondary analysis has demonstrated that operational factors (including limited capacity) affected the timing of the service component for patients who entered the non-adherent state and that patients who received service quickly were more likely to re-enter the desired state <cit.>. 

The third example is a sequence of RCTs evaluating a coach-enhanced behavioral health mobile phone application, Noom, for various use cases, including people with pancreatic cancer <cit.>, metabolic abnormalities <cit.> and prediabetes <cit.>. In all cases, a part of the mobile phone application is a coach-user messaging interface, where some of the communication is planned and scheduled whereas some of the communication is on-demand (i.e., the user sends a message and the coach must reply). In fact, the stochasticity in the demand for coaching advice is acknowledged as part of the trial results, with <cit.> stating that the “default frequency of personalized coaching was set to 3 times per week; however, the actual frequency varied depending on the user’s participation rate.” 

All of the interventions described above have the characteristics that motivate our study. To summarize: the objective is to keep subjects in a desired state but periodically and randomly they stop the desired behavior and become eligible for service that is provided by costly human servers. While we do not comment on the magnitude of the empirical estimates reported in any of these specific studies, our point is that in any RCT with this service intervention structure, the effect sizes and the statistical power are conditional on the service level deployed during the trial. Yet, to the best of our knowledge (as far as we can gather based on the trial protocols) the decision of what capacity to staff the platform with is not an explicit part of trial planning. As a result, it is possible for an experimenter to conclude that an intervention is ineffective (based on the trial outcome) as a result of the operational implementation (i.e., service levels) rather than the intervention itself.






 §.§ Contributions

In the language of experimental design, the above structure results in a specific type of interference (in which one subject's behavior or treatment status can affect the outcome of other subjects) through capacity constraints, and these capacity constraints mediate the effect size of the intervention. 
In other words, an RCT of a service intervention can lead to a range of impact estimates—depending on the capacity devoted to the service component and, in turn, the service level experienced by the subjects of the treatment group. At one extreme, when there is ample capacity and the utilization level of the service component is low, one would expect the average impact of the intervention to be large since subjects would have direct access to the service when they become eligible. In most cases, this would correspond to the intended protocol of the intervention as subjects would not experience delays (and hence behave independently from each other, without interference). At the other extreme, when very little capacity is devoted to the service component, delays would be long and one would expect the average impact of the intervention to be lowered. Further, across all service levels, the service component affects the variability in outcomes of the treatment group. The combination of these effects of service level on the mean and variance of outcomes makes trial planning and power analysis non-trivial. 


In this paper, we formalize the mechanism for interference due to capacity constraints and describe its implications for trial design. We focus on the experimenter's decision of how many treatment and control subjects to recruit into the trial, N_1 and N_0, respectively, and how many servers M_1 
to staff the treatment intervention with. We focus on the setting where N_1=N_0.

Our first contribution is a modeling one (<ref>). 
We start by modeling the behavior of individual subjects as a stochastic 
process with two states—the desired state (e.g., the subject is adhering to a medication regime, exercising, or following a diet) and the undesired state (i.e., the subject has stopped the desired activity). Once in the undesired state, subjects become eligible for the service, which increases their probability of transitioning back to the desired state.
The typical way to analyze these experiments 
is to think about subjects as independent objects. However, in order to capture the congestion interference of interest, we model the aggregate behavior of subjects of the service intervention RCT as a closed queueing system with a fixed number of subjects transitioning in and out of the queue. In other words, a subject who becomes eligible for service joins the queue to be attended to by a server and a subject who re-enters the desired state leaves the queue. The role of the service system is to maximize the amount of time subjects spend in the desired state. Finally, we turn our focus to experimentation with such systems and formalize the trial planning task in terms of the experimental metrics of interest and the key decisions of how many servers M_1 to hire and how many subjects N_1+N_0 to recruit in order to maximize the statistical power of the RCT.

Our second contribution is a descriptive one (<ref> and <ref>). Equipped with the modeling framework described above, we focus our analysis on characterizing the two quantities that contribute to the statistical power of experiments—the effect size and its variance. In our closed queueing framework, maximizing the amount of time subjects spend in the desired state is equivalent to minimizing the amount of time they spent in the queue for service. As a result, the main objective of our analysis is to characterize the average queue length and its variance, as a function of the number of users and servers in the system. We first derive those quantities explicitly, effectively establishing the observation from above, that differences in service levels (determined jointly by the number of subjects and servers) in these types of experiments correspond to different levels of treatment effects. To generate analytical insights, we also obtain approximations of the effect size using a mean field limit. 
Using these approximations, we establish that when the number of servers M_1 is fixed, the effect size is diminishing in the number of enrolled subjects, and in particular in the number of treatment subjects N_1, but only when N_1 is above a given threshold.
Furthermore, we demonstrate that the statistical power of a trial (for a given number of servers) is first increasing and then decreasing in the number of subjects. This has implications for trial planning and recruitment, as it contradicts the traditional wisdom that recruiting more subjects leads to better statistical power.  

Our third contribution is a prescriptive one (<ref>). Given the non-monotonicity of statistical power as a function of enrolled subjects, the key question for trial planning is how many subjects to recruit and how many servers to hire. We conduct numerical experiments contrasting three approaches to determine M_1, N_1 and N_0 of an RCT following a small-scale pilot; (1) A naïve policy that assumes that the treatment effect does not depend on service levels and that variance decreases linearly in N_1+N_0; (2) A proportional policy that chooses the same N_1+N_0 as the naïve policy and increases M_1 proportionally; and (3) a queueing informed Square Root Policy that aims to achieve a high service level. Among other things, our experiments demonstrate that following a pilot study with low service levels, the desired power for a full scale RCT can either be achieved by scaling up both M_1, N_1, and N_0 while maintaining the same low service level, or by 
increasing service levels through a higher M_1. In some practical cases, this might result in an equally powered experiment that requires much fewer participants. 


A main objective of this work is to help experimenters avoid the mistake of concluding a protocol is ineffective following RCT experimentation, simply because by enrolling a high number of subjects they believed the experiment to be high powered. This is a particularly relevant message for efficacy trials (as opposed to effectiveness trials) since their purpose is to evaluate whether a protocol or intervention has an impact under ideal circumstances. 
Descriptively, our paper serves as a reminder that, at a minimum, the outcomes of such service intervention RCTs should be interpreted as conditional on the implemented service level. In other words, the reason that such a trial shows small or no effect can either be attributed to the protocol itself not being effective (the usual interpretation) or the service level being insufficient. Therefore, papers describing RCT outcomes for service interventions should report operational outcomes describing empirical service levels along with all impact estimates. Prescriptively, we provide the experimenter with a framework to jointly optimize the size of the trial (i.e., the number of subjects) and its service level (i.e., the number of servers) in a queueing-informed manner, so as to maximize the probability of detecting a difference between a treatment group and a control group. 













§ LITERATURE

Our work is related to three distinct streams of literature. First, we contribute to the growing methodological toolkit of experimental designers. We give a brief summary of this stream of work in <ref>. Second, our work is, at least in part, motivated by prior trials of service interventions, which usually do not report on capacity planning as part of their trial preparation or empirical service levels as part of their outcome measures. We provide some examples in <ref>. Finally, our methodology draws on prior results from the service operations and queueing theory literature. We highlight the main connections to our work in <ref>.




 §.§ Interference in Experimentation

The capacity constraints induce what is known as interference in the experiment, where the outcome of one individual depends on the treatment assignments of other individuals <cit.>. It is well documented that interference leads to biased estimates of the treatment effect in a number of settings, including social networks (e.g., <cit.>) and marketplaces <cit.>. Our setting is more closely related to interference in marketplaces, 
where supply constraints (analogous to the capacity constraints in service interventions) and demand constraints create dependencies across units <cit.>. However, the service interventions introduce a queueing structure to the interference that does not arise in marketplaces. Further, the papers on marketplaces generally focus on estimating the treatment effect, whereas this paper also studies the impact of interference on statistical power. 

The most closely related paper is <cit.> which also studies experimentation in queueing systems and similarly illustrates how incorporating knowledge of the queueing system can lead to more efficient estimators. 
The problem motivation differs, where <cit.> focuses on experimenting on an existing platform infrastructure and our work studies how to set up the platform infrastructure to test a new intervention in development. 
More specifically, <cit.>
focuses considers a queueing setting with a fixed capacity and raw user arrival rate and studies interventions that change how likely a user joins the queue, conditional on seeing the queue at a certain length.  
In contrast, our work focuses on the problem of developing a new protocol and the recruitment decision of how many servers and subjects to recruit for the trial. This decision is necessary when developing a new intervention (for example, in <cit.>) and is separate from the problem in <cit.> which studies a platform with a fixed size.





 §.§ Trials of Service Interventions

It is beyond the scope of this work to give a comprehensive account of all RCTs that had a service component. As examples of such experiments, we refer to the tuberculosis treatment adherence platform Keheala <cit.>, the heart attack medication support program HeartStrong <cit.>, and the coach-enhanced behavioral health app Noom <cit.>.
All of these interventions have been evaluated in RCTs and (at least partly) rely on the type of service intervention component that motivates our work. In particular, the objective for all of them is to keep subjects in a desired state and, when the subject leaves the desired state, they become eligible for service that is provided by costly human servers.

In addition to the primary analysis of the data collected in the RCTs designed to evaluate the aforementioned behavioral health programs, secondary analysis of this data has provided additional insight. As an example, taking a closer look at the HeartStrong data, <cit.> find that patients do seem to respond to connected healthcare interventions, particularly those that involve personalized feedback and when interventions are escalated quickly and consistently. They also leverage the trial data to generate a risk-scoring method to target non-adherent patients. 
Similarly, secondary analysis of the Keheala data suggests that the operational efficiency of such behavioral health interventions can be greatly improved through machine learning enabled personalization <cit.>. Furthermore—focusing on ultimate health outcome—it has been established that Keheala's effect was heterogeneous across patient types, with the highest impact on the patient types that were most likely to have poor health outcomes in the absence of behavioral support <cit.>. 











 §.§ Queueing theory

A key step in our analysis is to model the congestion interference of one user's behavior on other user's experience using a queueing theory model. 
Most related to our work are a sequence of papers focusing on staffing in closed queueing systems <cit.>. Similar to our setting they consider a finite set of users that periodically transition into needing service that is provided by a fixed set of servers. In <cit.>, the objective is to develop staffing policies for these types of membership services, based on many server theorems that correspond to different staffing regimes. Importantly, they derive a staffing policy that minimizes capacity investment while ensuring a certain service level. <cit.> also use many server asymptotic results to generate staffing policies but for the specific case of nursing teams. Our setting is also related to the work of <cit.>, who study an infinite source queue with balking and reneging, where balking refers to users choosing not to join the queue if the queue is too long. They consider a setting where the probability of joining a queue, upon arrival, is proportional to the queue length. This process, though inspired by a different setting, has the exact same transition probabilities as our setup. Our model is also related to the Machine Interference Problem (see <cit.> for a survey on these problems), where machines are operating until they break, after which they require service from a provider to be fixed. Unlike a typical MIP problem, our setting has reneging, or machines (subjects) that can recover without the help of a server.  

While some of our results (see <ref>) are related to the analysis presented in this literature, our objective is completely different. This literature has focused on generating staffing policies whereas we focus on the implications of staffing on the statistical power of RCTs of service interventions. 






§ MODELING FRAMEWORK

In this section, we formalize our problem setting. We gradually establish the structure of service intervention experiments by first introducing a model of individual subject behavior both with and without the intervention (<ref>) as well as the service system they interact with (<ref>). We then define the outcome metrics of interest (<ref>). Finally, we adapt these models to analyze randomized controlled trials of service interventions (<ref>). 






 §.§ Individual subject behavior

The defining feature of subjects in our setting is that they can be described by a two-state stochastic process. 
We let 𝒰 denote the set of subjects or users (with |𝒰|=N) and 𝒯=ℝ_+ denote time. Then the state of user u∈𝒰 at time t∈𝒯 is denoted by x(u,t) ∈{0,1}. Here, state 0 represents a desirable state (from the perspective of both the servers and the users), while state 1 represents an undesirable state. For example, in a medication adherence setting, a desirable state is one where the user has taken their medication on a given day, or in a customer service setting, a desirable state is one where the user does not have any issues.



The transition dynamics of a given subject depend on whether or not they receive intervention from the system. In the absence of intervention, they transition from the desirable state 0 to the undesirable state 1 with rate λ and back from state 1 to state 0 with rate τ. In the presence of intervention, each server has a service rate of μ and so a user (assuming there is a server available immediately) transitions from the undesirable state 1 to the desirable state 0 with rate τ + pμ, where p represents the probability that a user transitions to the desirable state after receiving service while 1-p represents the probability that the user does not transition, and thus remains in the queue for intervention.
For our theoretical analysis, we assume subjects are homogeneous in terms of their state transition rates.



 §.§ Queueing model of service intervention system

One way to analyze the performance of the types of systems we have described is by analyzing the individual stochastic processes, with intricate dependencies across the users. However, given that the type of interference we are interested in stems from congestion, a better approach may be to consider the service intervention as a closed queuing system (i.e., with a fixed number of subjects transitioning in and out of the queue).
The system aims to serve users in state 1 so that they transition to (and ideally remain in) state 0. In other words, if 
x(u,t)=0 then user u does not require service but if 
x(u,t)=1 
then user u is eligible for service and joins the queue.


We define a Markov chain to describe the closed queueing system in a setting with M servers and N users (we describe how to apply this model to the study of experimentation in Section <ref>). We denote an individual's state at time t with x_M,N(u,t), indexed by M and N.  The state of the system at time t is the number of users in the undesirable state. Specifically, let X_M,N(t) ∈{0, …, N} such that X_M,N(t) = ∑_u x_M,N(u,t), where M is the number of servers and N is the number of users.  This quantity X_M,N(t) corresponds to the total number of users in the undesirable state 1 at time t, or in other words the number of people either waiting in the queue or being served at time t (for a system with M servers and N users). This notation explicitly references the fact that this quantity depends on both M and N.

The dynamics of the queueing Markov chain are governed by a transition rate matrix 𝒬, where 𝒬_M,N(i,j) represents the rate that the system moves from state X_M,N(t)=i to state X_M,N(t)=j. On the one hand, there is a rate of users entering the queue, i.e., 𝒬_M,N(i,i+1). If there are i users in the queue, then there are N-i users in a state 0 and so the rate at which users enter the queue is (N-i)λ. On the other hand, the rate of users leaving the queue depends on the congestion level. Each server has a service rate μ and so they can serve the users at a rate of min{iμ, Mμ} (limited by the number of users in the queue and number of servers). 
If the number of users in the queue at time t is less than the number of servers (i.e., X_M,N(t)=i≤ M), then users transition out of the queue with a transition rate of ipμ + iτ. If the number of users in the queue at time t exceeds the number of servers (i.e., X_M,N(t)=i>M) then users transition out of the queue with rate Mpμ + iτ. If the user remains in the undesired state, despite being served, the user rejoins the queue. Summarizing, we have:

    Q_M,N(i, i+1)    = (N-i) λ,     for 0≤ i<N, 
    
        Q_M,N(i, i-1)    = 
        
        iμ p + iτ,    if i ≤ M,
    
        M μ p + iτ,    if M < i ≤ N.

The rate of all other transitions Q_M,N(i, j) for i≠ j is 0. Finally, the quantity 𝒬_M,N(i,i) is defined so that the sum of each row is 0. The above model captures congestion due to the interference of interest because the length of time between when a user transitions into the undesired state and when they are served by the service intervention depends on the number of other users who also need to be served. 

We note that this Markov chain is ergodic and has a unique stationary distribution, which we denote π_M,N, where π_M,N(k) denotes the steady state probability of there being k users in the undesirable state. This notation captures the fact that the steady state distribution depends on the number of users N and servers M in the system. The steady state is characterized by the following equations:

    π_M,N(j) =
        π_M,N(j-1) ·(N-j+1)λ/jμ p + jτ   for  1≤ j ≤ M
    π_M,N(j-1) ·(N-j+1)λ/Mμ p + jτ   for  j≥ M.

and ∑_j=0^Nπ_M,N(j)=1. 

We also define the steady state expected queue lengthK_M,N a standard queueing metric, given by

    K_M,N   = ∑_j=1^N j ·π_M,N(j) 
       = π_0 ·∑_k=1^m k ·N!  λ^j/k!  k!  (μ p + τ)^k
        + π_0 ·∑_k=m+1^N k ·N!  λ^j/j! M!  (μ p + τ)^M ∏_i=M+1^j(Mμ p +i τ)


In our setting, K_M,N corresponds to the expected number of users in the undesirable state. 




  §.§.§ Queueing system regimes and offered load.


To illustrate the impact of the queueing system structure on service interventions, we begin by introducing the concepts of Efficiency-Driven (ED), Quality-Driven (QD), and Quality-and-Efficiency-Driven (QED) regimes from queueing theory. These regimes will be instrumental in interpreting the outcomes of the experiments. We provide a brief introduction here; for more detail, see <cit.> for an introduction in general queues and <cit.> for discussion specific to closed queueing systems. 

A key parameter in the subsequent analysis is the critical ratior, defined as

    r = λ/λ + τ + μ p.

Then rN is the offered load, which can be interpreted as the expected number of users in the undesirable state if the system had an infinite number of servers, or, in other words, if a server were available as soon as a user enters the undesirable state.

The relationship between the offered load and the number of servers M determines which regime the queue operates in. In the Efficiency-Driven (ED) regime, the number of servers is less than the offered load (M ≪ rN) and servers are efficiently used with little idle time, at the cost of longer wait times for users. 
In the Quality-Driven (QD) regime, the number of servers is larger than the offered load (M ≫ rN) and the probability that a user must wait to be served is low, at the cost of maintaining more servers. The Quality-Efficiency-Driven (QED) regime refers to a regime that balances both quality and efficiency, where the capacity is chosen such that it is approximately equal to the offered load (M ≈ rN), but with an additional “buffer” to account for randomness in user arrival and service times. A simple heuristic to staff in the QED regime is use the Square Root Staffing rule, which chooses M = rN + γ√(N) for some constant γ. We will utilize this staffing policy and the queueing regimes in the later analysis.











 §.§ Metric of interest

The intervention aims to increase the average time that users spend in the desired state, or equivalently, reduce the average time spent in the undesirable state. 
Starting with a single user u, define Y(u, T) to be the proportion of time spent in the undesirable state over a finite horizon [0,T]:
Y_M,N(u, T) = 1/T·∫_t=0^T x_M,N(u,t)dt.
The proportion of time spent in the desirable state is 1-Y_M,N(u,T). 
The intervention then aims to reduce the average time that all N users spend in the undesirable state. 

    1/N·∑_u
         Y_M,N(u,T).


To focus on the long run behavior, we consider the steady state proportion of time user u spends in the undesirable state, denoted _π_M,N[ x_M,N(u,t) ], where the expectation is taken over the stationary distribution. Since the system is an ergodic Markov chain, it follows that 

    lim_T→∞
         Y_M,N(u,T) = _π_M,N[ x_M,N(u,t) ], and
    lim_T→∞1/N·∑_u
         Y_M,N(u,T) 
         = 1/N∑_u_π_M,N[ x_M,N(u,t) ] 
         = _π_M,N[ x_M,N(u,t) ],

where the the second equality in Equation (<ref>) comes from the fact that users are homogeneous in the current setting.












The left hand side of Equation (<ref>) involves a sum of dependent random variables
where one subject's time spent in the undesirable state can depend on whether the provider was busy serving another subject. Further, each random variable Y_M,N(u,T) is an average of the subject's state up until time T, and the subject's state at time t can affect their state at some later time t'.

Nevertheless, we are able to study this metric by connecting the outcomes of individual users to metrics of the queueing system. The following lemma shows that the average of the individual quantities Y_M,N(u,T) is equivalent to the time average of the queue length, a well studied quantity in queueing theory. While straightforward, this observation enables us to leverage queueing theory results in order to study these service intervention experiments. 


Let X_M,N(t) denote the number of people being served or waiting to be served in the queue. 
Then the proportion of time that the user spends in the undesirable state, averaged across users, can be expressed as
    
    1/N·∑_u Y_M,N(u,T) 
            = 1/NT·∫_t=0^T X_M,N(t) dt

The long run (steady state) proportion of time the user spends in the undesirable state can be expressed as
    
    _π_M,N[ x_M,N(u, t) ] =  K_M, N/N.
Proof of Lemma <ref>.
For the equation for finite T,

    1/N·∑_u Y_M,N(u,T) 
           = 1/N∑_u 1/T∫_t=0^T x_M,N(u,t)dt
       = 1/NT∫_t=0^T ∑_u x_M,N(u,T) dt
       = 1/NT·∫_t=0^T X_M,N(t) dt

The equation for the steady state quantity follows from taking the limit on both sides of the above expression, since the Markov chain is ergodic.



 §.§ Experimentation

We now start considering impact evaluation for the kind of system we have described above. In particular, we will describe the control group, the treatment group, the treatment effect and estimator, and how the power of such an experiment depends on both the number of users enrolled and the number of servers staffing the service component. 





  §.§.§ Recruitment decisions for users and servers
 The experimenter recruits N subjects, which we call users, into the experiment. These users are then randomized into the treatment group, which receives the service intervention, and the control group, which does not. For each user u, we let Z_u indicate whether the user is assigned to the treatment group (Z_u=1) or the control group (Z_u=0).Let N_1 and N_0 denote the number of treatment and control subjects, respectively. We focus on the setting where there are the same number of subjects in the treatment and control group N_1 = N_0 = N/2, though all of the analysis can extend to the general setting. 

The experimenter hires M_1 servers to provide the service intervention, where the subscript denotes that the service intervention is provided only to the subjects in the treatment group. These servers correspond to the individuals or resources that are providing the costly, on-demand interactions in the service intervention. In the 
context of the medication adherence programs in <cit.> and <cit.>, a server corresponds to the provider who reaches out patients who are not adhering to their medication schedule. Servers may also correspond to healthcare providers in medical experiments or teachers in education experiments.




  §.§.§ Behavior of treatment and control groups.

Note that the treatment group and the control group form two distinct stochastic systems that can be analyzed separately. In other words, users in the treatment group do not affect users in the control group, and vice versa. However, users in the treatment group do affect each other.

In the notation of the queueing system defined in <ref>, the treatment group evolves according to Q_M_1,N_1, where the steady state distribution of the number of users in the queue is captured by π_M_1, N_1, and the steady state proportion of time each user spends in the undesirable state is _π_M_1,N_1[x_M_1,N_1(u,t) ].
Each of these expressions depends on M_1 and N_1. 


In contrast, users in the control group move from the undesired state to the desired state according to the dynamics given in Figure <ref>, without any service from system. We can express the evolution of the control group with the transition rate matrix Q_0,N_0 with steady state distribution π_0, N_0 or, equivalently, as N_0 separate systems, each consisting of a single individual evolving according to Q_0,1 and with steady state distribution π_0,1. The steady state proportion of time that each user spends in the undesirable state is then _π_0,1 [x_0,1(u,t) ], which does not depend on N_0.  







  §.§.§ Treatment effect and estimators.

We define a class of treatment effects
that measure the long term effect of the intervention on the time users spend in the desirable state, the metric of interest defined in <ref>.
Importantly, in the context of service interventions, this effect depends on the number of users N_1 and servers M_1.

Given an experiment with M_1, N_1, N_0, we define the steady state treatment effectθ^ss(M_1,N_1) as the difference between the treatment and control group in the proportion of time spent in the desirable state.

    θ^ss(M_1, N_1) 
           = [ 1 - _π_M_1, N_1[x_M_1,N_1(u,t)] ] - [ 1 - E_π_0,N_0[x_0,N_0(u,t)]] 
       = [ 1 - K_M_1,N_1/N_1 ] - _π_0,1 [x_0,1(u,t) ].

Note that this treatment effect depends on M_1 and N_1, but not N_0. 









A natural estimator for the treatment effect is the difference in means estimator that compares the empirical group mean verification of the treatment and control group. Given an experiment with M_1 servers for the treatment group, N_1 users in treatment, N_0 users in control, and a time horizon of length T, the time average estimatorθ̂(M_1, N_1, N_0, T) is



    θ̂(M_1, N_1, N_0, T) 
           = [    ∑_u: Z_u=11 - Y_M_1,N_1(u,T)/N_1] 
        -  [ 
        ∑_u: Z_u=0 1- Y_0, N_0(u,T) /N_0]
        
       = [ 1 -  1/T·∫_t=0^T X_M_1, N_1(t) dt/N_1] 
        -  [ 1 - 
        1/T·∫_t=0^T X_0, N_0(t) dt /N_0].

Equation (<ref>) shows two ways of expressing the estimator. The first line expresses the estimator as the difference between averages of individual outcomes. The second line expresses the estimator as a queueing system metric, with respect to the queue length for the treatment and control systems, X_M_1,N_1(t) and X_0, N_0(t), using Lemma <ref>.








  §.§.§ Hypothesis testing and power.

The experimenter conducts a standard hypothesis test to determine whether observed differences between the treatment and control group are statistically significant. Let α∈ (0,1) denote the significance level of the test. 

The experimenter then conducts a test with null hypothesis H_0: θ^ss(M_1,N_1) = 0 and alternative hypothesis θ^ss(M_1,N_1)>0. 
If we assume that the variance of the estimator is known, then the test statistic under the null hypothesis is 

    Z(M_1, N_1, N_0,T) = 
        θ̂(M_1, N_1, N_0, T) - 0/√((θ̂(M_1, N_1, N_0, T) )).

The experimenter rejects the null if the probability of observing Z(M_1,N_1,N_0,T) under the null hypothesis is less than α. Let  denote a minimum detectable effect threshold and β∈(0,1) be the desired power. If the true effect θ^ss(M_1, N_1) is at least as large as the , then the experimenter wants to reject the null hypothesis with probability β. We will develop approximations for the two components of (<ref>) in <ref>.




  §.§.§ Trial design decisions.


When planning a trial, experimenter must choose the number of servers M_1 and the number of subjects N_1 and N_0 to ensure a high powered test at the specified , or equivalently, a high enough ratio in Equation (<ref>). 


In trials without interference, the problem is simple, since the variance in (<ref>) decreases linearly in the number of subjects, and boils down to minimizing the number of subjects N_1+N_0 while meeting the power criterion. 
For service interventions, the decision is more complicated as the experimenter must jointly decide on N_1, N_0 and M_1. In <ref> we will contrast two naive approaches for power analysis with a queueing-informed approach, demonstrating that obtaining accurate power estimates relies on understanding the level of congestion interference. 


For service interventions, the decision is more complicated as the experimenter must jointly decide on N_1, N_0 and M_1. In <ref> we will contrast two naive approaches for power analysis with a queueing-informed approach, demonstrating that obtaining accurate power estimates relies on understanding the level of congestion interference. 










§ ANALYSIS OF SYSTEM


This section provides the mathematical foundations to analyze these experiments; later <ref> and <ref> use these expressions to characterize the implications for service intervention RCTs.
To study the quantities defined in <ref>, we need to characterize both the expected value of the estimator and its variance. By Lemma <ref>, this problem reduces to characterizing the time average of the queue length and the associated variance, for both the treatment and control groups. 

Here, we first use prior results from the literature to establish a Central Limit Theorem for the two groups and the estimator as T→∞ (<ref>).
However, due to the dependencies between individuals in the treatment group, the expressions for the average queue length and its variance are complex even in the large T limit (see Equations (<ref>)-(<ref>)). 
Therefore, to obtain analytical insights on the behavior of these two quantities, we subsequently develop a fluid limit to approximate the average queue length in large systems with many users and many servers (<ref>). In particular, we illustrate how to apply these approximations to study experiment outcomes (<ref>).




 §.§ Central Limit Theorem for estimator in finite system

Recall that the estimator θ̂(M_1, N_1, N_0, T), defined in Equation (<ref>) as

    θ̂(M_1, N_1, N_0, T)  =
        [    ∑_u: Z_u=11 - Y_M_1,N_1(u,T)/N_1] 
        -  [ 
        ∑_u: Z_u=0 1- Y_0, N_0(u,T) /N_0],

compares the average time spent in the desirable state across groups, where the first term corresponds to the average over the users in the treatment group and the second term corresponds to the average over users in the control group. 

We derive a Central Limit Theorem (CLT) for the estimator θ̂(M_1, N_1, N_0, T) by first deriving a CLT for each of the treatment and control terms separately. Since the treatment and control groups are independent from each other, the CLT for the estimator then immediately follows. 

We first remind the reader of the challenges in deriving a CLT for this system. The term corresponding to the treatment group is a sum of dependent random variables Y_M_1,N_1(u,T), since the length of time that a user remains in the undesirable state can depend on whether other users are waiting for service. In contrast, the term corresponding to the control group is a sum of independent random variables Y_0, N_0(u,T) since the users' states evolve independently from each other in the control group. However, in both groups, there is a dependency across time for each user u. 
That is, the state of user u at time t affects the distribution of their state at some later time t'. Each random variable Y_M,N(u,T) is an integral over time and so we must characterize the dependency across time for both groups.
Thus, we do not have independent and identically distributed samples, a condition typically assumed to guarantee the existence of a CLT. Nevertheless, we are able leverage existing results from  <cit.> in queueing theory to establish a CLT. 


Let 
A(M_1,N_1,T) =  ∑_u: Z_u=11 - Y_M_1,N_1(u,T ) / N_1
and 
B( N_0,T) =
    ∑_u: Z_u=0 1- Y_0, N_0(u,T)  / N_0
denote the treatment and control terms of Equation (<ref>), so that θ̂(M_1, N_1, N_0, T) = A(M_1, N_1,T) - B(N_0,T). 


Then the following quantities converge in distribution

    T^1/2·( A(M_1,N_1,T) - μ_1 ) 
            N(0, σ̃_1^2) 
        
    
        T^1/2·( B(N_0,T)  - μ_0)     N(0, σ̃_0^2)

where 

    μ_1 = μ_1(M_1,N_1) = 1 - K_M_1,N_1/N_1,
      μ_0 = τ/λ + τ
    σ̃^2_1 = σ̃_1^2(M_1,N_1) = 2/N_1^2∑_j=0^N_1-11/(N_1-j) π_M_1,N_1(j)[ ∑_i=0^j (i - K̅_M_1, N_1)π_M_1,N_1(i) ]^2
    σ̃_0^2 = σ̃_0^2(N_0) = 1/N_0·2 λτ/(λ + τ)^3


Then the scaled estimator converges

    T^1/2·(θ̂(M_1, N_1, N_0, T)  - (μ_1 - μ_0) )  N(0,  σ̃_1^2 + σ̃_0^2).










The convergence to the time average of each group to its mean follows directly from the system being an ergodic Markov chain. The formula for variance follows from a result for Markov processes in <cit.>.
The proof for this result is in Appendix <ref>. 


A corollary of Theorem <ref> is that θ̂(M_1, N_1, N_0, T) is a consistent estimator for the the long term treatment effect θ^ss(M, N), when M=M_1 and N=N_1. That is, the estimator recovers the true treatment effect if the experiment is run for long enough. 
As we discuss later, this result does not hold for general M≠ M_1 and N≠ N_1.

For any N_0>1, 
    
    lim_T →∞θ̂(M_1, N_1, N_0, T) θ^ss(M_1, N_1)

where p denotes convergence in probability.


Motivated by Theorem <ref>, we use the following approximation for the mean of the estimator:

    θ̂(M_1, N_1, N_0, T) ≈[ 1 - K_M_1,N_1/N_1 ] 
        - τ/λ + τ.

Similarly, we use the following approximation for the variance of the estimator for finite T:

    (θ̂(M_1, N_1, N_0, T))
        ≈σ̃^2 / T.

The simulations in Appendix <ref> for the system at finite time horizons show that these simulation quantities align closely with the approximations suggested by the CLT for large enough T. 






 §.§ Approximating the average queue length using a fluid limit

To capture the implications of congestion arising from capacity constrained interventions, we must characterize how the size of the treatment effect defined in Equation (<ref>) changes with the number of servers and users. 
In other words, we need to characterize how the mean of the limiting distribution in Theorem <ref> depends on N_1 and M_1. 
To obtain analytical insights, instead of directly analyzing the expression in Equation (<ref>),  we utilize a fluid limit to approximate this quantity in large systems. This approach is a method from queueing theory that allows us to simplify the expression for queue length (see <cit.> for the general method and <cit.> for an example in a closed queueing system). 

We first present the fluid limit 
of the queueing system with M servers and N users. In the next section ( <ref>), we describe how to use this limit to approximate experiment quantities described above.


We scale up both the number of servers M and number of users N proportionally (such that M/N approaches a constant) and consider the average behavior of the system, which becomes deterministic even for finite T. 
Formally, suppose that the number of servers is a function of N, denoted M^(N). Further assume that we choose a staffing rule such that lim_N→∞ M^(N) / N = M. 
We define the following fluid limit, designed to represent the behavior of the system as N →∞. Let z(t) denote the fraction of users in the undesirable state at time t such that z(t) obeys the following ordinary differential equation:
dz(t)/dt=λ (1-z) - z μ p - z τ,     for z< M, 
λ (1-z) - Mμ p - z τ,    for z ≥M.

The two equations show that the evolution of this system depends on whether the fraction of users in the undesirable state z(t) is greater than or less than the the ratio  of servers to users M. When z(t)<M, the rate at which users receive service undesirable state is limited by z(t). Conversely, when z(t) > M, the rate at which users receive service is limited by M. 



Analogous to the finite system steady state quantity K_M,N/N, we can define the steady state proportion of users in the system (undesirable state) in the fluid limit, defined to be the value at which dz/dt=0, which we denote z^*_ M. The following result characterizes the steady state behavior, as a function of model parameters. The proof is in Appendix <ref>.


    For a given value of M, the ODE system given by equations (<ref>)–(<ref>) has the following steady state solution:
    z^*_M
    = λ - Mμ p /λ + τ,    for M≤ r,
λ/λ + τ + μ p,    for M> r.
    
In particular, note that this expression directly shows how increasing the ratio of servers M to users affects the fraction of people in the undesirable state, unlike the expression for queue length in Equation (<ref>) for finite settings.


For a finite system with large enough values of M and N, we can use the behavior of the fluid limit to approximate the average queue length in the finite system as follows:

    K_M,N≈ N · z^*_M/N.

Indeed, we observe that the the steady state distribution of the finite system converges to the steady state of the fluid limit as M and N increase. See Appendix <ref> for comparisons of simulations of the finite system and the fluid limit.




  §.§.§ Fluid limit approximations for experiment quantities


For a system with finite M and N, we can approximate the finite system behavior using the fluid limit with limiting server-to-user ratio M/N. Applying this to the experiment context
with M_1 servers, N_1 users in the treatment group, and N_0 users in the control group, we define the fluid limit treatment effectθ^*, analogous to the finite system steady state treatment effect θ^ss
as

    θ^*(M_1/N_1)
        := 
        [1 - z^*_M_1/N_1] - 
        [1 - z^*_0  ].

and use the fluid limit treatment effect to approximate θ^ss(M_1,N_1)
    θ^ss(M_1,N_1) ≈θ^*(M_1/N_1).






We use this approximation in Section <ref> to highlight how the steady state treatment effect θ^ss(M_1,N_1) changes with M_1 and N_1. 
However, we note that this fluid limit is deterministic and thus, when we study the variance of the estimator and the statistical power of the experiment, we use the finite system quantities in Theorem <ref>.













§ INSIGHTS FOR EXPERIMENTAL DESIGN


In this section, we highlight the impact that congestion has on the magnitude of the treatment effect and the resulting statistical power of the RCT. 
Note that there are four experiment parameters that the experimenter decides in the design phase: the number of service providers M_1, the number of treatment and control users N_1 and N_0, as well as the time horizon T. We focus on the choices of M_1, N_1, and N_0, to highlight the capacity constrained dimension of these interventions.



















































    











 §.§ Non-linear effect of user load on effect size



Intuitively, in a service intervention, if we fix the number of servers but increase the number of users, then users will likely need to wait longer to be served and hence, will spend more time in the undesirable state. In this situation, we expect the treatment effect of the intervention to decrease. However, we can show using the fluid limit that this impact of the user load on effect size is non-linear. When the user load is small, the treatment effect is in fact constant in the user load. Only when the user load is large enough does the treatment effect decrease in user load, following the intuition above. Later <ref> and <ref> show how to use this non-linearity to increase the statistical power of an experiment.



Fix a limiting server-to-user ratio M = lim_N→∞ M_1^(N) / N_1.  
The fluid limit treatment effect is

    θ^*(M) 
        =
        M·μ p /λ + τ   for M≤ r
        
    λμ p/(λ + τ)(λ + τ + μ p)   for M≥ r.

where r is the critical ratio.

In particular, 
as the server-to-user ratio decreases to 0, we have

    lim_M→ 0θ^*(M) 
    = 0,

The proof follows immediately by applying the fluid limit steady state characterization in Proposition <ref> to the treatment and control systems. Using the mean field limit, Proposition <ref> confirms the intuition that there is not a single treatment effect for a service intervention, but rather a set of different treatment effects corresponding to different server-to-user ratios M. Figure <ref> shows these fluid approximations for the treatment effect, along with the finite system quantities in Equation (<ref>).


We note that the outcome of the control group does not depend on M and that changes in the treatment effect stem only from changes in the outcomes of the treatment group. 
When M decreases, there are fewer servers for the treatment group and on average treatment users will wait longer to be served. In the limit, when M→ 0 (as is the case when holding M fixed and increasing N→∞), users will not be served and the treatment effect diminishes. On the other hand, when increasing M, users will experience shorter wait times before being served and as M→∞, users will be served immediately after entering the undesirable state. 

The dependence of the treatment effect is not linear in M. For small M<r, increasing the ratio of servers to users increases the treatment effect but when M>r is large, increasing M does not increase the treatment effect. This result is due to the underlying queueing structure of the service intervention. Recall the queueing regimes defined in Section <ref>. The M < r case corresponds to the Efficiency-Driven regimes where, on average, users who enter the undesirable state will need to wait to be served. In this setting, increasing the number of servers decreases how long users must wait before receiving the intervention and increases the treatment effect. The  M>r case corresponds to the Quality-Driven regime, where the system maintains a buffer of unused servers and the probability that a user needs to wait to be served is low (tending to 0). In this setting, most users are served immediately and increasing the number of servers will not increase the treatment effect. 







Proposition <ref> also implies that the experiment estimator may be biased if the experiment does not the same number of servers or users as the intended intervention when scaled up. Consider the setting where an experimenter runs a study with M_1 servers, N_1 users in treatment, and N_0≥ 1 users in control and obtains the estimate θ̂(M_1,N_1,N_0)≈θ^*(M_1/N_1). If they choose to scale up the platform to N>N_1 users without increasing the number of servers M_1, then they will obtain an unbiased estimate of the treatment effect if and only if both M_1/N ≥ r and M_1/N_1 ≥ r; otherwise the experimenter will overestimate the true effect. 
See Proposition <ref> in Appendix <ref> for a complete characterization of the bias for all ratios of M/N and M_1/N_1. 

















 §.§ Estimation of variance

In general, the variance of the sampling distribution θ̂ is unknown and the experimenter must estimate the variance using observed data. In settings where individual outcomes Y_M,N(u,T) are independent across u, there exists a constant σ^2 = Var(Y_M,N(u,T)) and the variance of the sample mean is given by Var(∑_u=1^N Y_M,N(u,T) / N) = σ^2 / N. The standard approach is to estimate the sample variance s^2 across observations and estimate the variance of the sample mean with s^2/N. 

However, with a capacity constrained intervention, the users in the treatment group are dependent and there are correlations in Y_M,N(u,T) across users that the naive variance estimation procedure ignores. In particular, as seen in Theorem <ref>, the asymptotic variance for the treatment group average 

    σ̃_1^2 = σ̃^2(M,N_1, N_0) = 2/N_1^2∑_j=0^N_1-11/(N_1-j) π_M,N_1(j)[ ∑_i=0^j (i - K̅_M, N_1)π_M,N_1(i) ]^2
 
does not decompose into the form σ^2 / N_1.

We leave this problem of variance estimation for future work and, for the rest of this paper, assume that the experimenter has the simpler task of running an experiment when the true variance is known. We show that even in this setting, where variance estimation is not an issue, the capacity constraints on the intervention will invalidate statistical guarantees in naive experiments.




 §.§ Power is not monotonic in number of patients



We now consider the statistical power of the hypothesis test, which is the probability of finding a statistically significant result given that the true effect size is at least some threshold. Let M_1 denote the number of providers for the treatment group and N_1 and N_0 denote the number of users in treatment and control. We assume for simplicity that N_1=N_0.

Let the null hypotheses be H_0:μ_r=μ_c and suppose we are conducting a one-tailed test such that the alternative hypothesis  is H_a:μ_r > μ_c. Let α be the significance level (e.g., α=0.05), β be the desired power (e.g., β=0.80), and MDE>0 denote the a Minimum Detectable Effect threshold. Fix T>0. 



The test statistic under the null hypothesis is 

    Z(M_1, N_1, N_0,T) = 
        θ̂(M_1, N_1, N_0, T) - 0/√(σ̃_r^2  (M_1, N_1)/T
        +
        σ̃_0^2 (N_0)/T
        ).

Recall that if T is large enough, Theorem <ref> shows that the estimator θ̂(M_1, N_1, N_0, T) is approximately normally distributed. For tractability, we assume that the estimator is indeed normally distributed, although we expect that the results hold without this assumption.
If we make the assumption that the estimator θ̂(M_1, N_1, N_0, T) is normally distributed, then we can run a z-test. The power of this test at a fixed  is

    1-Φ(Φ^-1(1-α)-/√(σ̃_1^2  (M_1, N_1)/T
        +
        σ̃_0^2 (N_0)/T)).

See Equation (<ref>) in Appendix <ref> for the derivation.


The experimenter generally fixes a static MDE and wishes to ensure a probability β of detecting a true effect θ^ss(M_1, N_1, N_0) at least as large as MDE. As we have seen, however, in service interventions this true effect size depends on M_1 and N_1. To capture this phenomenon, for an experiment run with M_1 providers, N_1 treatment users, and N_0 control users, we consider the power to detect an effect at least as large as the true effect of the experiment; that is, we fix the MDE = θ^ss(M_1, N_1) to obtain:


    1-Φ(Φ^-1(1-α)-θ^ss(M_1, N_1)/√(σ̃_1^2  (M_1, N_1)/T
        +
        σ̃_0^2 (N_0)/T)).

This quantity, of course, is not known to the experimenter when running the experiment. However, we can use this quantity to evaluate different experiment designs.


Now we consider the implications of Equation (<ref>). First, note that
power increases when θ^ss(M_1, N_1, N_0) increases, since Φ is a monotonically increasing function. 
Further, power increases when the variance term σ̃_r^2  (M_1, N_1) + σ̃_0^2 (N_0) decreases. 


First consider the setting where SUTVA holds and all treatment and control users are independent. Then, the numerator θ^ss(M_1, N_1) is constant in M_1, N_1 and N_0. For the variance term, there exist constants σ̃_0^2 and σ̃_0^2 such that σ̃_1^2  (M_1, N_1) = σ̃_1^2/N_1 and σ̃_0^2 (N_0) = σ̃_0^2/N_0; in other words, the variance term for each of the treatment and control group averages decrease linearly with 1/N_1 and 1/N_0, respectively. Thus,  increasing N_1 and N_0 increases the power of the hypothesis test. 






For service interventions, SUTVA does not hold and we find that power is not monotonic in the number of patients. Figure <ref> plots the statistical power at different M_1 and N, where N_1 = N_0 = N/2, using approximations in Equations (<ref>)-(<ref>).
For each number of providers M_1, we see that power is increasing in the number of patients N until a threshold (depending on M), after which power is decreasing in N. 

The expression for power in Equation (<ref>) highlights two factors leading to in power: (a) the treatment effect θ^ss(M_1,N_1,N_0) decreases in N (Figure <ref>) and (b) the treatment group variance term σ̃^2_r(M_1,N_1) (given in Theorem <ref>) does not necessarily decrease with 1/N (Figure <ref>). (The control group samples are independent and we indeed have σ̃_0^2 (N_0) = σ̃_0^2(1)/N_0.)
Qualitatively, we observe that (a) the difference in the treatment effect plays a larger role than (b) the deviation in variance. For (a), the top left figure shows a sharp decrease in the treatment effect size in N. For (b), the top right figure shows that the control group variance decreases with 1/N but the treatment group variance deviates slightly in the small N regime. 





A comparison of the plots for the treatment effect (Figure <ref>) and the variance in (Figure <ref>) provides intuition on how to maximize power, for a given M. As discussed in Section <ref>, treatment effect is constant for small N (the Quality Driven regime) up until a quantity that depends on M and then decreases for larger N (the Efficiency Driven regime). On the other hand, the variance is largely decreasing in N, and, in particular, is decreasing quickly for small N. Thus, for the small N interval of the Quality Driven regime, we can see that power is increasing in N, since power is a function of the ratio between the treatment effect and the standard error.
For large N in the Efficiency Driven regime, the treatment effect appears to be decreasing more quickly than the variance, and so power is decreasing in N. Thus one might expect that the optimal N is one in the “middle” between these two regimes, what is known in queueing theory as the Quality Efficiency Driven regime. Indeed, we use this observation in the <ref> to suggest a policy for experiment planning. 









 §.§ Numerical experiments: Optimal N varying parameter values

Figure <ref> explores how the optimal number of users N changes as system parameters vary. We set the base parameters to be λ=0.3, τ=0.3, μ=3, p=0.5, and each plot varies a single parameter. We focus on arrival rates λ∈ [0, 0.5] and abandon rates τ∈ [0, 0.5] to reflect that states are “sticky”, i.e., a user is more likely to stay in the same state they were in yesterday, in the absence of intervention. 


Figure <ref> shows that the optimal N is decreasing in the arrival rate λ, increasing in abandon rate τ, increasing in service rate μ, and increasing in the probability of effect p. The directional effects intuitively reflect how the number of users in the queue change with respect to the parameters, e.g., as the arrival rate increases, more users will be entering the queue and so a larger number of servers M is needed. On the other hand, as the abandon rate increases, more users leave the queue and thus a fixed M will be able to serve more users.

In summmary, Figure <ref> implies that, for each M_1, the power optimal N the depends on the system parameters. We explore this direction in the next section and propose a heuristic Square Root Staffing policy, informed by queueing theory, to increase power by leveraging information about the underlying system structure.






§ COMPARISON OF POWER ANALYSIS APPROACHES

A main objective of this work is to help experimenters avoid the mistake of concluding an intervention is ineffective following RCT experimentation, simply because operational (capacity) constraints led to smaller effect sizes and, thus, an underpowered experiment. This goal is especially relevant for an efficacy trial, which aims to evaluate the impact of an intervention under ideal conditions. If the intervention seems promising in the efficacy trial, then there may be what is known as an effectiveness trial, designed to estimate the effect of the intervention under realistic conditions <cit.>. In our setting, an effectiveness trial might staff the experiment with a similar number of servers and users as what may be realistically deployed to the intended user-base.

A standard procedure in experiment design to ensure that an experiment is well powered is to first run a small scale pilot study and then conduct a power analysis, using the outcomes from the pilot study, to decide how many users to include in the full study. 



In the remainder of the section, we consider two naive power analysis approaches that do not account for the capacity constrained structure intervention that we show may either be underpowered or be costly to run (requiring high M_1, N_1, or N_0). We then define a queueing-informed policy that leverages the intervention structure to ensure high power and with fewer resources (requiring lower M_1, N_1, and N_0).




 §.§ Setup and naive power analysis policies

Consider a small scale pilot study, with M_1^p servers and N^p in the experiment, with N^p_0 in control and N^p_1 in treatment. Fix some T>0. After running the pilot study, the experimenter obtains an estimate of the treatment effect θ̂(M_1^p, N^p_1, N^p_0, T) and an estimate for the variance (θ̂ (M_1^p, N^p_1, N^p_1, T)). Based on the estimates from the pilot study and a specified Minimum Detectable Effect (MDE), the experimenter decides how to set the number of users and servers in the full experiment. 

A power analysis policy thus specifies an (M_1, N_1, N_0) pair. 
We focus on policies with an equal number of users in treatment and control N_1 = N_0, although the observations can be extended for any constant treatment proportion. 



  §.§.§ Naive Policy 1: No M_1 Scale-up.

Recall that the long-term treatment effect is θ^ss(M_1, N_1, N_0) and the variance (θ̂ (M_1, N_1, N_0,T) ) ≈ 1/T ·(σ̃^2_1(M_1, N_1,T) + σ̃^2_0( N_0,T)).

For this first naive policy, the experimenter is not aware of those dependencies and makes two (incorrect) assumptions about the experiment:

  *  They wrongly assume that the treatment effect θ^ss(M_1, N_1) does not depend on M_1 nor N_1.
    
  *  
    They wrongly assume that there exist constants σ̃_0^2 and σ̃_0^2 such that σ̃_1^2  (M_1, N_1) = σ̃_1^2/N_1 and σ̃_0^2 (N_0) = σ̃_0^2/N_0.


Due to assumption (1), they believe that there is a constant  treatment effect for any M_1, N_1, and N_0. 
An implication is that all experiment designs will lead to the same treatment effect as the pilot study. Thus, if the experimenter knew the treatment effect of the pilot study, they would set =θ^ss(M_1^p, N^p_1). Further, an experimenter who is not aware of the impact of congestion does not increase the number of servers beyond M^p_1. 

Of course, the experimenter does not know θ^ss(M^p, N^p_1) and only obtains an estimate θ̂(M_1^p, N^p_1, N^p_0, T). Further, as Section <ref> discusses, it is unclear how to estimate the variance of the estimator θ̂(M^p, N^p_1, N^p_0, T). To simplify matters, we assume that the experimenter knows three additional pieces of information after the pilot study: they have oracle access to θ^ss(M^p_1, N^p_1, N^p_0),  σ̃^2_1(M^p_1, N^p_1)/T, and σ̃^2_0( N^p_0)/T. We note that oracle access to these quantities makes the naive experimenter's task easier, and we will still show that the naive policy underperforms with respect to the queueing-informed policy. In other words, the experimenter has perfect knowledge of the sampling distribution of the estimator in the pilot study, but is not given additional information about the sampling distribution at other M_1, N_1, or N_0.

Under this oracle knowledge and Assumption (2), the naive experimenter (incorrectly) assumes that the treatment group variance term scales with N_1 and so the variance at N_1 ≠ N^p_1 is σ̃^2_1(M^p_1, N^p_1)/T · N^p_1 / N_1. 
Likewise, the experimenter (correctly) assumes that the control group variance term scales with N_0 and so the variance at N_0 ≠ N^p_0 is σ̃^2_1( N^p_0)/T · N^p_0 / N_0.



Given these assumptions, the naive experimenter chooses N_1 by solving the following optimization problem. 


    minimize       N_1 
    subject to      1-Φ(Φ^-1(1-α)-/√( f(N_1)+ g(N_0)))≥β
        = θ^ss(M_1^p, N^p_1)
        M_1 = M^p_1
        f(N_1) =  N^p_1/N_1  T·σ̃^2_1(M^p_1, N^p_1) 
        g(N_0) = N^p_0/ N_0  T·σ̃^2_1( N^p_0)  
        N_1 = N_0 
        N_1 ∈ℤ^n_+

Note that (<ref>)-(<ref>) reflect Assumption (1) and (<ref>)-(<ref>)  reflect Assumption (2). 
Let N_1^naive denote the solution to the naive optimization problem. Then the first Naive Policy of not scaling M_1 would recommend
(M_1^p, N_1^Naive, N_1^Naive) for the full experiment.













  §.§.§ Naive Policy 2: Proportional M_1 Scale-up.

We consider a (less naive) second policy where the experimenter makes Assumption (2) but not Assumption (1). This experimenter knows that θ^ss(M_1,N_1) depends on both M_1 and N_1, but does not necessarily know how. In this setting, experimenter similarly sets MDE = θ(M_1^p, N_1^p) and prescribes the same N^naive as above, but takes the natural step of scaling M_1 proportionally with N_1, so that 

    M_1 = ⌈ M_1^p ·N^naive/N_1^p⌉.

The Naive Policy (Proportion M_1 Scale-up) recommends (⌈ M^p_1 ·N^naive/ N^p⌉, N_1^Naive, N_1^Naive) for the full experiment.




 §.§ Queueing Informed Square Root Staffing Policy.


We now consider a policy informed by queueing theory, which utilizes the square root staffing rule, a common heuristic to balance efficiency and quality of service. This experimenter intelligently corrects for both Assumption (1) and Assumption (2).

As observed in Section <ref>, power is monotonically increasing for small N (the Quality Driven regime) and decreasing for large N (the Efficiency Driven regime). Motivated by these observations, we aim to set the number of servers M and users N such that the queueing system is operating in the intermediate Quality Efficiency Driven regime. 
We utilize the Square Root Staffing rule to set staffing levels in this regime. Introduced in <cit.>, this heuristic calculates for each number of users N the number of servers M required to maintain an approximately fixed probability of delay.

We first describe the square root staffing rule, which we later incorporate into a power analysis policy. Fix a constant γ >0. In this work, we take γ = 0.5, although the choice of γ should depend on the parameters of the queueing system <cit.>. We expect the dependence on γ to diminish in larger instances. We leave further optimization of γ in the context of experiment design to future work. Recall that r = λ / (λ + τ + μ p) is the critical ratio, as defined in Equation (<ref>), and rN_1 is offered load, or the average load on the system if there were always an available server when a patient entered the undesirable state. 
For each N_1>0, the square root staffing rule computes the required number of servers M^*(N_1) where 

    M_1^*(N_1) := ⌈ r N_1 + γ√(N_1)⌉,

The number of servers M_1 is chosen to match the offered load on the system r N_1, but adds a buffer γ√(N_1) to account for variability in arrival and service times. In other words, to maintain a fixed level of service when increasing N, the chosen M should not be linear in N but rather needs to account for variability in the system and incorporate this √(N_1) term.

Equation (<ref>) implies that as the number of users N_1 increases, then the ratio of servers to users M_1^*(N_1) / N_1 → r. 
Indeed, this limiting ratio r coincides with the threshold in Proposition <ref>, which shows that in the (large system) mean field limit, the treatment effect is increasing in the limiting server to user ratio M when M<r and increasing in M when M>r. Intuitively, this staffing policy chooses the smallest M to maintain a high level of service and, thus, a large treatment effect.

Now we combine the square root staffing rule into an experiment design approach. For a fixed N_1, the square root staffing rule outputs an M_1^*(N_1), but the experimenter must still choose N_1. 


The queueing informed experimenter solves the following optimization problem

    minimize       N_1 
    subject to      1-Φ(Φ^-1(1-α)-/√( f(N_1)+ g(N_0)))≥β
        = θ^ss(M_1, N_1)
        M_1 = ⌈ r N_1 + γ√(N_1)⌉
        f(N_1) = σ̃^2_1(M_1, N_1)/T 
        g(N_0) = σ̃^2_1(N_0)/T  
        N_1 = N_0 
        N_1 ∈ℤ^n_+

Let N^sqrt_1 denote the solution N_1 to the above problem. 
Compared to the naive optimization problem, the queueing informed optimization problem corrects for Assumption (1) in (<ref>),  implements the square root staffing rule in (<ref>), and uses the variance approximation from Theorem <ref> in (<ref>)-(<ref>).

The queueing informed Square Root Staffing Policy then proposes (⌈ r N_1 + γ√(N_1)⌉, N_1^sqrt, N_1^sqrt) for the full experiment. 

Note, however, that both calculating the expressions in (<ref>)-(<ref>) requires knowing λ, τ, μ, and p. In practice, these parameters are unknown and experimenter would need to obtain estimates λ̂, τ̂, μ̂, and p̂ from the pilot study, and then use these estimates to compute (<ref>)-(<ref>). Similar to the discussion of variance estimation for the naive policy, in order to isolate the issue of scaling up M_1 and N_1, we assume that the experimenter has oracle access to the true quantities and leave the issue of estimation of queueing quantities to future work. 







 §.§ Numerical experiment setup

We consider a setting with λ = 0.4, τ = 0.35, μ = 3, p=0.1, and T=10.  We focus on a setting with λ<0.5 and τ<0.5 to capture the effect where states are “sticky”, i.e., without intervention, the user is more likely to remain in the state they were in yesterday. We then consider two scenarios for a pilot study: Scenario 1 with M_1^p = 5 and N_1^p = N_0^p = 10 and Scenario 2 with the same number of servers M_1^p=5 but more users N_1^p = N_0^p = 25. 

We suppose that the experimenter wants to run an experiment at significance level α = 0.05 and desired power β=0.80. 
We compare the power at each of the three power analysis policies: Naive Policy 1 (No M_1 Scale-up), Naive Policy 2 (Proportional M_1 Scale-up), and the Queueing Informed Square Root Staffing Policy. 
  



Using Equation (<ref>), we evaluate the statistical power of the experiment with (M_1, N_1, N_0) to detect a treatment effect at least as large as the true treatment effect θ^ss(M_1, N_1) of the experiment, where we approximate estimator mean and variance using Equations (<ref>) and (<ref>).




 §.§ Comparison of power analysis policies



Figure <ref> shows the performance of the three policies, for two difference instances of M^1_p and N_1^p. Since these initial pilot study parameters M^1_p and N_1^p are typically chosen for feasibility reasons and not optimized, a power analysis policy would ideally perform well given any instance of M^1_p and N_1^p. While the queueing informed Square Root Staffing Policy can give the desired power β for both scenarios, Naive Policy 1 (No M_1 Scale-up) does not achieve the desired power in either scenario, and Naive Policy 2 (Proportional M_1 Scale-up) achieves the desired policy but, depending on the initial pilot study conditions, may require significantly more resources than the Square Root Staffing Policy.

Under these parameters, the critical ratio is r=0.38 and Scenario 1 (with M_1^p/ N_1^p = 0.5) corresponds to the small N_1 (Quality-Driven) regime whereas Scenario 2 (with M_1^p/ N_1^p = 0.2) corresponds to  the large N_1 (Efficiency-Driven) regime. Importantly, the treatment effect is larger for M^p = 5 and N^p = 20 than it is for M^p=5 and more users N^p = 50. (See Figure <ref> for an illustration of effect size.) 

In Scenario 1 (small N^p_1 pilot), the treatment effect in the pilot study is θ^ss(5, 10) = 0.14. Naive Policy 1 (No-M_1 Scale-up) chooses (M_1,N_1, N_0)=(5, 35, 35), Naive Policy 2 (Proportional M_1 Scale-up) chooses (M_1,N_1, N_0)=(18, 35, 35), and the Square Root Staffing Policy chooses (M_1,N_1, N_0)=(16, 34, 34). We can see that Naive Policy 1 (No M_1 Scale-up) does not achieve the desired power, and actually has less power than the initial pilot experiment, due to the decreased effect size when increasing N_1 but not increasing M_1. Both the Naive Policy 2 (Proportional M_1 Scale-up) and the Square Root Staffing Policy achieve 80% power. However, the Square Root Staffing Policy is able to achieve this power with slightly fewer users and servers, which reduces costs for running the experiment.


In Scenario 2 (large N^p_1 pilot), the treatment effect in the pilot study is θ^ss(5, 25) = 0.07, which is lower than the treatment effect in Scenario 1, due to the higher user load. We observe a similar pattern where the Naive Policy 1 (No M_1 Scale-up) is underpowered but both Naive Policy 2 (Proportional M_1 Scale-up) and Square Root Staffing policies achieve 80% power.  Naive Policy 1 (No-M_1 Scale-up) chooses (M_1,N_1,N_0)=(5, 140, 140), Naive Policy 2 (Proportional M_1 Scale-up) chooses (M_1,N_1, N_0)=(28, 140, 140), and the Square Root Staffing Policy chooses (M_1,N_1,N_0)=(16,33, 33). In this setting, the Square Root Policy is able to achieve the same power as Naive Policy 2, but with 42% fewer servers and 76% fewer users, requiring far fewer resources for the same power. Both naive policies choose a large number of users because they fail to realize that the small treatment effect size in the pilot study is due to a high user load on the system. Both naive policies attempt to increase the number of users in order to detect an effect as small as the pilot study observed effect size. The Queueing Informed Square Root Staffing rule recognizes that the treatment effect can be larger if there are more servers and thus requires fewer users in the experiment to detect this effect.























    




    













§ CONCLUSION


Our study provides insights into the challenges of experimentation with capacity constrained service interventions and also illustrates how we can run better experiments (with larger power and lower costs) by incorporating knowledge of the underlying queueing structure. With service interventions, it is possible that an intervention is beneficial and has a large effect size under ideal conditions (high enough capacity relative to the number of users) but unless the capacity is carefully chosen, an experiment may be underpowered to detect the effect. 

This work serves to highlight the importance and the magnitude of such effects and provides a springboard for directions of future research. One direction is to develop the variance estimation and queue parameter estimation problems needed for both the naive and the queueing informed power analysis policies. Another direction is to study how to extrapolate from a single experiment with a given (M,N) and estimate how the experiment would have performed if a different M were used. Finally, one may want to consider heterogeneous models for users, servers, and treatment effects and also consider interventions with different priority queues, in addition to the first come first serve queue we consider here. 




informs2014

§ EXPRESSIONS FOR POWER
Hypothesis testing.

The experimenter conducts a one-sided hypothesis test at the α=.05 significance level with null hypotheses H_0:μ_r=μ_c and H_a:μ_r > μ_c. The desired power is β = 0.80.


Fix T>0 and let {r_1,...,r_N_1} and {c_1,...,c_N_0} be two sets of independent samples where r_u = 1/T·∫_t=0^T x_M_1, N_1(u,t) dt and c_u = 1/T·∫_t=0^T x_0, N_0(u,t) dt. 
Let r̅(M_1, N_1)=∑_u: Z_u=11/T·∫_t=0^T x_M, N_1(u,t) dt/N_1 and c̅(N_0)=∑_u: Z_u=01/T·∫_t=0^T x_0, N_0(u,t) dt/N_0 be the sample means from the treatment and control group, respectively. 
Note that for large enough T, both quantities r̅(M_1, N_1) and c̅(N_0) are each approximately normally distributed, as suggested by Theorem <ref>. 


For simplicity, we proceed with a normal approximation and assume that r̅(M_1, N_1) ∼ N(μ_r,σ_r^2) and c̅(N_0) ∼ N(μ_c,σ_c^2); we provide expressions for each of these quantities μ_r, μ_c, σ_r^2, σ_c^2 in the next section. We expect the main insights from our analysis to hold for the true distribution at finite T.

The test statistic under the null hypothesis is

    Z(M_1, N_1, N_0) = 
        (r̅(M_1, N_1)-c̅(N_0)) - 0/√(σ̃_r^2  (M_1, N_1)
        +
        σ̃_0^2 (N_0)
        ).

where σ̃_r^2  (M_1, N_1) and σ̃_c^2  (N_0)
denote the variance of the treatment and control group sample means, respectively. Under the null hypothesis, Z(M_1, N_1, N_0) is approximately distributed as N(0,1). 

Note that if all treatment user outcomes r_u were independent, then [r̅(M_1, N_1)-c̅(N_0)] is constant in M_1, N_1, and N_0, whereas this quantity depends on M_1 and N_1 in the setting with service interventions.



Power.
Let Φ(z) denote the CDF of the standard normal distribution. 
For a fixed minimum detectable effect , 

    P(Z > Φ^-1(   1-α) | μ_r - μ_c = ) 
       = 1 - P(Z ≤Φ^-1(1-α) | μ_r - μ_c = ),
       = 1 - P(r̅-c̅/√(σ̃_r^2  (M_1, N_1)
        +
        σ̃_0^2 (N_0))≤Φ^-1(1-α) | μ_r - μ_c = ), 
       = 1 - P(r̅-c̅ -  + /√(σ̃_r^2  (M_1, N_1)
        +
        σ̃_0^2 (N_0))≤Φ^-1(1-α) | μ_r - μ_c = ), 
       = 1 - P(r̅-c̅ - /√(σ̃_r^2  (M_1, N_1)
        +
        σ̃_0^2 (N_0))≤Φ^-1(1-α) - /√(σ̃_r^2  (M_1, N_1)
        +
        σ̃_0^2 (N_0)) | μ_r - μ_c = ), 
       ≈1-Φ(Φ^-1(1-α)-/√(σ̃_r^2  (M_1, N_1)
        +
        σ̃_0^2 (N_0)))

where the approximation in the last line comes from the CLT in Theorem <ref>, which implies that Z(M_1,N_1,N_0) is approximately normally distributed with mean θ and variance σ̃_r^2  (M_1, N_1)+σ̃_0^2 (N_0).























§ PROOFS
Proof of Theorem <ref>.
    The proof proceeds in three parts: 1) showing existence of a CLT exists for the estimator, 2) characterizing the mean of the limiting distribution, and 3) characterizing the variance of the limiting distribution.

    Step 1: Existence of a CLT. We utilize Theorem 3.1 in <cit.> on the existence of CLTs for continuous time Markov chains. This result shows for a positive recurrent CTMC X_t, with stationary distribution π, and real valued function f, a CLT holds for the sample mean S(t) = 1/t ∫_0^t f_X_sds, t≥ 0, a CLT of the form t^1/2[S(t) - π(f)]  N(0, σ^2(f) when certain conditions are satisfied for X_t and f. We apply this theorem to our setting, letting X_t be the state of our CTMC and f be the identify function, i.e., f(x) = x for any state x. 

    
    We need to check that the conditions X_t is strongly ergodic and _π[f(x)^2]<∞ hold. First note that the Markov chain is ergodic, since it is possible to transition between any two states in finite time. Further, since the state space is finite, the expected hitting time of any state is finite and so ergodicity implies strong ergodicity <cit.>. The second condition _π[f(x)^2]<∞ holds since the state space is finite. Thus a CLT exists. 

    Step 2: Characterizing the mean.
    We analyze the treatment patients and the control patients separately. We start with the treatment patients. Recall from Lemma <ref> that
    
    1/N∑_i=1^NY_M,N(u,T)/T
            = 1/NT∫_i=0^T X_M,N(t)dt.

    In other words, we can calculate the proportion of time non-verified Y_M,N(u,T), averaged across users, as the time average of the queue length, normalized by the number of patients N. By the Ergodic theorem for Markov chains <cit.>, queue length time average converges to the expected length of the queue under the steady state distribution K_M,N and so the average proportion of time that users spend verified in the treatment group converges to 1 - K_M, N_1/N_1.

    The control group consists of N_0 individuals that evolve independently. For any individual u, this individual switches between two states x(u,t)=0 and x(u,t)=1. By the Ergodic theorem, proportion of time that u spends verified on [0,T] converges to the expectation in steady state that the user is in state x(u,t)=1. Thus the proportion of time each user u spends verified converges to τ/(λ+τ), and the average across all N_0 users is the same quantity.

    
    Step 3: Characterizing the variance.
    Note that the set of treatment patients is independent from the set of control patients, so we can analyze the behavior of the two systems separately. 
    For both systems, we first characterize the variance of the time average of the queue length and then relate this variance to the variance of the estimator. 

    We start with the treatment patients. For the treatment patients, the queueing system is a birth death chain. We use the following result from <cit.>, attributed to <cit.>, for the asymptotic variance for a birth death process.





Let X(t) be a birth and death process on a subset of integers { 0, …, n} with birth and death rates λ_i and μ_i, respectively. Let Y(t) = f(X(t)) where f is a real-valued function on the state space of the BD process X(t) and let f̅ = ∑_i=0^n π_i f(i) be the steady state mean. Define the time average (sample mean)  (Y(t) = t^-1∫_0^t Y(s) ds for s>0 and define the asymptotic variance to be
σ̃^2 = lim_t→∞ t  (Y(t)).

Then

    σ̃^2 = 2 ∑_j=0^n-11/λ_j π_j[ ∑_i=1=0^j (f(i) - f̅)π_i ]^2.


Note that the average number of jobs in the queue can be written in the above formulation as f(i) = i and then we can directly use the formula in our setting. 

Let σ̃^2_M,N be the asymptotic variance of the time average queue length in a system with M servers and N users. Then

    σ̃^2_M,N = 2 ∑_j=0^N-11/(N-j) π_M,N(j)[ ∑_i=0^j (i - K̅)π_M,N(i) ]^2

where K itself is a function of π_M,N. 

Since the time average proportion of time verified for the treatment group is simply the time average of the queue length normalized by N_1, we get that the treatment group variance contribution is 

    σ̃^2 = σ̃^2(M,N_1, N_0) = 2/N_1^2∑_j=0^N_1-11/(N_1-j) π_M,N_1(j)[ ∑_i=0^j (i - K̅_M, N_1)π_M,N_1(i) ]^2.


For the control group, patients are independent from each other and so we can begin by analyzing a single patient. A single patient forms a birth death chain with only two states {0, 1}. Thus we can use Equation (<ref>) to calculate the time average of the given patient's verification proportion. For this simple two state case, the resulting expression simplifies to 

    2 λτ/(λ + τ)^3.

All control users are independent and so the average across users has variance 

    1/N_0·2 λτ/(λ + τ)^3.


Since the treatment and control groups are independent from each other, the asymptotic variance of the estimator is the sum of the respective asymptotic variance for the treatment and control groups. Thus completes the proof. 

Proof of Proposition <ref>

Note that when Equation (<ref>) holds, 

    dz/dt<0     when λ/(μ p + λ + τ)<z
    dz/dt=0     when λ/(μ p + λ + τ)=z 
    dz/dt>0     when λ/(μ p + λ + τ)>z.


Similarly, when Equation (<ref>) holds, 

    dz/dt<0     when  (λ - Mμ p)/(λ+τ)<z
    dz/dt=0     when (λ - Mμ p)/(λ+τ)=z 
    dz/dt>0     when (λ - Mμ p)/(λ+τ)>z.


Now we consider three cases, Case (i) r<M, Case (ii) r = M, and Case (iii) r>M.




We work out the steady state of the differential equation for Case (i). The other two cases can be proved similarly. 
If z<r, then Equation (<ref>) holds and dz/dt < 0. If z = r, Equation (<ref>) holds and dz/dt = 0. If z > r, then there are two cases: (a) r<z < M and (b) r < M < z. Under scenario (a) r<z < M, Equation (<ref>) holds and dz/dt - λ (1-z) - Mμ p - z τ. dz/dt < 0  z > (λ - Mμ p ) / (λ + τ). One can verify through straightforward algebra that M > r implies that r > (λ - Mμ p ) / (λ + τ). Combining this expression with the fact that z > r implies that dz/dt<0 in this case. Thus when r < M, the only steady state where dz/dt=0 is when z=r = λ / (λ + τ + μ p). 


§ ADDITIONAL RESULTS
















Proposition <ref> also implies that when the experiment is run with a different M or N_1 than the intended levels M' and N' when the intervention is scaled up, then it is possible that the estimator from the experiment θ̂^*(M, N) does not recover the treatment effect at scale-up θ^*(M'/N') and the estimator is biased. We characterize the bias in the following result. 


    Fix an experiment design with M, N_1, and N_0. Suppose that the platform wants to estimate the treatment effect θ(M', N') of the intervention with M' providers and N' patients, with M'≥ M and N' ≥ N_1. 
    The bias in the mean field estimator is given by
    
    θ̂^*(M / N_1) - θ^*(M'/ N')
            =
            
                0    if M/N ≤ r ,  M'/N'>r
                
    λ/λ + τ + μ p  - λ - (M'/N') ·μ p /λ + τ   if M/N>r ,  M'/N'<r  
                 
    λ - (M/N) ·μ p /λ + τ - λ/λ + τ + μ p   if M/N < r ,  M'/N'>r
                  
    λ - (M/N) ·μ p /λ + τ - λ - (M'/N') ·μ p /λ + τ   if M/N<r ,  M'/N'<r.


An immediate result of Proposition <ref> is that a platform that runs a study with M providers and N_1 users, obtains the estimate θ̂^*(M, N_1) and naively wishes to scale up the platform to N>N_1 users without increasing the capacity M may be overestimating the effect θ^*(M,N). 

The proof follows immediately from the mean field steady state expression in Equation (<ref>).







§ COMPARISON OF SIMULATIONS WITH APPROXIMATIONS


In Sections <ref> and <ref>, we use the asymptotic approximations for the mean and variance of the estimator θ̂(M, N_1, N_0, T) suggested by Theorem <ref>. We refer to these approximations as the CLT approximations. These approximations fix finite M, N_1, N_0 but consider the asymptotic behavior as T→∞. Additionally, in Section <ref> Proposition <ref> we use an additional large system mean field approximation in order to characterize how the effect size and estimator change with M and N. This approximation first scales up the size of the system such that M→∞ and N →∞, with M/N →M for some constant M. Then we consider the steady state of the mean field approximation as T→∞. 

These approximations are convenient, as the the finite M, N_1, N_0 approximation motivated by Theorem <ref> allows us to characterize the behavior at different M, N_1, N_0 without running computationally heavy simulations. The mean field approximation further allows us to prove the non-linearity in the decrease in the effect size in Proposition <ref> when increasing the ratio of users to providers. 

We now verify that these methods give us reasonable approximations of a system with finite M, N_1, N_0 and finite time horizon T. This boils down to confirming that the average queue length and the variance in the average queue length in simulations is similar to the quantities given by the approximations. 


We run simulations with system parameters λ=0.185, μ=7, τ=0.16, p=0.085 and time horizon T=150. We N and M across simulation instances. For each simulation instance with server and user pair (M,N), we run 500 simulation runs and compute. For each run i, we analyze the system at different time horizons T and compute the time average of the queue length on the interval [0,T], which we denote B_i(T). For each T, we then plot the sample mean and variance of B_i(T) across simulation runs i, with bootstrapped 95% confidence intervals, and compare with the mean given by the mean field limit approximation and the mean and variance given by the CLT approximation. 




Figure <ref> compares the mean of the estimator across simulation runs with (a) the mean field approximation and (b) the mean given by the CLT approximation. The simulation mean coincides with the CLT approximation mean in all instances. The simulation mean coincides with the mean field approximation mean in all instances except (M,N)=(20, 100) and (M,N)=(40, 200). We attribute this difference the behavior of queues with finite M and N. We note that the ratio M/N=0.2 in both of these instances is very close to the critical ratio of r=0.196 for this combination of λ, τ, μ, p. In the limit as M→∞ and N→∞ and M/N→M=0.2, the system is in the Quality Driven regime. However, recall that for finite M and N, the square root staffing rule suggests that M = rN + β√(N), which implies that M/N must be larger than N plus some “buffer” in order to be in the Quality Driven regime. We conjecture that the finite systems with (M,N)=(20, 100) and (M,N)=(40, 200) are still operating in the Efficiency Driven regime, thus contributing to the difference between the mean field approximation and the simulation mean. We expect that this difference decreases for larger M and N.

Figure <ref> also compares the treatment effect approximations given by the CLT and mean field limit and similarly shows that the two coincide except for small differences near the QED regime.



Figure <ref> compares the variance of the estimator value across simulation runs with the variance variance given by the CLT approximation. Note that the mean field limit is a deterministic system with no variance, and so we omit the mean field approximation from this comparison. In all instances shown, the mean of the simulation variance approaches the variance from the CLT approximation as T increases. For most instances, the 95 % confidence interval contains the CLT approximation for T≥ 20.

 Paper Title: Fast variational Bayesian inference for correlated survival data: an application to invasive mechanical ventilation duration analysis.


 

1]Chengqian Xian

1]Camila P.E. de Souza

1]Wenqing He

1,2]Felipe F. Rodrigues

2]Renfang Tian

Chengqian Xian et al


[1]Department of Statistical and Actuarial Sciences, Western University, London, Ontario, Canada

[2]School of Management, Economics, and Mathematics, King's University College at Western University, London, Ontario, Canada


Chengqian Xian, Department of Statistical and Actuarial Sciences, Western University, 1151 Richmond Street, London, Ontario, Canada, N6A 5B7. cxian3@uwo.ca



[Abstract]Correlated survival data are prevalent in various clinical settings and have been extensively discussed in literature. One of the most common types of correlated survival data is clustered survival data, where the survival times from individuals in a cluster are associated. Our study is motivated by invasive mechanical ventilation data from different intensive care units (ICUs) in Ontario, Canada, forming multiple clusters. The survival times from patients within the same ICU cluster are correlated. To address this association, we introduce a shared frailty log-logistic accelerated failure time model that accounts for intra-cluster correlation through a cluster-specific random intercept. We present a novel, fast variational Bayes (VB) algorithm for parameter inference and evaluate its performance using simulation studies varying the number of clusters and their sizes. We further compare the performance of our proposed VB algorithm with the h-likelihood method and a Markov Chain Monte Carlo (MCMC) algorithm. The proposed algorithm delivers satisfactory results and demonstrates computational efficiency over the MCMC algorithm. We apply our method to the ICU ventilation data from Ontario to investigate the ICU site random effect on ventilation duration.











Fast variational Bayesian inference for correlated survival data: an application to invasive mechanical ventilation duration analysis
    [
    August 5, 2024
=====================================================================================================================================







§ INTRODUCTION

Correlated survival data are commonplace in various research contexts and have been extensively studied in the literature <cit.>. One such context of correlated survival data is observed in clustered survival data, which are derived from multiple entities such as families or hospitals. Within each cluster, survival data exhibit correlation because of the shared environmental factors, and random effects are often introduced to capture the shared characteristics within the cluster. Conditional on the random effects (frailty), the survival times within a cluster can be assumed independent, which leads to a shared frailty model to account for cluster-level uncertainty <cit.>.

Our research is motivated by data from intensive care units (ICUs) across multiple clinical centers in Ontario, Canada. The ICU data were provided by the Critical Care Information System (CCIS) Ontario database. In Canadian ICUs, invasive mechanical ventilation is prevalent, with approximately one third of patients requiring ventilation during their ICU stay <cit.>. The duration of ventilation has significant implications for clinical outcomes and is associated with an increased risk of complications <cit.>. Analysis on the ventilation duration for ICU patients utilizing the associated risk factors, such as patient categories (e.g., medical or surgical), admission diagnoses, and patient severity, can help determine the number of beds with ventilators and therefore, support capacity planning and effective clinical resource management. The severity of patients in ICU is often assessed using the Multiple Organ Dysfunction Score (MODS) <cit.> that evaluates organ function. Kobara et al. <cit.> conducted a study on ventilation duration for ICU patients from Ontario using a survival analysis framework. In their study, patient ventilation duration is considered as a time-to-event (survival) outcome and parametric accelerated failure time (AFT) models are applied to predict the ventilation time. If a patient is transferred to another facility without subsequent follow-up information, the ventilation time is considered right censored. Kobara et al. found that the log-logistic AFT model well describes the association between risk factors and patients’ ventilation duration in Ontario ICUs. However, Kobara et al. did not consider a possible correlation of ventilation duration times among patients within the same ICU. Previous studies have indicated that patient outcomes within the same ICU site may be correlated, and ignoring this hierarchical structure can result in flawed prediction models <cit.>. 

As aforementioned, shared frailty can be used to accommodate cluster-level association among patients within the cluster. Gorfine and Zucker <cit.> recently provided a comprehensive review of shared frailty methods for complex survival data. To incorporate risk factors in survival data, the Cox proportional hazards (PH) model with a multiplicative shared frailty on the hazard rates has been widely developed <cit.>. As an alternative to the Cox PH model, AFT models offer an intuitive interpretation of covariate effects on survival time. Lambert et al. <cit.> developed shared frailty AFT models with different parametric distributions assumed for the survival time and conducted maximum likelihood estimation by integrating out the unobserved frailties. They empirically found that the choice of distribution for the shared frailty is not critical, recommending the normal distribution. Do Ha et al. <cit.> considered a shared frailty log-normal AFT model and used the hierarchical-likelihood (h-likelihood) approach to estimate the model parameters. The h-likelihood method obtains fixed effects estimates by maximizing the h-likelihood, while utilizing the restricted maximum likelihood estimate for the estimation of the variance of the shared frailty <cit.>. An R package,  <cit.> has been developed to implement the h-likelihood estimation in the shared frailty log-normal AFT model. Building on this, Park and Do Ha <cit.> introduced a penalized variable selection technique for the shared frailty log-normal AFT model. Additionally, Zhou et al. <cit.> developed a Markov chain Monte Carlo (MCMC)-based algorithm, called survregBayes, to estimate the shared frailty AFT model, and an R package,  <cit.>, is available for its implementation. To our knowledge, there is no work on variational Bayesian inference for shared frailty AFT models. 

As an alternative to MCMC methods, which are the gold standard for obtaining posterior distributions under a Bayesian framework, variational inference (VI) has gained popularity due to its favourable results and lower computational cost than MCMC. Recently, several types of VI algorithms have been developed, including mean-field VI <cit.>, stochastic VI <cit.>, and black-box VI <cit.>. A special case of mean-field VI, called mean-field variational Bayes (VB), arises when the Kullback–Leibler (KL) divergence is utilized to quantify the dissimilarity between exact and approximated posterior distributions. In addition, the approximated posterior distribution, referred to as the variational posterior, is assumed to belong to a mean-field variational family. Under the mean-field VB framework, the solutions to minimizing the KL divergence can be obtained by utilizing the coordinate ascent algorithm <cit.>. Mean-field VB has been widely applied to regression models such as the generalized additive model <cit.>, nonparametric regression with measurement error <cit.>, count response semiparametric regression <cit.>, high-dimensional linear regression <cit.>, multilevel regression modelling <cit.>, B-spline regression mixture model for functional data clustering <cit.>, basis selection for functional data representation <cit.>, among others. Applications of other types of VI can be found in a comprehensive review of VI from a statistical perspective by Blei et al. <cit.>.

In this study, we propose a shared frailty log-logistic AFT model to account for the correlation among patient ventilation durations within the ICU sites. We develop a novel and fast mean-field VB algorithm to infer the model parameters. By applying the piece-wise approximation techniques proposed by Xian et al. <cit.> to avoid intractable calculations, we obtain closed-form posterior distributions. We conduct extensive simulation studies with various numbers of clusters and cluster sizes to evaluate the performance of the proposed method, and compare the performance of our VB algorithm with the h-likelihood method <cit.> and the MCMC-based algorithm survregBayes <cit.>. Finally, we apply our methodology to investigate ventilation duration for ICU patients using the same dataset as Kobara et al. <cit.>. This study was approved by the Research Ethics Review Committee at King’s University College at Western University.

The remainder of the paper is organized as follows. Section <ref> presents the log-logistic AFT model with a shared frailty under the Bayesian framework. We introduce our proposed VB algorithm in Section <ref>. In Section <ref>, simulation studies are conducted to evaluate the performance of our VB algorithm. Section <ref> illustrates the application of the proposed method to the ICU ventilation duration data. A discussion is provided in Section <ref>.



§ BAYESIAN LOG-LOGISTIC AFT MODEL WITH A SHARED FRAILTY

Let T_ij and C_ij be the survival and censoring times, respectively, of the j^th subject from the i^th group (i.e., cluster) in a sample, i=1, ..., K and j=1, ..., n_i. Let t_ij=min(T_ij, C_ij) and δ_ij=1(T_ij≤ C_ij) be the subject's observed time and the indicator for right censoring, respectively. We consider a log-logistic AFT model with shared frailty (a random intercept) specified as follows:

    log(T_ij)=γ_i + X_ij^T β + bϵ_ij

where X_ij is a column vector with length p, p ≥ 2, containing p-1 fixed effects (covariates) and a constant one to incorporate the constant intercept (i.e., X_ij = (1, x_ij1, ..., x_ij(p-1))^T), β is the corresponding vector of coefficients for the fixed effects, where γ_i is a random intercept for the i^th cluster and ϵ_ij is a random variable following a standard logistic distribution, and b is a scale parameter. We further assume that γ_i iid∼ N(0, σ^2_γ) representing the discrepancy between clusters with iid denoting identically and independent distributed. The survival time T_ij and censoring time C_ij are assumed independent given the covariates X_ij. Our model follows a structure similar to one presented by Robison (1991) <cit.> and Nolan et al. <cit.> for a Gaussian linear mixed effect model. 







In our proposed Model (<ref>), we incorporate the unknown and unobserved shared risk through cluster-specific random intercepts and estimate the model parameters, β, b, and σ^2_γ using a Bayesian framework by further assuming the following independent marginal prior distributions:



    
  * β∼ N_p(μ_0, σ_0^2 I_p× p)  with precision  v_0=1/σ_0^2 and I_p × p being a p × p identity matrix
    
  * b ∼Inverse-Gamma (α_0, ω_0)
    
  * γ_i |σ_γ^2 iid∼ N(0, σ^2_γ), i=1,..., K
    
  * σ_γ^2∼Inverse-Gamma (λ_0, η_0)

where μ_0, v_0, α_0, ω_0, λ_0 and η_0 are known hyperparameters (parameters of the prior distributions).









































§ VARIATIONAL BAYES ALGORITHM

In what follows, we outline our methodology for deriving a mean-field VB algorithm for Model (<ref>). We summarize the resulted VB algorithm in Algorithm <ref>.


Given the observed data D:={(t_ij, δ_ij,  X_ij), i=1, ..., K, j=1,..., n_i}, we denote the complete data log-likelihood by log p(D, β, γ, b, σ^2_γ), where γ=(γ_1, ..., γ_K). Our objective is to derive a VB algorithm to approximate the exact posterior joint distribution of β, b, γ and σ^2_γ given the data D by maximizing the evidence lower bound (ELBO) defined as 

    ELBO(q)=_q[log p(D, β, γ, b, σ^2_γ)]-_q[log q(β, b, γ, σ^2_γ)]

where q(β, b, γ, σ^2_γ) is the approximated posterior joint distribution, which is also called the variational density, and the expectation is taken with respect to the variational density <cit.>. We consider the mean-field variational family which assumes that q(β, b, γ, σ^2_γ)=q(β)  q(b)  q(σ^2_γ) ∏_i=1^K q(γ_i), and apply the coordinate ascent variational inference (CAVI) algorithm <cit.> to obtain each variational component (e.g., q(β)) in q(β, b, γ, σ^2_γ)). Under our Model (<ref>), the complete data log-likelihood log p(D, β, γ, b, σ^2_γ) can be obtained by 

    log p(D, β, γ, b, σ^2_γ)=log p(D | β, γ, b)+log p(β)+log p(b) + ∑_i=1^K log p(γ_i |σ^2_γ) + log p(σ^2_γ)

where 

    log p(D | β, γ, b) = -δlog b +∑_i=1^K∑_j=1^n_i[δ_ijy_ij-X_ij^Tβ-γ_i/b -(1+δ_ij)log{1+exp(y_ij-X_ij^T β-γ_i/b)}]

with δ=∑_i=1^K∑_j=1^n_iδ_ij being the number of observed uncensored times and y_ij=log(t_ij), i=1, ..., K, j= 1, ..., n_i, being the log observed survival time.

By maximizing the ELBO, the following solutions are provided by the CAVI algorithm:

    log q^*(β) _-β[log p(D | β, γ, b)+log p(β)]


    log q^*(γ_i) _-γ_i[log p(D | β, γ, b)+∑_i=1^K log p(γ_i |σ^2_γ)]


    log q^*(b) _-b[log p(D | β, γ, b)+log p(b)]


    log q^*(σ^2_γ) _-σ^2_γ[∑_i=1^K log p(γ_i |σ^2_γ)+log p(σ^2_γ)]

where we use  to denote equality up to a constant additive factor for convenience, and -β indicates the expectation is taken with respect to the variational density of other latent variables but β, same for other solutions. To achieve conjugacy and tractable expectation calculation of log p(D | β, γ, b) as specified in (<ref>), we apply the proposed method by Xian et al. <cit.>, piecewise approximations of the function, f(x) = log(1+exp(x)), x ∈ (-∞, ∞), embedded in deriving the update equations for each parameter. As in Nolan et al. <cit.> and Lee and Wand <cit.>, we are also interested in the posterior distribution of the random effects, q^*(γ_i), i=1,...,K, in our proposed VB framework.



 §.§ Update equation for each variational density

The update equations to obtain the optimal variational densities of β, γ_i, b and σ^2_γ denoted by q^*(β), q^*(γ_i), q^*(b) and q^*(σ^2_γ), respectively, which are the corresponding approximated posterior distributions, are presented as follows within the paper while their derivations are given in the Appendix A. The calculation of expectations in the update equations are given in Section <ref>. In the update equations, φ_ij, ζ_ij, and ρ_ij represent the piece-wise approximation coefficients proposed by Xian et al. <cit.> for the j^th subject in the i^th cluster. Detailed information regarding these coefficients is also provided in the Appendix A. 

(1) Update equation for q^*(β)


q^*(β) is an N_p(μ^*, Σ^*) where

    Σ^*= [v_0I_p × p+2_q(b)(1/b^2) ∑_i=1^K∑_j=1^n_i(1+δ_ij)ζ_ijX_ijX_ij^T]^-1

and 

    μ^*=[{v_0 μ_0^T + ∑_i=1^K∑_j=1^n_i( (_q(b)(1/b)(-δ_ij+(1+δ_ij)ρ_ij) +2_q(b)(1/b^2) (1+δ_ij)ζ_ij(y_ij-_q(γ_i)(γ_i)) )X_ij^T)} Σ^*]^T.


(2) Update equation for q^*(γ_i)


q^*(γ_i) is an N_l(τ_i^*, σ_i^2*) where

    τ^*_i=σ^2*_i∑_j=1^n_i[_q(b)(1/b)(-δ_ij+(1+δ_ij)ρ_ij) +2_q(b)(1/b^2)(1+δ_ij)ζ_ij(y_ij-X_ij^T_q(β)β)]

and 

    σ^2*_i= [_q(σ^2_γ)(1/σ^2_γ)+2_q(b)(1/b^2)∑_j=1^n_i(1+δ_ij)ζ_ij]^-1.


(3) Update equation for q^*(b)


q^*(b) is an Inverse-Gamma (α^*, ω^*) where
α^* = α_0 + δ and

    ω^* = ω_0-∑_i=1^K∑_j=1^n_i(δ_ij-(1+δ_ij)φ_ij)(y_ij-X_ij^T_q(β)(β)-_q(γ_i)γ_i).


(4) Update equation for q^*(σ^2_γ)


q^*(σ^2_γ) is an Inverse-Gamma (λ^*, η^*) where λ^*=λ_0 + K/2 and

    η^* = η_0 + 1/2∑_i=1^K_q(γ_i)γ_i^2.



 §.§ ELBO calculation

The ELBO under Model (<ref>) is defined in (<ref>) with the complete-data log-likelihood calculated by (<ref>) and note that q(β, b, γ, σ^2_γ)=q(β)  q(b)  q(σ^2_γ) ∏_i=1^K q(γ_i). Let

    diff_β=_q[log p(β)]-_q[log q(β)]


    diff_γ=_q[∑_i=1^K log p(γ_i |σ^2_γ)]-_q[∑_i=1^K log q(γ_i)]


    diff_b=_q[log p(b)]-_q[log q(b)]


    diff_σ^2_γ=_q[log p(σ^2_γ)]-_q[log q(σ^2_γ)]

Then we can calculate the ELBO as follows with proof details provided in the Appendix B.

    ELBO(q)=_q[log p(D | β, γ, b)]+diff_β+diff_γ+diff_b+diff_σ^2_γ

where 

    _q[log p(D | β, γ, b)] -δ _q(b)(log b)+ _q(b)(1/b) ∑_i=1^K∑_j=1^n_i(δ_ij-(1+δ_ij)φ_ij)(y_ij-X_ij^T_q(β)(β)-_q(γ_i)γ_i)


    diff_β -1/2v_0[trace(Σ^*)+(μ^*-μ_0)^T(μ^*-μ_0)] + 1/2log (|Σ^*|),


    diff_γ-K/2_q(σ^2_γ)(logσ^2_γ)-1/2_q(σ^2_γ)(1/σ^2_γ)∑_i=1^K _q(γ_i)(γ_i^2) -1/2∑_i=1^K(logσ_i^2*),


    diff_b (α^*-α_0)_q(b)(log b) + (ω^*-ω_0)_q(b)(1/b) - α^*logω^*, and


    diff_σ^2_γ (λ^*-λ_0)_q(σ^2_γ)(logσ^2_γ) + (η^*-η_0)_q(σ^2_γ)(1/σ^2_γ) - λ^*logη^*


We now present the calculation of the expectations in the update equations and the ELBO calculation. All the expectations are taken with respect to the approximated variational distributions. Since q^*(b) is an Inverse-Gamma(α^*, ω^*), we have

    _q(b)(1/b)=α^*/ω^*,


    _q(b)( 1/b^2) = _q(b)[( 1/b)^2 ] =Var_q(b)[(1/b)]+[_q(b)(1/b)]^2 = α^*/ω^*2+α^*2/ω^*2= α^*+α^*2/ω^*2,  and


    _q(b)(log b)=log(ω^*)-ψ(α^*),

where ψ is the digamma function defined as ψ(x)=d/dxlogΓ(x).

Similarly, 

    _q(σ^2_γ)(1/σ^2_γ)=λ^*/η^*  and  _q(σ^2_γ)(logσ^2_γ)=log(η^*)-ψ(λ^*).























§ SIMULATION STUDY



 §.§ Design of simulation

We conduct a simulation study to evaluate the performance of our proposed VB algorithms across different scenarios by varying the number of clusters and the number of observations within each cluster.

We generate the log of survival time for the j^th subject in the i^th cluster, log(T_ij), i = 1, ..., K and j = 1, ..., n_i as follows:

    log T_ij=0.5+β_1 x_ij1+ β_2 x_ij2 +γ_i +bϵ_ij,

where x_ij1, x_ij2, and ϵ_ij are mutually independently generated with x_ij1∼ N(1, 0.2^2), x_ij2∼Bernoulli(0.5) and ϵ_ij∼logistic(0,1). The values of β_1, β_2 and b are chosen as 0.2, 0.8 and 0.8, respectively. The random intercept for the i^th cluster, γ_i, is generated from N(0, σ_γ^2) with σ_γ^2=1. The censoring time for the j^th subject in the i^th cluster, C_ij, is generated from a uniform distribution, uniform(0, d), where d is a positive value controlling the percentage of censoring. Then t_ij = min(T_ij, C_ij) and δ_ij = 1(T_ij≤ C_ij). Take d = 48 to achieve a 15% censoring rate in our simulations. Investigation of the effect of censoring rates can be found in Xian et al. <cit.> where they show that as the censoring rate increases, an increase in mean squared error (MSE) of estimating parameters in an AFT model using a VB algorithm was observed.

We explore various scenarios by varying the number of clusters, K, and the number of observations within each cluster, n_i=n for all i=1, ..., K. Across the experiments, we consider K values from the set {15, 30, 50, 80} and n values from {5, 15, 30, 50}, resulting in a total of 16 unique scenarios. Our objective is to assess the estimation performance of the VB algorithm concerning the variations in K and n. We consider a prior setting with μ_0 = (0, 0, 0)^T, v_0=0.1, α_0=λ_0=3, and ω_0=η_0=2, which indicates no strong prior information on the parameters. The ELBO convergence threshold is set as 0.01 which is the default recommendation <cit.>, and the maximum number of iterations is 100.

We conduct N = 500 runs (replicates) in each considered scenario and apply our proposed VB algorithm to derive the approximated posterior distribution of each parameter to each run. The mean of each approximated posterior distribution is used as the parameter estimate for the corresponding parameter. The empirical bias and sample standard deviation (SD) as well as the empirical MSE for each estimate are obtained, where

    MSE=∑_i=1^N (θ_0 -θ̂_i)^2/N

and θ̂_i is the estimate of parameter θ in the i^th replicate, and θ_0 is the true value. In addition, for each parameter of interest, we report the empirical 95% coverage rate (CR) calculated as 

    CR=∑_i=1^N I_i/N

where I is the indicator variable which takes 1 if the true parameter value θ_0 falls into the 95% credible interval.



 §.§ Simulation results

The empirical bias, sample SD, empirical MSE and empirical CR of estimating β_1, β_2, b, and σ_γ^2 from 500 replicates are summarized in Table <ref>. Considering β_1, β_2, and b, we observe that when the number of clusters K is fixed, increasing the cluster size n from 5 to 50 does not always significantly affect the empirical bias. However, there is a noticeable decrease in the sample SD, leading to a pronounced reduction in the empirical MSE. A similar trend is observed when the cluster size is fixed while increasing K. Figure <ref> visually illustrates this asymptotic property through boxplots. Our primary focus lies in understanding the impact of K and n on estimating the variance of the random intercept, denoted as σ_γ^2. In most of the scenarios, when the number of clusters K is fixed, we observe that the bias of estimating σ_γ^2 decreases as the cluster size increases, while the sample SD remains relatively stable. However, when K is increased, both the empirical bias and the sample SD decrease noticeably, except for the case when n=30 as K grows from 15 to 30. Particularly noteworthy is the scenario with K = 80 and n = 50, where we achieve a less biased and less variable estimation of the variance of the random intercept. In addition, the empirical CRs corresponding to a 95% credible interval for each parameter across all scenarios are close to the nominal level of 95%, with a mean of 94.1% and a standard deviation of 0.014. Furthermore, based on a nominal level of 95% with 500 replicates, the coverage with two standard deviations is 95%± 2SD = [93.1%, 97.0%] since SD=√(0.95 × 0.05 / 500)≈ 0.0097. We observe that the majority of our empirical CRs are within the range of [93.1%, 97.0%].

The left part of Figure <ref> presents the computational run time of 500 replicates in minutes against the number of clusters (K) with different colors for different cluster sizes n. Fixing K, as n increases, the used time increases. The scatter plot in the right of Figure <ref> shows the run time against the sample size (K × n). As anticipated, the computational cost rises with increasing sample size.



Furthermore, among those considered 16 scenarios, we select three scenarios (K = 30 with n =5, K = 50 with n =15, and K = 80 with n =30) and conduct a comparative analysis of estimation results obtained from the proposed VB algorithm with those from two alternative methods which we introduced in Section <ref>: the h-likelihood method proposed by Do Ha et al. <cit.> and the MCMC-based survregbayes developed by Zhou et al. <cit.>. Summaries from the MCMC-based survregbayes algorithm are derived from one Markov chain, subsampled every 5 iterates to achieve a final chain size of 2,000 after a burn-in period of 5,000 iterates <cit.>. We further refer to our VB method and the h-likelihood method as survregVBfrailty and survregHL, respectively. Numerical estimation results are presented in Table <ref>, where we focus on the comparison of estimation for β_1, β_2 and σ_γ^2 since the MCMC-based survregbayes does not directly return the estimate for b. In the scenario with K=30 and n=5, the proposed survregVBfrailty exhibits a larger empirical bias compared to both the survregHL and survregbayes methods. However, as K and n increase, the discrepancy in empirical bias among the three methods becomes negligible. In terms of the sample SD, on average, across the three parameters β_1, β_2, and σ_γ^2, survregVBfrailty yields a 16.5% smaller sample SD when K=30 and n=5, a 7.6% smaller sample SD when K=50 and n=15, and a 3.7% smaller sample SD when K=80 and n=30, compared to survregHL. Compared with the survregBayes algorithm, we observe a decrease in sample SD of 7.8% in the K=30, n=5 scenario, mainly due to β_1, and only 2.0% in the K=50, n=15 scenario. However, in the scenario with K=80, n=30, no average difference in sample SD is observed between VB and MCMC. Therefore, the survregVBfrailty algorithm generally yields a smaller SD, resulting in a lower MSE compared to the other two methods in most cases. On average, across the three parameters β_1, β_2, and σ_γ^2, survregVBfrailty achieves a 27.2% lower MSE when K=30, n=5, a 12.0% lower MSE when K=50, n=15, and a 13.4% lower MSE when K=80, n=30, compared to survregHL. Compared with survregBayes, we observe a reduction in MSE of 12.4% in the K=30, n=5 scenario, mainly because of β_1, and only 3.0% in the K=50, n=15 scenario. However, in the scenario with K=80, n=30, no difference in MSE is observed between VB and MCMC. In addition, we compare the posterior densities for β_1, β_2, and σ_γ^2 obtained from both survregVBfrailty and the MCMC-based survregBayes using a simulated dataset with K=50 and n=15. These densities present a strong consistency between the VB and MCMC algorithms as illustrated in Figure <ref>, which is also reflected in the results presented in Table <ref>. 








To assess the computational efficiency of the proposed VB algorithm, we compare the run times in minutes for 500 replicates in these three scenario across survregVBfrailty, survregHL, and survregbayes methods and present the results in Table <ref>. In Table <ref>, we observe that in the scenario with a small sample size (K=30 and n=5), there is minimal difference in the run times between the VB and h-likelihood methods. However, as both K and n increase, the h-likelihood method requires progressively longer computation times to obtain estimates. Particularly in the scenario with K = 80 and n=30, the computational time is over 10 times longer than that required by the VB algorithm. Comparatively, the VB algorithm demonstrates significantly higher computational efficiency when contrasted with the MCMC-based survregbayes algorithm. Notably, in the scenario with K = 80 and n=30, the survregVBfrailty algorithm runs approximately 150 times faster than the survregbayes algorithm. All algorithms were implemented within R version 4.3.2 and simulations were conducted on a computer operating the Mac OS X platform, equipped with a 4.05 GHz CPU and 8 GB RAM.
















§ APPLICATION TO VENTILATION DURATION ANALYSIS

In this section, we apply the shared frailty log-logistic AFT model with the proposed VB algorithm to the ICU data as we descried in the Introduction section and conduct a retrospective study on the ventilation duration time. We aim to investigate the ICU site-specific random effect on patient's ventilation duration. We extend the work by Kobara et al. <cit.> by incorporating the uncertainty from the ICU sites via a group-specific random intercept under a Bayesian analysis framework. 



The CCIS ICU data were collected between July 2015 and December 2016 and contained 49,467 patients receiving invasive mechanical ventilation upon arrival to ICU. About 3% of these patients were discharged/transferred to a Complex Continuing Care Facility, other hospitals, the Level 3 Unit, and Outside the ICU while still on a ventilator, and therefore, their ventilation time were considered as right-censored data <cit.>. The data were from 66 ICU sites (centers) and each site has a unique site code, for example, 3970. In the CCIS dataset, the average number of ventilated patients per ICU site over the study period of about 1.5 years is 749.5. We consider the significant covariates investigated by Kobara et al. <cit.> as fixed effects which are admission source (e.g., from operation rooms), admission diagnosis, patient type (medical or surgical), scheduled admission (yes or no), scheduled surgery (yes or no), referring physician specialty, other interventions (yes or no), central venous line (CVL, yes or no), arterial line (AL, yes or no), intra-cranial pressure monitor (IPM, yes or no), extracorporeal membrane oxygen (EMO, yes or no), intra-aortic balloon pump (IABP, yes or no), age group (18-39, 40-80 or above 80 years of age), pre-LOS (no more than 1 day, between 2 and 7 days, or no less than 7 days), and the MODS score (none with MODS ≤ 1, minimal with 1-4 scores, mild with 4-8 scores, moderate with 8-12 scores or, severe with scores > 12). 

To apply our proposed VB algorithm in real data analysis, we consider the same weak prior setting in our simulation study described in Section 4: μ_0 = 0, v_0=0.1, α_0=λ_0=3, and ω_0=η_0=2. Table <ref> displays the estimated regression coefficients from the fitted shared frailty log-logistic AFT model. For comparative analysis, we also employed the h-likelihood method survregHL and the MCMC-based survregbayes to model the data incorporating shared frailty. In the absence of shared frailty, we used the likelihood-based survreg from the  package in R, and the VB method survregVB proposed by Xian et al. <cit.>. Furthermore, for the Bayesian methods (survregVBfrailty, survregVB, and survregbayes), we report the 95% credible intervals, whereas for the likelihood-based methods, we provide the 95% confidence intervals. In Table <ref>, we first observe that there is no significant difference in the estimated regression coefficients between survregVBfrailty and survregbayes. However, some of the estimated coefficients from survregHL, such as scheduled surgery, CVL, AL, IPM and EMO, are different from those based on survregVBfrailty and survregbayes, which is further discussed in Section <ref>. In comparison to the models with frailty, the survregVB and survreg methods, which do not account for frailty, exhibit some differences in estimating certain coefficients. However, they maintain a strong overall consistency in estimating the regression coefficients with the results from the frailty models. This consistency is expected, as the inclusion of frailty does not affect the fixed effects, implying that the regression lines from models with or without frailty should be parallel. To illustrate the difference in interval estimation between models with and without frailty, we calculated the mean overlap percentage of the two 95% credible intervals from VB with or without frailty. Using the 95% credible intervals from VB without frailty (survregVB) as references, we found a 77.3% overlap on average. This means that if we fit a model using VB without considering the ICU site as a shared frailty, about 77% of the credible interval will fall within the corresponding credible interval obtained from the model that includes the shared frailty.

In what follows, we summarize the fixed effects on ventilation duration based on estimates from our proposed VB algorithm, survregVBfrailty. Regarding the admission source, patients arriving from the emergency department (ED), operating room (OR), or ward have ventilation times that are (1 - exp(-0.134))100%=12.54% shorter (credible interval (CI): [9.24%, 12.72%]), 27.89% shorter (CI: [25.62%, 30.02%]), and 13.06% shorter (CI: [9.70%, 16.31%]), respectively, compared to patients admitted from a downstream unit (baseline). Conversely, patients admitted from home or another hospital have ventilation durations that are 10.63% (CI: [-10.40%, 23.49%]) and 10.30% (CI: [7.04%, 13.54%]) longer, respectively. Since the CI for patients admitted from home includes zero, we conclude that admission from home is not a statistically significant factor. Additionally, patients from other sources, such as from outside the province, have ventilation durations that are 12.98% longer (CI: [5.13%, 21.29%]).

Compared to cardiovascular patients, those with gastrointestinal, neurological, and trauma diagnoses experience significantly longer ventilation times. Specifically, ventilation duration increases by 29.69% (CI: [25.36%, 34.18%]) for gastrointestinal patients, 33.11% (CI: [29.05%, 37.44%]) for neurological patients, and 77.71% (CI: [69.72%, 86.08%]) for trauma patients. Patient categories (surgical or medical) do not show significant differences in ventilation time. However, scheduled ICU admissions or surgeries are important factors. Patients with a scheduled ICU admission have a 24.95% longer ventilation time (CI: [21.89%, 27.82%]), while those with a scheduled surgery have a 13.32% shorter ventilation time (CI: [9.70%, 16.81%]) compared to patients without scheduled admissions or surgeries. The referral physician service is also a significant risk factor. Compared with medical referrals, surgical referrals result in a 5.82% shorter ventilation time (CI: [8.97%, 2.57%]), while respirology referrals result in a 16.77% longer ventilation time (CI: [11.29%, 22.51%]).

Specific treatment interventions upon ICU arrival significantly impact ventilation duration. Patients receiving a CVL, AL, IPM, EMO, or IABP have increased ventilation times by 20.20% (CI: [17.82%, 22.51%]), 21.90% (CI: [19.36%, 24.48%]), 70.40% (CI: [60.16%, 81.48%]), 148.93% (CI: [127.50%, 172.10%]), and 40.92% (CI: [32.45%, 49.78%]), respectively. Age is also a significant factor. Compared to patients aged 18 to 39, those aged 40 to 80 and those over 80 have longer ventilation periods, increasing by 14.22% (CI: [11.29%, 17.23%]) and 7.79% (CI: [4.50%, 11.18%]), respectively. 

Both pre-ICU LOS and patients' severity scores, as measured by MODS, are significant risk factors for longer ventilation duration. Longer pre-ICU LOS correlates with longer ventilation times. Patients with a pre-ICU LOS of 2-7 days or ≥ 7 days experience increases in ventilation duration by 3.87% (CI: [1.71%, 6.08%]) and 12.98% (CI: [10.52%, 15.60%]), respectively, compared to those with ≤ 1 day pre-ICU LOS. Compared to patients with a MODS score ≤ 1, those with minimal (1-4), mild (4-8), moderate (8-12), or severe (>12) MODS scores experience increases in ventilation duration by 10.63% (CI: [7.90%, 13.54%]), 23.49% (CI: [20.56%, 26.49%]), 30.34% (CI: [26.49%, 34.31%]), and 14.22% (CI: [7.47%, 21.53%]), respectively.

We now turn to the analysis of variance in terms of the variations from individual patients and from ICU sites. Using the mean of the posterior distribution for σ^2_γ, the estimated variance (σ^2_γ) for the shared ICU site effect from survregVBfrailty is 0.1, with a square root of 0.316, which indicates that the average spread of the ventilation time among ICU sites is exp(0.316), or 1.372. The estimated scale parameter b is 0.444, resulting in an estimated variance of the logarithms of individual patient ventilation times of 0.444^2 ×π^2/3, or 0.649, where π^2/3 is the variance of a standard log-logistic distribution. To measure the strength of the correlation between patients within the same ICU site, the intra-class correlation coefficient between the logarithms of ventilation time can be estimated by 0.1 / (0.1 + 0.649) ≈ 0.134.

In the left of Figure <ref>, we observe a strong consistency in estimating the variance of the ICU-site specific random effect between survregVBfrailty and the MCMC-based survregbayes. We further visualize the estimated ICU-site random effects with the 95% credible intervals based on their posterior distributions obtained from survregVBfrailty, as shown in the right of Figure <ref>, where the random effects are ranked from smallest to largest. Wider credible intervals correspond to ICUs with larger numbers of patients. As discussed in Lambert et al. <cit.>, if the intervals overlap, there are no significant center random effects. We observe that some of the intervals do not overlap, indicating that these ICU sites perform differently in terms of patient ventilation duration.

For reference on computational efficiency, the run times in minutes for each method are as follows: survregVBfrailty took 1.45 minutes, h-likelihood took 106.18 minutes, MCMC-based survregbayes took 267.04 minutes, survreg took 0.02 minutes, and survregVB took 0.13 minutes.   







§ DISCUSSION
 
In this paper, we have proposed a fast variational Bayesian algorithm, called survregVBfrailty, for statistical inference using a shared frailty log-logistic AFT model, which can be applied to analyze clustered survival data. We demonstrated that our proposed survregVBfrailty algorithm achieves satisfactory estimation performance through simulation studies under various scenarios with different numbers of clusters and cluster sizes. A strong consistency in the estimated posterior distributions was observed between VB and MCMC methods in both the simulation study and the application to ICU ventilation data. Moreover, the survregVBfrailty algorithm is significantly more computationally efficient, running over 150 times faster than the MCMC-based survregbayes algorithm.

The h-likelihood method proposed by Do Ha et al. <cit.> for analyzing clustered survival data in a log-normal AFT model has been shown to be robust against violations of the normality assumption (e.g., extreme value distribution) for the logarithm of survival time. In our simulation study, we investigated the performance of the h-likelihood method when the survival data, given the covariates in a specific cluster, follow a log-logistic distribution. We compared its estimation results to those obtained using VB and MCMC algorithms. We found that the h-likelihood method, survregHL, results in higher mean squared errors (MSEs) compared to VB and MCMC algorithms. Specifically, survregHL produced a 49.1% higher MSE than VB and a 41.2% higher MSE than MCMC for estimating the variance of the random intercept in our simulation study. Additionally, in our application to ICU ventilation duration analysis, we observed significant differences in some regression coefficients between h-likelihood and VB or MCMC methods. Therefore, our proposed shared frailty log-logistic AFT model using variational Bayes can be viewed as a better approach to the shared frailty log-normal AFT model using h-likelihood.

Our application of the proposed method to the CCIS ICU data for ventilation duration analysis reveals a moderate correlation of 0.134 among patients within the same ICU site. By incorporating the ICU site-specific random effect as an unknown shared frailty, we further validate the significant risk factors including the patient severity score MODS identified in the study by Kobara et al. <cit.> based on the 95% credible intervals obtained from the posterior distributions of each regression coefficient. We observe a similar trend regarding the effect of MODS on ventilation duration as reported by Kobara et al. <cit.>. Specifically, when MODS reaches a severe level, the increase in ventilation duration becomes less pronounced. This may be due to patient mortality, which warrants further investigation in future studies. We demonstrate that different ICU sites have varying effects on patient ventilation duration, as observed through differences in the estimated ICU site-specific random effects. Our research provides valuable insights and practical implications for clinical practice and resource management. Specifically, ICUs with smaller estimated random intercepts tend to have shorter overall ventilation durations compared to other ICUs. Understanding the patient characteristics and ventilation practices within these ICUs may help improve clinical performance. For ICUs with larger estimated random intercepts, equipping more ventilators could enhance the overall efficiency of the ICU ventilation procedures.



We present several open problems and directions for future work related to our proposed methodology. As discussed, we assume that the survival time from a specific cluster follows a log-logistic distribution. The robustness of the proposed shared frailty log-logistic AFT model to other distributions remains unknown and warrants further study and comparison with the shared frailty log-normal AFT model. Additionally, extending the current VB algorithm to accommodate other survival distributions, such as the Weibull distribution, could be an interesting avenue of research. In our current framework, we account for cluster-level uncertainty using a random intercept. This approach could be extended to a more general model that includes cluster-level covariates (e.g., the ICU type, general or specialized), resulting in a mixed-effects model. Such a general model can be used to better assess differences in performance across ICU sites regarding the duration of invasive mechanical ventilation. Another potential area for development is the integration of variable selection techniques within the VB algorithm, see Park and Do Ha <cit.> as a reference.



§ ACKNOWLEDGEMENTS

This research is supported by the Natural Sciences and Engineering Research Council of Canada (NSERC). We extend our gratitude to Dr. Yawo M. Kobara for facilitating access to the CCIS data set used in our real data analysis.



§ DATA AVAILABILITY STATEMENT

The ICU data analyzed in Section <ref> were from Critical Care Information System (CCIS) Ontario database. Under the authors' data use agreement, they are unable to share the files directly.


§ ORCID

Chengqian Xian: <https://orcid.org/0000-0002-6855-3221>

Camila P.E. de Souza: <https://orcid.org/0000-0002-4465-5792>

Wenqing He: <https://orcid.org/0000-0002-8913-9273>

Felipe F. Rodrigues: <https://orcid.org/0000-0001-9370-5998>

Renfang Tian: <https://orcid.org/0000-0001-8176-2469>

















§ APPENDIX A. UPDATE EQUATIONS

(1) Update equation for q^*(β)

    log q^*(β) _-β[log p(D | β, γ, b)]+_-β[log p(β)]

where

    _-β[log p(D | β, γ, b)] 
       =   _-β[-δlog b +∑_i=1^K∑_j=1^n_i{δ_ijy_ij-X_ij^Tβ-γ_i/b -(1+δ_ij)log{1+exp(y_ij-X_ij^T β-γ_i/b)}}]

with δ=∑_i=1^K∑_j=1^n_iδ_ij being the number of observed survival times, and

    _-β[log p(β)]        p/2log v_0-1/2v_0(β-μ_0)^T(β-μ_0)
           -1/2v_0 [β^Tβ-2μ_0^Tβ] = v_0 μ_0^Tβ -1/2v_0β^Tβ

In Equation (<ref>), we use the quadratic piece-wise approximation proposed by Xian et al to approximate 1+exp(y_ij-X_ij^T β-γ_i/b):

    1+exp(y_ij-X_ij^T β-γ_i/b)
    ≈ρ_ijy_ij-X_ij^T β-γ_i/b + ζ_ij(y_ij-X_ij^T β-γ_i/b)^2

where ρ_ij:=0^ν_ij1× 0.1696^ν_ij2× 0.5^ν_ij3× 0.8303^ν_ij4× 1^1-∑_k=1^4ν_ijk and ζ_ij:=0^ν_ij1× 0.0189^ν_ij2× 0.1138^ν_ij3× 0.0190^ν_ij4× 0^1-∑_k=1^4ν_ijk with
ν_ij1=1(y_ij-X_ij^Tβ-γ_i/b≤ -5), ν_ij2=1(-5 < y_ij-X_ij^Tβ-γ_i/b≤ -1.7), ν_ij3=1(-1.7 <y_ij-X_ij^Tβ-γ_i/b≤ 1.7), and 
ν_ij4=1(1.7 <y_ij-X_ij^Tβ-γ_i/b≤ 5).
Then, we obtain,

    log q^*(β)       [v_0 μ_0^T + (∑_i=1^K∑_j=1^n_i(_q(b)(1/b)(-δ_ij+(1+δ_ij)ρ_ij) +2_q(b)(1/b^2) (1+δ_ij)ζ_ij(y_ij-_q(γ_i)(γ_i)) )X_ij^T)] β
           -1/2β^T(v_0I+2_q(b)(1/b^2) ∑_i=1^K∑_j=1^n_i(1+δ_ij)ζ_ijX_ijX_ij^T) β

Let 

    Σ^*:= [v_0I+2_q(b)(1/b^2) ∑_i=1^K∑_j=1^n_i(1+δ_ij)ζ_ijX_ijX_ij^T]^-1

and 

    μ^*:=[{v_0 μ_0^T + ∑_i=1^K∑_j=1^n_i(_q(b)(1/b)(-δ_ij+(1+δ_ij)ρ_ij) +2_q(b)(1/b^2) (1+δ_ij)ζ_ij(y_ij-_q(γ_i)(γ_i)) )X_ij^T} Σ^*]^T

Then, q^*(β) is N_p(μ^*, Σ^*). 


(2) Update equation for q^*(γ_i)

    log q^*(γ_i) _-γ_i[log p(D | β, γ, b)]+_-γ_i[∑_i=1^K log p(γ_i |σ^2_γ)]

where

    _-γ_i[log p(D | β, γ, b)]  
          _-γ_i[∑_j=1^n_i{δ_ijy_ij-X_ij^Tβ-γ_i/b -(1+δ_ij)log(1+exp(y_ij-X_ij^T β-γ_i/b))}]

and 

    _-γ_i[∑_i=1^K log p(γ_i |σ^2_γ)]  -1/2γ_i^2_q(σ^2_γ)(1/σ^2_γ)

We again apply the quadratic approximation in (<ref>) to (<ref>), and obtain 

    log q^*(γ_i)       γ_i (∑_j=1^n_i[_q(b)(1/b)(-δ_ij+(1+δ_ij)ρ_ij) +2_q(b)(1/b^2)(1+δ_ij)ζ_ij(y_ij-X_ij^T_q(β)β)])
    
           -1/2γ_i^2(_q(σ^2_γ)(1/σ^2_γ)+2_q(b)(1/b^2)∑_j=1^n_i(1+δ_ij)ζ_ij)

Let 

    σ^2*_i= [_q(σ^2_γ)(1/σ^2_γ)+2_q(b)(1/b^2)∑_j=1^n_i(1+δ_ij)ζ_ij]^-1

and 

    τ^*_i=σ^2*_i∑_j=1^n_i[_q(b)(1/b)(-δ_ij+(1+δ_ij)ρ_ij) +2_q(b)(1/b^2)(1+δ_ij)ζ_ij(y_ij-X_ij^T_q(β)β)]

Then, q^*(γ_i) is N_l(τ_i^*, σ_i^2*). 


(3) Update equation for q^*(b)

    log q^*(b) _-b[log p(D | β, γ, b)]+_-b[log p(b)]

where

    _-b[log p(D | β, γ, b)]
       =   _-b[-δlog b +∑_i=1^K∑_j=1^n_i{δ_ijy_ij-X_ij^Tβ-γ_i/b -(1+δ_ij)log{1+exp(y_ij-X_ij^T β-γ_i/b)}}]

and

    _-b[log p(b)]  -(α_0+1)log b - ω_0/b  since we assume the prior   b ∼Inverse-Gamma (α_0, ω_0)

In Equation (<ref>), we apply the linear piece-wise approximation proposed by Xian et al. to approximate 1+exp(y_ij-X_ij^T β-γ_i/b) to achieve conjugacy:

    1+exp(y_ij-X_ij^T β-γ_i/b) ≈φ_ijy_ij-X_ij^T β-γ_i/b.

where φ_ij = 0^η_ij1× 0.0426^η_ij2× 0.3052^η_ij3× 0.6950^η_ij4×  0.9574^η_ij5×  1^1-∑_k=1^5η_ijk with η_ij1 = 1(y_ij-X_ij^Tβ-γ_i/b≤ -5), η_ij2 = 1(-5 < y_ij-X_ij^Tβ-γ_i/b≤ -1.701), η_ij3 = 1(-1.701 < y_ij-X_ij^Tβ-γ_i/b≤ 0), η_ij4 = 1(0 < y_ij-X_ij^Tβ-γ_i/b≤ 1.702), and η_ij5 = 1(1.702 < y_ij-X_ij^Tβ-γ_i/b≤ 5).
 
Then, we obtain

    log q^*(b)  -(α_0+δ + 1)log b - 1/b[ω_0-∑_i=1^K∑_j=1^n_i(δ_ij-(1+δ_ij)φ_ij)(y_ij-X_ij^T_q(β)(β)-_q(γ_i)γ_i)]


Let α^* = α_0 + δ and

    ω^* = ω_0-∑_i=1^K∑_j=1^n_i(δ_ij-(1+δ_ij)φ_ij)(y_ij-X_ij^T_q(β)(β)-_q(γ_i)γ_i),

we have q^*(b) is Inverse-Gamma (α^*, ω^*). 


(4) Update equation for q^*(σ^2_γ)

    log q^*(σ^2_γ) _-σ^2_γ[∑_i=1^K log p(γ_i |σ^2_γ)]+_-σ^2_γ[log p(σ^2_γ)]

where

    _-σ^2_γ[∑_i=1^K log p(γ_i |σ^2_γ)]    =   _-σ^2_γ[∑_i=1^K log(1/√(2πσ^2_γ)exp(-1/2σ^2_γγ_i^2)) ]
           -K/2logσ^2_γ -1/2σ^2_γ∑_i=1^K_q(γ_i)γ_i^2

and _-σ^2_γ[log p(σ^2_γ)] = -(λ_0 + 1)logσ^2_γ - η_0/σ^2_γ.

Therefore,

    log q^*(σ^2_γ)  -(λ_0 + K/2 + 1)logσ^2_γ - [η_0 + 1/2∑_i=1^K_q(γ_i)γ_i^2] / σ^2_γ


Let λ^*=λ_0 + K/2 and

    η^* = η_0 + 1/2∑_i=1^K_q(γ_i)γ_i^2,

q^*(σ^2_γ) is an Inverse-Gamma (λ^*, η^*).


§ APPENDIX B. ELBO CALCULATION

We now present details of calculating diff_β+diff_γ+diff_b+diff_σ^2_γ in the ELBO defined in (<ref>).

    diff_β   =   _q[log p(β)] - _q[log q(β)] 
          _q[-1/2v_0(β-μ_0)^T(β-μ_0)] -_q[-1/2log (|Σ^*|)-1/2(β-μ^*)^T(Σ^*)^-1(β-μ^*)] 
           -1/2v_0[trace(Σ^*)+(μ^*-μ_0)^T(μ^*-μ_0)] + 1/2log (|Σ^*|).

Note that

    _q[1/2(β-μ^*)^T(Σ^*)^-1(β-μ^*)]=p/2,

which is always a constant at each iteration and therefore we ignore it. 

    diff_γ   =   _q[∑_i=1^K log p(γ_i |σ_γ^2)]-_q[∑_i=1^K log q(γ_i)]
           -K/2_q(σ^2_γ)(logσ^2_γ)-1/2_q(σ^2_γ)(1/σ^2_γ)∑_i=1^K _q(γ_i)(γ_i^2)  -1/2∑_i=1^K[logσ_i^2*-1/σ_i^2*(_q(γ_i)(γ_i^2)-μ_i^*2)]
           -K/2_q(σ^2_γ)(logσ^2_γ)-1/2_q(σ^2_γ)(1/σ^2_γ)∑_i=1^K _q(γ_i)(γ_i^2) -1/2∑_i=1^K(logσ_i^2*)

Since (_q(γ_i)(γ_i^2)-μ_i^*2)/σ_i^2*=1 for i = 1,... K, and therefore,

    (∑_i=1^K (_q(γ_i)(γ_i^2)-μ_i^*2))/ (2σ_i^2*)=K/2

which is a constant, and we can ignore it.


    diff_b   =   _q[log p(b)]-_q[log q(b)]
          _q[-(α_0+1)log b-ω_0/b] 
           - _q[α^*logω^* - log (Γ(α^*))-(α^*+1)log b-ω^*/b] 
       =    (α^*-α_0)_q(b)(log b) + (ω^*-ω_0)_q(b)(1/b) - α^*logω^*.

Since α^* does not change at each iteration, we remove log (Γ(α^*)) in the calculation of the ELBO.

    diff_σ^2_γ   =   _q[log p(σ^2_γ)]-_q[log q(σ^2_γ)] 
          _q[-(λ_0+1)logσ^2_γ-η_0/σ^2_γ] 
           - _q[λ^*logη^* - log (Γ(λ^*))-(λ^*+1)logσ^2_γ-η^*/σ^2_γ] 
       =    (λ^*-λ_0)_q(σ^2_γ)(logσ^2_γ) + (η^*-η_0)_q(σ^2_γ)(1/σ^2_γ) - λ^*logη^*.

Since λ^* does not change at each iteration, we remove log (Γ(λ^*)) in the calculation of the ELBO.




§ APPENDIX C. REAL DATA ANALYSIS


















 Paper Title: Facilitating heterogeneous effect estimation via statistically efficient categorical modifiers.





#1 1





  
  0   
   
    
    
    
  
  
    
    Facilitating heterogeneous effect estimation via statistically efficient categorical modifiers
    
    
  
  
  
  
    Daniel R. KowalAssociate Professor, Department of Statistics and Data Science, Cornell University and Department of Statistics, Rice University (mailto:dan.kowal@cornell.edudan.kowal@cornell.edu). 
    Research  was sponsored by the National Institute of Environmental Health Sciences (R01ES028819) and the National Science Foundation (SES-2214726). The findings and conclusions in this publication are those of the author(s) and do not necessarily represent the views of the NIH, the U.S. government, or the North Carolina Department of Health and Human Services, Division of Public Health.
    
    
    August 5, 2024
=============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

 



§ ABSTRACT 
Categorical covariates such as race, sex, or group are ubiquitous in regression analysis. While main-only (or ANCOVA) linear models are predominant, cat-modified linear models that include categorical-continuous or categorical-categorical interactions are increasingly important and allow heterogeneous, group-specific effects. However, with standard approaches, the addition of cat-modifiers fundamentally alters the estimates and interpretations of the main effects, often inflates their standard errors, and introduces significant concerns about group (e.g., racial) biases. We advocate an alternative parametrization and estimation scheme using abundance-based constraints (ABCs). ABCs induce a model parametrization that is both interpretable and equitable. Crucially, we show that with ABCs, the addition of cat-modifiers 1) leaves main effect estimates unchanged and 2) enhances their statistical power, under reasonable conditions. Thus, analysts can, and arguably should include cat-modifiers in linear regression models to discover potential heterogeneous effects—without compromising estimation, inference, and interpretability for the main effects. Using simulated data, we verify these invariance properties for estimation and inference and showcase the capabilities of ABCs to increase statistical power. We apply these tools to study demographic heterogeneities among the effects of social and environmental factors on STEM educational outcomes for children in North Carolina. 0An  package  is available. 


Keywords:  Discrete data; Interactions; Penalized Estimation; Regression analysis


1.45 


§ INTRODUCTION


Interactions are remarkably valuable  in linear regression analysis. 

In particular, interactions between a categorical (or nominal) variable and either a continuous or categorical variable—referred to here as cat-modifiers—are crucial for discovering and quantifying heterogeneous effects. A prominent example is  race: due to structural racism and discrimination, the effects of many important variables on health and life outcomes vary by race  
<cit.>,  
with race often interacting with sex or socioeconomic status <cit.>. 
Cat-modifiers are also highly relevant for studying gene-environment interactions <cit.> and appear broadly in the social and behavioral sciences <cit.>. Within statistics, the urgency of cat-modifiers is perhaps best known by Simpson's paradox <cit.>, where the omission of cat-modifiers produces entirely misleading associations.  
 




 
 
 
 
 
 






 


Yet there are significant obstacles to the inclusion of cat-modifiers in linear regression analysis. Broadly, cat-modifiers alter the interpretation of the main effects, introduce concerns about equity across categorical groups (e.g., for race, sex, and other protected groups), 
change the main effect estimates, and typically inflate the main effect standard errors (SEs). Consequently, cat-modifiers are often omitted or misreported <cit.>, which falsely suppresses heterogeneity. 

We argue that, with the right parametrization,  cat-modifiers can readily, and arguably should be included in linear  regression models with categorical covariates. 
To establish ideas, suppose we have p continuous covariates x = (x_1,…, x_p)^⊤ and K categorical variables C = (C_1,…, C_K)^⊤ with L_k levels for each categorical variable k=1,…,K. We consider regression models for data {( x_i,  c_i, y_i)}_i=1^n parameterized by a linear regression function μ( x,  c) which typically models the conditional expectation 𝔼(Y | x,  c) or a transformed version for generalized linear models. We distinguish between two classes of linear models: those that do not include cat-modifiers and those that do.  First, the main-only model includes multiple continuous and categorical variables, but no interactions:

    μ^M( x,  c) = α_0^M +  x^⊤α^M + ∑_k=1^K β_k, c_k^M

or in Wilkinson notation, . Second, the cat-modified model expands (<ref>) to allow categorical-continuous and categorical-categorical interactions:

    μ( x,  c) = α_0 +  x^⊤α + ∑_k=1^K β_k, c_k +  ∑_k=1^K  x^⊤γ_k, c_k + ∑_k=1^K-1∑_k'=k+1^K γ_k,k',c_k, c_k'

or equivalently, , using pairwise interactions for convenience. Our notation emphasizes that the parameters in (<ref>) and (<ref>) are fundamentally distinct, even though these models are nested. 

The advantage of the cat-modified model is the ability to estimate heterogeneous, group-specific effects for each x_j. While both models specify group-specific intercepts (consider (<ref>) and (<ref>) with x = 0), 

only the cat-modified model features group-specific slopes: 

    μ_x_j'( c) μ(x_j+1,  x_-j,  c) - μ(x_j,  x_-j,  c) = α_j + ∑_k=1^K γ_j, k, c_k.

By comparison, the slopes in the main-only model do not depend on c:  μ_x_j^M' μ^M(x_j+1,  x_-j,  c) - μ^M(x_j,  x_-j,  c) = α_j^M. 





For concreteness, we consider two popular cases. Empirical examples are given in Tables <ref> and <ref>, respectively, and these cases are revisited subsequently. 
[ANCOVA]
    Suppose we have p=1 continuous variable x ∈ℝ and K=1 categorical variable  with L_R groups. The main-only model (<ref>) is then 
    
    μ^M(x, r) = α_0^M + xα_1^M + β_r^M

    or equivalently, , with group-specific intercepts, μ^M(0, r) = α_0^M + β_r^M for each  group r, but a global (race-invariant) slope, μ_x^M' =  α_1^M. Thus, (<ref>) produces parallel lines with race-specific vertical shifts. By comparison, the cat-modified model (<ref>) is 
    
    μ(x, r) = α_0 + x α_1 + β_r + x γ_r

    or equivalently, , with group-specific intercepts μ(0, r) = α_0 + β_r and group-specific slopes  μ_x'(r) = α_1 + γ_r for each  group r. 


[Two-way ANOVA]
    Suppose we have K=2 categorical variables  and  with L_R and L_S groups, respectively. The main-only  model (<ref>) is then
    
    μ^M(r,s) = α_0^M + β_1,r^M + β_2,s^M

    or equivalently, , while the cat-modified model (<ref>) is 
    
    μ(r, s) = α_0 + β_1,r + β_2,s + γ_rs

or equivalently, . 



The central challenge is that expanding from the main-only model to the cat-modified model  alters the interpretations, estimates, and inference for the main effects, i.e., the parameters {α_0^M, α^M, β_k,c_k^M} in (<ref>) or the analogous terms {α_0, α, β_k,c_k} in (<ref>). 
If these impacts are detrimental, then a quantitative modeler may be reluctant to include cat-modifiers. The key determinant is the model parametrization or identification strategy used for the categorical variable coefficients. Specifically, both models (<ref>) and (<ref>) require additional constraints to interpret and estimate the model parameters:  the main-only intercepts {α_0^M, β_k,c_k^M} are overparametrized, while the cat-modified intercepts {α_0, β_k,c_k, γ_k,k', c_k,c_k'} and slopes {α, γ_k,c_k} are overparametrized. The identifications determine the interpretations of all main and interaction parameters and the statistical properties of their estimators.

The most popular identification strategies are  problematic for cat-modified models. Reference group encoding (RGE)  is the overwhelming default, including for all major software implementations of  generalized linear regression (, SAS, Python,  MATLAB, Stata, etc.).  With RGE, a reference group is selected for each categorical variable C_k and removed: β_k,1^M = 0 for all k in (<ref>) and β_k,1 = 0, γ_k,1 =  0, γ_k,k', 1,c_k' = γ_k,k', c_k, 1 =0 for all (c_k,c_k') in (<ref>) (using 1 for each reference group without loss of generality). This is equivalent to using L_k -1 “dummy variables" to encode each C_k. 

Despite the simplicity of RGE, the implied notion of “main effects" in (<ref>) significantly impedes the use of cat-modifiers.  For the main-only model, the jth main effect is a global slope, α_j^M = μ_x_j^M', invariant of c; yet for the cat-modified model, RGE fixes γ_j,k,1 =  0 for all j so that α_j = μ_x_j'( 1) is the group-specific x_j-effect with all categorical variables set to their reference groups (c =  1). 



First, this main effect parametrization is statistically inefficient: SEs for α̂_j are typically larger than those for α̂_j^M—the intersection of all reference groups is a subset of the data with a much smaller effective sample size—while the group-specific x_j-effect μ_x_j'( c) may be smaller for the reference groups (c=  1) than for other groups or globally (i.e., α_j^M). We illustrate this effect in Table <ref>: with RGE, the main effects for the cat-modified model are attenuated and sacrifice power compared to those for the main-only model (see also Sections <ref> and <ref>). Similar effects occur for categorical-categorical interactions (see Table <ref>). Of course, these parameters refer to different functionals of μ( x,  c); yet crucially,  they are presented identically as “main effects" in statistical software output and manuscript tables  <cit.>. In fact, fewer than half of recent social science publications even reported the reference category <cit.>. This leads to misleading conclusions about effect magnitudes, directions, and heterogeneity <cit.>. 















Second, RGE is inequitable: the main effect elevates a single (reference) group above the others. In Table <ref>,  White is the reference group: the main effect α_1 = μ_x'() is  the x-effect for the  White group, while the interaction effect γ_r = μ_x'(r) - μ_x'() is the difference between the x-effect for race r and that for the White group. RGE presents the reference groups (main effects) as “normal" while all the other groups (interaction effects) are “deviations from normal"—almost always without any explicit labeling. This framing biases the interpretations of results <cit.>. 

The problem is compounded for regularized regression: when coefficient estimates are regularized toward zero, the group-specific slopes are statistically biased toward the reference group slope (γ_r → 0 implies μ_x'(r) →μ_x'()). Beyond the obvious inequities—including (racial, gender, etc.) bias in the estimators—this shrinkage obscures potential differences between the x-effects for dominant (e.g., White, Male, etc.) and nondominant groups. 
Thus, RGE undermines progress toward statistical methods that  promote equity <cit.>. 


Finally, RGE is difficult to interpret: each main effect and interaction in (<ref>) must be traced back to all reference groups. Consider Example <ref> (and Table <ref>), using White and Male for the reference groups:  the main effects in the cat-modified model (<ref>) are  α_0 = μ(, ), β_1,r = μ(r, ) - μ(, ) for each race r, and β_2,s = μ(, s) - μ(, ) for each sex s. Each main effect is anchored at both reference groups, which then affects the interpretations of the interaction effects γ_rs. These challenges are accentuated with multiple categorical covariates and interactions as in (<ref>). 










An alternative identification strategy uses sum-to-zero constraints (STZ). STZ identifies the parameters by restricting the group-specific coefficients to sum to zero:  ∑_ℓ=1^L_kβ_k,ℓ^M = 0 for all k in the main-only model and ∑_ℓ=1^L_kβ_k,ℓ = 0, ∑_ℓ=1^L_kγ_j,k,ℓ = 0 for j=1,…, p, and  ∑_ℓ=1^L_kγ_k,k', ℓ,c_k' = 0 and ∑_ℓ=1^L_kγ_k,k', c_k,ℓ =0 for all (c_k, c_k') in the cat-modified model. STZ is common for ANOVA models <cit.> and has been incorporated into regularized regression <cit.>. STZ eliminates the need for a reference group, and thus resolves the inequities of RGE. However, STZ does not offer any special statistical properties for estimation of (<ref>) or (<ref>), nor does it establish a clear connection between the “main effects" in (<ref>) and (<ref>). As a result, it is difficult to interpret the parameters under STZ, while the addition of cat-modifiers may have unpredictable or detrimental effects on the main effect estimates and inferences (see Section <ref>). 







To address these limitations, we advocate and analyze   abundance-based constraints (ABCs) for identification and estimation with cat-modified models. Broadly, ABCs identify parameters using group abundances (see Section <ref>). 
ABCs are sufficiently general and may be combined with ordinary least squares (OLS), maximum likelihood, and modern regularized estimation techniques. 
The benefits are summarized by “EEI":

    
  * Efficiency: ABCs permit the inclusion of cat-modifiers 1) without altering the main effect OLS estimates and 2) either maintaining or increasing their statistical power, under reasonable conditions; 
    
  * Equity: ABCs do not require a reference group and thus eliminate the alarming inequities under default approaches (RGE); and 
    
  * Interpretability: main effects  are identified as group-averaged  parameters, interaction effects are group-specific deviations from these group-averaged parameters, and both sets of parameters inherit meaningful notions of sparsity. 

ABCs effectively remove the impediments to cat-modifiers, thus facilitating richer regression analyses of heterogeneous effects. Of course, ABCs cannot guarantee that cat-modifiers will be practically or statistically significant, especially when the effective sample sizes for interactions are small. Rather, with ABCs, there is virtually nothing to lose by expanding from the main-only model (<ref>) to the cat-modified model (<ref>); yet the potential gains include greater statistical power for the main effects and discovery of  heterogeneous effects. 



We emphasize that ABCs, in various forms and by other names, have deep historical roots, but have lacked sufficient motivation to encourage widespread adoption.  <cit.> and <cit.> considered identification strategies for ANOVA models based on arbitrary group-specific weights. 
Ultimately, both adopted STZ. <cit.> suggested ABCs for the simple ANCOVA (<ref>) so that the estimated intercept  would  equal the sample mean  (see also Theorem <ref>). However, there was no consideration of cat-modifiers or multiple covariates and no case made for any of EEI. Among nonlinear models, <cit.> and <cit.> used an ABC-like approach to avoid estimating main effects, instead focusing exclusively on interactions to optimize individual treatment rules. More subtly, they required independence between the cat-modifier (treatment) and any modified covariates, which is not usually satisfied for observational data and not required for our results. For the two-way ANOVA (<ref>), <cit.> briefly mentioned ABCs only to dismiss them, claiming  they “complicate the interpretation of the model parameters and make it difficult to fit the model...especially when other covariates are present." Here, we forcefully argue the opposite, embodied by EEI—each of which applies 

with multiple covariates present. 
ABCs are considered concurrently in  <cit.>, which focuses on issues of equity with race as a single cat-modifier.  


Contrasts provide an alternative perspective on identification of  (<ref>) and (<ref>): dummy coding, effects coding, and weighted effects coding (WEC) are respectively linked to RGE, STZ, and ABCs. Although WEC has garnered recent support <cit.>,
this work did not consider general cat-modifiers or any EEI. Instead, WEC has been mainly limited to two-way ANOVAs (<ref>) or (<ref>) and only advocated in restrictive settings with 
“certain types of unbalanced data that are missing not at random” <cit.> or “categories of different sizes, and if these differences are considered relevant”  <cit.>. Our case is much broader and more direct: ABCs are ideal to identify coefficients on any categorical variables and  cat-modifiers should be included in many, if not all linear models. Further, we enforce ABCs using linearly-constrained optimization, which—unlike contrasts—is well-suited for regularized regression (see Section <ref>).





Lastly, we acknowledge additional perspectives on the cat-modified model (<ref>). A widely-used approach is subgroup analysis, which subsets the data into groups (for all combinations of c) and then fits separate regression models (e.g., ). The appeal is that it estimates group-specific slopes without the complicated interpretations of the parameters in (<ref>) under default approaches (RGE). However, subgroup analysis does not provide  estimates or inference for the main effects, cannot incorporate regularization or borrow information across groups, and does not allow direct testing for interaction effects. Notably, ABCs offer the same (and more) benefits without any of these drawbacks. 
Related, <cit.> advocated for marginal means. These quantities, like group-specific slopes and fitted values, will be identical for all (minimally sufficient) identification strategies under maximum likelihood estimation. Thus, it does not distinguish among identification strategies. 
However, the identification strategy remains key for 1) parameter interpretation, estimation, and inference and 2) regularized regression and variable selection. 



  















 




The paper is organized as follows. We introduce ABCs  in Section <ref>, both for parameter identification and statistical estimation. Our main results on theory for estimation and inference with ABCs are in Section <ref>. Simulation studies are in Section <ref> and a real data example is in Section <ref>. We conclude in Section <ref>. Supplementary material includes proofs of all results, details for generalized linear models, additional simulation results, and supporting data information and analysis.  
0An  package  is available. 













 






















    





 



 

 


 



 





§ IDENTIFICATION, ESTIMATION, AND INFERENCE WITH ABCS
 







The goal of ABCs is to enforce model identifiability while maintaining EEI. We first describe the model parametrization and interpretation, and then show how to compute regularized regression estimators and inference  using linearly-constrained optimization. The main properties for estimation and inference are in Section <ref>.



 §.§ Parameter identification with ABCs


For motivation, consider (<ref>) from Example <ref>: identifiability is obtained by constraining ∑_r=1^L_Rπ_r β_r = 0 and ∑_r=1^L_Rπ_r γ_r = 0 for some chosen nonnegative weights {π_r}_r=1^L_R. RGE sets π_1 = 1 and π_r = 0 for r>0, while STZ sets all π_r = 1. Instead, suppose we view each constraint as an expectation: 𝔼_π(β_R) = 0 and 𝔼_π(γ_R) = 0, where  R is a categorical random variable with probabilities {π_r}_r=1^L_R. Now, 

the main x-effect α_1 is equivalently the average of the group-specific slopes: 𝔼_π{μ_x'(R)} = 𝔼_π(α_1 + γ_R) =α_1. Of course, this notion of “average"—as well as the  accompanying properties for statistical estimation (Section <ref>)—depends entirely on the supplied probabilities {π_r}. 
 ABCs adopt a natural choice: the (population or sample) abundances by group. For instance, in 
Table <ref>, the ABCs specify
(π_, π_, π_) = (0.587, 0.351, 0.062) using  sample proportions. 

More broadly, we define ABCs for the cat-modified model (<ref>); special cases such as  (<ref>) simply omit the constraints for the omitted parameters. We express the ABCs in terms of π̂, which is the joint proportions across all categorical variables C = (C_1,…, C_K)^⊤ in the data { c_i}_i=1^n. ABCs may be defined using population or sample proportions; we prefer the latter because they are always available  and estimation properties are tractable and favorable (Section <ref>). First, ABCs for categorical main effects and categorical-continuous interactions are

    𝔼_π̂ (β_k, C_k)    = 0,    k=1,…, K 
    𝔼_π̂ (γ_j,k, C_k)    = 0,    k=1,…, K,    j=1,…,p.

Equivalently, ABCs may be expressed marginally and with summations: ∑_ℓ = 1^L_kπ̂_k, ℓβ_k, ℓ = 0, where {π̂_k,ℓ}_ℓ=1^L_k are the sample proportions for each categorical variable C_k, k=1,…, K,  and then similarly for each {γ_j,k,ℓ}_ℓ=1^L_k. The key implication is that, while the cat-modified model (<ref>) incorporates heterogeneity via mutual, group-specific slopes (<ref>),  ABCs  concisely identify each main x_j-effect as the average of this group-specific slope:

    α_j = 𝔼_π̂{μ_x_j'( C)}.

ABCs parameterize each main x_j-effect  by aggregating the group-specific slopes (<ref>), each weighted by its respective abundance in the data. Unlike RGE, ABCs do not elevate any single (reference) group, and thus avoid the accompanying inequities. 


The identification in (<ref>) also guides interpretation of the group-specific slope parameters {γ_j,k,ℓ}_ℓ=1^L_k. Consider (<ref>) from Example <ref>:  γ_r = μ_x'(r) - 𝔼_π{μ_x'(R)} is the difference between the group-specific slope for group r and the group-averaged slope. 
For the general cat-modified model (<ref>), isolating γ_j,k,c_k requires averaging over the remaining categorical variables C_-k with joint proportions π̂_-k with C_k=c_k  fixed: γ_j,k,c_k = 𝔼_π̂_-k{μ_x_j'( C_-k, c_k)} - 𝔼_π̂{μ_x_j'( C)}. 

Further simplifications are often available, since these averages only must include the categorical variables that act as cat-modifiers for x_j. In contrast with RGE, these group-specific coefficients are parameterized relative to a global main effect term (<ref>), rather than a single (reference) group (White, Male, etc.).





For categorical-categorical interactions, ABCs identify {γ_k,k', c_k, c_k'} by requiring

    𝔼_π̂_C_k | C_k'=ℓ(γ_k,k', C_k, ℓ)    = 0,   ℓ=1,…,L_k'
    𝔼_π̂_C_k'| C_k=ℓ(γ_k,k', ℓ, C_k')    = 0,   ℓ=1,…,L_k

for all (C_k,C_k') interactions based on the conditional proportions for categorical variable C_k given that the interacting  variable C_k' belongs to group ℓ (and vice versa). In conjunction,  (<ref>) and (<ref>) constitute ABCs. We illustrate (<ref>) using model  (<ref>) from Example <ref>: 
 𝔼_π̂_S | R=r(γ_rS) = 0 for  r=1,…,L_R and 𝔼_π̂_R | S=s(γ_Rs) = 0 for s=1,…,L_S, where π̂_S | R=r = {π̂_rs/π_r}_s=1^L_S is the conditional probability for each  given =r (similarly for π̂_R | S=s). Equivalently, (<ref>) may be expressed using the joint proportions π̂: for Example <ref>, this is ∑_s=1^L_Sπ̂_rsγ_rs = 0 for r=1,…,L_R and  ∑_r=1^L_Rπ̂_rsγ_rs = 0 for  s=1,…,L_S. Thus, all ABCs (<ref>) and (<ref>) can be written in terms of the joint probabilities π̂.  










 
 
 
 
 
 




There are several compelling reasons to identify the categorical-categorical interactions with (<ref>).  First,  it guarantees a global, group-averaged identification for the intercept: 


    Under ABCs, 
    the intercept parameter in  (<ref>) satisfies 𝔼_π̂{μ( 0,  C)} = α_0.

ABCs produce clean expressions and simple interpretations for these main effects: while cat-modifiers induce group-specific intercepts and slopes, ABCs identify suitably global, group-averaged quantities α_0 = 𝔼_π̂{μ( 0,  C)} and  α_j = 𝔼_π̂{μ_x_j'( C)} for j=1,…,p. This cannot occur for RGE and only occurs for STZ if the probabilities π̂ are exactly uniform. 
Second, (<ref>) orthogonalizes the main and interaction categorical effects: in fact, the OLS estimates of the main categorical effects {β_k, c_k} are identical between models that do (<ref>) or do not (<ref>) include cat-modifiers (Theorem <ref>). Finally, (<ref>) offers the interesting result that, if we were to instead combine the interacted covariates (C_k, C_k') into a single categorical variable (e.g., race-sex) with L_kL_k' levels, the main effect ABCs (<ref>) would be satisfied for this new categorical variable. Of course, doing so would sacrifice the ability to estimate the main effects {β_k, c_k}, but this internal consistency is reassuring. 

















 







 
 

















 
 
For implementation, it is sufficient to enforce L_k + L_k' -1 of the L_k + L_k' constraints in (<ref>). The choice of omitted constraint is arbitrary, since all constraints (<ref>) hold regardless:
 
    Suppose we apply (<ref>) to all but one interaction term: 
    𝔼_π̂_C_k | C_k'=ℓ(γ_k,k', C_k, ℓ) = 0 for ℓ=1,…,L_k' and 
    𝔼_π̂_C_k'| C_k=ℓ(γ_k,k', ℓ, C_k') = 0 for  ℓ=2,…,L_k. Then the same constraint holds for ℓ=1: 𝔼_π̂_C_k'| C_k=1(γ_k,k', 1, C_k') = 0. 
    




Finally, we emphasize that ABCs (<ref>) and (<ref>) are designed for parameter identification in the general cat-modified model (<ref>), which may be featured in generalized linear models (see the supplementary material, Section <ref>) and includes numerous important special cases, such as  main-only models (<ref>), ANCOVA models (Example <ref>), and two-way ANOVA models (Example <ref>), among many others.

 



 §.§ Estimation, inference, and sparsity with ABCs


ABCs are linear constraints and thus readily compatible with regularized regression. First, we consolidate the cat-modified model (<ref>) into a traditional regression structure: (μ( x_1,  c_1), …, μ( x_n,  c_n))^⊤ =  Xθ, where  X is the n × P matrix that includes an intercept, all (centered) continuous covariates, indicator variables for all levels of each categorical variable, and all specified interactions, and θ include all unknown regression coefficients. In the presence of at least one categorical covariate, X is rank deficient, say ( X) = P-m. We represent all ABCs (<ref>) and (<ref>) generically as A_π̂θ =  0, where is the m × P matrix of constraints with (  A_π̂) = m. 
Then, for a loss function ℒ( y,  X θ) for data y = (y_1,…,y_n)^⊤ and a coefficient penalty 𝒫(θ), we aim to solve 

    θ̂(λ) = min_θℒ( y,  X θ)  + λ𝒫(θ)     A_π̂θ =  0

and λ≥ 0 is a tuning parameter. We primarily focus on squared error loss  ℒ( y,  X θ) = ‖ y -   X θ‖^2 and either unpenalized estimation (λ=0) or (group) lasso and ridge regression with λ selected by cross-validation. 

One way to solve (<ref>) is to reparametrize to an unconstrained space with only P-m parameters. 

Let A_π̂^⊤ =  Q  R be the QR-decomposition 
with  columnwise partitioning of the P × P orthogonal matrix Q = ( Q_1:m :  Q_π̂ ) and similarly, R^⊤ = ( R_1:m, 1:m :  0). 
By construction, A_π̂ Q_π̂ =  0, so that for any (P-m)-dimensional vector θ_Q, the vector θ =  Q_π̂θ_Q satisfies  A_π̂θ =  0. Then, letting X_Q  X   Q_π̂,  (<ref>) is equivalently

    θ̂(λ) =  Q_π̂θ̂_Q(λ),   θ̂_Q(λ) = min_θℒ( y,  X_Q θ_Q) + λ𝒫( Q_π̂θ_Q).

Regularized regression with ABCs simply requires 1) computing the QR decomposition of A_π̂^⊤ and 2)  solving an unconstrained regularized regression problem. 



















 
















When ℒ is a negative log-likelihood,  θ̂_Q θ̂_Q(0) is a maximum likelihood estimator (MLE) and so is  θ̂. Hence, usual properties for MLEs apply to estimators with ABCs. Under standard regularity conditions,  (<ref>) satisfies 
 
    √(n)(θ̂ - θ) d→ N_P( 0,  Q_πℐ(θ_Q)^-1 Q_π^⊤) 
where ℐ is the Fisher information associated with θ_Q and π is the joint population probabilities for the categorical covariates C. Thus, it is straightforward to construct confidence intervals and conduct hypothesis tests for the coefficients θ.  When the model errors y_i - μ( x_i,  c_i) are Gaussian, uncorrelated, and homoskedastic, 



the OLS estimator under ABCs satisfies 

θ̂∼ N_P{θ, σ^2  Q_π̂( X_Q ^⊤ X_Q)^-1 Q_π̂^⊤}, even in finite samples. Although this distribution does not account for the sampling variability in π̂, this is typically quite small relative to the variability in θ̂. Our empirical analyses suggest that no further adjustments are needed (see Section <ref>). 



Finally, we emphasize the unique challenges of regularization and selection  for cat-modified models. Selection of interaction effects has primarily focused on high-dimensional, continuous-continuous interactions <cit.>. For cat-modified models with RGE,  coefficient  shrinkage introduces (racial, gender, etc.) biases: γ_j,k,c_k→ 0 implies μ_x_j'( c) →μ_x_j'( 1), so group-specific effects are pulled toward those for the reference (White, Male, etc.) groups.  With ABCs, no such biases occur: γ_j,k,c_k→ 0 implies μ_x_j'( c) →𝔼_π̂{μ_x_j'( C)} collapses to the group-averaged x_j-effect, which produces a reasonable notion of parameter sparsity.  

When λ > 0, it is possible to omit constraints and still obtain unique estimators. However, these estimators do not target identifiable parameters and thus are difficult to interpret. For lasso estimation, <cit.> observes that such “overparametrized" estimation tends to reproduce RGE by implicitly selecting a reference group, and thus inherits the same limitations as RGE. 
















§ THEORY FOR ESTIMATION AND INFERENCE WITH ABCS

A central nuisance with interactions is that they change the main effect estimates and SEs. Here, we show that ABCs circumvent these challenges for cat-modifiers. The main point is that, with ABCs, the addition of cat-modifiers is either 1) harmless, since it has little to no impact on main effects estimates and inference, or 2) beneficial, since it can reveal heterogeneity and improve statistical power for the main effects. 




 

 

 






  §.§.§ QUESTION: how do we interpret β_r (or β_s)?

Under model (<ref>) and the constraints (<ref>), it is difficult to isolate β_r. Usually the best bet is to consider μ( 0, R,S) and compute various expectations over the categorical covariates, like with α_0 in Lemma <ref>.

First, we know that 𝔼_π̂_S(β_S) = 0, so it might be reasonable to compute the the intercept averaged over all but race,

    𝔼_π̂_-R{μ( 0, r,S)}   = 𝔼_π̂_S{μ( 0, r,S)} = ∑_s=1^L_Sπ̂_s(α_0 + β_r + β_s + γ_rs) 
       = α_0 + β_r + ∑_s=1^L_Sπ̂_s γ_rs.

This operation eliminates β_s, but ∑_s=1^L_Sπ̂_s γ_rs is not zero in general. Note that this approach would yield α_0 + β_r for any main-only model (i.e., with γ_rs=0, even with additional categorical main effects). 



Instead, we might try to compute the conditional expectation of the intercept, which averages the intercept over sex for a given race:

    𝔼_π̂_S | R=r{μ( 0, R,S)}   = ∑_s=1^L_Sπ̂_rs/π̂_r(α_0 + β_r + β_s + γ_rs) 
       = α_0 + β_r + ∑_s=1^L_Sπ̂_rs/π̂_rβ_s.

Here, the interaction term γ_rs is eliminated, but a term with β_s remains. 

Idea 1: It is possible to modify the ABCs (<ref>) such that 𝔼_π̂_S | R=r(γ_RS) = 0 is replaced with 𝔼_π̂_S | R=r(β_S + γ_RS) = 0, similarly for each interaction term, so that the above conditional expectation would simplify: 𝔼_π̂_S | R=r{μ( 0, R,S)} = α_0 + β_r. This alternative maintains identifiability and Lemma 1, but sacrifices the estimation invariance in Theorem 1.  



Idea 2: Since the OLS estimator of β_r is the same whether or not the interaction is included, then perhaps the first approach is promising. In particular, for a model without the interaction, we can show that 

    β_r = 𝔼_π̂_-R{μ( 0, r,S)} - 𝔼_π̂{μ( 0, R,S)} = 𝔼_π̂_-R{μ( 0, r,S)} - α_0.

This offers at least some path toward an interpretation. However, it is not true for β_r when the interaction term γ_rs is present in the model. 





Possible Idea 3: just mention it as a race effect without much explanation...



 






§ SPECIAL CASES AND UNIFYING THEMES


Notation:
Consider categorical variables R (race), S (sex), and E (education level) with L_R, L_S, and L_E levels, respectively. For notation, we let β_R the coefficient for race and race group R, β_S the coefficient for sex and sex group S, etc. This notation is slightly overloaded, but context is clear. Similarly,  β_RS^* is the race-sex interaction for race R and sex S, and so forth. Let 𝔼_π̂_R denote averaging with respect to race proportions, e.g., 

    𝔼_π̂_R(β_R) = ∑_r=1^L_Rπ̂_r β_r.

where π̂_r is the proportion in race group r. For models without categorical-categorical interactions, ABCs simply imposed 𝔼_π̂_R(β_R) for each categorical variable (e.g., one for R, one for S, one for E). Now, further consideration is required. 

Let 𝔼_π̂ be a joint expectation over the mutual proportions of (R, S, E), and 𝔼_π̂_-R is the joint expectation over all but race, so that R=r is fixed. Finally, let  refer to a placeholder for (one or more) continuous covariates. The constraints below also apply for categorical-continuous interactions with , but instead on the slope terms. Thus, we focus on the intercepts to avoid redundancy. 



Goal: define ABCs to handle various categorical-categorical interaction combinations. Arguably, the main effects are  most interpretable if we can obtain constraints such that the intercept term μ( 0, R, S, E) satisfies

    𝔼_π̂{μ( 0, R, S, E)} = α_0 
    𝔼_π̂_-S{μ( 0, R, s,E)} = α_0 + β_s,    s=1,…,L_S 
    𝔼_π̂_-R{μ( 0, r, S,E)} = α_0 + β_r,    r=1,…,L_R 
    𝔼_π̂_-E{μ( 0, R, S,e)} = α_0 + β_e,    e=1,…,L_E

The first constraint gives α_0 a suitably global interpretation, and also implies that α̂_0 = y̅ (under OLS with ABCs), which is simple and invariant across many models. The latter constraints allow us to interpret the main effects, such as β_r, as the difference between the global average and the average over all but race, and specifically for race r. 

Note: previously also considered replacing 𝔼_π̂_-R with the conditional version, 𝔼_π̂_·| r. However, some of the estimates seemed nonintuitive and backwards...






  §.§.§ Main-only models


    :      μ( 0,R) = α_0 + β_R 
         
    𝔼_π̂_R (β_R) = 0
    
    
         𝔼_π̂{μ( 0,R)} = α_0





    :       μ( 0,R, S) = α_0 + β_R + β_S 
         𝔼_π̂_R (β_R) = 0 
    𝔼_π̂_S (β_S) = 0
    
         𝔼_π̂{μ( 0, R, S)} = α_0 
    𝔼_π̂_-R{μ( 0, r, S)} = α_0 + β_r,    r=1,…,L_R 
    𝔼_π̂_-S{μ( 0, R, s)} = α_0 + β_s,    s=1,…,L_S





    :      μ( 0,R,S, E) = α_0 + β_R + β_S + β_E
         𝔼_π̂_R (β_R) = 0 
    𝔼_π̂_S (β_S) = 0 
    𝔼_π̂_E (β_E) = 0
    
         𝔼_π̂{μ( 0, R, S, E)} = α_0 
    𝔼_π̂_-S{μ( 0, R, s,E)} = α_0 + β_s,    s=1,…,L_S 
    𝔼_π̂_-R{μ( 0, r, S,E)} = α_0 + β_r,    r=1,…,L_R 
    𝔼_π̂_-E{μ( 0, R, S,e)} = α_0 + β_e,    e=1,…,L_E

For connections with later specifications, note that these ABCs are equivalent to the following constraints (and yield the same implications):

    𝔼_π̂_-R(β_S + β_E) = 0 
    𝔼_π̂_-S(β_R + β_E) = 0 
    𝔼_π̂_-E(β_R + β_S) = 0

To see this, observe that the first two constraints here imply  
𝔼_π̂_S(β_S) =  -𝔼_π̂_E(β_E) and   𝔼_π̂_R(β_R) =  -𝔼_π̂_E(β_E), so 𝔼_π̂_S(β_S) = 𝔼_π̂_R(β_R). Applying the third constraint, we have     𝔼_π̂_R(β_R) = 𝔼_π̂_S(β_S) = 𝔼_π̂_E(β_E) = 0 as before. 

Note: in both cases, the joint (intercept) constraint is implied but not enforced directly.



  §.§.§ Cat-cat interaction models


    :      μ( 0,R,S) = α_0 + β_R + β_S + β_RS^* 
         𝔼_π̂ (β_R + β_S + β_RS^*) = 0 
    𝔼_π̂_S (β_S + β_rS^*) = 0,    r=1,…,L_R 
    𝔼_π̂_R (β_R + β_Rs^*) = 0,    s=1,…,L_S
    
         𝔼_π̂{μ( 0, R, S)} = α_0 
    𝔼_π̂_-R{μ( 0, r, S)} = α_0 + β_r,    r=1,…,L_R 
    𝔼_π̂_-S{μ( 0, R, s)} = α_0 + β_s,    s=1,…,L_S

This includes the correct number of constraints (1 + L_R + L_S) and the implications are consistent with those in the main-only setting.








    :      μ( 0,R,S, E) = α_0 + β_R + β_S + β_E + β_RS^*
         𝔼_π̂ (β_R + β_S +β_E + β_RS^*) = 0 
    𝔼_π̂_S (β_S + β_rS^*) = 0,    r=1,…,L_R 
    𝔼_π̂_R (β_R + β_Rs^*) = 0,    s=1,…,L_S 
    𝔼_π̂_E (β_E) = 0
    
         𝔼_π̂{μ( 0, R, S, E)} = α_0 
    𝔼_π̂_-S{μ( 0, R, s,E)} = α_0 + β_s,    s=1,…,L_S 
    𝔼_π̂_-R{μ( 0, r, S,E)} = α_0 + β_r,    r=1,…,L_R 
    𝔼_π̂_-E{μ( 0, R, S,e)} = α_0 + β_e,    e=1,…,L_E


Here, we have 1 + L_R + L_S + L_E + L_RL_S terms and only L_RL_S + L_E -1 identified parameters, and thus require 2 + L_R + L_S constraints. These ABCs are equivalent to

    𝔼_π̂ (β_R + β_S +β_E + β_RS^*) = 0 
    𝔼_π̂_-R (β_S + β_E + β_rS^*) = 0,    r=1,…,L_R 
    𝔼_π̂_-S (β_R + β_E + β_Rs^*) = 0,    s=1,…,L_S 
    𝔼_π̂_-E (β_R + β_S + β_RS^*) = 0

To see this, observe that the first and last constraints imply 𝔼_π̂_E (β_E) = 0. Thus, we have added a zero to the middle terms and replaced the last constraint with an  equivalent one. 

 




    Under the ABCs  𝔼_π̂_R (β_R + β_Rs^*) = 0 for all s=1,…,L_S and  𝔼_π̂_S (β_S + β_rS^*) = 0 for all r=1,…,L_R, it follows that
    𝔼_π̂_R(β_R) = 𝔼_π̂_S(β_S).


    
    Let 𝔼_π̂_R (β_Rs^*) = k_1 and 𝔼_π̂_S (β_rS^*) = k_2 for all levels s,r. It suffices to show that k_1 = k_2. Rewriting as summations, the first ABC is k_1 = ∑_r π̂_r β_rs^* and therefore β_1s^* = π̂_1^-1(k_1 - ∑_r > 1π̂_r β_rs^*), using r=1 without loss of generality. Substituting into the second ABC, we have k_2 = ∑_s π̂_s β_1s^* 
        =  ∑_s π̂_s {π̂_1^-1(k_1 - ∑_r > 1π̂_r β_rs^*)}. Rearranging terms, this equality holds whenever 
        
    π̂_1 k_2    = k_1 -∑_r> 1π̂_r ∑_s π̂_s β_rs^* 
       = k_1 - ∑_r > 1π̂_r k_2 
       = k_1 - (1 - π̂_1)k_2,

        i.e., k_1 = k_2. 

These results hold for any quantities—parameters or estimators—that satisfy ABCs.  
By construction, we also have 𝔼_π̂_R(β_R) = 𝔼_π̂_S(β_S) = -1/2𝔼_π̂ (β_RS^*). This quantity need not be zero.


    : 
    μ( 0,R,S, E)    = α_0 + β_R + β_S + β_E + β_RS^* + β_RE^*
         𝔼_π̂ (β_R + β_S + β_E + β_RS^* + β_RE^*) = 0 
    𝔼_π̂_S (β_S + β_rS^*) = 0,    r=1,…,L_R 
    𝔼_π̂_E(β_E + β_rE^*) = 0,    r=1,…,L_R 
    𝔼_π̂_-S (β_R + β_E + β_Rs^* + β_RE^*) = 0,    s=1,…,L_S
    𝔼_π̂_-E(β_R + β_S + β_RS^* +  β_Re^*) =0,    e=1,…,L_E
    
         𝔼_π̂{μ( 0, R, S, E)} = α_0 
    𝔼_π̂_-R{μ( 0, r, S,E)} = α_0 + β_r,    r=1,…,L_R 
    𝔼_π̂_-S{μ( 0, R, s, E)} = α_0 + β_s,    s=1,…,L_S 
    𝔼_π̂_-E{μ( 0, R, S, e)} = α_0 + β_e,    e= 1,…, L_E

Here, we have 1 + L_R + L_S + L_E + L_RL_S + L_RL_E terms and only L_RL_S + L_RL_E - L_R identified parameters, and thus require 1 + 2 L_R + L_S + L_E constraints. If we add more terms interacted with race, then the 2 is replaced with the number of race-categorical interactions, and the number of levels for the additional categorical variables appears in the summation (like L_S and L_E). If another additive categorical variable is added, then just one additional constraint  is needed. 

The general formula here seems to be the following: apply the Implications for all terms except those categorical variables C interacted with R, and for those we constrain 𝔼_C(β_C + β_rC^*)=0. 

Alternative:

    𝔼_π̂ (β_R + β_S + β_E + β_RS^* + β_RE^*) = 0 
    𝔼_π̂_-R (β_S + β_E + β_rS^* + β_rE^*) = 0,    r=1,…,L_R 
    𝔼_π̂_E(β_rE^*) = 0,    r=1,…,L_R 
    𝔼_π̂_-S (β_R + β_E + β_Rs^* + β_RE^*) = 0,    s=1,…,L_S
    𝔼_π̂_-E(β_R + β_S + β_RS^* +  β_Re^*) =0,    e=1,…,L_E










    :  
       μ( 0,R,S, E) = α_0 + β_R + β_S + β_E + β_RS^* + β_RE^* + β_SE^*


Here, we have 1 + L_R + L_S + L_E + L_RL_S + L_RL_E + L_SL_E terms and only 1 + L_RL_S + L_RL_E + L_SL_E - L_R - L_S - L_E identified parameters, and thus require 2L_R +  2 L_S + 2L_E constraints.   



    𝔼_π̂_-R (β_S + β_E + β_rS^* + β_SE^*) = 0,    r=1,…,L_R 
    𝔼_π̂_-R (β_rE^*) = 0,    r=1,…,L_R 
    𝔼_π̂_-S (β_R +  β_E + β_Rs^* + β_RE^*) = 0,    s=1,…,L_S 
    𝔼_π̂_-S (β_sE^*) = 0,    s=1,…,L_S 
    𝔼_π̂_-E (β_R + β_S +β_RS^* + β_Re^*) = 0,    e=1,…,L_E 
    𝔼_π̂_-E (β_Se^*) = 0,    e=1,…,L_E 
    
         
        fixme

Note 1: we know this has too many constraints, at least by one. If we can show that it has too many constraint by two, then we can replace each joint version with L_R-1, L_S-1, and L_E-1 constraints, and then add the usual global constraint... 


Note 2: does it matter which joint term we “leave out"? Does the interpretation of the resulting coefficients change??





 






 








 §.§ Estimation invariance with ABCs

We establish conditions under which main effect OLS estimates are invariant to the addition of cat-modifiers under ABCs. These results make  minimal  assumptions about the true data-generating process and do not apply for other identifications (RGE, STZ, etc.). 

First, consider OLS estimation of the intercept. For an enormous class of linear models—with arbitrarily many continuous covariates, categorical covariates, and categorical-categorical interactions—ABCs ensure that the OLS-estimated intercept is always exactly equal to the sample mean, α̂_0 = y̅ n^-1∑_i=1^n y_i.

For any linear model of the form (<ref>) with 1) centered continuous covariates (x̅ =  0),  2) no categorical-continuous interactions (all γ_k,c_k =  0), and 3) ABCs (<ref>) and (<ref>), 
the OLS estimate of the intercept is α̂_0 = y̅. 

Simple models such as  yield the same intercept estimate as more complex models like .  This reaffirms the global interpretation of the intercept: under ABCs, α̂_0 targets the global intercept α_0 = 𝔼_π̂{μ( 0,  C)} (Lemma <ref>). Of course, y̅ is a good estimator for the marginal expectation of Y, so  α̂_0 is appropriately global—even in the presence of categorical variables and their interactions. For models with at least one categorical variable, this result cannot occur for any other identification (RGE, STZ, etc.).  Theorem <ref> extends   <cit.> to allow for categorical-categorical interactions and arbitrarily many continuous covariates. 

Next, consider the impact of adding categorical-categorical interactions on estimation of the main effects. For concreteness, we consider a two-way ANOVA (Example <ref>).

    Under ABCs (<ref>) and (<ref>), the OLS estimates of all main effects are identical under the main-only model (<ref>) and the cat-modified model (<ref>): α̂_0^M = α̂_0, β̂_1,r^M = β̂_1,r for all r=1,…,L_R, and β̂_2,s^M = β̂_2,s for all s=1,…,L_S.

This estimation invariance applies to all (1 + L_R + L_S) main effects in (<ref>). Implicitly, we assume that the OLS estimates exist and are unique (i.e., empty categories are not permitted), but otherwise there are no requirements on the data-generating process. In particular, there are no assumptions of independence or uncorrelateness between the categorical covariates and no assumptions about their relationship with Y.  ABCs deliver a natural interpretation of the categorical variable coefficients: the main effects are deviations from the global mean (Theorem <ref>), while the interaction effects are deviations from the main effects in the main-only model (Theorem <ref>).  This result validates our choice of ABCs (<ref>) and especially (<ref>). Again, such invariance does not occur for other identifications.




Finally, we consider the addition of categorical-continuous interactions to main-only models. For clarity, we focus on a single categorical variable (K=1) with levels r=1,…, L_R, but showcase these principles empirically with multiple categorical variables (Section <ref>).  Following Example <ref>, we begin with a single continuous covariate x (p=1). Let σ̂_x[r]^2  n_r^-1 s_x[r]^2 - x̅_r^2 be the (scaled) sample variance of {x_i}_i=1^n for each group r, where n_r = nπ̂_r, s_x[r]^2 = ∑_r_i=r x_i^2 and x̅_r = n_r^-1∑_r_i=r x_i. If the continuous covariate has  the same scale for each group, then the OLS estimate of the coefficient on x is the same whether or not the cat-modifier is included.

    Under ABCs (<ref>) and the equal-variance condition
    
    σ̂_x[r]^2 = σ̂_x[1]^2    r=1,…,L_R,

    the OLS estimates for the main-only model (<ref>) and the cat-modified model (<ref>) satisfy  estimation invariance, α̂_1^M = α̂_1.

We apply Theorem <ref> as an approximation, α̂_1 ≈α̂_1^M whenever σ̂_x[r]^2 ≈σ̂_x[1]^2 for all r, which is reasonably robust to deviations from  (<ref>) (see Table <ref> and Section <ref>). This condition makes no requirements on the true associations between Y and (x,r) and generally allows the distribution of x to vary by r—as long as the scale is approximately constant. In particular, strong dependencies between x and r are permissible.

It is clarifying to consider violations of the equal-variance condition (<ref>), so that x varies substantially for some groups, but varies little for others. This scenario does not invalidate estimation with ABCs; rather, it decouples the coefficients on x (i.e., the main x-effects) from the models that do (<ref>) or do not (<ref>) include a cat-modifier. Arguably, the main-only model (<ref>) is no longer appropriate in this setting. The x-effect in (<ref>) is α_1^M = μ^M(x+1) - μ^M(x), which considers a one-unit change in x regardless of the group r. But when (<ref>) is violated, the scale of x—and a “one-unit change in x"—is no longer comparable across  groups. Thus,  group-specific slopes μ(x+1, r) - μ(x, r) = α_1 + γ_r are appropriate, which mandates the cat-modified model. As the global x-effect α_1^M from the main-only model is no longer appealing, the cat-modified model with ABCs instead identifies a global x-effect via the group-averaged quantity α_1 = 𝔼_π̂{μ(x+1, R) - μ(x, R)} as in (<ref>). In this setting, distinctness between α_1 and α_1^M is appropriate.

This result can be extended  for p continuous covariates, each of which is cat-modified:  . Here, the equal-variance condition (<ref>)  instead uses the (scaled) sample covariance between x_j and x_h in group r, _r( x_j, x_h)  n_r^-1∑_r_i = r (x_ij - x̅_j)(x_ih - x̅_h). 


    
    Consider the main-only model (<ref>) and the cat-modified model 
    (<ref>), each with K=1 categorical variable. 
    Under  ABCs (<ref>) and the equal-covariance condition 
    _r( x_j, x_h) = _1( x_j, x_h)
    
    for all r=1,…,L_R and each j,h=1,…,p, 
    the OLS estimates satisfy α̂ = α̂^M. 

Theorem <ref> ensures estimation invariance for all p continuous main effects, each of which is cat-modified. Thus, the equal-covariance condition is stricter than (<ref>). As with Theorem <ref>, we apply Theorem <ref> as an approximation, so that α̂≈α̂^M when equal-covariance approximately holds. 

Lastly, we establish a middle ground: , which is a cat-modified model with p continuous covariates and K=1 categorical variable, but now only x_1 is cat-modified. Instead of covariances between all pairs of covariates, the equal-variance condition now involves only x_1 and the residuals ê_1 from regressing x_1 on all other variables, . 


    Consider the main-only model (<ref>) with K=1 and the  cat-modified model 
    (<ref>) with K=1 and interactions only with x_1 (fix γ_j,r = 0 for all j > 1 and r=1,…,L_R). 
    Under ABCs (<ref>)  and the equal-variance condition 
    _r( x_1, ê_1) = _1( x_1, ê_1)
    for all r=1,…,L_R, the OLS estimates satisfy α̂_1^M = α̂_1. 
    
    
    
    

To understand this modified equal-variance condition, we can equivalently express _r(ê_1, x_1) = n_r^-1∑_r_i = r (x_i1^2 - x_i1x̂_i1) = σ̂_x_1[r]^2 - _r(x̂_1, x_1), where x̂_1 are the fitted values from . Theorem <ref> requires that the variability in x_1 explained by the remaining (continuous and categorical) covariates is the same within each group. When this condition is violated, a one-unit change in x_1 holding all else equal among x_2,…,x_p is no longer comparable across groups r. As with Theorem <ref>, the main-only model x-effect α_1^M is no longer appropriate; group-specific x_1-effects μ_x_1'(r) = α_1 + γ_1,r are preferred; and ABCs offer a substitute for the global slope parameter via the group-averaged x_1-effect, α_1 = 𝔼_π̂{μ_x_1'(R)}. 

















 








    
    












 §.§ Powerful inference with ABCs

A primary reason for the unpopularity of cat-modifiers is the loss of statistical power for the main effects. With RGE, cat-modifiers relegate the main effects to a single reference group, which shrinks the effective sample size and often attenuates global effects. Thus,  quantitative modelers may be reluctant to include cat-modifiers for fear of larger p-values, wider confidence intervals, and less power to identify important effects. Consequently, potential race-, sex-, or other group-specific effects may remain hidden. 




ABCs directly and uniquely address this challenge. With the addition of cat-modifier effects, we show that ABCs may actually reduce SEs for the main effects. The magnitude of this reduction increases with the effect size of the cat-modifier. Crucially, when the cat-modifier effect is unnecessary, then the main effect SEs match, but do not inflate, those for a (correct) main-only model. 



Consider two nested models, a main-only model and a cat-modified model. Our general result is that the cat-modified model with ABCs has smaller SEs for the main effects whenever the estimated residual variance is smaller for the cat-modified model,

    Ŝ^2 ≤Ŝ_M^2.

For the maximum likelihood estimators  Ŝ^2 =  ‖ê‖^2/n and Ŝ_M^2 =  ‖ê_M ‖^2/n, where ê and ê_M are the residuals from the cat-modified and main-only models,  respectively, (<ref>) is guaranteed: ‖ê‖^2 ≤‖ê_M ‖^2, typically with strict inequality. More commonly, the unbiased estimators  Ŝ^2 =  ‖ê‖^2/(n - d_M - d) and Ŝ_M^2 =  ‖ê_M ‖^2/(n - d_M) are used, where d_M+d and d_M are the number of identified parameters for the cat-modified and main-only models, respectively. In that case, (<ref>) 
requires that the adjusted-R^2 for the cat-modified model exceeds that for the main-only model, or equivalently,  
(‖ê_M ‖^2  - ‖ê‖^2) /‖ê_M ‖^2 ≥  d/(n-d_M), 

so that the (guaranteed) reduction in sum-squared-residuals from main-only to cat-modified must be  large enough to justify the addition of d parameters. This requirement is modest:  adjusted-R^2 is well-known to prefer overparametrized models, and thus (<ref>) is likely to hold even when the cat-modifiers are extraneous (see Section <ref>). When cat-modifiers are indeed necessary, the reduction from Ŝ_M^2 to Ŝ^2 can be substantial. 




We revisit each case from Section <ref>, beginning with a two-way ANOVA (Example <ref>). 


    Under ABCs (<ref>) and (<ref>) and (<ref>), the OLS SEs of all main effects under the cat-modified model  (<ref>) are less than or equal to those under the main-only model (<ref>): (α̂_0) ≤(α̂_0^M), (β̂_1,r) ≤(β̂_1,r^M) for all r=1,…,L_R, and (β̂_2,s) ≤(β̂_2,s^M) for all s=1,…,L_S.
    

Remarkably, Theorems <ref> and <ref> confirm that ABCs deliver the best possible result: adding cat-modifiers to the main-only model (<ref>) does not change the main effect estimates, but potentially decreases their SEs. Thus, analysts may include cat-modifiers “for free"—with no negative consequences for the main effects—while acquiring the ability to infer possibly heterogeneous, group-specific effects. The same occurs for categorical-continuous interactions, again with the equal-variance condition: 
 
     Under ABCs (<ref>), equal-variance (<ref>), and (<ref>), the OLS SE for the main x-effect under the cat-modified model (<ref>) is less than or equal to that under the main-only model (<ref>):  (α̂_1) ≤(α̂_1^M). 
    
    
    

This result applies in the context of Theorem <ref>, but analogous extensions are available for Theorems <ref> and <ref>; only the condition (<ref>) must be added.

These results make minimal assumptions about the true data-generating process and do not require independence or uncorrelatedness among the covariates. However, the OLS SEs are defined as usual, which implicitly refers to uncorrelated and homoskedastic error assumptions for both the main-only and cat-modified models. Thus, while Theorems <ref> and <ref> are direct statements about the SEs as statistics and do not require any assumptions on the error distributions, the utility of these results is clearly linked to these assumptions. 










 


 
 





 
 
















  










§ SIMULATIONS







 §.§ Validating invariance for estimation and inference

The first objective is to verify the theory of ABCs for estimation and inference invariance,  focusing on the conditions in Section <ref>. We consider both categorical-categorical interactions (Section <ref>) and categorical-continuous interactions (Section <ref>). 





  §.§.§ Categorical-categorical interactions

Given two categorical variables, say  and , what is the effect of including the  interaction term on the estimates and SEs for the  and  main effects? The theory of ABCs (Section <ref>) predicts that the estimates will be exactly the same, while the SEs may decrease if the interaction effect is sufficiently large. These results make no requirements on the data-generating process. Thus, we simulate data such that  1)  and  are dependent, 2) the errors are non-Gaussian, and 3)  ABCs are not satisfied. 

Let  and  be categorical variables with groups {, , , } and {, }, respectively; we use arbitrary labeling here to remain agnostic about particular race- or sex-specific effects in our synthetic data-generating process. For each of n=500 observations, we  draw each  assignment with ( π_a,  π_b,  π_c,  π_d) = (0.4, 0.3, 0.2, 0.1), and then draw the  assignment conditional on  with 
 ( π_uu,  π_vv)_·| r =  = (0.4, 0.6), 
 ( π_uu,  π_vv)_·| r =  = (0.6, 0.4), 
 ( π_uu,  π_vv)_·| r =  = (0.7, 0.3),  and 
 ( π_uu,  π_vv)_·| r =  = (0.2, 0.8). Thus,  and  are dependent, and marginally π_uu = π_vv = 0.5.  The response variable y is simulated with expectation (<ref>) with α_0 = 1, β_c = -1,  γ_b,vv = γ, and all other coefficients zero, or equivalently, 
μ(r,s) = 1   - 𝕀{r = } +  γ𝕀{r = , s = } 
plus t_4(0,1)-distributed errors. 
Crucially, γ controls the  magnitude of the   effect: we consider γ = 0 (no interaction effect), γ = 0.5 (moderate interaction effect; see the supplementary material),  and γ = 1.5 (large interaction effect).  
We repeat this process to create 500 synthetic datasets. 


For each simulated dataset, we fit the main-only model (<ref>) 
and the cat-modified model (<ref>) 
and compare the estimates and SEs for each main effect between the two models. These models are fit using ABCs, RGE (references  r =, s =), and STZ. This setting is favorable for RGE: the data-generating process satisfies RGE (β_a = 0, β_uu = 0, γ_a,uu = 0), but not ABCs, and the reference groups are the most abundant groups for both  and . To aid comparisons, we omit the main effects from the RGE reference groups, resulting in four main effects (β_b, β_c, β_d, β_vv) to compare between the main-only and cat-modified models for ABCs, RGE, and STZ. 
 

The estimates are in Figure <ref>. Under ABCs, all  and  main effects are exactly identical between the models that do and do not include the  interaction, confirming Theorem <ref>. This result persists regardless of the true data-generating process, including the magnitude of the interaction. No such invariance occurs for RGE or STZ: the inclusion of the interaction completely changes the estimates (and the interpretations) of the main effects. 




The SEs are in 
Figure <ref>. 
Under ABCs,  the addition of the  interaction  has virtually no impact on the main effect SEs. For larger γ, the main effect SEs are slightly smaller (about a 5% reduction) for cat-modified model, as expected. More substantial SE reductions occur for larger interactions (γ≥ 5), although such large interaction effects are not usually expected in practice. 
Again, no such results occur for RGE: the SEs are much larger for the model that includes  the  interaction, regardless of γ. 



These results must be interpreted carefully: the “main effects" under ABCs, RGE, or STZ target different functionals of μ(r,s). In fact, the OLS fitted values for μ̂(r,s) are identical under each identification (this is not the case for regularized regression). However, each identification puts forth “main effects" in both the main-only and cat-modified model. We argue that the main effects under ABCs are superior: the estimates are exactly invariant to the inclusion of () interactions and the SEs may decrease slightly. Uniquely, ABCs circumvent the traditional roadblocks to including interactions: the interpretations remain simple (and equitable) and there is no loss of statistical power for the main effects. 







  §.§.§ Categorical-continuous interactions

We now revise this analysis for categorical-continuous interactions: given categorical  and continuous , what is the effect of including the  interaction on the main x-effect? The theory of ABCs (Section <ref>) predicts that invariance for estimation and inference is contingent on  the equal-variance condition (<ref>). We investigate the sensitivity to this condition as well as to the magnitude of the interaction effect. 

To incorporate dependencies between  and , we simulate  as in Section <ref> and then simulate  conditional on : 
[| = ] ∼ 5  + σ_ac N(0,1), 
[| = ] ∼√(12) (0,1), 
[| = ] ∼ -5 + σ_act_8(0,1), and 
[| = ] ∼(1,1). 


    [| = r] ∼
        5  + σ_ac N(0,1)      r = 
    √(12) (0,1)     r = 
    
         -5 + σ_act_8(0,1)     r = 
    (1,1)     r =


Each  group features a unique distribution with varying means, so  and  are strongly dependent and highly correlated. 
Here, σ_ac controls the degree to which the equal-variance condition (<ref>) is violated: σ_ac = 1 is a mild violation (the race-specific population variances are identical, but the sample quantities σ̂_x[r]^2 are not) while σ_ac = 1.5 is a strong violation. The response variable y is simulated with expectation (<ref>) with α_0 = α_1 = 1, β_c = -1, and γ_b = γ, and all other coefficients zero, or equivalently, 
μ(x, r) = 1 + x  - 𝕀{r = } + γ x 𝕀{r = } 
plus t_4(0,1)-distributed errors. 
This data-generating process satisfies RGE (β_a = 0), but not ABCs, and includes non-Gaussian errors. Again, γ∈{0,0.5,1.5} determines the magnitude of the interaction effect.  We repeat this process to create 500 synthetic datasets. 


For each simulated dataset, we fit the main-only model (<ref>)  
and the cat-modified model (<ref>) 
and compare the estimates and SEs for main x-effect α_1 between the two models under ABCs, RGE, and STZ. 
The estimates are in Figure <ref>. Even with mild deviations from the equal-variance condition (<ref>), the x-effect estimates under ABCs are nearly identical between models that do and do not include the  interaction. Crucially, this invariance persists regardless of the true interaction effect magnitude γ. Under strong violations of (<ref>) and a strong interaction effect, Theorem <ref> no longer applies. However, as argued in Section <ref>, this behavior is appropriate: when (<ref>)  is strongly violated,  a one-unit change in x is not comparable for different  groups, so only the model that includes race-specific x-effects (via the  interaction) is appropriate. Finally, we note the absence of invariance for estimation with RGE or STZ. These estimators change dramatically when γ is moderate to large. Even when γ = 0—when classical consistency results for OLS should provide asymptotic invariance in this case—they do not match the invariance of ABCs.





The SEs are in Figure <ref>. As long as the violations of (<ref>) are mild (σ_ac = 1), the SEs of the x-effect, under ABCs, are 1) nearly identical between the main-only and cat-modified models when the true interaction effect is small  and 2) smaller for the cat-modified model  when the true interaction effect is large. Critically, including the  interaction under ABCs does not sacrifice any statistical power for the main x-effect, and in some cases enhances it. This is decisively not the case for RGE or STZ: when the true interaction effect is zero, adding the  interaction decreases statistical power for the main x-effect. 

The same caveats apply as in Section <ref>: RGE, STZ, and ABCs are targeting different functionals of   μ(x, r), but again we argue that the estimation and inference properties of the “main effects" are most ideal under ABCs. 







 
 
 




 









 §.§ Evaluating estimation and inference with cat-modifiers

We evaluate the practical impacts of the estimation invariance and enhanced power of ABCs. The goal is quantify the extent to which ABCs 1) maintain accurate estimates and precise uncertainty quantification when extraneous cat-modifiers are included and 2) improve estimation and reduce uncertainty when necessary cat-modifiers are included. The simulation design has three main features, described below.


First, we generate multiple, dependent categorical and continuous covariates. Dependent categorical variables  and  are generated as in  Section <ref>, while p=10 dependent continuous variables 
are generated as follows: x_j is drawn as in Section <ref> with σ_ac=1 for j=1,3,5,7,9 and  N(0,1) for j=2,4,6,8,10. Some x-variables are correlated with , which induces correlations among those x-variables with each other and with , while others are uncorrelated.  

Second, the regression coefficients are constructed  to satisfy both RGE and ABCs. 
These include an intercept α_0=1,  active main x-effects α_j = 1 for j=1,…,5,  main effects β_b = 1 and β_c = β_d = -1, and cat-modifiers γ_b,j = γ and γ_c,j = γ_d,j = -γ for j=1,…,5; the remaining coefficients are all zero. RGE is enforced because all reference group coefficients are zero  (β_a  = 0, β_uu = 0, γ_a,uu = 0, and γ_a, j = 0 for all j=1,…,p), while ABCs are satisfied for the population proportions ( π_a,  π_b,  π_c,  π_d) = (0.4, 0.3, 0.2, 0.1). Thus, it is meaningful to compare coefficient estimates and inference between RGE and ABCs (STZ is not satisfied and thus excluded). ABCs actually use the sample proportions and are at a slight disadvantage. All  main and interaction effects are zero, since this is the only way to satisfy both RGE and ABCs for a variable with two groups. 



Third, a parameter γ controls the magnitude of the cat-modifier () effect. We consider γ = 0 for extraneous cat-modifiers and γ = 1.5 for necessary cat-modifiers.  

Using these covariates and coefficient values, the response variable y is simulated with expectation (<ref>)  plus Gaussian errors and a signal-to-noise ratio of one. We vary the sample size n ∈{200, 500, 1000}  and repeat this process to create 500 synthetic datasets. 

For each synthetic dataset, we fit the main-only  model  and the cat-modified model  that includes  interactions with all continuous covariates and , both under ABCs and RGE. The main-only model is favored when γ = 0, while the opposite is true for γ > 0. Either way, the true data-generating process is sparse, so both models include many extraneous parameters. The main-only model includes 15 identifiable parameters (9 true signals)  while the cat-modified model includes 48 identifiable parameters. When γ = 0, the cat-modified model estimates 33 extraneous (identified) parameters; even when γ > 0, only 15 of those cat-modifier effects are nonzero.  



Evaluation primarily focuses on the  main x-effects  (α_1,…,α_10), which isolates the impacts of including  extraneous (γ = 0) or necessary (γ > 0) cat-modifiers on estimation and inference for the main effects. For benchmarking, we also include evaluations for all (main and cat-modifier) coefficients. Note that for the main-only model, RGE and ABCs produce main x-effect estimates and SEs that are identical and nearly identical, respectively. 

Estimation accuracy is evaluated by root mean squared error (RMSE) for the regression coefficients (Figure <ref>). The cat-modified model with ABCs preserves estimation accuracy of the main x-effects, even when (all 33) cat-modifier effects are included unnecessarily (Figure <ref>, top left). When some cat-modifiers are necessary, the cat-modified model with ABCs delivers slightly more accurate main x-effect estimates than the main-only models (Figure <ref>, bottom left). Neither result holds for RGE. By comparison, estimation accuracy across all coefficients 
(Figure <ref>, right) overwhelmingly favors the correctly-specified model (main-only for γ=0, cat-modified for γ = 1.5), regardless of RGE or ABCs. This result is not surprising, but rather serves as a contrast to emphasize the extraordinary robustness of main effect estimation accuracy for cat-modified models—but only under ABCs.  





Inference is evaluated by mean interval widths and empirical coverage for 95% confidence intervals for the regression coefficients (Figure <ref>); narrow intervals are preferred, subject to nominal coverage.  For ABCs, the cat-modified model offers nearly the same statistical power for the main x-effects as does the main-only model, even when (all 33) cat-modifier effects are included extraneously (Figure <ref>, top left). Compare that to inference for all coefficients (Figure <ref>, top right): here, the inclusion of extraneous cat-modifiers inflates interval widths by more than 300%. Clearly, this inferential robustness against extraneous cat-modifiers is a special property for 1) main effects and 2) ABCs.  When some cat-modifiers are necessary, the cat-modified model with ABCs  improves statistical power for the main x-effects compared to the main-only models. Again, no such results hold for RGE, for which the cat-modified model consistently sacrifices statistical power. Finally, as expected, main-only models fail to provide coverage for active cat-modified parameters (Figure <ref>, bottom right). 





The supplementary material includes additional results for smaller (n=200) and larger (n=1000) sample sizes; predictive evaluations based on RMSEs for μ( x,  c); comparisons between ABCs and RGE for lasso and ridge regression, also including an “overparametrized" version that does not impose any constraints; and modifications for σ_ac=1.5 that strongly violate the equal-variance condition (<ref>), with similar results as for σ_ac=1. 




 












§ APPLICATION

We apply cat-modified regression to assess heterogeneity among factors linked to STEM educational outcomes. Our dataset[Data management, access, and analysis are governed by data use
agreements and an Institutional Review Board–approved research protocol at the
University of Illinois Chicago.] links three administrative datasets to provide individual-level data for n=27,638 children in North Carolina (NC):   NC Detailed Birth Records, NC Blood Lead  Surveillance, and NC Standardized Testing Data; details are provided elsewhere <cit.>. The STEM educational outcome variable y_i is the end-of-4th-grade standardized math score for student i, centered and scaled by year of test (2010, 2011, or 2012). These math scores are linked with a rich collection of  demographic, social, and environmental exposure variables. The continuous covariates are  racial (residential) isolation (), which is a measure of structural racism based on neighborhood information; blood lead level (), which measures lead exposure; 
birthweight percentile (); mother's age at time of child's birth (); and exposure to the air pollutant _2.5  during the year prior to the exam (). The continuous covariates are centered and scaled. The categorical covariates are mother's race (), child's sex (), mother's education level (), and an indicator of economically disadvantaged () determined by participation in the National Lunch Program; see Table <ref> for categorical levels and proportions. 

Our linear regression analysis spans from main-only models to a variety of cat-modified models, expanding significantly upon the simple models from  Tables <ref> and <ref>. First, we establish a main-only model that includes each of these covariates (, , , , , , , , and ) but no interactions. 

The main-only model features a variety of interesting demographic, socio-economic, maternal, and environmental exposure variables, with  16 regression parameters (12 identified). Next, the race-modified model adds an interaction between  and every other covariate. 

This expansion allows for heterogeneous effects of each variable by race, thus providing insights into the myriad impacts of race on each child's life course and educational outcomes,  with  52 regression parameters (30 identified). Finally, the cat-modified model adds all pairwise categorical-continuous and categorical-categorical interactions. This instance of (<ref>) allows the fullest (pairwise) extent of heterogeneous effects across the rich collection of demographic and socio-economic variables (, , , and ), with 103 regression parameters (55 identified). We fit each of these models under ABCs and RGE (references , , lowest  (), and not ). 

While each model offers potential for insight, a critical limitation of popular identification approaches, especially RGE, is that the estimates, inference, and interpretations of the main effects are highly sensitive to the choice of cat-modifiers. To see this, we present the main effect OLS estimates and 95% confidences intervals across these models in Figure <ref>. With RGE (right), the main effects shift and the intervals widen considerably—with increases from 160% to 230% in interval widths—upon adding race- (blue) and other (red) cat-modifiers. These main effects and accompanying interaction effects (not shown) are anchored at the reference groups and refer to different functionals of μ( x,  c) under each model—even though the statistical output for the “main effects" is typically presented identically, regardless of any cat-modifiers. Thus, while cat-modified models are essential for heterogeneous effects, there is a cost incurred under RGE: each additional  cat-modifier requires careful re-consideration of the main  and interaction effects, which impedes statistical analysis and undermines interpretability. 





The invariance of ABCs resolves these limitations: estimation and inference for the main effects (Figure <ref>, left) are nearly identical across these substantially different models. This occurs despite strong dependencies among the covariates (and interactions) with both continuous and categorical variables. ABCs effectively decouple the main effects from the cat-modifiers: even adding 87 parameters (43 identified) from the main-only model to obtain the cat-modified model does not lessen, and in some cases increases the statistical power for the main effects. With ABCs, the statistical analyst may consider these or other cat-modified models without compromising or complicating inferences for the main effects. 


The full regression output from the cat-modified model with ABCs is in Tables <ref> and <ref>. 
Lower math scores are strongly (p < 0.01) associated with racial (residential) isolation, lead exposure, lower (mother's) education levels, and occur for non-Hispanic Black and economically disadvantaged students; higher math scores are strongly associated with birthweight percentile, mother's age, and the opposing categories from above. ABCs provide output for all levels of all categorical variables, thus eliminating the presentation bias of RGE that presents all output relative to the reference groups (White, Male, etc.). For categorical variables with ABCs, the estimates and SEs are directly related to the abundances: for instance, categorical variables with equal proportions such as , the main and -continuous interaction estimates are equal and opposite with identical SEs for  Male and Female. 


The regression output strongly supports heterogeneous effects, most notably via mother's education level and with intersectionality of race and sex (e.g., ). 



    











Finally, we simplify the heavily-parametrized cat-modified model by fitting a lasso regression under ABCs; λ is selected using 10-fold cross-validation and the one-standard-error rule <cit.>. The selected main effects  (, , , , , , and ) match the conclusions from Figure <ref>. Among interactions,  coefficients from , , , , and  are selected. The accompanying coefficients of these cat-modifiers suggest that some positive effects are not as beneficial for minoritized groups: the positive effect of  mother's education () are attenuated for  Black and Hispanic students, while the benefits of mother's age are less so for lower mother's education, Black, or economically disadvantaged students. 











§ CONCLUSION


To encourage and enable statistical analysis of heterogeneous effects, we analyzed and advocated ABCs—an alternative parametrization and estimation strategy for cat-modified models that include categorical-continuous or categorical-categorical interactions. Unlike default methods, ABCs allow the inclusion of cat-modifiers “for free": there is virtually no impact on the main effect estimates, while main effect inference is stable or more powerful. We rigorously proved these estimation and inference invariance properties and validated them empirically with extensive simulation studies. We also provided strategies for estimation and inference, including both generalized and regularized regression. Finally, we applied these tools to analyze STEM educational outcomes and showed how ABCs facilitate  identification and estimation of (demographic) heterogeneous effects without incurring any costs—in estimation, inference, or interpretation—for the main effects.  



Despite these many advantages, we note several caveats. First, ABCs may increase susceptibility to p-hacking. Because ABCs facilitate the inclusion of interactions, and with a large enumeration of potential interactions,  there is a heightened potential for both discovery and false discovery. Proper statistical analyses require careful consideration of hypothesis tests with  multiple testing corrections
as appropriate.  Second, ABCs cannot guarantee that cat-modifiers will be (practically or statistically) significant. Detection of heterogeneous effects often requires well-designed studies or large sample sizes. 
Third, our invariance results apply for least squares estimation, but not more general loss functions. Finally, many categorical variables, especially race, sex, and other protected groups, are susceptible to misinterpetation, inaccurate labelings, and exclusions of small groups. 


























 


§ ACKNOWLEDGEMENTS

We thank Virginia Baskin,  Caleb Fikes, Prayag Gordy, and Jai Uparkar for helpful discussions and their contributions to software development.



chicago









figuresection
tablesection
equationsection





 Supplement to 

    “Facilitating heterogeneous effect estimation via statistically efficient categorical modifiers"
    
      0
 
 Daniel R. Kowal
    
    





    This supplementary file includes proofs of all results (Section <ref>), details for generalized linear models (Section <ref>), additional simulation results (Section <ref>), and additional details and analyses of the North Carolina education data (Section <ref>).





§ PROOFS
 

We first provide a sketch of the general proof technique. Our results require only basic linear algebra, but the notation can be cumbersome. Here, the goal is to provide clear intuition for our results and to put forth a blueprint to analyze similar invariance properties in other settings. 

Consider two generic but nested models:

     

    

The task is to establish conditions under which the OLS estimates of the coefficients on X_* are unchanged by the addition of X_1, with X_0 also present in both models.  In our typical setting,   X_* is a matrix of (continuous) covariates, X_0 is a matrix of categorical indicator variables, and  X_1  contains cat-modifiers. Crucially, for identifiable estimation and inference, these matrices involving categorical covariates or cat-modifiers must already be parametrized to enforce the identifiable constraints, such as omitting certain columns for RGE or applying the QR reparametrization from Section <ref> for ABCs. 

The most relevant classical result is due to Frisch and Waugh (1933) and Lovell (1963): 


 Frisch-Waugh-Lovell (FWL) Theorem:
    
    For a partition of the n × p covariate matrix X = ( X_0: X_1) into p_0 and p_1 columns, the partition of the ordinary least squares estimator β̂ = (β̂_0^⊤, β̂_1^⊤)^⊤ satisfies β̂_0 = ( X_0^⊤ E_01)^-1 E_01^⊤ y = ( E_01^⊤ E_01)^-1 E_01^⊤ y, where E_01 = ( I_n -  H_X_1)  X_0 is the n × p_0 matrix of residuals from regressing each column of X_0 on X_1, H_X_1 =  X_1 ( X_1^⊤ X_1)^-1 X_1^⊤ is the corresponding hat matrix for X_1, and y = (y_1,…,y_n)^⊤ is the vector of outcomes. 

 

Applying the FWL Theorem, our target result occurs when  = , for which a sufficient condition is X_*^⊤ E_10 = 0
where E_10 = . More formally, let H_0  X_0( X_0^⊤ X_0)^-1 X_0^⊤ be the hat matrix for the covariates X_0 that are always included. Then the sufficient condition is 

    X_*^⊤ ( X_1 -  H_0  X_1) =  0

or equivalently, X_*^⊤ X_1 - ( H_0 X_*)^⊤ X_1 =  0, if we prefer to consider regressing X_0 on X_* instead of X_1. 
 In the simpler case without a common X_0 term, the requirement simplifies to X_*^⊤ X_1 =  0, where the role orthogonality is now abundantly clear. 

In the presence of ABCs (or other linear constraints), we apply the reparametrization from Section <ref> that replaces X_1 with X_1  Q_π̂ to enforce the constraints. The main condition (<ref>) is now 

    X_*^⊤ ( X_1 -  H_0  X_1) Q_π̂ =  0.

The key observation is that   A_π̂ Q_π̂ =  0 by construction; this is true for the QR-based approach with any constraints of the form A_π̂θ =  0, including but not limited to ABCs. Thus, the general  requirement is to show that X_*^⊤ ( X_1 -  H_0  X_1) is  row-wise proportional to A_π̂, which produces the necessary zeros. 

We apply this strategy for Theorems <ref>–<ref>, but prove the main results in sequence.





    For simplicity, we prove this result for the case of (<ref>), but the same ideas apply more generally. 
    
    It is sufficient to show that  𝔼_π̂(β_1,R + β_2,S + γ_RS) = 0. Direct application of (<ref>) implies 𝔼_π̂(β_1,R + β_2,S + γ_RS) = 𝔼_π̂_R(β_1,R) + 𝔼_π̂_S(β_2,S) + 𝔼_π̂(γ_RS) = 𝔼_π̂(γ_RS), and further simplifying, 𝔼_π̂(γ_RS) = ∑_r=1^L_R∑_s=1^L_Sπ̂_rsγ_rs = 0 since the internal summation is zero for all r by (<ref>).



    We prove this result for the case of (<ref>) for simplicity. Applying (<ref>) to all but r=1, we have ∑_r=1^L_Rπ̂_rsγ_rs = 0 for s=1,…,L_S and thus γ_1s = -π̂_1s^-1∑_r=2^L_Rπ̂_rsγ_rs. The conditional expectation is then 
    𝔼_π̂_S | R=1(γ_RS) = ∑_s=1^L_Sπ̂_1sγ_1s
        = -∑_s=1^L_S
        ∑_r=2^L_Rπ̂_rsγ_rs
        =∑_r=2^L_R∑_s=1^L_Sπ̂_rsγ_rs
        =0 
    since the internal summation equals zero for all r>1. 




    Under OLS, y̅ equals the sample mean of the fitted values {ŷ_i}_i=1^n; this is true for ABCs, RGE, STZ, etc. Then we simplify: 
    
    y̅   = n^-1∑_i=1^n ŷ_i = n^-1∑_i=1^n(α̂_0 +  x_i^⊤α̂ + ∑_k=1^K β̂_k, c_k + ∑_k=1^K-1∑_k'=k+1^K γ̂_k,k', c_k, c_k' )
       = α̂_0 + x̅^⊤α̂ +  ∑_k=1^K ∑_c_k =1^L_kπ̂_k, c_kβ̂_k, c_k + ∑_k=1^K-1∑_k'=k+1^K ∑_c_k =1^L_k∑_c_k' =1^L_k'π̂_k,k', c_k, c_k'γ̂_k,k', c_k, c_k'
       = α̂_0

    since the continuous covariates are centered (x̅ =  0) and the main categorical effects and categorical-categorical interactions satisfy ABCs, so the interior summations equal zero for all k, k'. 






    Following the  and  terminology from Example <ref>,  define the design matrix by letting 1 be an n-dimensional vector of ones, Z_1 the n × L_R matrix of   indicators with  entries [ Z_1]_ir = 1 if r_i = r and zero otherwise, and Z_2 n × L_S matrix of   indicators  with entries [ Z_2]_is = 1 if s_i = s and zero otherwise. Similarly, let Z_12 be the n × L_RL_S matrix with indicators for the interaction terms. Consider the cross-produces of each main effect with the interaction matrix. 
    First, 1^⊤ Z_12 is the 1 × L_RL_S matrix where each entry is the joint total by  and , i.e., ∑_i=1^n 𝕀(r_i = r, s_i = s) for each r,s combination. 
    Next, Z_1^⊤ Z_12 is L_R × L_RL_S, where each row r includes the totals  ∑_i=1^n 𝕀(r_i = r, s_i = s) for all s=1,…,L_S but zeros for columns with other  groups, r'  r. Similarly, Z_2^⊤ Z_12 is L_S × L_RL_S, where each row s includes the totals  ∑_i=1^n 𝕀(r_i = r, s_i = s) for all r=1,…,L_R but  zeros for columns with other  groups, s'  s. 

    Estimation invariance occurs when these cross-products are zero. However, we must also account for identifiability constraints. Following Section <ref>,   Z_12 is replaced by Z_12 Q_π̂, where A_π̂ Q_π̂ =  0 and  A_π̂ encodes the constraints on the interaction coefficients. Thus, it suffices to show that 1^⊤ Z_12 Q_π̂ =  0, Z_1^⊤ Z_12 Q_π̂ =  0, and Z_2^⊤ Z_12 Q_π̂ =  0, with each zero of the appropriate dimension. 
    For ABCs, the latter two cross-products, when scaled by n^-1, exactly match the joint ABCs 
    (<ref>) in the form of A_π̂, and thus are zero upon post-multiplication by Q_π̂. Similarly, the first cross-product is also zero by applying the arguments from Lemma <ref>.
    








    Let  y = (y_1,…,y_n)^⊤, 
    x = (x_1,…, x_n)^⊤, and Z be the matrix of categorical () indicators with entries [ Z]_ir = 1 if r_i = r and zero otherwise. The cat-modifier term is Z_X =  D_X  Z and D_X = ( x). The goal is to show that, under the stated conditions, (<ref>) holds with x =  X_*, X_1 =  Z_X, and H_0  =  H_Z =  Z( Z^⊤ Z)^-1 Z^⊤ is the hat matrix for the categorical covariate. 
    
    For clarity, we provide more detailed results en route. Applying the FWL Theorem, the estimated coefficients under (<ref>) satisfy 
    α̂_1^M = ( x^⊤ê_x∼ r)^-1ê_x∼ r^⊤ y, 
    where  ê_x∼ r is the vector of residuals from regressing the continuous variable {x}_i=1^n on the categorical variable {r_i}_i=1^n (i.e., Z). Similarly, the estimated coefficients under (<ref>) satisfy 
    α̂_1 = ( x^⊤ê_x∼ r + Z_XQ)^-1ê_x∼ r + Z_XQ^⊤ y, 
     where ê_x∼ r + Z_XQ are the residuals from regressing the continuous variable {x}_i=1^n on the categorical variable {r_i}_i=1^n (i.e., Z) and the reparametrized interaction term that enforces  ABCs,  Z_XQ =  Z_X  Q_-(1:m) (see Section <ref>). Thus, it suffices to show that ê_x∼ r = ê_x∼ r + Z_XQ, which occurs when the additional (interaction) coefficients from the latter model, say b̂_Z_XQ (corresponding to Z_XQ), are identically zero. Again using  the FWL Theorem, these estimated coefficients are b̂_Z_XQ =   Q_-(1:m) ( Z_XQ^⊤ E_Z_XQ)^-1 E_Z_XQ^⊤ x, where E_Z_XQ is the matrix of residuals from regressing Z_XQ on Z, i.e., E_Z_XQ =  Z_XQ -  H_Z  Z_XQ. Thus, showing x^⊤ E_Z_XQ =  0 is sufficient, and factoring x^⊤ E_Z_XQ = ( x^⊤ Z_X -  x^⊤ H_Z  Z_X)  Q_-(1:m) shows the connection with (<ref>).
    
     First, observe that  x^⊤ Z_X =  x^⊤ D_X  Z = (s_x[1]^2,…, 
     s_x[L_R]^2) is the vector of s_x[r]^2 = ∑_r_i=r x_i^2 across groups. Next, observe that ( Z^⊤ Z)^-1 Z^⊤ Z_X = ({x̅_r}_r) contains the sample means of {x}_i=1^n by each group r, and therefore x^⊤ H_Z  Z_X =  x^⊤ Z ({x̅_r}_r) = (n_1 x̅_1^2, …, n_L_Rx̅_L_R^2) with n_r = n π̂_r. Combining these results, we have x^⊤ E_Z_XQ =  v^⊤ Q_-(1:m), where v^⊤ = (s_1^2 - n_1 x̅_1^2,…, s_L_R^2 - n_L_Rx̅_L_R^2) = n ( π̂_1 σ̂_x[1]^2, …,π̂_L_Rσ̂_x[L_R]^2) = n σ̂_x[1]^2 π̂^⊤ under the assumption that σ̂_x[r]^2 = σ̂_x[1]^2 is common for all r, which is precisely the equal-variance condition (<ref>). Finally, the definition of Q_-(1:m) via  ABCs implies that π̂^⊤ Q_-(1:m) =  0, which proves the result.





Let X denote the n × p matrix of continuous covariates, Z  the matrix of categorical dummy variables with entries [ Z]_ir = 1 if r_i = r and zero otherwise, and Z_XQ = ( Z_X_1Q,…,  Z_X_pQ) with Z_X_jQ =  Z_X_j Q_-(1:m), 
 Z_X_j =  D_X_j Z, and D_X_j = ( x_j). By the FWL Theorem, it suffices to show that E_M =  E, where E_M = ( I_n -  H_Z) X are the residuals from regressing each column of X on Z and E are similarly the residuals from regressing each column of X on Z and Z_XQ. Thus, it is sufficient to show that the coefficients associated with Z_XQ in the latter regression are identically zero. Again using the FWL Theorem, we see that this occurs whenever X^⊤ E_Z_XQ =  0, where E_Z_XQ =  Z_XQ -  H_Z  Z_XQ = ( Z_X_1Q -  H_Z  Z_X_1Q, …,  Z_X_pQ -  H_Z  Z_X_pQ). Noticing that X^⊤ E_Z_XQ = ( X^⊤ ( Z_X_1Q -  H_Z  Z_X_1Q), …,  X^⊤( Z_X_pQ -  H_Z  Z_X_pQ)), we consider the individual components x_h^⊤( Z_X_jQ -  H_Z  Z_X_jQ) = ( x_h^⊤ D_x_j Z -  x_h^⊤ H_Z  D_x_j Z)  Q_-(1:m), each of which must equal the zero vector with dimension equal to the number of categories. Noting that x_h^⊤ D_x_j Z = (…, s_r(j,h),…) with s_r(j,h) = ∑_r_i=r x_ijx_ih and x_h^⊤ H_Z  D_x_j Z = (…, n_r x̅_r(j) x̅_r(h), …) with x̅_r(j) = n_r^-1∑_r_i=r x_ij, we apply the same arguments as in Theorem <ref>. 





    Let X_0 be the matrix of covariates that includes X_-1 (i.e., all covariates but x_1) and the categorical (race) indicators Z with entries [ Z]_ir = 1 if r_i = r and zero otherwise, and let H_0  X_0( X_0^⊤ X_0)^-1 X_0^⊤ be its hat matrix. For the interaction terms, let Z_x_1Q =  Z_x_1 Q_π̂ where Z_x_1 =  D_x_1 Z, D_x_1 = ( x_1), and π̂^⊤ Q_π̂ =  0 enforces the ABCs for the interaction terms (see Section <ref>). Now, it is sufficient to show that ( x_1^⊤ Z_x_1 -  x_1^⊤ H_0  Z_x_1) Q_π̂ =  0 as in (<ref>). First, observe that x_1^⊤ Z_x_1 = (⋯ s_x_1[r]^2 ⋯ ). Second, x_1^⊤ H_0  Z_x_1 = x̂_1^⊤ D_x_1 Z = (⋯∑_r_i = rx̂_i1 x_i1⋯ ) where x̂_1 =   H_0  x. Combining these results, we see that v^⊤ x_1^⊤ Z_x_1 -  x_1^⊤ H_0  Z_x_1 = (⋯∑_r_i = r (x_i1^2 - x_i1x̂_i1) ⋯). Consider the interior terms for each r:  ∑_r_i = r (x_i1^2 - x_i1x̂_i1) =  ∑_r_i = r x_i1ê_i1 = n_r_r(ê_1, x_1), where the latter equality holds because ∑_r_i=rê_i1 = 0 for each r due to the inclusion of Z. Thus, v^⊤ = (⋯ n_r_r(ê_1, x_1) ⋯ ) = k(⋯ n_r ⋯) for some constant k that does not depend on r, which implies that v^⊤ Q_π̂ = nk π̂^⊤ Q_π̂ =  0 under ABCs.




    The proof of Theorem <ref> establishes orthogonality of ABCs-constrained interaction to the main effects under the same conditions. Given this orthogonality, the remainder of the proof follows the proof of Theorem <ref> and is omitted for brevity. 




    
    Applying the same arguments from the proof of Theorem <ref>, the variances satisfy 
        (α̂_1^M) = σ_M^2 ( x^⊤ê_x∼ r)^-1 and 
        (α̂_1) = σ^2 ( x^⊤ê_x∼ r + Z_XQ)^-1, 
    where σ_M^2 is the error variance from the main-only model and σ^2 is the error variance from the cat-modified model, assuming uncorrelated and homoskedastic errors in both models. These error assumptions are not required to prove the result, but do motivate the definition of the SE. Under the equal-variance condition (<ref>), we previously showed  that ê_x∼ r = ê_x∼ r + Z_XQ. Thus, the only difference in the variances of the estimators occurs because of the error variances, i.e., 
    (α̂_1)/(α̂_1^M)  =  σ^2/σ_M^2. The SEs  substitute point estimates for σ_M and σ: (α̂_1^M) = Ŝ_M √(( x^⊤ê_x∼ r)^-1) and similarly,
        
    (α̂_1)    = Ŝ√(( x^⊤ê_x∼ r + Z_XQ)^-1)
       = Ŝ√(( x^⊤ê_x∼ r)^-1)
       = Ŝ/Ŝ_M(α̂_1^M) 
       ≤(α̂_1^M)

    since Ŝ≤Ŝ_M under (<ref>). 







§ GENERALIZED LINEAR MODELS WITH ABCS
 

Generalized linear models (GLMs) are immensely useful for regression analysis with a variety of data types, including continuous, count, binary, and categorical data. Broadly, GLMs require a choice of data distribution (e.g., Gaussian, Poisson, Bernoulli, etc.) and a link function g that replaces the expectation of Y, say μ( x,  c)  with a transformed version, say g{μ( x,  c)}, in the cat-modified model (<ref>) (similarly for the main-only model (<ref>)). With categorical covariates and cat-modifiers, identification constraints are needed for the regression coefficients exactly as in the ordinary (untransformed) linear model. ABCs again provide a suitable identification strategy, with straightforward estimation and inference: the loss function ℒ in Section <ref>  is specified to incorporate the appropriate negative log-likelihood and link function. 

More subtly, the presence of the link function g implies that interpretations of the coefficients will be different from those in the  ordinary linear model (Section <ref>). For the main x_j-effects,  recall that α_j = 𝔼_π̂ (α_j + ∑_k=1^K γ_j, k, C_k) under ABCs (<ref>), regardless of the data distribution or the link function. When the link g is not the identity,  it is no longer the case that the internal quantity in the expectation equals μ_x_j'( C), and thus the previous interpretation from (<ref>) requires modifications. Most generally, cat-modified GLMs satisfy

    g{μ(x_j+1,  x_-j,  c)} - g{μ(x_j,  x_-j,  c)} = α_j + ∑_k=1^K γ_j, k, c_k,

so under ABCs (<ref>) the main x_j-effect is 

    α_j = 𝔼_π̂ [
        g{μ(x_j+1,  x_-j,  C)} - g{μ(x_j,  x_-j,  C)}].

As with ordinary linear regression, ABCs identify each main effect as a group-averaged comparison between expectations at (x_j+1,  x_-j) and (x_j,  x_-j). The main differences for GLMs is the presence of the link function g within this comparison. 


For clarity, we provide interpretations for logistic and Poisson regression. For binary data Y ∈{0,1}, μ( x,  c) equals the probability that Y=1 and logistic regression specifies g as the logit link, g(t) = log{t/(1-t)}. Now, (<ref>) simplifies to the log-odds-ratio: 

    g{μ(x_j+1,  x_-j,  c)} - g{μ(x_j,  x_-j,  c)} = log[{μ(x_j+1,  x_-j,  c)}/{μ(x_j,  x_-j,  c)}]

where {μ( x,  c)} = μ( x,  c)/{1 - μ( x,  c)}. Thus, α_j is the group-averaged log-odds-ratio for x_j. This interpretation is natural: for the main-only logistic regression model, α_j is simply the log-odds-ratio for x_j. 
Similarly, for Poisson regression with Y∈{0,1,…,}, μ( x,  c) is the expectation of Y and g(t) = log(t), so (<ref>) is a log-ratio:

    g{μ(x_j+1,  x_-j,  c)} - g{μ(x_j,  x_-j,  c)} = log{μ(x_j+1,  x_-j,  c)/μ(x_j,  x_-j,  c)}.

Here, α_j is the group-averaged log-ratio. Finally, we note that both of these terms involve group-averaged quantities on the log-scale. Thus, it may be more natural to consider exponentiated versions on the μ-scale, so the group-averages become weighted geometric means. 



In both cases, a logarithmic term is linked to α_j + ∑_k=1^K γ_j, k, c_k via (<ref>). Considering the exponentiated version, along with an averaging operation, we notice that 

    exp(α_j)    = exp{𝔼_π̂ (α_j + ∑_k=1^K γ_j, k, C_k)} = exp{∑_k=1^K ∑_ℓ=1^L_kπ̂_k,ℓK^-1(α_j + Kγ_j, k, C_k)}
       = ∏_k=1^K ∏_ℓ=1^L_kexp(α_j + Kγ_j, k, C_k)^π̂_k,ℓK^-1

which 
is a weighted geometric mean of α_j + Kγ_j, k, C_k. 







 










  §.§.§ Logistic regression

Logistic regression models a binary outcome y∈{0,1} as a Bernoulli random variable with “success" probabilities determined by the log-odds of  the linear term μ:

    {ℙ(y = 1 |   X = x, κ = k)} = log{ℙ(y = 1 |   X = x, κ = k)/ℙ(y = 0 |   X = x, κ = k)}   = μ(x, k)

Clearly, the odds are expressed by (y = 1 |   X = x, κ = k) = exp{μ(x,k)}, so that the odds ratio is linked to the “slopes":

    (y = 1 |   X = x + 1, κ = k)/(y = 1 |   X = x, κ = k)  = exp{μ_x'(k)} = exp(α_1 + β_k^*).

 As a consequence, the same issues arise for logistic regression as in linear regression: selecting a baseline group for the race variable k requires that all estimation and interpretation are with respect to the baseline group, which for race is typically NHW.  

Instead, suppose the ABCs are enforced. The previous interpretations require modifications, since the linear term appears on the log-odds scale. First, consider the common slope term α_1. Since α_1 = 𝔼_π̂{μ_x'(κ)} under the ABCs, we can derive  from (<ref>) that

    exp(α_1) = exp[ 𝔼_π̂{μ_x'(κ)}]  = ∏_k=1^K exp{μ_x'(k)}^π̂_k = ∏_k=1^K exp(α_1 + β_k^*)^π̂_k

which, since ∑_k=1^K  π̂_k = 1, is equal to the weighted geometric mean  of the race-specific odds-ratios for covariate x with weights given by the category proportions {π̂_k}_k=1^K. 

Naturally, the previous interpretations progress as before, but now in the context of (i) odds-ratios and (ii) weighted geometric means. 


 




§ ADDITIONAL SIMULATION RESULTS




 




















§ ADDITIONAL APPLICATION DETAILS












 













 








 






