• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
The Analysis Factor

The Analysis Factor

Statistical Consulting, Resources, and Statistics Workshops for Researchers

  • Home
  • Our Programs
    • Membership
    • Online Workshops
    • Free Webinars
    • Consulting Services
  • About
    • Our Team
    • Our Core Values
    • Our Privacy Policy
    • Employment
    • Collaborate with Us
  • Statistical Resources
  • Contact
  • Blog
  • Login

Strategies for Choosing the Reference Category in Dummy Coding

by Karen Grace-Martin 8 Comments

Every statistical software procedure that dummy codes predictor variables uses a default for choosing the reference category.

This default is usually the category that comes first or last alphabetically.

That may or may not be the best category to use, but fortunately you’re not stuck with the defaults.

So if you do choose, which one should you choose?

The first thing to remember is that ultimately, it doesn’t really matter, as long as you are aware of which category is the reference.  You’re going to get the same results no matter what you choose.  It’s just that the specific comparisons that the software reports (and gives you p-values for) will differ.

So it’s best to choose a category that makes interpretation of results easier.  Here are a few common options for choosing a category.

Remember, the regression coefficients will give you the difference in means (and/or slopes if you’ve included an interaction term) between each other category and the reference category.

Strategy 1: Use the normative category

In many cases, the most logical or important comparisons are to the most normative group.  For example, in one data set I analyzed, an important dummy-coded predictor is Poverty Status: In Poverty or Not In Poverty.

Not In Poverty is the norm–most people aren’t in Poverty (at least in this data set–it may not be true in the population you’re studying).  The interesting comparison is to see how people in poverty differ from this normative group.  So making Not In Poverty the reference group just makes sense.

Likewise, another example is Marital Status: Never Married, Currently Married, Divorced, Separated, or Widowed.

The alphabetical default would make Widowed the reference group.  But it’s not as interesting to compare Separated people to Widowed people, as they’re both small groups in the data set, and the most interesting comparisons are with the normative categories of Never Married or Currently Married.

In experiments or randomized control trials the control group is a natural normative category.  The only exception I can think of is a study with multiple  controls, but only one intervention or treatment group.  In that case, it may be more important to measure any differences between the treatment and each control.

Strategy 2: Use the largest category

The other problem with using the Widowed group as the reference is it’s very, very small.  When sample sizes are very unequal in the groups, which is very common for naturally occurring groups, it can become problematic to use it as the reference.

Sometimes, if there isn’t a normative group in a logical sense, it makes sense to just use the largest category as the reference.

Strategy 3: Use the category whose mean is in the middle, or conversely, at one of the ends

Sometimes all of these options fail.  There is no obvious norm and sample sizes are similar.

In those cases, sometimes the best thing to do is to pick the category with the lowest, the highest, or the middle mean.  Let me give you an example.

Let’s say those 5 marital categories have means on Y of

10  Never Married

11  Currently Married

9   Divorced

15  Separated

19  Widowed

If the overall F test in the ANOVA table is significant for this variable, you already know that the highest and lowest means are significantly different.  You just don’t know which of the middle three are significantly different from each of those.

For example, the middle value here is 11, the mean for currently married folks.  If you use that as the reference group and discover that it is significantly lower than 15, the mean for separated folks and 19, the mean for widowed, you know that both 9 for Divorced and 10 for Never Married should be too. (Note, this doesn’t always hold if some groups have much smaller sample sizes, but as long as they’re reasonably equal, it should hold).

You won’t know, for example, if there is a significant difference between the means for the Separated and Widowed groups, but if that’s not a theoretically important comparison, you’re done.

This particular strategy doesn’t always work, but you can use it to your advantage when it does.

Interpreting Linear Regression Coefficients: A Walk Through Output
Learn the approach for understanding coefficients in that regression as we walk through output of a model that includes numerical and categorical predictors and an interaction.

Tagged With: dummy coding, Reference Group

Related Posts

  • Your Questions Answered from the Interpreting Regression Coefficients Webinar
  • Member Training: Dummy and Effect Coding
  • How to Interpret the Intercept in 6 Linear Regression Examples
  • When Dummy Codes are Backwards, Your Stat Software may be Messing With You

Reader Interactions

Comments

  1. Reema says

    February 5, 2021 at 2:43 pm

    I am a beginner in data science. Just had a general doubt regarding the reference category.
    So my doubt is whether the reference categories are always assumed to be significant by default as while giving business recommendatins we compare the remaining categories with reference eg so and so item “x” is more popular then the “reference category item” and hence client should consider producing more “x” items then the “reference item”.

    Reply
    • Karen Grace-Martin says

      December 2, 2021 at 9:56 am

      Hi Reema,
      It all depends on what you’re trying to test. If you’re trying to understand, say, whether customers like item A more than the reference item B, then yes, your test is about the difference in the mean of liking between those two items. The coefficient you care about then is item A’s. That’s the difference between A and B.

      Reply
  2. abdulaziz says

    September 26, 2020 at 11:33 pm

    how can I select reference category in stata 9

    Reply
  3. Leonardo Castilho says

    January 28, 2019 at 4:18 pm

    Why using small sample groups as reference is problematic?

    Reply
    • Karen Grace-Martin says

      March 4, 2019 at 11:31 am

      Hi Leonardo,

      It’s generally a lack of power. Your power is determined by your smaller group.

      Reply
  4. Rousset says

    April 21, 2018 at 3:51 am

    How do I chose the Reference Category in STATA, so that it is not arbitrary the last alphabetical one?
    Presently, I am doing an xtreg in STATA and the omitted variable is the last one. I would like to chose another one so that results are easier to interpretate.
    Thanks

    Reply
    • Azadeh says

      December 1, 2021 at 6:13 pm

      use ib#.[variable_name]. b stands for base and # is the number for that category in your variable.

      Reply
  5. Shalaw says

    June 17, 2016 at 11:45 am

    I am going to analyze a situation where there are 300 non-injury and only 17 injury… four categorical variables are significant according to Chi-squire, then I used Multiple logistic regression for significant variables. Three of them are significant again. does it make any sense? I would like to know whether can I use Multiple logistic regression because only 17 respondent had injured from 317 of the respondents. I used SPSS to data analysis.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Please note that, due to the large number of comments submitted, any questions on problems related to a personal study/project will not be answered. We suggest joining Statistically Speaking, where you have access to a private forum and more resources 24/7.

Primary Sidebar

This Month’s Statistically Speaking Live Training

  • Member Training: Analyzing Pre-Post Data

Upcoming Free Webinars

Poisson and Negative Binomial Regression Models for Count Data

Upcoming Workshops

  • Analyzing Count Data: Poisson, Negative Binomial, and Other Essential Models (Jul 2022)
  • Introduction to Generalized Linear Mixed Models (Jul 2022)

Copyright © 2008–2022 The Analysis Factor, LLC. All rights reserved.
877-272-8096   Contact Us

The Analysis Factor uses cookies to ensure that we give you the best experience of our website. If you continue we assume that you consent to receive cookies on all websites from The Analysis Factor.
Continue Privacy Policy
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT