Tutorials › Nonlinear Mixed-Effects Models (NLME) › Multiple Covariates Acting on the Same Parameter

The Hierarchical Model · Tutorial 101 of 797

Multiple Covariates Acting on the Same Parameter

See how two covariates combine on the log scale and multiply on the parameter scale, alongside an individual random effect.

Intermediate 10 min read

What You'll Learn

  • Write a positive parameter model with two covariates and an individual random effect.
  • Interpret each log-scale coefficient as a ratio for a one-unit covariate change.
  • Calculate the combined covariate multiplier and the resulting individual parameter.
  • Distinguish additive effects on the log scale from multiplicative effects on the parameter scale.
  • Recognize when reference choices, covariate overlap, or omitted interactions may undermine interpretation.

How Two Covariates Combine

A parameter may depend on more than one measured characteristic of an individual. For example, clearance might vary with both body weight and a categorical metabolic status. In an exponential parameter model, each covariate contributes additively to the exponent. Consequently, their contributions multiply on the parameter scale. Keeping these two scales straight is essential: it determines how to calculate an individual parameter and what each coefficient means.

The model below has one parameter, two covariates, and one subject-level random effect. It assumes the covariates act additively on the log parameter: there is no covariate-by-covariate interaction unless one is added explicitly. The random effect allows individuals with the same recorded covariates to have different parameter values.

Definition: Let \(P_i\) be a positive parameter for individual \(i\), and let \(x_{1i}\) and \(x_{2i}\) be that individual's two covariate values. A two-covariate exponential parameter model is $$ P_i=P_{\mathrm{pop}}\exp\left\{\beta_1(x_{1i}-x_{1,\mathrm{ref}})+\beta_2(x_{2i}-x_{2,\mathrm{ref}})+\eta_i\right\}. $$ Here \(P_{\mathrm{pop}}>0\) is the typical parameter for the reference covariate values when \(\eta_i=0\); \(x_{1,\mathrm{ref}}\) and \(x_{2,\mathrm{ref}}\) are the reference values; \(\beta_1\) and \(\beta_2\) are fixed-effect coefficients; and \(\eta_i\) is an individual random effect on the log scale. In the usual single-random-effect specification, \(\eta_i\sim N(0,\omega^2)\), with \(\eta_i\) assumed independent of the covariates. The covariate terms and \(\eta_i\) are dimensionless, so each \(\beta_j\) has units reciprocal to the units used for its covariate.

The model's reference individual has both covariates at their reference values and \(\eta_i=0\), giving \(P_i=P_{\mathrm{pop}}\). This is a model-defined typical value at the reference covariates, not necessarily the arithmetic mean of the population parameters. The individual random effect shifts the log parameter and therefore acts as a multiplicative factor on the parameter scale.

From Additive Log Effects to Multiplicative Factors

Taking logarithms makes the model's structure clear. The logarithm of the parameter is the logarithm of its typical reference value plus the two covariate contributions and the random effect:

$$ \log P_i=\log P_{\mathrm{pop}}+ \beta_1(x_{1i}-x_{1,\mathrm{ref}})+ \beta_2(x_{2i}-x_{2,\mathrm{ref}})+\eta_i. $$

Exponentiating each term gives an equivalent product:

$$ P_i=P_{\mathrm{pop}}\, \exp\{\beta_1(x_{1i}-x_{1,\mathrm{ref}})\}\, \exp\{\beta_2(x_{2i}-x_{2,\mathrm{ref}})\}\, \exp(\eta_i). $$

Thus, for fixed covariate values, the combined covariate multiplier is the product of the two individual multipliers, or equivalently the exponential of the sum of their log-scale contributions. A positive coefficient increases the parameter as its covariate increases; a negative coefficient decreases it. For a change of \(\Delta x_1\) in the first covariate, holding the second covariate and \(\eta_i\) fixed, the parameter ratio is \(\exp(\beta_1\Delta x_1)\). The corresponding statement holds for the second covariate.

Key result: With no interaction term, the joint covariate multiplier is $$ \exp\{\beta_1\Delta x_1+\beta_2\Delta x_2\} = \exp(\beta_1\Delta x_1)\exp(\beta_2\Delta x_2). $$ It is not the sum of the two parameter-scale multipliers. This product structure follows directly from exponentiating the additive log-scale predictor.

