Why a Reference Group Matters
A categorical covariate, such as formulation group or genotype category, assigns each individual to one of a finite set of levels. In an NLME parameter model, the categorical covariate contributes to the individual parameter alongside subject-level random effects. Indicator variables make that contribution explicit: one level is chosen as the reference group, and its covariate contribution is set to zero.
The zero is a feature of the coding, not a claim that the reference group has no biological effect or that its parameter is zero. It means the reference group's covariate term is the baseline against which the other coded levels are represented. The numerical parameter for that baseline is given by the model's typical value when the random effect is zero.
Reference-Group Coding in a Parameter Model
Suppose a categorical covariate \(G_i\) has levels \(A\), \(B\), and \(C\), and \(A\) is the reference group. Define \(I(G_i=B)\) to equal 1 for an individual in group \(B\) and 0 otherwise; define \(I(G_i=C)\) similarly. For a positive parameter such as clearance, a log-linear covariate model with an exponential random effect can be written as follows.
Here, \(\theta_{CL}\) is the clearance for an individual in the reference group with \(\eta_{CL,i}=0\). The coefficients \(\beta_B\) and \(\beta_C\) are fixed effects for the nonreference levels on the log scale. The term \(\eta_{CL,i}\) is the individual random effect. The same coding structure can be used for another positive parameter, with its own typical value, coefficients, and random effect.
The indicator values are determined by group membership:
| Group for individual \(i\) | \(I(G_i=B)\) | \(I(G_i=C)\) | Covariate contribution in the exponent |
|---|---|---|---|
| A, the reference group | 0 | 0 | 0 |
| B | 1 | 0 | \(\beta_B\) |
| C | 0 | 1 | \(\beta_C\) |
The table separates two sources of individual differences. Group membership determines the fixed covariate contribution, while \(\eta_{CL,i}\) accounts for an individual's deviation through the random effect. For an eta-zero individual in group \(A\), clearance is \(\theta_{CL}\); for an eta-zero individual in another group, the appropriate fixed-effect term is included as well. An eta-zero individual is a model reference, not necessarily a person observed in the data.
Worked Example: Coding Three Formulation Groups
In a hypothetical model, clearance is in L/h and formulation \(A\) is the reference group. Suppose \(\theta_{CL}=8.00\) L/h, \(\beta_B=-0.2231\), and \(\beta_C=0.1823\). Calculate the model clearance for an eta-zero individual in each group. These values are illustrative, not results from a real study.
For group \(A\), both indicators are zero. Substituting into the model gives:
For group \(B\), \(I(G_i=B)=1\) and \(I(G_i=C)=0\). Thus:
For group \(C\), the indicators are 0 and 1, respectively:
The reference group's covariate contribution is zero, and its eta-zero value is the model's \(\theta_{CL}\). Each other group activates only its own indicator. For an individual with a nonzero random effect, that random effect also enters the exponent; these calculations deliberately set it to zero to isolate the reference-group coding.
Why Use \(K-1\) Indicators?
With an intercept and reference-group coding, each of the \(K\) groups has a distinct indicator pattern: all indicators are zero for the reference, and exactly one is 1 for each other group. This gives a direct interpretation to the baseline and the other group-specific terms. Using an intercept plus an indicator for every group instead creates redundancy.
The reason can be shown directly. If \(I(G_i=k)\) is defined for every level \(k\), then each individual belongs to exactly one level, so the indicators sum to 1. The intercept column is therefore an exact sum of the group-indicator columns. The resulting design matrix is rank-deficient: different coefficient values can give the same fitted values, so the coefficients are not separately identifiable.
For instance, adding a constant \(c\) to the intercept and subtracting \(c\) from every group coefficient leaves the linear predictor unchanged. The data therefore cannot determine a unique intercept and set of all-\(K\) group coefficients simultaneously. Removing the reference indicator resolves this redundancy while retaining a parameter for each group-specific value.
Worked Example: Changing the Reference Group
Consider a hypothetical clearance model with group \(A\) as reference. Let the eta-zero values be 10.0 L/h for \(A\), 12.5 L/h for \(B\), and 7.50 L/h for \(C\). In the original coding, the group coefficients are \(\beta_B=\log(1.25)=0.2231\) and \(\beta_C=\log(0.75)=-0.2877\). Now use \(B\) as the reference and write the equivalent model values.
The new reference value must be the eta-zero value for group \(B\), which is 12.5 L/h. Group \(A\)'s coefficient is the log of its value relative to that new baseline:
Group \(C\)'s coefficient relative to \(B\) is:
The new model reproduces the same values. For \(B\), both indicators are zero, giving \(12.5\exp(0)=12.5\) L/h. For \(A\), it gives \(12.5\exp(-0.2231)\approx10.0\) L/h. For \(C\), it gives \(12.5\exp(-0.5108)\approx7.50\) L/h. The choice of reference changes the baseline and coefficient values, not the group-specific fitted values when the model is reparameterized consistently.
Assumptions and Checks
Indicator coding is a representation of a categorical covariate; it does not by itself guarantee that a chosen parameter model is scientifically appropriate or estimable. Before interpreting a fitted model, check the following conditions:
- Levels are defined clearly. Each individual should be assigned to one relevant level of the categorical covariate. The reference level and the coding of every other level should be explicit.
- The reference level is represented in the data. If no individual belongs to the reference group, the reference baseline is not directly supported by observations in that group. Model estimates may depend on extrapolation or other model structure.
- There is information for the other levels. A level with very few observations, or a level perfectly aligned with another design feature, may provide weak information for its coefficient. Coding correctly does not fix a lack of information.
- The model form is stated. The equation assumes the listed fixed effects enter additively on the log scale and that the displayed random effect enters as shown. These are modeling choices, not consequences of using indicators.
- The reference has not been confused with an average individual. The reference-group value at \(\eta_{CL,i}=0\) is a conditional model value. It is not automatically the arithmetic mean clearance among people in that group.
In practice, inspect the categorical levels and their counts, verify the software's factor coding, and check that the fitted parameter equation uses the intended reference group. A coefficient attached to the wrong indicator, or a reference level that differs between the analysis code and the report, can lead to a coherent-looking model with an incorrect interpretation.
Alternative Coding and Its Limits
A common alternative is a cell-means parameterization: omit the intercept and include one indicator for every level. Each coefficient then represents that group's log-scale baseline when the random effect is zero. This uses \(K\) coefficients rather than one intercept and \(K-1\) coefficients. It is a valid alternative when the intercept is omitted; using all \(K\) indicators together with an intercept is redundant.
The two parameterizations can describe the same group-specific values, but their coefficients have different meanings. Reference-group coding makes one group the baseline and expresses the others relative to it. Cell-means coding gives a separate baseline coefficient for every level. Neither coding creates information that is absent from the data, and neither resolves model misspecification or confounding.
A frequent mistake is to say, “The reference group's covariate effect is zero, so the parameter in that group is zero.” The first part refers only to the coded contribution in the exponent. In the model above, for a reference-group eta-zero individual the parameter is \(\theta_{CL}\), not zero. Another mistake is to include an intercept and all group indicators without a constraint; the correction is to use \(K-1\) indicators or use all \(K\) indicators without an intercept.
Write down the categories the covariate can take and choose the intended reference level.
For each nonreference level, define an indicator that is 1 for that level and 0 for all other levels.
Include the typical value, the nonreference fixed-effect terms, and the random effect in their stated roles.
Set all indicators to 0 and the random effect to 0. Confirm that the resulting parameter is the intended reference-group baseline.
Activate exactly its indicator and verify that the equation and software coding agree.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- A categorical covariate has four levels, with level \(D\) as the reference. How many indicators are needed with an intercept, and what values do they take for an individual in group \(D\)?
- In a model with reference group \(A\), what does the eta-zero value of the parameter in group \(A\) equal? Does zero covariate contribution mean zero parameter?
- A model has a reference value of 6.00 mg/h and one nonreference indicator with coefficient \(0.1000\). Calculate the parameter for an eta-zero individual in that nonreference group.
- Why is an intercept plus one indicator for every level of a categorical covariate not identifiable without an additional constraint?
- Can changing the reference level change the fitted group-specific values? State what must change for the reparameterized model to remain equivalent.
Solutions. (1) Three indicators are needed. For group \(D\), all three are 0 because \(D\) is the reference. (2) It equals the model's typical value for that parameter, since all categorical indicators and the random effect are zero. The zero is the covariate contribution, not the parameter. (3) Substitution gives \(6.00\exp(0.1000)=6.00(1.1052)\approx6.631\) mg/h. (4) The intercept equals the sum of the all-level indicators for every observation, so the design columns are linearly dependent and multiple coefficient sets give the same linear predictor. (5) No, not if the model is reparameterized consistently. The reference baseline and the coefficients must be changed to represent the same group-specific values under the new coding.