Tutorials › Generalized Linear Mixed Models (GLMM) › Profile Likelihood Tests for Fixed-Effect Parameters

Testing Fixed and Random Effects · Tutorial 370 of 698

Profile Likelihood Tests for Fixed-Effect Parameters

You will learn to construct and interpret a profile likelihood-ratio test by fixing a coefficient at its null value and re-estimating all nuisance parameters.

Advanced 11 min read

What You'll Learn

  • Define the profile likelihood for a fixed-effect coefficient in a GLMM.
  • Construct a likelihood-ratio statistic by comparing unrestricted and constrained marginal maximum-likelihood fits.
  • Apply the one-degree-of-freedom chi-square reference law under regularity conditions.
  • Work through profile-test calculations for hypothetical clustered binary outcomes.
  • Diagnose optimization, approximation, and model-regularity problems.
  • Distinguish profile likelihood tests from Wald tests and ordinary nested-model tests.

Why Profile a Fixed-Effect Coefficient?

A fixed-effect coefficient in a generalized linear mixed model (GLMM) describes how a predictor relates to the response on the model’s link scale, conditional on the model’s fixed and random effects. Testing whether that coefficient equals a specified value requires accounting for uncertainty in the other parameters as well. A profile likelihood-ratio test does this by fixing the coefficient at each value under consideration and maximizing the likelihood over all remaining parameters.

This is useful when the likelihood is not well approximated by a symmetric quadratic near its maximum. A Wald test relies on a coefficient estimate and its estimated standard error; a profile test instead compares likelihoods. It can therefore reflect asymmetry or curvature in the fitted likelihood more directly, although it still depends on the model and on reliable likelihood computation.

Model and Profile Likelihood

Suppose observations are grouped into independent clusters. A GLMM specifies a response distribution conditional on cluster-specific random effects, a linear predictor involving fixed-effect coefficients, and a distribution for the random effects. The marginal likelihood is obtained by integrating the conditional response likelihood over the random-effects distribution. Write its log likelihood as \(\ell(\boldsymbol{\beta},\boldsymbol{\psi})\), where \(\boldsymbol{\beta}\) is the vector of fixed-effect coefficients and \(\boldsymbol{\psi}\) collects nuisance parameters such as random-effect covariance parameters and any dispersion parameter.

For a coefficient \(\beta_j\), a test of \(H_0:\beta_j=b_0\) against \(H_a:\beta_j\ne b_0\) compares the unrestricted maximum of this marginal log likelihood with its maximum subject to the null restriction. The other fixed-effect coefficients and nuisance parameters are not held at their unrestricted estimates: they are re-estimated under the restriction.

Definition: The profile log likelihood for \(\beta_j\) at a fixed value \(b\) is $$ \ell_p(b)=\max_{\boldsymbol{\beta}_{-j},\,\boldsymbol{\psi}} \ell(\beta_j=b,\boldsymbol{\beta}_{-j},\boldsymbol{\psi}), $$ where \(\boldsymbol{\beta}_{-j}\) denotes all fixed-effect coefficients other than \(\beta_j\). The profile likelihood-ratio statistic for \(H_0:\beta_j=b_0\) is $$ G^2=2\{\ell_p(\hat{\beta}_j)-\ell_p(b_0)\}, $$ where \(\ell_p(\hat{\beta}_j)\) is the unrestricted maximum log likelihood.

The likelihood used for this fixed-effect comparison is the marginal likelihood maximized by maximum likelihood (ML). When fixed effects differ between the unrestricted and restricted fits, restricted maximum likelihood (REML) likelihoods are not the likelihood basis for this comparison. The random-effects structure, response distribution, link, offsets, and other model specifications must be held the same across the two fits; the tested fixed-effect restriction is what distinguishes them.

Reference Distribution and Justification

Under the null hypothesis, the statistic has an asymptotic \(\chi^2_1\) reference distribution when the model is correctly specified, the tested coefficient is identifiable and is an interior parameter, the relevant nuisance parameters are identifiable and regular, and the sample contains enough independent information for the likelihood approximation to apply. The one degree of freedom corresponds to the one scalar restriction \(\beta_j=b_0\). The p-value is the upper-tail probability \(P(\chi^2_1\ge G^2)\) under this reference law.