For a categorical covariate, the difference from its reference category is represented by an indicator, usually 0 for the reference category and 1 for the category being compared. Its coefficient then describes the log ratio between categories, holding the other covariate fixed. A continuous covariate's coefficient depends on its units: changing from a one-unit scale to a ten-unit scale changes the coefficient accordingly, but not the model's predictions.

Worked Example: Weight and Age Both Affect Clearance

Hypothetical model. Suppose clearance \(CL_i\), in L/h, follows

$$ CL_i=4.00\exp\left\{ 0.20\frac{WT_i-70}{10} -0.15\frac{AGE_i-50}{10} +\eta_i \right\}, $$

where weight \(WT_i\) is in kg, age \(AGE_i\) is in years, and \(\eta_i\) is dimensionless. The reference individual weighs 70 kg and is 50 years old. The coefficients apply per 10 kg and per 10 years, respectively. Consider an individual weighing 80 kg and aged 40 years, with \(\eta_i=0.05\).

The weight contribution is \(0.20(80-70)/10=0.20\). The age contribution is \(-0.15(40-50)/10=0.15\), because the individual is 10 years younger than the reference and the age coefficient is negative. The combined covariate contribution is \(0.20+0.15=0.35\), giving the covariate multiplier \(\exp(0.35)=1.419\) to three decimal places. Including the random effect, the full exponent is \(0.35+0.05=0.40\). Therefore,

$$ CL_i=4.00\exp(0.40) =4.00(1.4918247\ldots) =5.967\ \mathrm{L/h}. $$

At these covariates, the covariate terms alone increase the parameter by a factor of about 1.419 relative to the reference. The specified positive random effect adds a further factor \(\exp(0.05)\); the final clearance is calculated from the full, unrounded exponent.

Combining Continuous and Categorical Covariates

A categorical effect can combine with a continuous effect in exactly the same way. The indicator determines whether the categorical contribution is zero or its estimated coefficient. When both covariates differ from their references, add their log-scale contributions first—or multiply their exact factors—and then apply the typical parameter value.

Worked Example: A Category Effect and a Continuous Covariate

Hypothetical model. Suppose a positive parameter \(Q_i\), measured in L/h, is

$$ Q_i=2.00\exp\left\{ 0.25I_i+0.03(WT_i-60)+\eta_i \right\}, $$

where \(I_i=1\) for the specified category and \(I_i=0\) for the reference category, weight is in kg, and \(\eta_i\) is dimensionless. The reference weight is 60 kg. For an individual in the specified category, weighing 65 kg, with \(\eta_i=0\), the category contribution is \(0.25(1)=0.25\) and the weight contribution is \(0.03(65-60)=0.15\). The combined covariate contribution is \(0.40\).

The separate factors are \(\exp(0.25)=1.2840\) and \(\exp(0.15)=1.1618\). Their product is \(\exp(0.40)=1.4918\). Thus,

$$ Q_i=2.00\exp(0.40) =2.00(1.4918247\ldots) =2.984\ \mathrm{L/h}. $$

For these covariates and \(\eta_i=0\), the model predicts a value about 1.492 times the reference typical value. This is a combined contrast: it does not mean either covariate alone has that multiplier.

Opposing Effects and the Importance of the Full Exponent

Two covariates can push in opposite directions. In that case, a covariate multiplier greater than 1 from one term can be partly or wholly offset by a multiplier less than 1 from the other. The net change is determined by their product, not by inspecting either effect in isolation.

Worked Example: A Negative Combined Covariate Contribution

Hypothetical model. Suppose a positive parameter \(P_i\), in mg/h, is

$$ P_i=4.00\exp\left\{ 0.04(WT_i-70)-0.30I_i+\eta_i \right\}, $$

where weight is in kg, the reference weight is 70 kg, and \(I_i=1\) denotes a category whose reference is \(I_i=0\). Consider an individual weighing 75 kg in the specified category, with \(\eta_i=0.08\). The weight term is \(0.04(75-70)=0.20\); the category term is \(-0.30(1)=-0.30\). Together they contribute \(-0.10\), so the combined covariate multiplier is \(\exp(-0.10)=0.9048\). Including the random effect gives a full exponent of \(-0.10+0.08=-0.02\). Hence

$$ P_i=4.00\exp(-0.02) =4.00(0.9801987\ldots) =3.921\ \mathrm{mg/h}. $$

