4
$\begingroup$

Generally, my default practice in regression for nominal categorical variables, including race, is to use dummy coding, with the majority/plurality level as reference. Interpretation of the model coefficients using this scheme is straightforward.

Additionally, I typically view comparisons to the majority/plurality group as most relevant, and for this coding scheme those comparisons are simply evident in the estimated coefficients and it's straightforward to test only these comparisons. They are also the best-sampled pairwise comparisons (i.e., the tests with the most power for given effect size). For a sample in the US population, that usually means white race is the reference category.

Recently, a colleague of mine received some criticism for this approach, arguing that using "white" as a default category propagates bias that "white" is normal/typical, and that it's better to look at difference between each group to "all" as a reference, or perhaps to choose the measured maximum/minimum category as a reference (whichever is preferable with respect to the dependent variable).

I appreciate the sentiment behind this, but the interpretation seems flawed to me. For an outcome where disparities are expected due to racism or bias, a comparison of one race category to the mean across all categories (weighted or not) seems to dilute the size of any disparities that are present across more than one non-majority race. Planning contrasts only with the "best" point estimate could mean the comparison group is likely to be undersampled and introduces selection bias. Unfortunately, I wasn't present and was unable to follow up with the person raising an objection as to what specifically they are proposing.

Am I missing some alternative? I'd be interested in any supported proposals of best-practices for handling these types of variables. I understand the use of "race" as a variable is unfamiliar/unusual to many people outside the US and would prefer not to relitigate those issues here: from my perspective, perceived race is not useful as a biological variable, but is nonetheless important because it impacts how people are treated by others in society and therefore affects health and healthcare.


A colleague suggested the criticism may have been motivated by papers like https://journals.sagepub.com/doi/abs/10.1177/0081175020982632 that suggests use of mean contrasts or binary contrasts. That would help answer the alternative I'm missing, but I'm still a bit uncertain with these suggestions, as they still seem to bring other problems with interpretation.

$\endgroup$

3 Answers 3

7
+100
$\begingroup$

To me, this seems to come from an over-reliance on interpreting the output of regression models, in contrast to estimating and interpreting specific contrasts and relationships from a model. By this I mean that a researcher should specify the contrasts they want to make (which could be all pairwise comparisons between race categories) and then compute those from the model in a model-agnostic way. Identifying estimands (i.e., quantities to estimate) that are functions of the predicted values of the model means that the model parameters themselves do not need to be interpreted.

Some examples of model-agnostic estimands include the following:

  • $E[Y|\text{race} = B, X = x]$ (the predicted value of the outcome for those with $\text{race} = B$ and covariates $X$ set to a specific profile $x$)
  • $E[Y|\text{race} = B, X = x] - E[Y|\text{race} = W, X = x]$ (the contrast between the predicted value of the outcome for those with $\text{race} = B$ and $\text{race} = W$ with $X$ set to a specific profile $x$)
  • $E\left[E[Y|\text{race} = B, X]\right]$ (the average predicted outcome for those with $\text{race} = B$)
  • $E\left[E[Y|\text{race} = B, X]\right] - E\left[E[Y|\text{race} = W, X]\right]$ (the contrast in average predicted outcomes between those with $\text{race} = B$ and $\text{race} = W$)

None of these quantities reference the type of model being fit or the parameterization of the model. In that sense, they are model-agnostic. Depending on the parameterization of the model, they may be equal to familiar model outputs, as I demonstrate below.

We'll use the lalonde dataset from MatchIt, which contains observations from a study of the effect of a job training program (treat) on 1978 earnings (re78) and includes several covariates, including race (with three categories, "black", "hispan", and "white"). We'll consider the relationships between the racial categories and the outcome in the control group.

library("marginaleffects")
data("lalonde", package = "MatchIt")

lalonde_c <- subset(lalonde, treat == 0)

First, let's fit a model for the outcome given race and the covariates in the control group. We'll set the reference category of race to "white" to match your example.

lalonde_c <- transform(lalonde_c,
                       race = relevel(race, "white"))

fit <- lm(re78 ~ race + age + educ + married + I(re74/1000),
          data = lalonde_c)

