From Likelihood Comparison to a Test
A more flexible model can fit the observed data at least as well as a restricted model, because it has more freedom to choose its parameters. The inferential question is whether the improvement in fit is large enough to be inconsistent with the restrictions in the smaller model, if those restrictions were true. A likelihood ratio test (LRT) formalizes that comparison for nested models.
For an NLME model, the likelihood used here is the likelihood of the observed data after accounting for the random effects. For example, if subject \(i\) has random effects \(b_i\), the subject-level contribution is obtained by integrating over their distribution, rather than by treating an estimated \(b_i\) as if it were an observed parameter. The earlier material on likelihood comparisons covers the interpretation of likelihood values; the focus here is the test statistic and its reference distribution.
For instance, a model with a population effect of a covariate is nested in an otherwise identical model that includes that effect plus an additional covariate effect: setting the additional effect to zero recovers the smaller model. By contrast, two structural models that cannot be made identical by fixing parameters are not nested, so this LRT calibration does not apply to their comparison.
Why the Statistic Is Twice the Log-Likelihood Gain
The likelihood ratio itself is the maximized likelihood under the null divided by the maximized likelihood under the alternative, \(L_0/L_1\). It is at most one when the models are nested. Taking minus twice its logarithm gives
The minus sign makes a better-fitting alternative produce a larger, nonnegative statistic. The factor of two is not an arbitrary rescaling: under regularity conditions, it gives the statistic a limiting chi-square distribution. This is an asymptotic result, so its accuracy depends on the model and the amount and structure of information in the data.
A brief justification comes from the local quadratic approximation to the log likelihood. Under the null hypothesis, the alternative adds \(q\) independently estimable directions beyond the null model, after accounting for nuisance parameters shared by both models. Near the true parameter, the log likelihood is approximately quadratic. The standardized score in those additional directions is asymptotically a vector of \(q\) independent standard normal variables, say \(Z_1,\ldots,Z_q\). Maximizing the quadratic approximation over those directions gains approximately half the sum of their squared scores. Consequently,
This explains both the factor of two and the chi-square form: a chi-square random variable with \(q\) degrees of freedom is the sum of squares of \(q\) independent standard normal variables. The approximation concerns the null distribution of the statistic when the restrictions are true; it does not say that the statistic is chi-square in every finite sample or for every pair of fitted models.
When the Chi-Square Reference Is Appropriate
Under the null hypothesis, the usual large-sample chi-square calibration is justified when the models are genuinely nested and the following conditions are reasonable:
- The null model is obtained by imposing \(q\) independent, smooth restrictions on the alternative. The restricted parameter value is in the interior of the permitted parameter space, not on a boundary.
- The parameters relevant to the comparison are identifiable, and the likelihood has a well-behaved local curvature near the true parameter. In particular, the information matrix is nonsingular for the estimable directions.
- The likelihood is correctly specified for the observed data, and the independent sampling units provide a suitable large-sample basis for the approximation. In NLME analyses, repeated measurements within a subject are not themselves independent subjects; the independent units are generally the subjects.
- Both models use the same observations and comparable versions of the same likelihood, and the maximization is accurate enough that the reported values are genuine maxima rather than optimizer failures.
If these conditions hold, the null reference distribution is approximately \(\chi^2_q\), where \(q\) is the number of independent restrictions. The p-value is the probability, under that reference distribution and the null model, of obtaining a statistic at least as large as the observed statistic. It is not the probability that the null hypothesis is true.
Some NLME comparisons need special care. A variance component tested against zero is at a boundary, so the ordinary interior-parameter argument above does not automatically apply. Likewise, a parameter that is not identifiable under the null can invalidate the usual chi-square reference. These are not small bookkeeping details: they can change the null distribution. Restricted likelihoods also require care when comparing models with different fixed-effect spaces, because the likelihoods may not be on a directly comparable basis.
Worked Example: Testing One Added Covariate Effect
Suppose hypothetical data from 80 subjects are fitted with two nested NLME models. Both use the same concentration observations and likelihood. The null model omits a fixed population effect of renal function on clearance; the alternative includes that effect. Setting its coefficient to zero recovers the null model. The maximized log likelihoods are \(\ell_0=-412.6\) and \(\ell_1=-410.2\).
The added coefficient is one smooth restriction under the null, and suppose its null value is identifiable and interior. Assume the models converge to their maxima and the subject-level sample is adequate for the asymptotic approximation. Then \(q=1\), and
For one degree of freedom, the chi-square upper-tail probability at 4.8 is approximately \(0.0285\). At significance level \(\alpha=0.05\), this is evidence against the null restriction in this hypothetical analysis. The result says the observed likelihood gain would be relatively unusual under the specified null model and its reference assumptions. It does not establish that renal function causes a change in clearance, nor does it give the size or clinical importance of the effect.
Worked Comparisons and Interpretation
Worked Example: Testing Two Added Fixed Effects
In a second hypothetical analysis, an alternative NLME model adds two population covariate effects to the null model. Each effect can be set to zero to recover the smaller model. Both parameters are identifiable and interior under the null; both models use the same subjects and marginal likelihood; and the fits have converged. The log likelihoods are \(\ell_0=-305.1\) and \(\ell_1=-302.0\).
There are two independent restrictions, so \(q=2\). The statistic is
For \(q=2\), the chi-square upper-tail probability has the form \(P(\chi^2_2\geq x)=\exp(-x/2)\). Thus the p-value is \(\exp(-6.2/2)=\exp(-3.1)\approx0.0450\). At \(\alpha=0.05\), this is just below the significance threshold, so the null restrictions would be rejected using this approximation. The conclusion is about the joint test of the two effects; it does not show that each effect is individually significant.
Worked Example: A Smaller Gain Is Not Significant
Consider a third hypothetical comparison in which the alternative adds two identifiable, interior fixed effects to the null model. The same data and likelihood are used, and optimization and sampling assumptions are considered adequate. Suppose \(\ell_0=-188.4\) and \(\ell_1=-187.2\). Nesting is explicit because setting both added effects to zero gives the null model.
With \(q=2\), the statistic and p-value are
At \(\alpha=0.05\), the result is not statistically significant. This means the observed improvement does not provide sufficient evidence against the joint null restrictions at that threshold, given the model and approximation. It does not prove that both effects are exactly zero, and it does not mean there is a 30.1% probability that the null is true.
Diagnostics, Alternatives, and Limitations
Before interpreting an LRT, check the comparison itself. Confirm that the smaller model is obtainable from the larger one by imposing the stated restrictions, and that both fits use the same observations and likelihood construction. Check convergence, parameter estimates, and whether the maximized log likelihoods are plausible. If the purportedly larger model has a lower maximized log likelihood, nesting may have been specified incorrectly, the optimizer may have found a local rather than global maximum, or the fits may not be comparable. A negative calculated statistic is a warning to investigate, not a result to reinterpret as an ordinary LRT.
The chi-square approximation can also fail even when the arithmetic is correct. Small numbers of independent subjects, weakly identified effects, parameters near constraints, or inaccurate numerical integration of the NLME likelihood can make the reference p-value unreliable. In particular, a random-effect variance tested against zero violates the interior condition; do not automatically use the ordinary chi-square calibration for that case. The likelihood may be approximated by numerical methods, so optimization tolerances and integration accuracy should be checked when the log-likelihood difference is small.
The LRT is not the only way to compare models. Wald tests assess estimates relative to their estimated standard errors and can be sensitive to local quadratic approximations, especially for poorly identified parameters. Score tests use information evaluated under the null and do not require fitting the unrestricted model, but also rely on regularity conditions. Information criteria compare relative fit while penalizing model complexity and can be used for non-nested models; they answer a different model-selection question and are not hypothesis tests with the LRT's null calibration. None of these approaches repairs a misspecified likelihood or an unreliable fit.
A frequent mistake is to say, “The alternative has a higher likelihood, so it is better and the null is false.” The higher likelihood is expected for a nested, more flexible model. The relevant question is whether the gain, measured by \(2(\ell_1-\ell_0)\), is large relative to the appropriate null distribution. A second mistake is to use the chi-square degrees of freedom merely as the number of parameters printed in a software table. The reference requires independent restrictions and regularity; redundant restrictions or nonstandard parameter constraints can invalidate that simple count.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- Two nested models have maximized log likelihoods \(-90.0\) and \(-87.5\), and the alternative adds one regular parameter. Calculate the statistic and approximate p-value.
- Why is a higher maximized likelihood for the alternative not, by itself, evidence against the null?
- An alternative adds three independent, regular parameters, and the observed statistic is 6.25. At the 5% level, would the usual chi-square test reject? Use the approximate 5% critical value \(7.815\) for three degrees of freedom.
- Why should an ordinary chi-square LRT not be applied automatically to a test of whether a random-effect variance equals zero?
Solutions. (1) \(\Lambda=2[-87.5-(-90.0)]=2(2.5)=5.0\). For one degree of freedom, the upper-tail probability is approximately \(0.0253\); under the stated regularity conditions, this is significant at \(0.05\). (2) The alternative includes the null as a special case, so it can always match the null fit and may improve it by chance. The null distribution of the improvement, not its positivity alone, determines whether the gain is unusually large. (3) Since \(6.25<7.815\), the test does not reject at the 5% level using the stated chi-square approximation. (4) The null value zero lies on the boundary of the nonnegative variance parameter space. The interior-parameter condition behind the ordinary chi-square result therefore fails, so a different calibration may be needed.