The covariates together lower the typical reference value by a factor of about 0.9048, while the positive random effect partly offsets that reduction. The final value is below 4.00 mg/h because the full exponent remains negative. The calculation uses the unrounded exponent, rather than multiplying rounded intermediate factors.

Assumptions, Checks, and Alternatives

The equation is meaningful only with its modeling assumptions made explicit. The parameter is positive, the reference values and units are specified, and each chosen covariate enters linearly on the log scale as written. Unless an interaction is included, the effect of changing one covariate's value does not depend on the value of the other covariate: their relative effects combine multiplicatively. The random effect represents remaining individual variation on the log scale; in the stated normal specification, its distribution is centered at zero and is assumed independent of the covariates.

Model checks should ask whether these assumptions are plausible for the data and the intended interpretation. For example, a curved relationship with a continuous covariate may not be adequately represented by a straight-line contribution to the log parameter. An effect that changes across levels of another covariate calls for an interaction or another model structure. Sparse data in some combinations of covariates can also make a joint contrast poorly supported, even when the equation can be evaluated numerically. Correlated covariates may make their separate coefficients difficult to estimate precisely; this is a concern about the information in the data, not a reason to change the product rule.

A useful check is to calculate the covariate contribution two ways: add the terms in the exponent, then exponentiate; and separately exponentiate each term, then multiply. The two results must agree apart from rounding. Also check that each covariate difference is expressed in the units used by its coefficient, that indicator coding uses the stated reference category, and that the random effect is included only once. If the model's predictions are inconsistent with the observed pattern across covariates, or if estimates are driven by a narrow, unrepresentative range of covariate combinations, the specification or the available data may be inadequate.

ApproachParameter-scale implicationWhat it assumes
Two additive terms in the log parameterSeparate covariate factors multiplyEach covariate has a log-linear effect; there is no interaction unless added
Additive effects directly on the parameterChanges in the parameter add, rather than multiplyEffects are appropriate on the natural parameter scale and positivity is maintained
Include a covariate interaction on the log scaleThe multiplier for one covariate can depend on the otherThere is evidence and enough data to support a joint effect

The exponential form is useful for parameters that must remain positive and for interpreting covariate effects as ratios. An additive model on the natural parameter scale can instead be appropriate when absolute changes are scientifically meaningful, but it may predict impossible negative values. An interaction can represent a non-separable joint effect, but adds complexity and requires information in the relevant combinations of covariates. No parameter equation should be selected solely because its arithmetic is convenient: its scale and assumptions must suit the parameter and data.

Common pitfall: Adding two multipliers, such as 1.28 and 1.16, and calling the result the joint effect is incorrect. The model adds log-scale contributions, so the joint multiplier is their product, \(1.28\times1.16\), using unrounded factors for calculation. Also, a coefficient is not itself a percent change: \(\beta\) is a log-ratio coefficient, and the corresponding one-unit ratio is \(\exp(\beta)\).

Check Your Understanding

Use the model structure and units in each question. Each solution is included below the question.

  1. For \(P_i=5\exp\{0.10(x_{1i}-2)-0.20(x_{2i}-4)+\eta_i\}\), calculate the covariate multiplier when \(x_{1i}=5\) and \(x_{2i}=3\). Solution: The contributions are \(0.10(5-2)=0.30\) and \(-0.20(3-4)=0.20\). Their sum is 0.50, so the multiplier is \(\exp(0.50)=1.649\).
  2. A binary covariate has coefficient \(\log(1.5)\). What is the parameter ratio for category 1 versus its reference, holding other terms fixed? Solution: The indicator changes by 1, so the ratio is \(\exp\{\log(1.5)\}=1.5\). The model assigns category 1 a parameter 1.5 times that of the reference, conditional on the other terms.
  3. In the first model, suppose \(x_{1i}=2\), \(x_{2i}=4\), and \(\eta_i=0.10\). Find \(P_i\). Solution: Both covariate contributions are zero at the reference values. Thus \(P_i=5\exp(0.10)=5(1.105170\ldots)=5.526\), in the units assigned to \(P_i\).
  4. Why can the effect of two covariates not generally be found by adding their parameter-scale multipliers? Solution: Their contributions are added in the exponent. Since \(\exp(a+b)=\exp(a)\exp(b)\), their parameter-scale multipliers multiply. Adding the multipliers would not be algebraically equivalent to the specified model.