summary(fit)
#> 
#> Call:
#> lm(formula = re78 ~ race + age + educ + married + I(re74/1000), 
#>     data = lalonde_c)
#> 
#> Residuals:
#>    Min     1Q Median     3Q    Max 
#> -15538  -4674  -1305   4277  18486 
#> 
#> Coefficients:
#>              Estimate Std. Error t value Pr(>|t|)    
#> (Intercept)   2795.48    1705.87   1.639   0.1020    
#> raceblack    -1054.18     832.24  -1.267   0.2060    
#> racehispan     685.42     949.68   0.722   0.4709    
#> age            -35.51      33.59  -1.057   0.2911    
#> educ           248.43     118.86   2.090   0.0372 *  
#> married        353.07     744.98   0.474   0.6358    
#> I(re74/1000)   458.51      55.38   8.279 1.65e-15 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> Residual standard error: 6524 on 422 degrees of freedom
#> Multiple R-squared:  0.2113, Adjusted R-squared:  0.2001 
#> F-statistic: 18.84 on 6 and 422 DF,  p-value: < 2.2e-16

We get coefficients comparing the expected values of the outcome between black and white and between hispan and white. One might ask whether the expected values of the outcome differ between hispan and black; the model doesn't answer this question. Failing to report his contrast is precisely the bias the reviewer is identifying. Instead, we can compute the expected value of the outcome for an average covariate profile (i.e., for units that are average on the other variables) and contrast them.


predictions(fit, newdata = datagrid(race = levels)) |>
              summary(by = "race")
#> 
#>    race Estimate Std. Error     z Pr(>|z|) 2.5 % 97.5 %
#>  white      7043        400 17.62   <0.001  6260   7826
#>  black      5989        718  8.34   <0.001  4582   7396
#>  hispan     7728        848  9.12   <0.001  6067   9390
#> 
#> Columns: race, estimate, std.error, statistic, p.value, conf.low, conf.high

comparisons(fit, variables = list(race = "pairwise"),
            newdata = "mean")
#> 
#>  Term       Contrast Estimate Std. Error      z Pr(>|z|) 2.5 % 97.5 %
#>  race black - white     -1054        832 -1.267    0.205 -2685    577
#>  race hispan - black     1740       1107  1.572    0.116  -430   3909
#>  race hispan - white      685        950  0.722    0.470 -1176   2547
#> 
#> Columns: rowid, term, contrast, estimate, std.error, statistic, p.value, conf.low, conf.high, predicted, predicted_hi, predicted_lo, re78, race, age, educ, married, re74

Note that no matter which contrast coding scheme you use or which category you choose to be the reference category, you will get exactly the same predicted values and contrasts between categories. For example, below we set the reference category to "black" and fit the same model and compute the same quantities.

fit <- lm(re78 ~ race + age + educ + married + I(re74/1000),
          data = transform(lalonde_c, race = relevel(race, "black")))

predictions(fit, newdata = datagrid(race = levels)) |>
  summary(by = "race")
#> 
#>    race Estimate Std. Error     z Pr(>|z|) 2.5 % 97.5 %
#>  black      5989        718  8.34   <0.001  4582   7396
#>  white      7043        400 17.62   <0.001  6260   7826
#>  hispan     7728        848  9.12   <0.001  6067   9390
#> 
#> Columns: race, estimate, std.error, statistic, p.value, conf.low, conf.high

comparisons(fit, variables = list(race = "pairwise"),
            newdata = "mean")
#> 
#>  Term       Contrast Estimate Std. Error     z Pr(>|z|) 2.5 % 97.5 %
#>  race hispan - black     1740       1107 1.572    0.116  -430   3909
#>  race hispan - white      685        950 0.722    0.470 -1176   2547
#>  race white - black      1054        832 1.267    0.205  -577   2685
#> 
#> Columns: rowid, term, contrast, estimate, std.error, statistic, p.value, conf.low, conf.high, predicted, predicted_hi, predicted_lo, re78, race, age, educ, married, re74

You might notice that the contrasts between black and white and between hispan and white estimated from comparisons() are the same as those computed from the model coefficients. So this method isn't necessarily doing anything new when the model is simple like this one. But another benefit of this approach is that you can compute quantities that have the same interpretations as the ones above but come from models that are completely uninterpretable. For example, let's say we fit the model below, which contains interactions and polynomial terms:

fit <- lm(re78 ~ race * (poly(age, 2) + educ * married + I(re74/1000)),
          data = lalonde_c)

The coefficients are uninterpretable, so would you present them in a regression table? Would you give the reader a deluge of meaningless coefficient values with meaningless tests associated with them with the hopes they would find a way to interpret them correctly? I wouldn't. And yet this model is more likely to capture the true relationship between the predictors and the outcome because it is more flexible and makes fewer restrictions (i.e., it doesn't assume the relationships are purely linear and additive). Still, though, we can compute quantities with exactly the same interpretations as those above:

predictions(fit, newdata = datagrid(race = levels)) |>
  summary(by = "race")
#> 
#>    race Estimate Std. Error     z Pr(>|z|) 2.5 % 97.5 %
#>  white      7176        665 10.79   <0.001  5872   8479
#>  black      5313       1237  4.29   <0.001  2889   7738
#>  hispan     5960       1261  4.73   <0.001  3489   8430
#> 
#> Columns: race, estimate, std.error, statistic, p.value, conf.low, conf.high

comparisons(fit, variables = list(race = "pairwise"),
            newdata = "mean")
#> 
#>  Term       Contrast Estimate Std. Error      z Pr(>|z|) 2.5 % 97.5 %
#>  race black - white     -1862       1404 -1.326    0.185 -4615    890
#>  race hispan - black      647       1766  0.366    0.714 -2815   4108
#>  race hispan - white    -1216       1425 -0.853    0.394 -4009   1578
#> 
#> Columns: rowid, term, contrast, estimate, std.error, statistic, p.value, conf.low, conf.high, predicted, predicted_hi, predicted_lo, re78, race, age, educ, married, re74

Note that this strategy also obviates the need to decide on centered vs. uncentered, standardized vs. unstandardized, raw polynomial vs. orthogonal polynomial, and any other regression adjustments that are made to enhance the interpretability of the model but don't change its fit. The model simply isn't meant to be interpreted; rather, it should be probed for interpretable quantities that could be computed no matter how the model is parameterized.

So, to summarize, you (and your colleague) should do the following:

  1. Fit a model that is likely to capture the true outcome-generating process, regardless of whether it is interpretable or not. In fact, it would be better to choose an uninterpretable model (e.g., one with many interactions and polynomials) to fit the data better.
  2. Do not report the model coefficients and tests, except possibly as a table deep in the appendix. Nothing in this table should be interpreted, but it might be useful for those seeking to replicate your results to see what values your estimated coefficients take. Note that it doesn't matter how nominal variables are coded; all codings yield the same model fit and predicted values. Fitting an uninterpretable model can help sell the decision not to rely on model coefficients.
  3. Report model-agnostic quantities that answer the specific substantive questions you want to answer, e.g., whether there are disparities between race groups. Because these quantities are model-agnostic, it doesn't matter which category is the baseline category in the model. You would report all comparisons that make sense to make, whether between the majority category and minority categories or between minority categories. Only if you selectively report comparisons will bias show through; the choice of how the model is parameterized reveals no bias because it has no effect on how the reported quantities are estimated.

This last point is the key point. The reviewer is commenting that how the model is parameterized reveals bias by the analyst when prioritizing a majority category as "baseline" or "normal". But this only occurs when the analyst only reports and interprets the comparisons that involve the majority category because those happen to correspond to coefficients in the model when parameterized in a specific way. Severing the relationship between the model parameters and the interpretation of the model results by choosing model-agnostic estimands eliminates this bias.

Using simple models because they are more interpretable is no excuse for bad statistics practices, so don't prioritize fitting interpretable models. Fit good models, and interpret quantities that are model-agnostic in a just way.

$\endgroup$
8
  • $\begingroup$ Sure, it's good to point out that ultimately these are all the same model, but I think it's missing the point a bit and ending up on a tangent about linear approximations. Probably largely due to how I presented the problem. In that case, though, the problem remains about how to present the results. Ultimately, that means presenting contrasts between groups, and the argument is that using the majority category as a reference exhibits bias. $\endgroup$ Commented Apr 21, 2023 at 16:09
  • $\begingroup$ journals.sagepub.com/doi/full/10.1177/0081175020982632 argues that a reference category is unnecessary and advocates for mean contrasts or binary contrasts. $\endgroup$ Commented Apr 21, 2023 at 16:15
  • 1
    $\begingroup$ It seemed to me that the problem was due to presenting regression coefficients, which, no matter how the model is parameterized, prioritize one group of others, and so my recommendation was to avoid showing regression coefficients as they often have no useful interpretation except in the simplest of models. My "tangent" was to explain how to present the results of a model that avoid regression coefficients. That article also focuses on presenting regression coefficients as though that is the only way to present the results of a regression model. $\endgroup$
    – Noah
    Commented Apr 21, 2023 at 16:17
  • 1
    $\begingroup$ It seems standard in medical/health publishing to both use relatively simple, interpretable models when the goals are inference rather than prediction, and typically to present effects rather than predictions. The question is generally "does X make Y better or worse and how much", rather than "what's the expected result for A". For categorical predictors there's no need to think about polynomial relationships. $\endgroup$ Commented Apr 21, 2023 at 16:21
  • 1
    $\begingroup$ Reading the article more carefully, they recommend exactly what I do in the section "Alternatives to using a reference category". So I stand by recommendation. Simply omit categories that you don't have data to make valid comparisons on. Just because medical research currently uses poorly justified simple models, doesn't mean we shouldn't develop a method that both avoids the problem you identify in the question and allows straightforward interpretation of complicated models, which my recommended does. $\endgroup$
    – Noah
    Commented Apr 21, 2023 at 16:29
