## Facilitating heterogeneous effect estimation via statistically efficient categorical modifiers

Daniel R. Kowal ∗

August 2, 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. An R package lmabc is available.

Keywords: Discrete data; Interactions; Penalized Estimation; Regression analysis

∗ Associate Professor, Department of Statistics and Data Science, Cornell University and Department of Statistics, Rice University (dan.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.

## 1 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 (Williams et al., 2019), with race often interacting with sex or socioeconomic status (Schoendorf et al., 1992; Bauer, 2014). Cat-modifiers are also highly relevant for studying gene-environment interactions (Miao et al., 2024) and appear broadly in the social and behavioral sciences (Krefeld-Schwalb et al., 2024). Within statistics, the urgency of catmodifiers is perhaps best known by Simpson's paradox (Simpson, 1951), 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 (Knol et al., 2009), 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 , . . . , x 1 p ) ⊤ and K categorical variables C = ( C , . . . , C 1 K ) ⊤ with L k levels for each categorical variable k = 1 , . . . , K . We consider regression models for data { ( x i , c i , y i ) } n i =1 parameterized by a linear regression function µ ( x c , ) which typically models the conditional expectation E ( 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:

$$\mu ^ { M } ( x, c ) = \alpha _ { 0 } ^ { M } + x ^ { \top } \alpha ^ { M } + \sum _ { k = 1 } ^ { K } \beta _ { k, c _ { k } } ^ { M }$$

or in Wilkinson notation, y ∼ x 1 + ...+ x p + c 1 + ...+ c K . Second, the cat-modified model expands (1) to allow categorical-continuous and categorical-categorical interactions:

$$\mu ( x, c ) = \alpha _ { 0 } + x ^ { \top } \alpha + \sum _ { k = 1 } ^ { K } \beta _ { k, c _ { k } } + \sum _ { k = 1 } ^ { K } x ^ { \top } \gamma _ { k, c _ { k } } + \sum _ { k = 1 } ^ { K - 1 } \sum _ { k ^ { \prime } = k + 1 } ^ { K } \gamma _ { k, k ^ { \prime }, c _ { k }, c _ { k ^ { \prime } } } \quad \quad ( 2 )$$

or equivalently, y ∼ (x 1 + ...+ x )*(c p 1 + ...+ c K ) + c *c 1 2 + ...+ c K -1 *c K , using pairwise interactions for convenience. Our notation emphasizes that the parameters in (1) and (2) are fundamentally distinct, even though these models are nested.

The advantage of the cat-modified model is the ability to estimate heterogeneous, groupspecific effects for each x j . While both models specify group-specific intercepts (consider (1) and (2) with x = 0 ), only the cat-modified model features group-specific slopes :

$$\mu _ { x _ { j } } ^ { \prime } ( c ) \coloneqq \mu ( x _ { j } + 1, x _ { - j }, c ) - \mu ( x _ { j }, x _ { - j }, c ) = \alpha _ { j } + \sum _ { k = 1 } ^ { K } \gamma _ { j, k, c _ { k } }.$$

By comparison, the slopes in the main-only model do not depend on c : µ M x j ′ := µ M ( x j + 1 , x -j , c ) -µ M ( x , j x -j , c ) = α M j .

For concreteness, we consider two popular cases. Empirical examples are given in Tables 1 and D.1, respectively, and these cases are revisited subsequently.

Example 1 (ANCOVA) . Suppose we have p = 1 continuous variable x ∈ R and K = 1 categorical variable race with L R groups. The main-only model (1) is then

$$\mu ^ { M } ( x, r ) = \alpha _ { 0 } ^ { M } + x \alpha _ { 1 } ^ { M } + \beta _ { r } ^ { M }$$

or equivalently, y ∼ x + race , with group-specific intercepts, µ M (0 , r ) = α M 0 + β M r for each race group r , but a global (race-invariant) slope, µ M x ′ = α M 1 . Thus, (4) produces parallel lines with race-specific vertical shifts. By comparison, the cat-modified model (2) is

$$\mu ( x, r ) = \alpha _ { 0 } + x \alpha _ { 1 } + \beta _ { r } + x \gamma _ { r }$$

or equivalently, y ∼ x + race + x:race , with group-specific intercepts µ (0 , r ) = α 0 + β r and group-specific slopes µ ′ x ( r ) = α 1 + γ r for each race group r .

Example 2 (Two-way ANOVA) . Suppose we have K = 2 categorical variables race and sex with L R and L S groups, respectively. The main-only model (1) is then

$$\mu ^ { M } ( r, s ) = \alpha _ { 0 } ^ { M } + \beta _ { 1, r } ^ { M } + \beta _ { 2, s } ^ { M }$$

or equivalently, y ∼ race + sex , while the cat-modified model (2) is

$$\mu ( r, s ) = \alpha _ { 0 } + \beta _ { 1, r } + \beta _ { 2, s } + \gamma _ { r s }$$

or equivalently, y ∼ race + sex + race:sex .

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 { α M 0 , α M , β M c k, k } in (1) or the analogous terms { α , 0 α , β k,c k } in (2). 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 (1) and (2) require additional constraints to interpret and estimate the model parameters: the main-only intercepts { α M 0 , β M c k, k } 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 ( R , SAS, Python, MATLAB, Stata, etc.). With RGE, a reference group is selected for each categorical variable C k and removed: β M k, 1 = 0 for all k in (1) 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 (2) (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 (2) significantly impedes the use of cat-modifiers. For the mainonly model, the j th main effect is a global slope, α M j = µ M x j ′ , 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 ˆ α M j -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., α M j ). We illustrate this effect in Table 1: 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 4 and 5). Similar effects occur for categorical-categorical interactions (see Table D.1). 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 (Knol et al., 2009). In fact, fewer than half of recent social science publications even reported the reference category (Johfre and Freese, 2021). This leads to misleading conclusions about effect magnitudes, directions, and heterogeneity (Kowal, 2024).

Table 1: Abbreviated regression output for the main-only model (4) and the cat-modified model (5) for North Carolina end-of-4th-grade reading scores y (see Section 5) with x = racial residential isolation ( RI ) and (mother's) race. With RGE (left), the cat-modifier attenuates the RI main effect (red), inflates its SE, and suppresses race-specific RI effects. With ABCs (right), the RI main effect (blue) estimates and SEs are nearly invariant to the cat-modifier (see Section 3) and the output clearly shows that the RI effect is significantly negative and much worse for Black students.

| Reference group encoding (RGE)   | Reference group encoding (RGE)   | Reference group encoding (RGE)   | Reference group encoding (RGE)   | Abundance-based constraints (ABCs)   | Abundance-based constraints (ABCs)   | Abundance-based constraints (ABCs)   | Abundance-based constraints (ABCs)   |
|----------------------------------|----------------------------------|----------------------------------|----------------------------------|--------------------------------------|--------------------------------------|--------------------------------------|--------------------------------------|
| Variable                         | Model                            | Estimate (SE)                    | p -value                         | Variable                             | Model                                | Estimate (SE)                        | p -value                             |
| RI                               | Main-only Cat-modified           | -0.036 (0.007) -0.022 (0.011)    | < 0.001 0.047                    | RI                                   | Main-only Cat-modified               | -0.036 (0.007) -0.030 (0.007)        | < 0.001 < 0.001                      |
| RI:White                         | Cat-modified                     | ref                              | ref                              | RI:White                             | Cat-modified                         | 0.008 (0.006)                        | 0.157                                |
| RI:Black                         | Cat-modified                     | -0.030 (0.015)                   | 0.036                            | RI:Black                             | Cat-modified                         | -0.022 (0.009)                       | 0.014                                |
| RI:Hispanic                      | Cat-modified                     | 0.038 (0.028)                    | 0.163                            | RI:Hispanic                          | Cat-modified                         | 0.047 (0.025)                        | 0.059                                |

Second, RGE is inequitable: the main effect elevates a single (reference) group above the others. In Table 1, White is the reference group: the main effect α 1 = µ ′ x ( White ) is the x -effect for the White group , while the interaction effect γ r = µ ′ x ( r ) -µ ′ x ( White ) 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 (Chestnut and Markman, 2018). 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 ( White )). 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 (Chen et al., 2021).

Finally, RGE is difficult to interpret: each main effect and interaction in (2) must be traced back to all reference groups. Consider Example 2 (and Table D.1), using White and Male for the reference groups: the main effects in the cat-modified model (7) are α 0 = µ ( White Male , ), β 1 ,r = µ r, ( Male ) -µ ( White Male , ) for each race r , and β 2 ,s = µ ( White , s ) -µ ( White Male , ) 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 (2).

An alternative identification strategy uses sum-to-zero constraints (STZ). STZ identifies the parameters by restricting the group-specific coefficients to sum to zero: ∑ L k ℓ =1 β M ℓ k, = 0 for all k in the main-only model and ∑ L k ℓ =1 β k,ℓ = 0, ∑ L k ℓ =1 γ j,k,ℓ = 0 for j = 1 , . . . , p , and ∑ L k ℓ =1 γ k,k ,ℓ,c ′ k ′ = 0 and ∑ L k ℓ =1 γ k,k ,c ′ k ,ℓ = 0 for all ( c k , c k ′ ) in the cat-modified model. STZ is common for ANOVA models (Scheffe, 1999; Fujikoshi, 1993) and has been incorporated into regularized regression (Lim and Hastie, 2015). 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 (1) or (2), nor does it establish a clear connection between the 'main effects' in (1) and (2). 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 4).

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 2). 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':

- 1. 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;
- 2. Equity: ABCs do not require a reference group and thus eliminate the alarming

inequities under default approaches (RGE); and

- 3. 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 (1) to the cat-modified model (2); 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. Scheffe (1999) and Fujikoshi (1993) considered identification strategies for ANOVA models based on arbitrary group-specific weights. Ultimately, both adopted STZ. Sweeney and Ulveling (1972) suggested ABCs for the simple ANCOVA (4) so that the estimated intercept would equal the sample mean (see also Theorem 1). However, there was no consideration of cat-modifiers or multiple covariates and no case made for any of EEI. Among nonlinear models, Park et al. (2021) and Park et al. (2023) 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 (7), Wang and Lin (2024) 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 Kowal (2024), which focuses on issues of equity with race as a single cat-modifier.

Contrasts provide an alternative perspective on identification of (1) and (2): dummy coding, effects coding, and weighted effects coding (WEC) are respectively linked to RGE, STZ, and ABCs. Although WEC has garnered recent support (Grotenhuis et al., 2017a,b),

this work did not consider general cat-modifiers or any EEI. Instead, WEC has been mainly limited to two-way ANOVAs (6) or (7) and only advocated in restrictive settings with 'certain types of unbalanced data that are missing not at random' (Brehm and Alday, 2022) or 'categories of different sizes, and if these differences are considered relevant' (Grotenhuis et al., 2017b). 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 2.2).

Lastly, we acknowledge additional perspectives on the cat-modified model (2). A widelyused approach is subgroup analysis , which subsets the data into groups (for all combinations of c ) and then fits separate regression models (e.g., Pocock et al., 2004). The appeal is that it estimates group-specific slopes without the complicated interpretations of the parameters in (2) 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, Searle et al. (1980) 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 2, both for parameter identification and statistical estimation. Our main results on theory for estimation and inference with ABCs are in Section 3. Simulation studies are in Section 4 and a real data example is in Section 5. We conclude in Section 6. Supplementary material includes proofs of all results, details for generalized linear models, additional simulation results, and supporting data information and analysis. An R package lmabc is available.

## 2 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 reg-

ularized regression estimators and inference using linearly-constrained optimization. The main properties for estimation and inference are in Section 3.

## 2.1 Parameter identification with ABCs

For motivation, consider (5) from Example 1: identifiability is obtained by constraining ∑ L R r =1 π β r r = 0 and ∑ L R r =1 π γ r r = 0 for some chosen nonnegative weights { π r } L R r =1 . RGE sets π 1 = 1 and π r = 0 for r &gt; 0, while STZ sets all π r = 1. Instead, suppose we view each constraint as an expectation: E π ( β R ) = 0 and E π ( γ R ) = 0, where R is a categorical random variable with probabilities { π r } L R r =1 . Now, the main x -effect α 1 is equivalently the average of the group-specific slopes: E π { µ ′ x ( R ) } = E π ( α 1 + γ R ) = α 1 . Of course, this notion of 'average'-as well as the accompanying properties for statistical estimation (Section 3)depends entirely on the supplied probabilities { π r } . ABCs adopt a natural choice: the (population or sample) abundances by group. For instance, in Table 1, the ABCs specify ( π White , π Black , π Hisp ) = (0 587 . , 0 351 0 062) using sample proportions. . , .

More broadly, we define ABCs for the cat-modified model (2); special cases such as (1) 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 , . . . , C 1 K ) ⊤ in the data { c i } n i =1 . 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 3). First, ABCs for categorical main effects and categorical-continuous interactions are

$$\mathbb { E } _ { \tilde { \pi } } ( \beta _ { k, C _ { k } } ) & = 0, \quad k = 1, \dots, K \\ \mathbb { E } _ { \tilde { \pi } } ( \gamma _ { j, k, C _ { k } } ) & = 0, \quad k = 1, \dots, K, \quad j = 1, \dots, p.$$

Equivalently, ABCs may be expressed marginally and with summations: ∑ L k ℓ =1 ˆ π k,ℓ β k,ℓ = 0, where { ˆ π k,ℓ } L k ℓ =1 are the sample proportions for each categorical variable C k , k = 1 , . . . , K , and then similarly for each { γ j,k,ℓ } L k ℓ =1 . The key implication is that, while the cat-modified model (2) incorporates heterogeneity via mutual, group-specific slopes (3), ABCs concisely identify each main x j -effect as the average of this group-specific slope:

$$\alpha _ { j } = \mathbb { E } _ { \hat { \pi } } \{ \mu ^ { \prime } _ { x _ { j } } ( C ) \}.$$

ABCs parameterize each main x j -effect by aggregating the group-specific slopes (3), 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 (9) also guides interpretation of the group-specific slope parameters { γ j,k,ℓ } L k ℓ =1 . Consider (5) from Example 1: γ r = µ ′ x ( r ) -E π { µ ′ x ( R ) } is the difference between the group-specific slope for group r and the group-averaged slope. For the general cat-modified model (2), 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 = E ˆ π -k { µ ′ x j ( C -k , c k ) } -E ˆ π { µ ′ 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 (9), rather than a single (reference) group (White, Male, etc.).

For categorical-categorical interactions, ABCs identify { γ k,k ,c ′ k ,c k ′ } by requiring

$$\mathbb { E } _ { \hat { \pi } _ { C _ { k } } | _ { C _ { k ^ { \prime } } = \ell } } ( \gamma _ { k, k ^ { \prime }, C _ { k }, \ell } ) & = 0, \quad \ell = 1, \dots, L _ { k ^ { \prime } } \\ \mathbb { E } _ { \hat { \pi } _ { C _ { k ^ { \prime } } } | _ { C _ { k } = \ell } } ( \gamma _ { k, k ^ { \prime }, \ell, C _ { k ^ { \prime } } } ) & = 0, \quad \ell = 1, \dots, L _ { k }$$

for all ( C , C k 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, (8) and (10) constitute ABCs. We illustrate (10) using model (7) from Example 2: E ˆ π S R | = r ( γ rS ) = 0 for r = 1 , . . . , L R and E ˆ π R S | = s ( γ Rs ) = 0 for s = 1 , . . . , L S , where ˆ π S R | = r = { ˆ π rs /π r } L S s =1 is the conditional probability for each sex given race = r (similarly for ˆ π R S | = s ). Equivalently, (10) may be expressed using the joint proportions ˆ π : for Example 2, this is ∑ L S s =1 ˆ π rs γ rs = 0 for r = 1 , . . . , L R and ∑ L R r =1 ˆ π rs γ rs = 0 for s = 1 , . . . , L S . Thus, all ABCs (8) and (10) can be written in terms of the joint probabilities ˆ π .

There are several compelling reasons to identify the categorical-categorical interactions with (10). First, it guarantees a global, group-averaged identification for the intercept:

$$\text{Lemma } 1. \ U n d e r \ A B C s, \ t h e \ i n t e r c e p t \ p a r a m e t e r \ i n \ ( 2 ) \ s a t i s f i e s \ \mathbb { E } _ { \hat { \pi } } \{ \mu ( 0, C ) \} = \alpha _ { 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 = E ˆ π { µ ( 0 , C ) } and α j = E ˆ π { µ ′ x j ( C ) } for j = 1 , . . . , p . This cannot occur for RGE and only occurs for STZ if the probabilities ˆ π are exactly uniform. Second, (10) 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 (7) or do not (6) include cat-modifiers (Theorem 2). Finally, (10) offers the interesting result that, if we were to instead combine the interacted covariates ( C , C k k ′ ) into a single categorical variable (e.g., race-sex) with L L k k ′ levels, the main effect ABCs (8) 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 (10). The choice of omitted constraint is arbitrary, since all constraints (10) hold regardless:

Lemma 2. Suppose we apply (10) to all but one interaction term: E ˆ π C k | C k ′ = ℓ ( γ k,k ,C ′ k ,ℓ ) = 0 for ℓ = 1 , . . . , L k ′ and E ˆ π C k ′ | C k = ℓ ( γ k,k ,ℓ,C ′ k ′ ) = 0 for ℓ = 2 , . . . , L k . Then the same constraint holds for ℓ = 1 : E ˆ π C k ′ | C k =1 ( γ k,k , ′ 1 ,C k ′ ) = 0 .

Finally, we emphasize that ABCs (8) and (10) are designed for parameter identification in the general cat-modified model (2), which may be featured in generalized linear models (see the supplementary material, Section B) and includes numerous important special cases, such as main-only models (1), ANCOVA models (Example 1), and two-way ANOVA models (Example 2), among many others.

## 2.2 Estimation, inference, and sparsity with ABCs

ABCs are linear constraints and thus readily compatible with regularized regression. First, we consolidate the cat-modified model (2) 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 rank( X ) = P -m . We represent all ABCs (8) and (10) generically as A θ ˆ π = 0 , where is the m × P matrix of constraints with rank( A ˆ π ) = m . Then, for a loss function L ( y Xθ , ) for data

y = ( y , . . . , y 1 n ) ⊤ and a coefficient penalty P ( θ ), we aim to solve

$$\hat { \theta } ( \lambda ) = \arg \min _ { \theta } \mathcal { L } ( y, X \theta ) + \lambda \mathcal { P } ( \theta ) \quad \text{subject to } A _ { \hat { \pi } } \theta = 0$$

and λ ≥ 0 is a tuning parameter. We primarily focus on squared error loss L ( 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 (11) is to reparametrize to an unconstrained space with only P -m parameters. Let A ⊤ ˆ π = QR 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 := XQ ˆ π , (11) is equivalently

$$\hat { \theta } ( \lambda ) = Q _ { \hat { \pi } } \hat { \theta } _ { Q } ( \lambda ), \quad \hat { \theta } _ { Q } ( \lambda ) = \arg \min _ { \theta } \mathcal { L } ( y, X _ { Q } \theta _ { Q } ) + \lambda \mathcal { P } ( Q _ { \hat { \pi } } \theta _ { Q } ).$$

Regularized regression with ABCs simply requires 1) computing the QR decomposition of A ⊤ ˆ π and 2) solving an unconstrained regularized regression problem.

When L 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, (12) satisfies √ n ( ˆ θ -θ ) d → N P ( 0 , Q π I ( θ Q ) -1 Q ⊤ π ) where I 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 X ⊤ Q 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 4).

Finally, we emphasize the unique challenges of regularization and selection for catmodified models. Selection of interaction effects has primarily focused on high-dimensional, continuous-continuous interactions (Bien et al., 2013; Lim and Hastie, 2015). 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 ) → E ˆ π { µ ′ x j ( C ) } collapses to the group-averaged x j -effect, which produces a reasonable notion of parameter sparsity.

When λ &gt; 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, Kowal (2024) observes that such 'overparametrized' estimation tends to reproduce RGE by implicitly selecting a reference group, and thus inherits the same limitations as RGE.

## 3 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.

## 3.1 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 categoricalcategorical interactions-ABCs ensure that the OLS-estimated intercept is always exactly equal to the sample mean, ˆ α 0 = ¯ := y n -1 ∑ n i =1 y i .

Theorem 1. For any linear model of the form (2) with 1) centered continuous covariates ( ¯ x = 0 ), 2) no categorical-continuous interactions (all γ k,c k = 0 ), and 3) ABCs (8) and (10) , the OLS estimate of the intercept is ˆ α 0 = ¯ y .

Simple models such as y ∼ race yield the same intercept estimate as more complex

models like y ∼ x 1 + ...+ x p + race + sex + race:sex . This reaffirms the global interpretation of the intercept: under ABCs, ˆ α 0 targets the global intercept α 0 = E ˆ π { µ ( 0 , C ) } (Lemma 1). Of course, ¯ is a good estimator for the marginal expectation of y 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 1 extends Sweeney and Ulveling (1972) 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 2).

Theorem 2. Under ABCs (8) and (10) , the OLS estimates of all main effects are identical under the main-only model (6) and the cat-modified model (7) : ˆ α M 0 = ˆ α 0 , ˆ β M r 1 , = ˆ β 1 ,r for all r = 1 , . . . , L R , and ˆ β M s 2 , = ˆ β 2 ,s for all s = 1 , . . . , L S .

This estimation invariance applies to all (1 + L R + L S ) main effects in (7). 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 1), while the interaction effects are deviations from the main effects in the main-only model (Theorem 2). This result validates our choice of ABCs (8) and especially (10). 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 5). Following Example 1, we begin with a single continuous covariate x ( p = 1). Let ˆ σ 2 x r [ ] := n -1 r s 2 x r [ ] -¯ x 2 r be the (scaled) sample variance of { x i } n i =1 for each group r , where n r = nπ ˆ , r s 2 x r [ ] = ∑ r i = r x 2 i and ¯ x r = n -1 r ∑ 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.

Theorem 3. Under ABCs (8) and the equal-variance condition

$$\hat { \sigma } _ { x [ r ] } ^ { 2 } = \hat { \sigma } _ { x [ 1 ] } ^ { 2 } \quad \text{for all $r=1,\dots,L_{R}$},$$

the OLS estimates for the main-only model (4) and the cat-modified model (5) satisfy estimation invariance , ˆ α M 1 = ˆ α . 1

We apply Theorem 3 as an approximation, ˆ α 1 ≈ ˆ α M 1 whenever ˆ σ 2 x r [ ] ≈ ˆ σ 2 x [1] for all r , which is reasonably robust to deviations from (13) (see Table 1 and Section 4.1.2). 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 (13), 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 (5) or do not (4) include a cat-modifier. Arguably, the main-only model (4) is no longer appropriate in this setting. The x -effect in (4) is α M 1 = µ M ( x +1) -µ M ( x ), which considers a one-unit change in x regardless of the group r . But when (13) 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 α M 1 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 = E ˆ π { µ x ( +1 , R ) -µ x, R ( ) } as in (9). In this setting, distinctness between α 1 and α M 1 is appropriate.

This result can be extended for p continuous covariates, each of which is cat-modified: y ∼ x 1 + ...+ x p + c 1 + x :c 1 1 + ...+ x :c p 1 . Here, the equal-variance condition (13) instead uses the (scaled) sample covariance between x j and x h in group r , ̂ Cov ( r x j , x h ) := n -1 r ∑ r i = r ( x ij -¯ )( x j x ih -¯ ). x h

Theorem 4. Consider the main-only model (1) and the cat-modified model (2) , each with K = 1 categorical variable. Under ABCs (8) and the equal-covariance condition ̂ Cov r ( x j , x h ) = ̂ Cov 1 ( x j , x h ) for all r = 1 , . . . , L R and each j, h = 1 , . . . , p , the OLS esti-

mates satisfy ˆ α = ˆ α M .

Theorem 4 ensures estimation invariance for all p continuous main effects, each of which is cat-modified. Thus, the equal-covariance condition is stricter than (13). As with Theorem 3, we apply Theorem 4 as an approximation, so that ˆ α ≈ ˆ α M when equalcovariance approximately holds.

Lastly, we establish a middle ground: y ∼ x 1 + ...+ x p + c 1 + x :c 1 1 , 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 equalvariance condition now involves only x 1 and the residuals ˆ e 1 from regressing x 1 on all other variables, x 1 ∼ x 2 + ...+ x p + c 1 .

Theorem 5. Consider the main-only model (1) with K = 1 and the cat-modified model (2) with K = 1 and interactions only with x 1 (fix γ j,r = 0 for all j &gt; 1 and r = 1 , . . . , L R ). Under ABCs (8) and the equal-variance condition Cov ̂ r ( x 1 , ˆ e 1 ) = ̂ Cov 1 ( x 1 , ˆ e 1 ) for all r = 1 , . . . , L R , the OLS estimates satisfy ˆ α M 1 = ˆ α 1 .

To understand this modified equal-variance condition, we can equivalently express ̂ Cov ( r ˆ e 1 , x 1 ) = n -1 r ∑ r i = r ( x 2 i 1 -x i 1 ˆ x i 1 ) = ˆ σ 2 x 1 [ r ] -̂ Cov ( r ˆ x 1 , x 1 ), where ˆ x 1 are the fitted values from x 1 ∼ x 2 + ...+ x p + c 1 . Theorem 5 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 , . . . , x 2 p is no longer comparable across groups r . As with Theorem 3, the main-only model x -effect α M 1 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 = E ˆ π { µ ′ x 1 ( R ) } .

## 3.2 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,

$$\hat { S } ^ { 2 } \leq \hat { S } _ { M } ^ { 2 }.$$

For the maximum likelihood estimators ˆ S 2 = ∥ ˆ e ∥ 2 /n and ˆ S 2 M = ∥ ˆ e M ∥ 2 /n , where ˆ e and ˆ e M are the residuals from the cat-modified and main-only models, respectively, (14) is guaranteed: ∥ ˆ e ∥ 2 ≤ ∥ ˆ e M ∥ 2 , typically with strict inequality. More commonly, the unbiased estimators ˆ S 2 = ∥ ˆ e ∥ 2 / n ( -d M -d ) and ˆ S 2 M = ∥ ˆ e 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, (14) requires that the adjustedR 2 for the cat-modified model exceeds that for the main-only model, or equivalently, ( ∥ ˆ e M ∥ -∥ ∥ 2 ˆ e 2 ) / ∥ ˆ e 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: adjustedR 2 is well-known to prefer overparametrized models, and thus (14) is likely to hold even when the cat-modifiers are extraneous (see Section 4.2). When cat-modifiers are indeed necessary, the reduction from ˆ S 2 M to ˆ S 2 can be substantial.

We revisit each case from Section 3.1, beginning with a two-way ANOVA (Example 2).

Theorem 6. Under ABCs (8) and (10) and (14) , the OLS SEs of all main effects under the cat-modified model (7) are less than or equal to those under the main-only model (6) : SE (ˆ ) α 0 ≤ SE (ˆ α M 0 ) , SE ( ˆ β 1 ,r ) ≤ SE ( ˆ β M r 1 , ) for all r = 1 , . . . , L R , and SE ( ˆ β 2 ,s ) ≤ SE ( ˆ β M s 2 , ) for all s = 1 , . . . , L S .

Remarkably, Theorems 2 and 6 confirm that ABCs deliver the best possible result: adding cat-modifiers to the main-only model (6) 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:

Theorem 7. Under ABCs (8) , equal-variance (13) , and (14) , the OLS SE for the main x -effect under the cat-modified model (5) is less than or equal to that under the main-only model (4) : SE (ˆ ) α 1 ≤ SE (ˆ α M 1 ) .

This result applies in the context of Theorem 3, but analogous extensions are available for Theorems 4 and 5; only the condition (14) 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 6 and 7 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.

## 4 Simulations

## 4.1 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 3. We consider both categorical-categorical interactions (Section 4.1.1) and categorical-continuous interactions (Section 4.1.2).

## 4.1.1 Categorical-categorical interactions

Given two categorical variables, say race and sex , what is the effect of including the race:sex interaction term on the estimates and SEs for the race and sex main effects? The theory of ABCs (Section 3) 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) race

and sex are dependent, 2) the errors are non-Gaussian, and 3) ABCs are not satisfied.

Let race and sex be categorical variables with groups { A B C D , , , } and { uu vv , } , respectively; we use arbitrary labeling here to remain agnostic about particular raceor sex-specific effects in our synthetic data-generating process. For each of n = 500 observations, we draw each race assignment with ( π , π , π , π a b c d ) = (0 4 . , 0 3 . , 0 2 . , 0 1), and then draw . the sex assignment conditional on race with ( π uu , π vv ) ·| r = A = (0 4 0 6), ( . , . π uu , π vv ) ·| r = B = (0 6 . , 0 4), . ( π uu , π vv ) ·| r = C = (0 7 0 3), and ( . , . π uu , π vv ) ·| r = D = (0 2 0 8). . , . Thus, race and sex are dependent, and marginally π uu = π vv = 0 5. . The response variable y is simulated with expectation (7) with α 0 = 1, β c = -1, γ b,vv = γ , and all other coefficients zero, or equivalently, µ r, s ( ) = 1 - { I r = C } + γ I { r = B , s = vv } plus t 4 (0 , 1)-distributed errors. Crucially, γ controls the magnitude of the race:sex 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 (6) and the cat-modified model (7) and compare the estimates and SEs for each main effect between the two models. These models are fit using ABCs, RGE (references r = A , s = uu ), 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 race and sex . 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 catmodified models for ABCs, RGE, and STZ.

The estimates are in Figure 1. Under ABCs, all race and sex main effects are exactly identical between the models that do and do not include the race:sex interaction, confirming Theorem 2. 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 2. Under ABCs, the addition of the race:sex 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

## Main effect (race, sex) estimates: with and without race:sex n = 500, coef(race:sex) = 0

Figure 1: Estimates for all race and sex main effects for models that do (y-axis) and do not (x-axis) include the race:sex interaction across 500 simulated datasets. Under ABCs, all main effect estimates are exactly identical between the two models (45 ◦ line), regardless of whether the interaction effect is zero ( γ = 0, left) or large ( γ = 1 5, right). . Such invariance does not hold for other identifications (RGE or STZ).

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00618v1-figure-6595c85b-906f-400c-a9c6-7d5627ad4543.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00618v1-figure-2318ea24-14ee-48ea-acad-809e07d36576.jpg)

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 race:sex 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 ( race:sex ) 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.

## 4.1.2 Categorical-continuous interactions

We now revise this analysis for categorical-continuous interactions: given categorical race and continuous x , what is the effect of including the x:race interaction on the main x -effect? The theory of ABCs (Section 3) predicts that invariance for estimation and inference is contingent on the equal-variance condition (13). We investigate the sensitivity to this condition as well as to the magnitude of the interaction effect.

To incorporate dependencies between race and x , we simulate race as in Section 4.1.1 and then simulate x conditional on race : [ x | race = A ] ∼ 5 + σ ac N (0 , 1), [ x | race = B ] ∼

Figure 2: Standard errors (SEs) for all race and sex main effects for models that do (y-axis) and do not (x-axis) include the race:sex interaction across 500 simulated datasets. Under ABCs, the SEs are nearly identical between the two models (45 ◦ line) when the interaction effect is zero ( γ = 0, left) and slightly less (about a 5% reduction) for the cat-modified model when the interaction effect is larger ( γ = 1 5, . right). The RGE and STZ main effect SEs increase substantially when the interaction term is included in the model (above 45 ◦ line) regardless of γ .

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00618v1-figure-2696387a-1111-4a18-b7dd-2a0fd14db60f.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00618v1-figure-583aa2f6-bc4a-4056-a119-1b7b2ff9be8b.jpg)

√ 12 Uniform(0 1), [ , x | race = C ] ∼ -5 + σ ac t 8 (0 , 1), and [ x | race = D ] ∼ Gamma(1 1). , Each race group features a unique distribution with varying means, so x and race are strongly dependent and highly correlated. Here, σ ac controls the degree to which the equal-variance condition (13) is violated: σ ac = 1 is a mild violation (the race-specific population variances are identical, but the sample quantities ˆ σ 2 x r [ ] are not) while σ ac = 1 5 . is a strong violation. The response variable y is simulated with expectation (5) with α 0 = α 1 = 1, β c = -1, and γ b = γ , and all other coefficients zero, or equivalently, µ x, r ( ) = 1 + x - { I r = C } + γx I { r = B } plus t 4 (0 , 1)-distributed errors. This datagenerating 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 (4) and the cat-modified model (5) 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 3. Even with mild deviations from the equal-variance condition (13), the x -effect estimates under ABCs are nearly identical between models that do and do not include the x:race interaction. Crucially, this invariance persists regardless of the true interaction effect magnitude γ . Under strong violations of (13) and a strong interaction effect, Theorem 3 no longer applies. However, as argued in

y ~ 1 + x + race + x:race

1.2

1.1

1.0

0.9

0.8

## Main effect (x) estimates: with and without race-modifiers n = 500, coef(x:r) = 0, sigma(x[r = a,c]) = 1

ABCs

RGE

STZ

1.10

0.85

0.90

0.95

1.00

1.05

y ~ 1 + x + race

0.90

0.95

1.00

1.05

y ~ 1 + x + race

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00618v1-figure-cc610c61-04eb-470e-9d34-d29c99a06e60.jpg)

1.10

1.15

1.20

1.25

1.30

1.35

1.40

y ~ 1 + x + race

Figure 3: Estimates for the main x -effect for models that do (y-axis) and do not (x-axis) include the x:race interaction across 500 simulated datasets. Under ABCs, the estimates are nearly invariant (45 ◦ line) as long as the deviations from equal-variance (13) are mild ( σ ac = 1, left), regardless of whether the true interaction effect is zero ( γ = 0, top) or large ( γ = 1 5, bottom). . When γ is large and (13) is strongly violated (bottom right), ABCs no longer offer invariance under Theorem 3. RGE and STZ offer no such invariance and depend critically on γ .

Section 3, this behavior is appropriate: when (13) is strongly violated, a one-unit change in x is not comparable for different race groups, so only the model that includes race-specific x -effects (via the x:race 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 4. As long as the violations of (13) are mild ( σ ac = 1), the SEs of the x -effect, under ABCs, are 1) nearly identical between the main-only and catmodified 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 x:race 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

Main effect (x) estimates: with and without race-modifiers n = 500, coef(x:r) = 1.5, sigma(x[r = a,c]) = 1.5

ABCs

RGE

STZ

y ~ 1 + x + race + x:race y ~ 1 + x + race + x:race

1.2

1.1

1.0

0.9

0.8

1.6

1.4

1.2

1.0

## Main effect (x) estimates: with and without race-modifiers n = 500, coef(x:r) = 0, sigma(x[r = a,c]) = 1.5

ABCs

RGE

STZ

0.10

0.09

0.08

0.07

0.06

0.05

y ~ 1 + x + race + x:race

0.04

0.10

0.09

0.08

0.07

0.06

0.05

y ~ 1 + x + race + x:race

0.04

## Main effect (x) SEs: with and without race-modifiers n = 500, coef(x:r) = 0, sigma(x[r = a,c]) = 1

ABCs

RGE

STZ

0.060

0.040

0.045

0.050

0.055

y ~ 1 + x + race

Main effect (x) SEs: with and without race-modifiers n = 500, coef(x:r) = 1.5, sigma(x[r = a,c]) = 1

ABCs

RGE

STZ

0.050

0.055

0.060

0.065

Main effect (x) SEs: with and without race-modifiers n = 500, coef(x:r) = 1.5, sigma(x[r = a,c]) = 1.5

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00618v1-figure-f0d27166-865b-433e-a6f4-5b47a15279c4.jpg)

0.065

0.060

0.055

0.050

0.045

0.040

0.035

y ~ 1 + x + race + x:race

0.030

0.035

0.040

0.045

0.050

y ~ 1 + x + race y ~ 1 + x + race

Figure 4: Standard errors (SEs) for the main x -effect for models that do (y-axis) and do not (x-axis) include the x:race interaction across 500 simulated datasets. Under ABCs, the SEs are nearly identical between the two models (45 ◦ line) when the true interaction effect is zero and deviations from equal-variance (13) are mild ( γ = 0, σ ac = 1, top left). If instead the interaction effect is large ( γ = 1 5, . σ ac = 1, bottom left), the SEs under ABCs reduce substantially (by about 15%) for the model that includes the x:race interaction. These effects are not assured when (13) is strongly violated ( σ ac = 1 5, right). . All results are consistent with Theorem 7. Similar properties do not occur for RGE or STZ, regardless of γ and σ ac .

is zero, adding the x:race interaction decreases statistical power for the main x -effect.

The same caveats apply as in Section 4.1.1: 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.

## 4.2 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.

ABCs

RGE

STZ

First, we generate multiple, dependent categorical and continuous covariates. Dependent categorical variables race and sex are generated as in Section 4.1.1, while p = 10 dependent continuous variables are generated as follows: x j is drawn as in Section 4.1.2 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 race , which induces correlations among those x -variables with each other and with sex , 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, race 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 sex 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 ( x:race ) 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 (2) 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 y ∼ x 1 + ...+ x p + sex + race and the cat-modified model y ∼ (x 1 + ...+ x p + sex)*race that includes race interactions with all continuous covariates and sex , both under ABCs and RGE. The main-only model is favored when γ = 0, while the opposite is true for γ &gt; 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 γ &gt; 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 ( γ &gt; 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 5). 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 5, 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 5, bottom left). Neither result holds for RGE. By comparison, estimation accuracy across all coefficients (Figure 5, 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 6); 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 6, top left). Compare that to inference for all coefficients (Figure 6, 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 catmodifiers 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 6, 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 , ); compar-

Figure 5: RMSEs for the main x -effects (left) and all coefficients (right) under main-only and cat-modified models with ABCs (gold) and RGE (gray). Boxplots are across 500 simulations; nonoverlapping notches indicate a difference in medians. Under ABCs, the cat-modified model main x -effect estimates are just as accurate as the main-only ones, even when the cat-modifiers are extraneous (top left), with slight gains when the cat-modifiers are necessary (bottom left). Neither result holds for RGE. For comparison, the accuracy across all coefficients is primarily determined by whether the correct model (main-only, top right; cat-modified, bottom right) is used.

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00618v1-figure-a9f272c4-5b29-415f-ac74-703bc652a7bc.jpg)

isons 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 (13), with similar results as for σ ac = 1.

## 5 Application

We apply cat-modified regression to assess heterogeneity among factors linked to STEM educational outcomes. Our dataset 1 links three administrative datasets to provide individuallevel 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 else-

1 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.

Figure 6: Interval widths (boxplots) and empirical coverage (annotations) for 95% confidence intervals for the main x -effects (left) and all coefficients (right) under main-only and cat-modified models with ABCs (gold) and RGE (gray). Under ABCs, inference for the main x -effects is nearly as powerful for the cat-modified model, even when the cat-modifiers are extraneous (top left), with greater power when the cat-modifiers are necessary (bottom left). Neither result holds for RGE. For comparison, extraneous cat-modifiers increase interval widths overall (top right), while the omission of necessary cat-modifiers sacrifices coverage for the main-only models (bottom right).

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00618v1-figure-b4d9ba1f-c9c1-4531-acf1-0ae194e9932e.jpg)

where (Initiative, 2020; Kowal et al., 2021; Bravo et al., 2022). 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 ( RI ), which is a measure of structural racism based on neighborhood information; blood lead level ( BLL ), which measures lead exposure; birthweight percentile ( BWTpct ); mother's age at time of child's birth ( mAge ); and exposure to the air pollutant PM 2 5 . during the year prior to the exam ( PM2.5 ). The continuous covariates are centered and scaled. The categorical covariates are mother's race ( race ), child's sex ( sex ), mother's education level ( mEdu ), and an indicator of economically disadvantaged ( EconDisadv ) determined by participation in the National Lunch Program; see

Table 2 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 1 and D.1. First, we establish a main-only model that includes each of these covariates ( RI , BLL , BWTpct , mAge , PM2.5 , race , sex , mEdu , and EconDisadv ) 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 race 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 categoricalcontinuous and categorical-categorical interactions. This instance of (2) allows the fullest (pairwise) extent of heterogeneous effects across the rich collection of demographic and socio-economic variables ( race , sex , mEdu , and EconDisadv ), with 103 regression parameters (55 identified). We fit each of these models under ABCs and RGE (references White , Male , lowest mEdu ( mEdu&lt;HS ), and not EconDisadv ).

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 7. 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

Figure 7: OLS estimates and 95% confidence intervals for continuous (top) and categorical (bottom) main effects under ABCs (left) and RGE (right) for three linear models: the mainonly model (black) includes RI , BLL , BWTpct , mAge , PM2.5 , race , sex , mEdu , and EconDisadv ; the race-modified model (blue) adds interactions between race and every other covariate; and the cat-modified model (red) adds all pairwise categorical-continuous and categorical-categorical interactions. With ABCs, main effect inference is invariant to the cat-modifiers: all point and interval estimates are nearly identical across these substantially different models. With RGE, the main effect estimates shift and the intervals expand considerably as more cat-modifiers are added.

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00618v1-figure-92ae571f-5674-4761-8918-0bf20bbebac8.jpg)

main effects (Figure 7, 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 2 and D.3. Lower math scores are strongly ( p &lt; 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 sex , the main and sex -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., Bauer, 2014).

| Variable                             | Estimate (SE)   | p -value   | Variable (continued)   | Estimate (SE)   | p -value   |
|--------------------------------------|-----------------|------------|------------------------|-----------------|------------|
| Intercept                            | -0.026 (0.008)  | 0.001      | RI:White               | -0.002 (0.006)  | 0.795      |
| Racial isolation ( RI )              | -0.020 (0.007)  | 0.006      | RI:Black               | -0.005 (0.009)  | 0.565      |
| Blood lead level ( BLL )             | -0.020 (0.006)  | 0.001      | RI:Hisp                | 0.046 (0.025)   | 0.063      |
| Birthweight percentile ( BWTpct )    | 0.043 (0.006)   | < 0.001    | BLL:White              | -0.003 (0.005)  | 0.582      |
| Mother's age ( mAge )                | 0.029 (0.007)   | < 0.001    | BLL:Black              | -0.004 (0.008)  | 0.620      |
| PM 2 . 5 exposure ( PM2.5 )          | 0.004 (0.006)   | 0.527      | BLL:Hisp               | 0.050 (0.023)   | 0.033      |
| Mother's race ( race )               |                 |            | BWTpct:White           | -0.002 (0.005)  | 0.731      |
| White (58.7%)                        | 0.158 (0.006)   | < 0.001    | BWTpct:Black           | 0.006 (0.008)   | 0.512      |
| Black (35.1%)                        | -0.345 (0.010)  | < 0.001    | BWTpct:Hisp            | -0.014 (0.023)  | 0.548      |
| Hispanic (6.2%)                      | 0.451 (0.025)   | < 0.001    | mAge:White             | 0.009 (0.006)   | 0.120      |
| Child's sex ( sex )                  |                 |            | mAge:Black             | -0.017 (0.009)  | 0.071      |
| Male (49.9%)                         | 0.015 (0.006)   | 0.010      | mAge:Hisp              | 0.009 (0.027)   | 0.733      |
| Female (50.1%)                       | -0.015 (0.006)  | 0.010      | PM2.5:White            | -0.019 (0.005)  | < 0.001    |
| Mother's education level ( mEdu )    |                 |            | PM2.5:Black            | 0.024 (0.008)   | 0.004      |
| Did not complete high school         |                 |            | PM2.5:Hisp             | 0.037 (0.024)   | 0.123      |
| ( <HS ; 24.0%)                       | -0.215 (0.014)  | < 0.001    | RI:Male                | 0.001 (0.007)   | 0.835      |
| Completed high school ( =HS ; 36.8%) | -0.068 (0.008)  | < 0.001    | RI:Female              | -0.001 (0.007)  | 0.835      |
| At least some postsecondary          |                 |            | BLL:Male               | 0.002 (0.006)   | 0.793      |
| ( >HS ; 39.2%)                       | 0.196 (0.009)   | < 0.001    | BLL:Female             | -0.002 (0.006)  | 0.793      |
| White:Male                           | 0.023 (0.006)   | < 0.001    | BWTpct:Male            | 0.001 (0.006)   | 0.908      |
| Black:Male                           | -0.049 (0.010)  | < 0.001    | BWTpct:Female          | -0.001 (0.006)  | 0.908      |
| Hisp:Male                            | 0.056 (0.024)   | 0.019      | mAge:Male              | -0.007 (0.007)  | 0.290      |
| White:Female                         | -0.023 (0.006)  | < 0.001    | mAge:Female            | 0.007 (0.007)   | 0.290      |
| Black:Female                         | 0.048 (0.009)   | < 0.001    | PM2.5:Male             | -0.005 (0.006)  | 0.370      |
| Hisp:Female                          | -0.051 (0.022)  | 0.019      | PM2.5:Female           | 0.005 (0.006)   | 0.370      |
| White:mEdu<HS                        | -0.042 (0.014)  | 0.003      | RI:mEdu<HS             | -0.015 (0.012)  | 0.201      |
| Black:mEdu<HS                        | 0.023 (0.017)   | 0.166      | RI:mEdu=HS             | -0.007 (0.009)  | 0.442      |
| Hisp:mEdu<HS                         | 0.062 (0.018)   | 0.001      | RI:mEdu>HS             | 0.016 (0.010)   | 0.104      |
| White:mEdu=HS                        | 0.000 (0.008)   | 0.971      | BLL:mEdu<HS            | -0.004 (0.011)  | 0.682      |
| Black:mEdu=HS                        | 0.008 (0.011)   | 0.462      | BLL:mEdu=HS            | 0.011 (0.008)   | 0.145      |
| Hisp:mEdu=HS                         | -0.071 (0.038)  | 0.059      | BLL:mEdu>HS            | -0.008 (0.008)  | 0.350      |
| White:mEdu>HS                        | 0.017 (0.007)   | 0.012      | BWTpct:mEdu<HS         | -0.018 (0.011)  | 0.110      |
| Black:mEdu>HS                        | -0.031 (0.016)  | 0.064      | BWTpct:mEdu=HS         | 0.011 (0.008)   | 0.156      |
| Hisp:mEdu>HS                         | -0.172 (0.066)  | 0.009      | BWTpct:mEdu>HS         | 0.001 (0.008)   | 0.912      |
| Male:mEdu<HS                         | -0.018 (0.012)  | 0.131      | mAge:mEdu<HS           | -0.039 (0.013)  | 0.003      |
| Female:mEdu<HS                       | 0.017 (0.011)   | 0.131      | mAge:mEdu=HS           | -0.022 (0.009)  | 0.011      |
| Male:mEdu=HS                         | 0.007 (0.008)   | 0.390      | mAge:mEdu>HS           | 0.045 (0.009)   | < 0.001    |
| Female:mEdu=HS                       | -0.006 (0.007)  | 0.390      | PM2.5:mEdu<HS          | -0.002 (0.011)  | 0.849      |
| Male:mEdu>HS                         | 0.005 (0.008)   | 0.570      | PM2.5:mEdu=HS          | -0.013 (0.008)  | 0.091      |
| Female:mEdu>HS                       | -0.005 (0.009)  | 0.570      | PM2.5:mEdu>HS          | 0.013 (0.008)   | 0.096      |

Table 2: Cat-modified model output under ABCs for NC STEM education outcomes with all pairwise categorical-continuous and categorical-categorical interactions (see Table D.3 for EconDisadv effects). Categorical variable proportions are also indicated. Data are restricted to individuals with 37-42 weeks gestation, mAge ∈ [15 , 44] years, BLL ≤ 80 µg/dL (and capped at 10 µg/dL ), birth order ≤ 4, no current English language learners, and residence in NC at the time of birth and time of 4th end-of-grade test.

Finally, we simplify the heavily-parametrized cat-modified model by fitting a lasso re-

gression under ABCs; λ is selected using 10-fold cross-validation and the one-standard-error rule (Hastie et al., 2009). The selected main effects ( RI , BLL , BWTpct , mAge , race , mEdu , and EconDisadv ) match the conclusions from Figure 7. Among interactions, coefficients from race:mEdu , race:mAge , race:EconDisadv , mEdu:mAge , and EconDisadv:mAge 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 ( mEdu&gt;HS ) 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.

## 6 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.

## References

Bauer, G. R. (2014). Incorporating intersectionality theory into population health research methodology: challenges and the potential to advance health equity. Social Science &amp; Medicine 110 , 10-17.

Bien, J., J. Taylor, and R. Tibshirani (2013). A lasso for hierarchical interactions. The Annals of Statistics 41 , 1111.

Bravo, M., D. Zephyr, D. R. Kowal, K. B. Ensor, and M. L. Miranda (2022). Racial residential segregation shapes relationships between early childhood lead exposure and 4th grade standardized test scores. Proceedings of the National Academy of Sciences 119 , e2117868119.

Brehm, L. and P. M. Alday (2022). Contrast coding choices in a decade of mixed models. Journal of Memory and Language 125 , 104334.

Chen, I. Y., E. Pierson, S. Rose, S. Joshi, K. Ferryman, and M. Ghassemi (2021). Ethical machine learning in healthcare. Annual Review of Biomedical Data Science 4 , 123-144.

Chestnut, E. K. and E. M. Markman (2018). 'girls are as good as boys at math' implies that boys are probably better: A study of expressions of gender equality. Cognitive science 42 , 2229-2249.

Fujikoshi, Y. (1993). Two-way anova models with unbalanced data. Discrete Mathematics 116 , 315-334.

Grotenhuis, M. T., B. Pelzer, R. Eisinga, R. Nieuwenhuis, A. Schmidt-Catran, and R. Konig (2017a). A novel method for modelling interaction between categorical variables. International Journal of Public Health 62 , 427-431.

Grotenhuis, M. T., B. Pelzer, R. Eisinga, R. Nieuwenhuis, A. Schmidt-Catran, and R. Konig (2017b). When size matters: advantages of weighted effect coding in observational studies. International Journal of Public Health 62 , 163-167.

Hastie, T., R. Tibshirani, and J. Friedman (2009). The Elements of Statistical Learning , Volume 2. Springer.

- Initiative, C. E. H. (2020). Linked births, lead surveillance, grade 4 end-of-grade (eog) scores [data set].
- Johfre, S. S. and J. Freese (2021). Reconsidering the reference category. Sociological Methodology 51 , 253-269.

Knol, M. J., M. Egger, P. Scott, M. I. Geerlings, and J. P. Vandenbroucke (2009). When one depends on the other: Reporting of interaction in case-control and cohort studies. Epidemiology 20 .

Kowal, D. R. (2024). Regression with race-modifiers: towards equity and interpretability. medRxiv , 2021-2024.

Kowal, D. R., M. Bravo, H. Leong, R. J. Griffin, K. B. Ensor, and M. L. Miranda (2021). Bayesian variable selection for understanding mixtures in environmental exposures. Statistics in Medicine 40 , 4850-4871.

Krefeld-Schwalb, A., E. R. Sugerman, and E. J. Johnson (2024). Exposing omitted moderators: Explaining why effect sizes differ in the social sciences. Proceedings of the National Academy of Sciences 121 , e2306281121.

Lim, M. and T. Hastie (2015). Learning interactions via hierarchical group-lasso regularization. Journal of Computational and Graphical Statistics 24 , 627-654.

Miao, J., Y. Wu, and Q. Lu (2024). Statistical methods for gene-environment interaction analysis. Wiley Interdisciplinary Reviews: Computational Statistics 16 , e1635.

Park, H., E. Petkova, T. Tarpey, and R. T. Ogden (2021). A constrained single-index regression for estimating interactions between a treatment and covariates. Biometrics 77 , 506-518.

Park, H., E. Petkova, T. Tarpey, and R. T. Ogden (2023). Functional additive models for optimizing individualized treatment rules. Biometrics 79 , 113-126.

Pocock, S. J., T. J. Collier, K. J. Dandreo, B. L. de Stavola, M. B. Goldman, L. A. Kalish, L. E. Kasten, and V. A. McCormack (2004). Issues in the reporting of epidemiological studies: a survey of recent practice. BmJ 329 , 883.

Scheffe, H. (1999). The analysis of variance , Volume 72. John Wiley &amp; Sons.

Schoendorf, K. C., C. J. R. Hogue, J. C. Kleinman, and D. Rowley (1992). Mortality among infants of black as compared with white college-educated parents. New England journal of medicine 326 , 1522-1526.

Searle, S. R., F. M. Speed, and G. A. Milliken (1980). Population marginal means in the linear model: an alternative to least squares means. The American Statistician 34 , 216-221.

Simpson, E. H. (1951). The interpretation of interaction in contingency tables. Journal of the Royal Statistical Society: Series B (Methodological) 13 , 238-241.

Sweeney, R. E. and E. F. Ulveling (1972). A transformation for simplifying the interpretation of coefficients of binary variables in regression analysis. The American Statistician 26 , 30-32.

Wang, T. and C.-W. Lin (2024). Using a centered general linear model for detection of interactions among biomarkers. Statistical Methods in Medical Research , 09622802231224639.

Williams, D. R., J. A. Lawrence, and B. A. Davis (2019). Racism and health: evidence and needed research. Annual Review of Public Health 40 , 105-125.

## Supplement to

## 'Facilitating heterogeneous effect estimation via statistically efficient categorical modifiers'

## Daniel R. Kowal

This supplementary file includes proofs of all results (Section A), details for generalized linear models (Section B), additional simulation results (Section C), and additional details and analyses of the North Carolina education data (Section D).

## A 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:

$$y \, \sim \, X _ { * } \, + \, X _ { 0 }$$

$$y \, \sim \, X _ { * } \, + \, X _ { 0 } \, + \, X _ { 1 }$$

$$X _ { * } & \, + \, X _ { 0 } \\ X _ { * } & \, + \, X _ { 0 } \, + \, X _ { 1 }$$

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 2.2 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 E ⊤ 0 01 ) -1 E y ⊤ 01 = ( E E ⊤ 01 01 ) -1 E y ⊤ 01 , 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 X X 1 ( ⊤ 1 1 ) -1 X ⊤ 1 is the corresponding hat matrix for X 1 , and y = ( y , . . . , y 1 n ) ⊤ is the vector of outcomes.

Applying the FWL Theorem, our target result occurs when residuals(X ∗ ∼ X ) 0 = residuals(X ∗ ∼ X 0 + X ) 1 , for which a sufficient condition is X E ⊤ ∗ 10 = 0 where E 10 = residuals(X 1 ∼ X ) 0 . More formally, let H 0 := X X X 0 ( ⊤ 0 0 ) -1 X ⊤ 0 be the hat matrix for the covariates X 0 that are always included. Then the sufficient condition is

$$X _ { * } ^ { \top } ( X _ { 1 } - H _ { 0 } X _ { 1 } ) = 0$$

or equivalently, X X ⊤ ∗ 1 -( H X 0 ∗ ) ⊤ 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 2.2 that replaces X 1 with X Q 1 ˆ π to enforce the constraints. The main condition (A.1) is now

$$X _ { * } ^ { \top } ( X _ { 1 } - H _ { 0 } X _ { 1 } ) Q _ { \hat { \pi } } = 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 X 0 1 ) is row-wise proportional to A ˆ π , which produces the necessary zeros.

We apply this strategy for Theorems 3-7, but prove the main results in sequence.

Proof (Lemma 1). For simplicity, we prove this result for the case of (7), but the same

ideas apply more generally. It is sufficient to show that E ˆ π ( β 1 ,R + β 2 ,S + γ RS ) = 0. Direct application of (8) implies E ˆ π ( β 1 ,R + β 2 ,S + γ RS ) = E ˆ π R ( β 1 ,R ) + E ˆ π S ( β 2 ,S ) + E ˆ π ( γ RS ) = E ˆ π ( γ RS ), and further simplifying, E ˆ π ( γ RS ) = ∑ L R r =1 ∑ L S s =1 ˆ π rs γ rs = 0 since the internal summation is zero for all r by (10).

Proof (Lemma 2). We prove this result for the case of (7) for simplicity. Applying (10) to all but r = 1, we have ∑ L R r =1 ˆ π rs γ rs = 0 for s = 1 , . . . , L S and thus γ 1 s = -ˆ π -1 1 s ∑ L R r =2 ˆ π rs γ rs . The conditional expectation is then E ˆ π S R | =1 ( γ RS ) = ∑ L S s =1 ˆ π 1 s γ 1 s = -∑ L S s =1 ∑ L R r =2 ˆ π rs γ rs = ∑ L R r =2 ∑ L S s =1 ˆ π rs γ rs = 0 since the internal summation equals zero for all r &gt; 1.

Proof (Theorem 1). Under OLS, ¯ equals the sample mean of the fitted values y { ˆ y i } n i =1 ; this is true for ABCs, RGE, STZ, etc. Then we simplify:

$$\bar { y } & = n ^ { - 1 } \sum _ { i = 1 } ^ { n } \hat { y } _ { i } = n ^ { - 1 } \sum _ { i = 1 } ^ { n } ( \hat { \alpha } _ { 0 } + x _ { i } ^ { \top } \hat { \alpha } + \sum _ { k = 1 } ^ { K } \hat { \beta } _ { k, c _ { k } } + \sum _ { k = 1 } ^ { K - 1 } \sum _ { k ^ { \prime } = k + 1 } ^ { K } \hat { \gamma } _ { k, k ^ { \prime }, c _ { k }, c _ { k ^ { \prime } } } ) \\ & = \hat { \alpha } _ { 0 } + \bar { x } ^ { \top } \hat { \alpha } + \sum _ { k = 1 } ^ { K } \sum _ { c _ { k } = 1 } ^ { L _ { k } } \hat { \pi } _ { k, c _ { k } } \hat { \beta } _ { k, c _ { k } } + \sum _ { k = 1 } ^ { K - 1 } \sum _ { k ^ { \prime } = k + 1 } ^ { L _ { k } ^ { \prime } } \sum _ { c _ { k } = 1 } ^ { L _ { k ^ { \prime } } ^ { \prime } } \hat { \pi } _ { k, k ^ { \prime }, c _ { k }, c _ { k ^ { \prime } } } \hat { \gamma } _ { k, k ^ { \prime }, c _ { k }, c _ { k ^ { \prime } } } \\ & = \hat { \alpha } _ { 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 ′ .

Proof (Theorem 2). Following the race and sex terminology from Example 2, define the design matrix by letting 1 be an n -dimensional vector of ones, Z 1 the n × L R matrix of race indicators with entries [ Z 1 ] ir = 1 if r i = r and zero otherwise, and Z 2 n × L S matrix of sex indicators with entries [ Z 2 ] is = 1 if s i = s and zero otherwise. Similarly, let Z 12 be the n × L L R S matrix with indicators for the interaction terms. Consider the crossproduces of each main effect with the interaction matrix. First, 1 ⊤ Z 12 is the 1 × L L R S matrix where each entry is the joint total by race and sex , i.e., ∑ n i =1 I ( r i = r, s i = s )

̸

̸

for each r, s combination. Next, Z Z ⊤ 1 12 is L R × L L R S , where each row r includes the totals ∑ n i =1 I ( r i = r, s i = s ) for all s = 1 , . . . , L S but zeros for columns with other race groups, r ′ = r . Similarly, Z Z ⊤ 2 12 is L S × L L R S , where each row s includes the totals ∑ n i =1 I ( r i = r, s i = s ) for all r = 1 , . . . , L R but zeros for columns with other sex groups, s ′ = . s

Estimation invariance occurs when these cross-products are zero. However, we must also account for identifiability constraints. Following Section 2.2, Z 12 is replaced by Z Q 12 ˆ π , where A Q ˆ π ˆ π = 0 and A ˆ π encodes the constraints on the interaction coefficients. Thus, it suffices to show that 1 ⊤ Z Q 12 ˆ π = 0 , Z Z ⊤ 1 12 Q ˆ π = 0 , and Z Z ⊤ 2 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 (10) 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 1.

Proof (Theorem 3). Let y = ( y , . . . , y 1 n ) ⊤ , x = ( x , . . . , x 1 n ) ⊤ , and Z be the matrix of categorical ( race ) indicators with entries [ Z ] ir = 1 if r i = r and zero otherwise. The cat-modifier term is Z X = D Z X and D X = diag( x ). The goal is to show that, under the stated conditions, (A.2) 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 (4) satisfy ˆ α M 1 = ( x e ⊤ ˆ x ∼ r ) -1 ˆ e ⊤ x ∼ r y , where ˆ e x ∼ r is the vector of residuals from regressing the continuous variable { x } n i =1 on the categorical variable { r i } n i =1 (i.e., Z ). Similarly, the estimated coefficients under (5) satisfy ˆ α 1 = ( x e ⊤ ˆ x ∼ r + Z XQ ) -1 ˆ e ⊤ x ∼ r + Z XQ y , where ˆ e x ∼ r + Z XQ are the residuals from regressing the continuous variable { x } n i =1 on the categorical variable { r i } n i =1 (i.e., Z ) and the reparametrized interaction term that enforces ABCs, Z XQ = Z Q X -(1: m ) (see Section 2.2). Thus, it suffices to show that ˆ e x ∼ r = ˆ e 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 (A.2).

First, observe that x Z ⊤ X = x D Z ⊤ X = ( s 2 x [1] , . . . , s 2 x L [ R ] ) is the vector of s 2 x r [ ] = ∑ r i = r x 2 i across groups. Next, observe that ( Z Z ⊤ ) -1 Z Z ⊤ X = diag( { ¯ x r } r ) contains the sample means of { x } n i =1 by each group r , and therefore x H Z ⊤ Z X = x Z ⊤ diag( { ¯ x r } r ) = ( n x , . . . , n 1 ¯ 2 1 L R ¯ x 2 L R ) with n r = nπ ˆ . r Combining these results, we have x E ⊤ Z XQ = v ⊤ Q -(1: m ) , where v ⊤ = ( s 2 1 -n x , . . . , s 1 ¯ 2 1 2 L R -n L R ¯ x 2 L R ) = n π σ (ˆ 1 ˆ 2 x [1] , . . . , π ˆ L R ˆ σ 2 x L [ R ] ) = nσ ˆ 2 x [1] ˆ π ⊤ under the assumption that ˆ σ 2 x r [ ] = ˆ σ 2 x [1] is common for all r , which is precisely the equal-variance condition (13). Finally, the definition of Q -(1: m ) via ABCs implies that ˆ π Q ⊤ -(1: m ) = 0 , which proves the result.

Proof (Theorem 4). 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 Q 1 , . . . , Z X Q p ) with Z X Q j = Z X j Q -(1: m ) , Z X j = D X j Z , and D X j = diag( x j ). By the FWL Theorem, it suffices to show that E M = E , where E M = ( I n -H X Z ) 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 Q 1 -H Z Z X Q 1 , . . . , Z X Q p -H Z Z X Q p ). Noticing that X E ⊤ Z XQ = ( X ⊤ ( Z X Q 1 -H Z Z X Q 1 ) , . . . , X ⊤ ( Z X Q p -H Z Z X Q p )), we consider the individual components x ⊤ h ( Z X Q j -H Z Z X Q j ) = ( x D ⊤ h x j Z -x H D ⊤ h Z 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 D ⊤ h x j Z = ( . . . , s r ( j, h ) , . . . ) with s r ( j, h ) = ∑ r i = r x ij x ih and x H D ⊤ h Z x j Z = ( . . . , n r ¯ ( x r j )¯ ( x r h , . . . ) )

with ¯ ( x r j ) = n -1 r ∑ r i = r x ij , we apply the same arguments as in Theorem 3.

Proof (Theorem 5). 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 X X 0 ( ⊤ 0 0 ) -1 X ⊤ 0 be its hat matrix. For the interaction terms, let Z x Q 1 = Z x 1 Q ˆ π where Z x 1 = D Z D x 1 , x 1 = diag( x 1 ), and ˆ π Q ⊤ ˆ π = 0 enforces the ABCs for the interaction terms (see Section 2.2). Now, it is sufficient to show that ( x Z ⊤ 1 x 1 -x H Z ⊤ 1 0 x 1 ) Q ˆ π = 0 as in (A.2). First, observe that x Z ⊤ 1 x 1 = ( · · · s 2 x 1 [ r ] · · · ). Second, x H Z ⊤ 1 0 x 1 = ˆ x D ⊤ 1 x 1 Z = ( · · · ∑ r i = r ˆ x i 1 x i 1 · · · ) where ˆ x 1 = H x 0 . Combining these results, we see that v ⊤ := x Z ⊤ 1 x 1 -x H Z ⊤ 1 0 x 1 = ( · · · ∑ r i = r ( x 2 i 1 -x i 1 ˆ x i 1 ) · · · ). Consider the interior terms for each r : ∑ r i = r ( x 2 i 1 -x i 1 ˆ x i 1 ) = ∑ r i = r x i 1 ˆ e i 1 = n r ̂ Cov ( r ˆ e 1 , x 1 ), where the latter equality holds because ∑ r i = r ˆ e i 1 = 0 for each r due to the inclusion of Z . Thus, v ⊤ = ( · · · n r ̂ Cov ( r ˆ e 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.

Proof (Theorem 6). The proof of Theorem 2 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 7 and is omitted for brevity.

Proof (Theorem 7). Applying the same arguments from the proof of Theorem 3, the variances satisfy Var(ˆ α M 1 ) = σ 2 M ( x e ⊤ ˆ x ∼ r ) -1 and Var(ˆ ) = α 1 σ 2 ( x e ⊤ ˆ x ∼ r + Z XQ ) -1 , where σ 2 M is the error variance from the main-only model and σ 2 is the error variance from the catmodified 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 (13), we previously showed that ˆ e x ∼ r = ˆ e x ∼ r + Z XQ . Thus, the only difference in the variances of the estimators occurs because of the error variances, i.e., Var(ˆ α 1 ) / Var(ˆ α M 1 ) = σ /σ 2 2 M . The SEs substitute point estimates for σ M and

σ : SE(ˆ α M 1 ) = ˆ S M √ ( x e ⊤ ˆ x ∼ r ) -1 and similarly,

$$\text{SE} ( \hat { \alpha } _ { 1 } ) & = \hat { S } \sqrt { ( x ^ { \top } \hat { e } _ { x \sim r + Z _ { X Q } } ) ^ { - 1 } } \\ & = \hat { S } \sqrt { ( x ^ { \top } \hat { e } _ { x \sim r } ) ^ { - 1 } } \\ & = \frac { \hat { S } } { \hat { S } _ { M } } \text{SE} ( \hat { \alpha } _ { 1 } ^ { M } ) \\ & \leq \text{SE} ( \hat { \alpha } _ { 1 } ^ { M } )$$

since ˆ S ≤ ˆ S M

$$\L _ { M } \text{ under } ( 1 4 ).$$

## B Generalized linear models with ABCs

Generalized linear models (GLMs) are immensely useful for regression analysis with a Broadly, and a ) with a transformed version, model (1)).

variety of data types, including continuous, count, binary, and categorical data. GLMs require a choice of data distribution (e.g., Gaussian, Poisson, Bernoulli, etc.) link function g that replaces the expectation of Y , say µ ( x c , say g { µ ( x c , ) } , in the cat-modified model (2) (similarly for the main-only 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 L in Section 2.2 is specified to incorporate the appropriate negative loglikelihood 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 2). For the main x j -effects, recall that α j = E ˆ π ( α j + ∑ K k =1 γ j,k,C k ) under ABCs (8), 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 (9) requires modifications. Most generally, cat-modified GLMs satisfy

$$g \{ \mu ( x _ { j } + 1, x _ { - j }, c ) \} - g \{ \mu ( x _ { j }, x _ { - j }, c ) \} = \alpha _ { j } + \sum _ { k = 1 } ^ { K } \gamma _ { j, k, c _ { k } },$$

so under ABCs (8) the main x j -effect is

$$\alpha _ { j } = \mathbb { E } _ { \hat { \pi } } [ g \{ \mu ( x _ { j } + 1, x _ { - j }, C ) \} - g \{ \mu ( 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, (B.1) simplifies to the log-odds-ratio:

$$g \{ \mu ( x _ { j } + 1, x _ { - j }, c ) \} - g \{ \mu ( x _ { j }, x _ { - j }, c ) \} = \log \left [ \frac { \text{odds} \{ \mu ( x _ { j } + 1, x _ { - j }, c ) \} } { \text{odds} \{ \mu ( x _ { j }, x _ { - j }, c ) \} } \right ]$$

where odds { µ ( x c , ) } = µ ( x c , ) / { 1 -µ ( x c , ) } . Thus, α j is the group-averaged log-oddsratio 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( ), so (B.1) is a log-ratio: t

$$g \{ \mu ( x _ { j } + 1, x _ { - j }, c ) \} - g \{ \mu ( x _ { j }, x _ { - j }, c ) \} = \log \left \{ \frac { \mu ( x _ { j } + 1, x _ { - j }, c ) } { \mu ( x _ { j }, x _ { - j }, c ) } \right \}.$$

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.

## C Additional simulation results

Figure C.1: Estimates (left) and standard errors (SEs, right) for all race and sex main effects for models that do (y-axis) and do not (x-axis) include the race:sex interaction across 500 simulated datasets. Here, the interaction effect is moderate ( γ = 0 5). . Under ABCs, the estimates are exactly invariant and the SEs are nearly invariant (45 ◦ line).

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00618v1-figure-e77e066c-b81e-47cb-9834-b198b24495a0.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00618v1-figure-64a1a3be-5458-4825-ade3-9821341bd9cc.jpg)

Figure C.2: Estimates (left) and standard errors (SEs, right) for the main x -effect for models that do (y-axis) and do not (x-axis) include the x:race interaction across 500 simulated datasets. Here, the interaction effect is moderate ( γ = 0 5) in all cases. . Under ABCs, the estimates and SEs are nearly invariant (45 ◦ line) as long as the deviations from equal-variance (13) are mild ( σ ac = 1, top). These effects are not assured when (13) is strongly violated (bottom).

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00618v1-figure-698b4fe9-75b4-4c7d-b6c3-ce2550c34f83.jpg)

Figure C.3: RMSEs for the main x -effects with extraneous (top) or necessary (bottom) catmodifier effects for n = 200 (left) and n = 1000 (right) under main-only and cat-modified models with ABCs (gold) and RGE (gray). Boxplots are across 500 simulations; nonoverlapping notches indicate a difference in medians. For n = 200, the cat-modified models omit the race:sex interaction to avoid rank deficiency. For larger n , the cat-modified model with ABCs is better able to match (top right) or improve upon (bottom right) the main x -effect estimates compared to the main-only models.

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00618v1-figure-8e173939-c53f-4749-88f6-7a9c76521e9b.jpg)

Figure C.4: Interval widths (boxplots) and empirical coverage (annotations) for 95% confidence intervals for the main x -effects with extraneous (top) or necessary (bottom) cat-modifier effects for n = 200 (left) and n = 1000 (right) under main-only and cat-modified models with ABCs (gold) and RGE (gray). For n = 200, the cat-modified models omit the race:sex interaction to avoid rank deficiency. For larger n , the cat-modified model with ABCs is better able to match (top right) or improve upon (bottom right) the statistical power for the main x -effects compared to the main-only models.

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00618v1-figure-45006259-29e9-406d-9a0a-abe041adf271.jpg)

Figure C.5: RMSEs for prediction of µ ( x , r, s ) with extraneous (top) or necessary (bottom) catmodifier effects for n = 200 (left) and n = 1000 (right) under main-only and cat-modified models with ABCs (gold) and RGE (gray). Boxplots are across 500 simulations; nonoverlapping notches indicate a difference in medians. All lasso and ridge estimators use the cat-modified model. Predictions under OLS are identical between RGE and ABCs. For n = 200, the cat-modified models omit the race:sex interaction to avoid rank deficiency. For each penalized (lasso or ridge) regression, ABCs typically outperform both RGE and the overparametrized models that omits any constraints.

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00618v1-figure-d9af638a-3caa-4b81-87a7-8ac2c877594c.jpg)

