Why the Reference Category Matters
A categorical predictor does not have a natural numerical scale. In logistic regression, indicator coding represents group membership with zero-one variables, and one group is designated as the reference category. The fitted probabilities do not depend on which group is chosen as the reference, but the reported intercept and factor coefficient do. Correct interpretation therefore starts by identifying which group has indicator value zero.
Suppose \(Y_i\) is a binary outcome and \(D_i\) indicates whether observation \(i\) belongs to a group of interest. The standard main-effects model below uses \(D_i=0\) for the reference group and \(D_i=1\) for the comparison group. It may also include a quantitative predictor \(x_i\).
This model assumes that, conditional on the predictors, each response is Bernoulli with probability \(p_i\), and that the log odds are linear in the stated predictors. For the usual likelihood analysis, responses are also treated as conditionally independent. The equation contains no \(D_ix_i\) interaction: it therefore assumes that the group log-odds contrast \(\beta_1\) is the same at every value of \(x\). If an interaction is included, the group contrast depends on \(x\), and the simple interpretation of \(\beta_1\) as a constant group contrast no longer applies.
Interpret the Coefficients Relative to the Reference
Setting \(D=0\) removes the factor term. At a particular value \(x\), the reference group's linear predictor is \(\beta_0+\beta_2x\); for the comparison group it is \(\beta_0+\beta_1+\beta_2x\). Thus, \(\beta_0\) is the reference group's log odds when \(x=0\), not necessarily its log odds at a typical or average value of \(x\). If \(x=0\) is outside the meaningful range, the intercept may have limited practical interpretation.
The odds ratio describes a multiplicative change in odds, not a fixed change in probability. Both groups' probabilities depend on their linear predictors through the logistic function \(p=1/(1+\exp(-\eta))\), where \(\eta\) is the linear predictor. Consequently, even when the odds ratio is constant across \(x\), the probability difference generally is not.
Worked Example: Comparing Two Claim-Handling Groups
In a hypothetical study, \(Y=1\) means that a claim is settled within 30 days. Let \(D=1\) indicate enhanced documentation and \(D=0\) standard documentation. Let \(x\) be the number of prior claims. The fitted model is \(\operatorname{logit}(p)=-1.2+0.8D+0.3x\). Find the probabilities for both documentation groups at \(x=2\), and interpret the factor coefficient. The method is to substitute the indicator values, then convert each logit to a probability. The common mistake to avoid is interpreting \(0.8\) as a probability increase of 0.8.
Reference group. Standard documentation has \(D=0\). At \(x=2\), its linear predictor is \(-1.2+0.8(0)+0.3(2)=-1.2+0+0.6=-0.6\). Its odds are \(\exp(-0.6)=0.5488\), so its probability is \(0.5488/(1+0.5488)=0.3543\), to four decimals.
Comparison group. Enhanced documentation has \(D=1\). Its linear predictor is \(-1.2+0.8(1)+0.3(2)=-1.2+0.8+0.6=0.2\). Its odds are \(\exp(0.2)=1.2214\), so its probability is \(1.2214/(1+1.2214)=0.5498\), to four decimals.
Coefficient interpretation. At the same prior-claim count, the enhanced group's log odds exceed the standard group's by \(0.8\). The corresponding odds ratio is \(\exp(0.8)=2.2255\): the fitted odds are about 2.2255 times as large. The probability difference at \(x=2\) is \(0.5498-0.3543=0.1955\), not \(0.8\). The calculation checks because the difference in the two linear predictors is \(0.2-(-0.6)=0.8\).
Changing the Reference Category
For a binary factor, changing the reference category means replacing \(D\) by \(R=1-D\). The new indicator \(R\) equals one for the former reference group and zero for the former comparison group. Substituting \(D=1-R\) into the original linear predictor gives an equivalent expression. The new intercept corresponds to the group that is now coded zero, and the new factor coefficient reverses the direction of the comparison.
This identity is the reason fitted probabilities remain unchanged: for each observation, the rewritten equation produces exactly the same \(\eta\). Applying the same logistic function to that same \(\eta\) yields the same \(p\). Only the coefficient representation changes. In particular, the recoded intercept is \(\beta_0+\beta_1\), the log odds for the former comparison group at \(x=0\), and the recoded factor coefficient is \(-\beta_1\). Its odds ratio, \(\exp(-\beta_1)\), is the reciprocal of the original odds ratio.
Record which group has indicator zero and which has indicator one before interpreting any coefficient.
For reversed binary coding, use \(D=1-R\) throughout the linear predictor.
Read the new intercept and coefficient from the rewritten expression, then verify that a group-specific linear predictor is unchanged.
Worked Example: Reversing the Documentation Reference
Use the claim-settlement model \(\operatorname{logit}(p)=-1.2+0.8D+0.3x\), where \(D=0\) denotes standard documentation. Rewrite it using \(R=1-D\), and verify both fitted probabilities at \(x=2\). The method is algebraic substitution followed by direct evaluation. The common mistake to avoid is changing the coefficient's sign without also changing the intercept.
Recode the equation. Since \(D=1-R\), the linear predictor becomes \(-1.2+0.8(1-R)+0.3x=-1.2+0.8-0.8R+0.3x=-0.4-0.8R+0.3x\). The new reference group is enhanced documentation, because it has \(R=0\). Its log odds at \(x=0\) are now \(-0.4\). The coefficient \(-0.8\) compares standard documentation (\(R=1\)) with enhanced documentation (\(R=0\)); its odds ratio is \(\exp(-0.8)=0.4493\), the reciprocal of \(\exp(0.8)=2.2255\), up to rounding.
Check standard documentation. It has \(R=1\), so at \(x=2\) the recoded predictor is \(-0.4-0.8(1)+0.3(2)=-0.4-0.8+0.6=-0.6\). The probability is \(\exp(-0.6)/(1+\exp(-0.6))=0.3543\), matching the original coding.
Check enhanced documentation. It has \(R=0\), so the predictor is \(-0.4-0.8(0)+0.3(2)=-0.4+0.6=0.2\). The probability is \(\exp(0.2)/(1+\exp(0.2))=0.5498\), again matching the original coding. Both checks confirm that the change of reference alters the coefficients, not the fitted values.
Centering a Quantitative Predictor Is a Separate Change
A factor reference and a quantitative predictor's zero point answer different questions. If \(x\) is replaced by a centered predictor \(z=x-c\), the intercept shifts to describe the reference group at \(x=c\). In a model with no interaction, the factor coefficient remains the same because the group contrast is still measured at the same value of the quantitative predictor. This is distinct from changing the factor reference, which reverses the comparison and changes the intercept by the original factor coefficient.
Worked Example: Interpreting a Group Contrast at a Meaningful Age
A hypothetical model for a binary service-renewal outcome is \(\operatorname{logit}(p)=-2+0.6D+0.05A\), where \(D=0\) denotes the standard service option, \(D=1\) the expanded option, and \(A\) is age in years. Find the fitted probabilities at age 40 and interpret the factor effect. The method is to evaluate each linear predictor and transform it to a probability. The common mistake to avoid is treating the intercept \(-2\) as the standard group's log odds at age 40; it applies at age zero.
Standard option at age 40. Set \(D=0\) and \(A=40\): \(\eta=-2+0.6(0)+0.05(40)=-2+0+2=0\). Therefore \(p=1/(1+\exp(0))=0.5000\).
Expanded option at age 40. Set \(D=1\) and \(A=40\): \(\eta=-2+0.6(1)+0.05(40)=-2+0.6+2=0.6\). Therefore \(p=1/(1+\exp(-0.6))=0.6457\), to four decimals.
At the same age, the expanded option has \(0.6\) greater log odds, and its odds ratio relative to the standard option is \(\exp(0.6)=1.8221\). At age 40, the probability difference is \(0.6457-0.5000=0.1457\). The numerical check is that the two linear predictors differ by \(0.6-0=0.6\), exactly the fitted factor coefficient.
Common Interpretation Traps
- Ignoring which category is coded zero. A positive coefficient means higher log odds for the category coded one relative to the category coded zero, not automatically for a group with a particular name.
- Calling the coefficient a probability change. A coefficient of \(\beta_1\) changes log odds by \(\beta_1\); it multiplies odds by \(\exp(\beta_1)\). The probability change must be calculated at specified predictor values.
- Keeping the intercept after reversing the reference. When the binary reference is reversed, the intercept changes from \(\beta_0\) to \(\beta_0+\beta_1\), as well as the factor coefficient changing from \(\beta_1\) to \(-\beta_1\).
- Forgetting the predictor values at which an intercept applies. With quantitative predictors, the intercept describes the reference group when all included quantitative predictors equal zero. Centering changes that interpretation.
- Assuming the same simple interpretation with an interaction. If a group-by-predictor interaction is present, the group contrast depends on the predictor value; interpret the full relevant combination of coefficients instead.
Check Your Understanding
For each problem, identify the reference group before interpreting or recoding the coefficient.
- A fitted model is \(\operatorname{logit}(p)=-0.9+1.1D\), with \(D=0\) for routine review and \(D=1\) for additional review. Find both fitted probabilities and the additional-to-routine odds ratio. (Answer: Routine \(p=0.2891\); additional review \(p=0.5498\); odds ratio \(=\exp(1.1)=3.0042\).)
- A hypothetical model is \(\operatorname{logit}(p)=-1.5+0.4D+0.2x\), where \(D=1\) marks a revised procedure and \(x\) is a count. At \(x=3\), calculate both probabilities and the odds ratio for revised versus standard procedure. (Answer: Standard \(p=0.2891\); revised \(p=0.3775\); odds ratio \(=\exp(0.4)=1.4918\).)
- The model is \(\operatorname{logit}(p)=0.3-0.7D+0.1z\), where \(D=0\) marks the evening group. Let \(R=1-D\). Rewrite the model and state the new reference group and its factor coefficient. (Answer: \(\operatorname{logit}(p)=-0.4+0.7R+0.1z\); the new reference is the former \(D=1\) group, and the coefficient compares the former evening group with it.)
- A model is \(\operatorname{logit}(p)=-1+0.5D+0.02A\), where \(D=0\) is the reference category and \(A\) is age. Find the reference and comparison probabilities at \(A=30\), and the odds ratio. (Answer: Reference \(\eta=-0.4\), \(p=0.4013\); comparison \(\eta=0.1\), \(p=0.5250\); odds ratio \(=\exp(0.5)=1.6487\).)
- A main-effects logistic model has factor coefficient \(0.9\) for \(D=1\) against \(D=0\). After reversing the coding, state the new factor coefficient and odds ratio for the newly coded \(R=1\) group against \(R=0\). (Answer: Coefficient \(-0.9\); odds ratio \(=\exp(-0.9)=0.4066\), the reciprocal of \(\exp(0.9)\).)