2
$\begingroup$

It doesn't seem very useful to try and debate which of these two approaches is "right" in the abstract. Rather, different ways of analyzing race help answer different questions, and you should use whatever approach is answering the question you are trying to answer.

The standard approach you lay out - leaving "white" as the reference category and including dummies for each non-white racial category, is useful if you want to answer the following types of questions "Are Black respondents significantly different from white respondents?" "Are Hispanic respondents significantly different from white respondents?" etc.

These are often really important questions. For example, if you wanted to study whether "white supremacy" is causing Black, and Hispanic drivers to get pulled over more than white ones, then THIS is probably the approach you want - not because you are treating white as "normal" in some sort of moral sense, but because the theory of "white supremacy" argues that America treats "white" as normative in American society, and thus non-white Americans are oppressed/discriminated against relative to white Americans.

Note however, that this approach will not help you answer the question of whether (due to the particulars of anti-black racism) Black drivers are pulled over more than Hispanic drivers. If that was your research question (and it's a potentially interesting one!) then you would need to change the reference category to either Black or Hispanic so you can test if those two groups are different from each other.

Thus, you shouldn't just treat the biggest group as the reference by default, but you should choose the reference category that allows you to answer the question you are trying to answer. If that happens to be the biggest category, then so be it. It doesn't reflect your views on the normativity of whiteness or anything like that. You are just trying to answer a particular question.

The alternative approach - comparing each group to "the mean" - might be better if the question you were investigating involved looking at how each racial group differed from "the average across all racial groups." This is a trickery question (partly because the overall average depends on the relative prevalence of each group), and I'm having trouble coming up with a situation in which it's actually the thing we would care about (which is why I tend not to use that approach when analyzing race). But if someone can articulate a research question that does ask how different racial groups compare to the overall average, then this is the method you should use to try and answer it.

In short - when deciding how to treat "race" in a regression model, the key question is not which approach reflects our moral view about the nature of race and racism, but which approach allows us to actually answer the question we're trying to answer.

That all being said, none of this really matters very much if you are just treating race as a control variable. If you are interested in some other variable, then doing any of these different approaches will prevent race from confounding your results in the same way, so you are free to use whatever approach you find the most aesthetically or morally pleasing.

$\endgroup$
1
$\begingroup$

The attribute of this critique on which I feel compelled to comment is the suggestion that comparing to the "all" as a reference resolves the issue of bias (where the bias comes from picking "white" as the reference group for comparison).  Simply put, with regards to dummy coding for categorical variables in multiple regression models, this simply is not the case.  For even when you choose to do comparisons to the grand mean, you still need a reference group to encode the categorical predictor variable of "race" into the necessary instrumental variables (dummy variables) to run the MR model.

In brief, if you have 4 categories (A,B,C,D), and you have dummy variables $d_B=1$ if in category B, $d_C=1$ if in category C, and $d_D=1$ if in category $D$, and zero for all others...then you have an MR model that generates the mean differences for each category compared to the reference category A.  (I am assuming balanced design, but an adjustment can easily be made if the group sample sizes are not the same, though I will not elaborate on it here.)

And, if you wish to change this to a grand-mean dummy coding, you define the dummy variables the same, but if you are in group A, then all three dummy variables are set to the value $d_B=d_C=d_D=-1$. So, the flaw with the argument that using "white" as the reference group is actually NOT resolved by using grand-mean coding, as you still must pick a reference group.  And the suggestion that picking a reference group propagates bias is not resolved.

If the research question is about differences between groups, then the grand-mean comparison probably is not appropriate.  If the research question is about comparison to the grand-mean, then it would be justified.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.