Tutorials › Population Pharmacokinetics › Testing Linear Versus Nonlinear Covariate Functions

Covariate Selection Strategies and Their Statistics · Tutorial 289 of 599

Testing Linear Versus Nonlinear Covariate Functions

You will learn to formulate and test nested linear and nonlinear covariate functions, interpret the added-parameter likelihood-ratio test, and recognize when the comparison is not valid.

Advanced 11 min read

What You'll Learn

  • Express a linear covariate effect and its nonlinear extensions as nested hypotheses.
  • Calculate a likelihood-ratio statistic from objective-function values and identify its degrees of freedom.
  • Test prespecified quadratic, exponential-shaped, and power-function departures from linearity.
  • Check nesting, parameter identifiability, boundary conditions, and numerical fit before interpreting a test.
  • Distinguish a formal test of added curvature from comparisons of nonnested models or predictive performance.

Why Test Functional Form?

A continuous covariate can be relevant to a population PK parameter without having a linear relationship with that parameter. For example, body weight may predict typical clearance, but a straight-line change in log clearance across the observed weight range may not describe the data adequately. A formal functional-form test asks a focused question: does a prespecified nonlinear extension improve fit enough to justify its additional parameter or parameters?

The key is to construct the comparison as nested models. The simpler model must be obtainable from the more flexible model by fixing specified parameters to known values. Then the likelihood-ratio test evaluates those restrictions. It does not automatically compare any two curves that happen to be called “linear” and “nonlinear.”

Definition: A nonlinear covariate function is nested over a linear covariate function when the linear function is recovered by imposing specified restrictions on parameters of the nonlinear model. If the nonlinear model adds \(q\) freely estimated parameters under the alternative, the usual likelihood-ratio test compares the joint null hypothesis that those \(q\) parameters equal their restricted values with the unrestricted alternative.

Writing the Nested Hypotheses

Let \(u_i\) be a prespecified numerical coordinate for a continuous covariate measured on individual \(i\), and let \(x_i=u_i-1\). Suppose the covariate effect is on typical clearance and is represented on the log scale:

$$ \log\left(\frac{CL_i}{CL_{\mathrm{typ}}}\right)=\beta_1x_i. $$

This is linear in \(x_i\) on the log-clearance scale. A quadratic extension is

$$ \log\left(\frac{CL_i}{CL_{\mathrm{typ}}}\right)=\beta_1x_i+\beta_2x_i^2. $$

The linear model is recovered by setting \(\beta_2=0\). Thus the hypotheses are \(H_0:\beta_2=0\) against \(H_a:\beta_2\ne 0\). The linear coefficient remains in both models; the test concerns the additional curvature term, not whether the covariate has any effect at all. A joint extension with quadratic and cubic terms instead tests \(H_0:\beta_2=\beta_3=0\), adding two parameters.

More generally, write the effect as a linear term plus prespecified nonlinear basis functions:

$$ \log\left(\frac{CL_i}{CL_{\mathrm{typ}}}\right) =\beta_1x_i+\sum_{j=1}^{q}\gamma_j h_j(x_i). $$

Here each \(h_j\) is fixed before fitting the comparison. The linear model is the restriction \(\gamma_1=\cdots=\gamma_q=0\). A candidate power or exponential relationship can also be tested this way only if its parameterization genuinely contains the linear model as a restriction. If one model cannot be obtained from the other by fixing parameters, the ordinary nested-model likelihood-ratio test does not apply.

The Likelihood-Ratio Test and Its Conditions

Fit both models to the same observations using the same data likelihood and the same treatment of the structural, random-effects, residual-error, and other nuisance parameters. Let \(\ell_0\) be the maximized log likelihood for the restricted linear model and \(\ell_1\) the maximized log likelihood for the nonlinear model. The likelihood-ratio statistic is

$$ \Lambda=2(\ell_1-\ell_0)=\mathrm{OFV}_0-\mathrm{OFV}_1, $$

when the objective function is defined as minus twice the log likelihood. A correctly optimized nested alternative cannot have a lower maximized likelihood than its restricted model, so \(\Lambda\) should be nonnegative apart from small numerical discrepancies. Under the null hypothesis and standard regularity conditions, \(\Lambda\) has approximately a chi-square distribution with \(q\) degrees of freedom, where \(q\) is the number of independent restrictions being tested. The p-value is the upper-tail probability \(P(\chi^2_q\geq\Lambda)\).

The approximation relies on more than the models being nested. The null value should be an interior point of the alternative parameter space; the added parameters must be identifiable under the null; the likelihood must be sufficiently well behaved; and estimation must have reached the relevant maxima. In nonlinear mixed-effects models, finite samples, weak information, sparse covariate coverage, or complicated random-effects structures can make the chi-square approximation inaccurate. A parameter on a boundary or an added parameter that is undefined under the null can require different calibration.

Justification: Under regularity conditions, the log likelihood near the true parameter is locally approximated by a quadratic function. The unrestricted fit can improve on the restricted fit only along the \(q\) parameter directions released by the alternative. After scaling those directions by their information, the resulting likelihood improvement is asymptotically a sum of \(q\) squared standard normal quantities. That sum has a \(\chi^2_q\) distribution, giving the usual likelihood-ratio reference distribution.

Worked Comparisons

Worked Example: Testing a Quadratic Departure

Hypothetical data and models. Suppose \(u_i\) is body weight divided by 70 kg, so \(x_i=u_i-1\). The linear model for typical clearance includes \(\beta_1x_i\); the alternative adds \(\beta_2x_i^2\). Both models use the same concentration data, structural model, and random-effects assumptions. The quadratic coefficient is unconstrained and is identifiable under the alternative. Assume both fits converged to verified maxima.

The restricted and alternative objective-function values are 1240.60 and 1235.58. One parameter is added, so \(q=1\):

$$ \Lambda=1240.60-1235.58=5.02. $$

For one degree of freedom, the upper-tail probability is approximately \(p=0.0250\). At a prespecified \(\alpha=0.05\), this is evidence against the restriction \(\beta_2=0\) for this comparison. The result supports improved fit from this quadratic extension; it does not establish that the quadratic relationship is biologically correct or that its improvement is clinically important.

Worked Example: Testing an Exponential-Shaped Curvature Term

Hypothetical data and models. Retain the same definition of \(x_i\). Compare the linear covariate model with a model that adds \( \delta h(x_i) \), where \(h(x)=\exp(x)-1-x\) is prespecified. Because this added function is zero at \(x=0\) and has no first-order linear contribution there, it represents a particular curvature pattern. Under \(H_0:\delta=0\), the model reduces to the linear model. The transformation is fixed, the added coefficient is not constrained to a boundary, and assume both models converged.

Suppose the linear-model objective function is 812.40 and the alternative-model value is 805.20. The alternative adds one parameter:

$$ \Lambda=812.40-805.20=7.20,\qquad df=1. $$

The chi-square upper-tail probability is approximately \(p=0.0073\). This provides evidence against \(\delta=0\) at the 0.05 level for the specified exponential-shaped departure. The test does not show that every exponential function fits better; it tests this particular added shape and its coefficient.

Worked Example: A Power Function with a Linear Special Case

Hypothetical data and models. Suppose the typical clearance relationship is parameterized as \(CL_i=\theta_0+a u_i^\gamma\), with positive predicted clearance over the observed covariate range. The linear special case is \(\gamma=1\), which gives \(CL_i=\theta_0+a u_i\). Compare the unrestricted power model with the restricted model \(\gamma=1\), estimating \(\theta_0\) and \(a\) in both. Assume the fitted \(a\) is nonzero, \(\gamma=1\) is an interior value, and both fits have converged. These conditions matter: if \(a=0\), the exponent has no effect on the predictions and is not identifiable.

Suppose the linear restricted model has objective function 930.00 and the power model has 927.90. The only released parameter is \(\gamma\), so \(q=1\):

$$ \Lambda=930.00-927.90=2.10. $$

For one degree of freedom, \(p\approx0.147\). At \(\alpha=0.05\), this comparison does not provide sufficient evidence against \(\gamma=1\). It does not prove that the linear model is true or that the power model is equivalent to it; the data may simply be insufficiently informative about this departure.

Diagnostics, Alternatives, and Limitations

A small p-value is meaningful only if the comparison and its numerical fits are credible. Before interpreting it, check that the models use the same records and likelihood, that the alternative truly contains the null model, and that the counted degrees of freedom match the restrictions tested. Verify that the objective-function difference is positive and stable to reasonable changes in starting values or estimation settings. A failed convergence, implausible parameter estimate, or large sensitivity to starting values can signal that the nominal likelihood difference is not trustworthy.

Also inspect whether the covariate data can distinguish the proposed shape. A quadratic and a linear term can be difficult to separate when observations cover only a narrow range. Sparse observations near the extremes may leave curvature largely determined by a few individuals. Examine the fitted covariate relationship over the observed range and relevant residual or predictive diagnostics; a significant test does not make extrapolation beyond that range reliable.

The likelihood-ratio test is not appropriate for two nonnested functions merely because both describe the same covariate. For example, if neither a power curve nor an exponential curve can be recovered by restrictions from the other, their separate maximized likelihoods do not yield the ordinary chi-square test above. One possible strategy is an encompassing model that includes prespecified basis terms and tests a clearly defined joint restriction, provided the nesting and regularity conditions hold. Other questions may call for information criteria or predictive validation, which compare fit with complexity or predictive performance rather than testing the same null hypothesis.

The test is conditional on the functional form being specified. If many transformations are tried and only the most significant one is reported, the nominal p-value does not account for that search. Search procedures and multiplicity adjustments address that broader selection issue; the single-comparison p-value should not be presented as though it covers unreported exploration. Finally, statistical evidence for curvature is not proof of a causal mechanism. It describes the fitted covariate relationship under the model and data assumptions.

Common pitfall: “The nonlinear model has a lower objective function, so it is better.” A more flexible nested model is expected to fit at least as well, even when the added terms are unnecessary. The relevant question is whether the improvement is large relative to the chi-square reference distribution with the correct degrees of freedom, under valid regularity and fitting conditions.
1
Specify the target effect.
State the covariate coordinate, the PK parameter and scale, and the linear function to be tested.
2
Define a nested extension.
Write the added nonlinear terms and the exact null restrictions that recover the linear model.
3
Fit and verify both models.
Use the same likelihood and observations, check convergence, and confirm the unrestricted fit is not worse beyond numerical noise.
4
Calculate and interpret the test.
Compute the objective-function difference, use the number of restrictions for \(df\), and report the p-value with the tested functional departure and its limitations.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. A cubic extension adds both \(x^2\) and \(x^3\) to a linear covariate function. What is the null hypothesis and how many degrees of freedom does the usual test use?
  2. A nested alternative has objective function 500.0, while the restricted model has objective function 504.5. State the likelihood-ratio statistic and its degrees of freedom if one coefficient was added.
  3. Why can the exponent in a power model fail to be identifiable when its amplitude is zero?
  4. Two separately fitted covariate curves are nonnested. Why is their objective-function difference not automatically compared with a chi-square distribution?

Solutions. (1) The null is that both added coefficients are zero, \(H_0:\beta_2=\beta_3=0\); the test has \(df=2\). (2) \(\Lambda=504.5-500.0=4.5\), with \(df=1\); its p-value is approximately 0.0339. (3) When the amplitude is zero, changing the exponent does not change predictions, so the data contain no information that distinguishes exponent values. (4) The standard likelihood-ratio reference distribution requires the restricted model to be obtainable from the alternative by restrictions; without nesting, the difference does not represent the tested \(q\)-dimensional restriction and need not have the stated chi-square distribution.

Clinical Biostats