## D Additional application details

| Reference group encoding (RGE)   | Reference group encoding (RGE)   | Reference group encoding (RGE)   | Reference group encoding (RGE)   | Abundance-based constraints (ABCs)   | Abundance-based constraints (ABCs)   | Abundance-based constraints (ABCs)   | Abundance-based constraints (ABCs)   | Abundance-based constraints (ABCs)   |
|----------------------------------|----------------------------------|----------------------------------|----------------------------------|--------------------------------------|--------------------------------------|--------------------------------------|--------------------------------------|--------------------------------------|
| Variable                         | Model                            | Estimate (SE)                    | p -value                         | Variable                             | Model                                | Estimate                             | (SE)                                 | p -value                             |
| Intercept                        | Main-only                        | 0.238 (0.010)                    | < 0.001                          | Intercept                            | Main-only                            | 0.000                                | (0.006)                              | 1.000                                |
| Intercept                        | Cat-modified                     | 0.217 (0.011)                    | < 0.001                          | Intercept                            | Cat-modified                         | 0.000                                | (0.006)                              | 1.000                                |
| White                            | Main-only                        | ref                              | ref                              | White                                | Main-only                            | 0.256                                | (0.005)                              | < 0.001                              |
| White                            | Cat-modified                     | ref                              | ref                              | White                                | Cat-modified                         | 0.256                                | (0.005)                              | < 0.001                              |
| Black                            | Main-only                        | -0.727 (0.013)                   | < 0.001                          | Black                                | Main-only                            | -0.471                               | (0.008)                              | < 0.001                              |
| Black                            | Cat-modified                     | -0.664 (0.018)                   | < 0.001                          | Black                                | Cat-modified                         | -0.471                               | (0.008)                              | < 0.001                              |
| Hispanic                         | Main-only                        | -0.016 (0.025)                   | 0.517                            | Hispanic                             | Main-only                            | 0.240                                | (0.023)                              | < 0.001                              |
| Hispanic                         | Cat-modified                     | -0.042 (0.035)                   | 0.228                            | Hispanic                             | Cat-modified                         | 0.240                                | (0.023)                              | < 0.001                              |
| Female                           | Main-only                        | ref                              | ref                              | Female                               | Main-only                            | -0.018                               | (0.006)                              | 0.003                                |
| Female                           | Cat-modified                     | ref                              | ref                              | Female                               | Cat-modified                         | -0.018                               | (0.006)                              | 0.003                                |
| Male                             | Main-only                        | 0.036 (0.012)                    | 0.003                            | Male                                 | Main-only                            | 0.018                                | (0.006)                              | 0.003                                |
| Male                             | Cat-modified                     | 0.077 (0.015)                    | < 0.001                          | Male                                 | Cat-modified                         | 0.018                                | (0.006)                              | 0.003                                |
| White:Female                     | Cat-modified                     | ref                              | ref                              | White:Female                         | Cat-modified                         | -0.021                               | (0.005)                              | < 0.001                              |
| Black:Female                     | Cat-modified                     | ref                              | ref                              | Black:Female                         | Cat-modified                         | 0.043                                | (0.008)                              | < 0.001                              |
| Hisp:Female                      | Cat-modified                     | ref                              | ref                              | Hisp:Female                          | Cat-modified                         | -0.046                               | (0.022)                              | 0.034                                |
| White:Male                       | Cat-modified                     | ref                              | ref                              | White:Male                           | Cat-modified                         | 0.021                                | (0.005)                              | < 0.001                              |
| Black:Male                       | Cat-modified                     | -0.128 (0.025)                   | < 0.001                          | Black:Male                           | Cat-modified                         | -0.044                               | (0.008)                              | < 0.001                              |
| Hisp:Male                        | Cat-modified                     | 0.056 (0.050)                    | 0.262                            | Hisp:Male                            | Cat-modified                         | 0.051                                | (0.024)                              | 0.034                                |

Table D.1: Linear regression output with RGE (left) and ABCs (right) for the main-only model (6) and the cat-modified model (7) for the North Carolina education data (Section 5). The (mother's) race groups are non-Hispanic White (58.7%), non-Hispanic Black (35.1%), and Hispanic (6.2%) and the child's sex are Female (50.1%) and Male (49.9%). With RGE (references White and Female ), the main effects change dramatically with the addition of cat-modifiers and the standard errors (SEs) uniformly inflate. Yet with ABCs, all main effect estimates and SEs are invariant to cat-modifiers (the SEs actually decrease slightly; this is obscured due to rounding).

| Variable j                                 |   ˆ σ x [ NHW ] ( j ) |   ˆ σ x [ NHB ] ( j ) |   ˆ σ x [ Hisp ] ( j ) |
|--------------------------------------------|-----------------------|-----------------------|------------------------|
| Racial isolation (RI)                      |                 0.691 |                 1.071 |                  0.942 |
| Blood lead level                           |                 0.951 |                 1.042 |                  0.977 |
| Birthweight percentile for gestational age |                 0.994 |                 0.963 |                  0.979 |
| Mother's age                               |                 0.999 |                 0.971 |                  0.889 |
| PM 2 . 5 exposure                          |                 0.998 |                 1.005 |                  0.928 |

Table D.2: The (scaled) sample standard deviations ˆ σ x r [ ] ( j ) by race r for each covariate j = 1 , . . . , p . The invariance result for estimators with and without cat-modifiers (Theorem 4) requires ˆ σ x [ NHW ] ( j ) = ˆ σ x [ NHB ] ( j ) = ˆ σ x [ Hisp ] ( j ) for each covariate j (and similarly for the cross-covariances). Although this condition is clearly violated, the estimates and SEs maintain invariance, which suggests strong empirical robustness for the desirable invariance property of ABCs.

Table D.3: Cat-modified model output under ABCs for NC STEM education outcomes. These results augment Table 2 to include EconDisadv main and interaction effects, where 'Economically disadvantaged' is determined by participation in the National Lunch Program. EconDisadv is associated with lower math scores and eliminates the significant positive benefits of highereducated mothers ( mEdu&gt;HS ), thus emphasizing the importance of heterogeneous effects.

| Variable (continued)                      | Estimate   | (SE)    | p -value   |
|-------------------------------------------|------------|---------|------------|
| Economically disadvantaged ( EconDisadv ) |            |         |            |
| No (39.5%)                                | 0.163      | (0.009) | < 0.001    |
| Yes (60.5%)                               | -0.106     | (0.006) | < 0.001    |
| White:EconDisadvNo                        | 0.010      | (0.004) | 0.018      |
| Black:EconDisadvNo                        | -0.034     | (0.023) | 0.138      |
| Hisp:EconDisadvNo                         | -0.171     | (0.063) | 0.007      |
| White:EconDisadvYes                       | -0.013     | (0.006) | 0.018      |
| Black:EconDisadvYes                       | 0.007      | (0.005) | 0.138      |
| Hisp:EconDisadvYes                        | 0.025      | (0.009) | 0.007      |
| EconDisadvNo:Male                         | -0.013     | (0.008) | 0.118      |
| EconDisadvYes:Male                        | 0.009      | (0.006) | 0.118      |
| EconDisadvNo:Female                       | 0.014      | (0.009) | 0.118      |
| EconDisadvYes:Female                      | -0.009     | (0.006) | 0.118      |
| EconDisadvNo:mEdu<HS                      | -0.056     | (0.037) | 0.126      |
| EconDisadvYes:mEdu<HS                     | 0.006      | (0.004) | 0.126      |
| EconDisadvNo:mEdu=HS                      | -0.039     | (0.012) | 0.002      |
| EconDisadvYes:mEdu=HS                     | 0.016      | (0.005) | 0.002      |
| EconDisadvNo:mEdu>HS                      | 0.020      | (0.005) | < 0.001    |
| EconDisadvYes:mEdu>HS                     | -0.043     | (0.011) | < 0.001    |
| RI:EconDisadvNo                           | -0.007     | (0.011) | 0.513      |
| RI:EconDisadvYes                          | 0.005      | (0.007) | 0.513      |
| BLL:EconDisadvNo                          | -0.011     | (0.009) | 0.229      |
| BLL:EconDisadvYes                         | 0.007      | (0.006) | 0.229      |
| BWTpct:EconDisadvNo                       | 0.000      | (0.009) | 0.983      |
| BWTpct:EconDisadvYes                      | 0.000      | (0.006) | 0.983      |
| mAge:EconDisadvNo                         | 0.016      | (0.009) | 0.088      |
| mAge:EconDisadvYes                        | -0.011     | (0.006) | 0.088      |
| PM2.5:EconDisadvNo                        | 0.010      | (0.009) | 0.230      |
| PM2.5:EconDisadvYes                       | -0.007     | (0.006) | 0.230      |
Daniel R. Kowal
Facilitating heterogeneous effect estimation via statistically efficient categorical modifiers
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. An R
package lmabc is available.