The reason for profiling can be seen from the local shape of the likelihood. Near its unrestricted maximum, a regular log likelihood is approximately quadratic in the parameter displacement. If the coefficient is fixed at \(b_0\), maximizing over nuisance parameters chooses the point on that constrained slice with the largest likelihood. The difference between the unrestricted maximum and that constrained maximum measures the likelihood loss attributable to the restriction, after allowing the nuisance parameters to adjust. Multiplying that loss by two gives the likelihood-ratio statistic. With one regular restriction, the likelihood-ratio result gives the asymptotic \(\chi^2_1\) calibration.

$$ \ell_p(\hat{\beta}_j)-\ell_p(b_0)\ge 0 \quad\Longrightarrow\quad G^2=2\{\ell_p(\hat{\beta}_j)-\ell_p(b_0)\}\ge 0. $$

The inequality follows because the unrestricted maximization includes every parameter value allowed under the null, as well as values not allowed under the null. Thus the constrained maximum cannot exceed the unrestricted maximum. A negative computed statistic signals a fitting, bookkeeping, or numerical-precision problem, not evidence in favor of a negative likelihood-ratio statistic.

Worked Example: Testing a Treatment Coefficient in a Binary GLMM

Consider a hypothetical study with 30 clinics and 600 patients, with a binary outcome indicating whether each patient experienced an event. A logistic random-intercept GLMM includes a treatment indicator as a fixed effect. The treatment coefficient is on the log-odds scale. Test \(H_0:\beta_{\text{treat}}=0\) against a two-sided alternative. Suppose the unrestricted ML fit gives \(\hat{\beta}_{\text{treat}}=0.32\) and maximized marginal log likelihood \(-128.40\). When the treatment coefficient is fixed at zero and all remaining fixed and random-effect parameters are re-estimated, suppose the log likelihood is \(-129.10\).

The two fits use the same response distribution, random-intercept structure, and other model specifications. Only the treatment coefficient is constrained in the null fit, so the likelihood comparison is appropriate.

Calculate the statistic. The unrestricted profile maximum is \(-128.40\), and the null profile value is \(-129.10\): $$ G^2=2\{(-128.40)-(-129.10)\} =2(0.70)=1.40. $$

Find the p-value. With one restriction, compare \(1.40\) with \(\chi^2_1\). The upper-tail p-value is approximately \(0.2367\). At significance level \(\alpha=0.05\), \(0.2367>0.05\), so the test does not reject \(H_0\). These hypothetical data do not provide strong evidence that the treatment coefficient differs from zero. The estimated odds ratio, \(\exp(0.32)\approx1.38\), is an estimate, not evidence by itself that the population coefficient is nonzero.

Constructing the Test in Practice

A profile test requires two related optimization tasks. First, maximize the marginal likelihood without restricting the coefficient. Second, impose the null value and maximize again over every other parameter. In a GLMM, the marginal likelihood generally involves integrating over random effects, so the fitting method must evaluate that likelihood consistently in both fits. Numerical integration, approximation, and optimizer settings can affect the resulting log likelihoods.

1
Specify the hypothesis and model.
State \(H_0:\beta_j=b_0\), the two-sided alternative, and the common GLMM structure used in both fits.
2
Fit the unrestricted model by ML.
Record its maximized marginal log likelihood and the estimate of the tested coefficient.
3
Fit the constrained model by ML.
Fix \(\beta_j=b_0\), then re-estimate all other fixed-effect coefficients and nuisance parameters.
4
Calculate and calibrate the statistic.
Compute \(G^2=2(\ell_{\text{unrestricted}}-\ell_{\text{null}})\) and, if regularity conditions are adequate, use the upper tail of \(\chi^2_1\).

Worked Example: Testing a Specified Age Effect

In a hypothetical logistic random-intercept analysis of 480 discharges from 24 clinics, age is measured in decades and the response is 30-day readmission (yes or no). Test whether the age coefficient equals \(0.50\) log-odds units per decade. The unrestricted model has maximized marginal log likelihood \(-84.26\). Under the restriction \(\beta_{\text{age}}=0.50\), maximizing over the intercept, other fixed effects, and random-intercept variance gives \(-86.01\). The same model structure and ML method are used in both fits.

The test statistic is $$ G^2=2\{(-84.26)-(-86.01)\} =2(1.75)=3.50. $$ For a single regular restriction, the reference distribution is \(\chi^2_1\); its upper-tail probability at \(3.50\) is approximately \(0.0614\). At \(\alpha=0.05\), the test does not reject the specified value \(0.50\). This is not proof that the coefficient equals \(0.50\); it says that this likelihood comparison does not provide sufficient evidence against that value at the chosen level. The coefficient is expressed in log-odds per decade, and the comparison does not establish a causal effect of age.

Reading a Profile and Checking the Fit

The profile log likelihood is a function of the tested coefficient: for each fixed value, the nuisance parameters are optimized anew. A useful diagnostic is to inspect a range of profile values, not only the value at the null. A smooth profile with a clear maximum is reassuring. A flat profile may indicate weak information about the coefficient; an irregular profile, unexpected jumps, or multiple apparent maxima can indicate optimization instability, inadequate integration accuracy, weak identifiability, or a model that is difficult to estimate.

For a numerical check, the unrestricted fit should have a log likelihood at least as large as the constrained fit. Refit from multiple starting values when convergence is questionable, and confirm that the nuisance parameters and integration settings were treated consistently. If approximate integration is used, assess whether the log-likelihood difference is stable at a more accurate setting. A small error in either log likelihood can matter when their difference is small.

Worked Example: Testing a Nonzero Delay Coefficient

A hypothetical logistic GLMM relates readmission to a treatment delay measured in 10-minute units, with patients nested within units and a random intercept for unit. The unrestricted estimate is \(\hat{\beta}_{\text{delay}}=0.68\), and the unrestricted maximized ML log likelihood is \(-73.52\). To test \(H_0:\beta_{\text{delay}}=0.40\), the constrained fit fixes the coefficient at \(0.40\) and re-estimates all other parameters, giving log likelihood \(-74.10\). Both fits use the same random-intercept specification and fitting settings.

The statistic is $$ G^2=2\{(-73.52)-(-74.10)\} =2(0.58)=1.16. $$ The \(\chi^2_1\) upper-tail p-value is approximately \(0.2816\). At \(\alpha=0.05\), there is not sufficient evidence to reject the specified coefficient \(0.40\) log-odds units per 10-minute increase. The test concerns the conditional model coefficient; it does not by itself establish that delay causes readmission.

Alternatives, Limitations, and a Common Pitfall

A Wald test for one coefficient uses the estimate divided by its estimated standard error and relies on a local standard-error approximation. A profile likelihood-ratio test instead measures the likelihood loss under the specified coefficient value, while allowing nuisance parameters to adapt. For a single coefficient, an ordinary nested-model likelihood-ratio test is the same likelihood comparison when the restricted model imposes precisely that coefficient restriction and both fits maximize the same marginal likelihood. The profile formulation emphasizes that the comparison can be made at any specified value \(b_0\), not only at zero.

The \(\chi^2_1\) calibration is asymptotic, not exact in small samples. Sparse outcomes, few independent clusters, weakly identified coefficients, or difficult random-effects estimation can make the reference approximation unreliable. Also, if nuisance parameters are near a boundary or other regularity conditions fail, the standard calibration may require special care. This tutorial’s \(\chi^2_1\) result applies to a regular fixed-effect restriction; it should not be transferred automatically to tests of variance components, which have distinct boundary issues.

Common mistake: Fixing \(\beta_j=b_0\) while keeping all other parameters at their unrestricted estimates does not calculate the profile likelihood. That procedure evaluates the likelihood at one point on the constrained slice, which may be lower than the constrained maximum. The correction is to re-optimize every nuisance parameter under the restriction; only then compare that constrained maximum with the unrestricted maximum.

Key takeaway: A profile likelihood-ratio test compares the unrestricted marginal ML maximum with the maximum obtained after fixing the tested coefficient at its null value and re-estimating the remaining parameters. For one regular fixed-effect restriction, \(G^2\) is compared asymptotically with \(\chi^2_1\).

Check Your Understanding

Answer each question, then compare your work with the solutions.

  1. In a profile test of \(H_0:\beta_j=0\), which parameters are re-estimated in the restricted fit?
  2. The unrestricted log likelihood is \(-42.8\), and the restricted log likelihood is \(-43.3\). Calculate \(G^2\).
  3. Why is the asymptotic reference distribution \(\chi^2_1\) for a regular test of one coefficient?
  4. A researcher fixes the coefficient at the null value but leaves all other estimates unchanged. What is wrong with this procedure?

Solutions. (1) Re-estimate all other fixed-effect coefficients and nuisance parameters, including random-effect covariance and any dispersion parameters. (2) \(G^2=2\{(-42.8)-(-43.3)\}=2(0.5)=1.00\). (3) The null imposes one scalar restriction, so under the stated regularity conditions the likelihood-ratio statistic has an asymptotic chi-square distribution with one degree of freedom. (4) This evaluates the likelihood at a point on the constrained slice rather than maximizing over that slice; it is not the profile likelihood unless that point happens to be the constrained maximum.

Clinical Biostats