Tutorials › Generalized Linear Models › Using an Encompassing Model for Competing Hypotheses

Nested Models and Deviance Tests · Tutorial 322 of 981

Using an Encompassing Model for Competing Hypotheses

Learn to construct a defensible encompassing model for competing GLM hypotheses and interpret the resulting nested deviance tests without overclaiming.

Intermediate 9 min read

What You'll Learn

  • Define competing scientific hypotheses as restrictions within one GLM.
  • Construct an encompassing model by combining the terms needed to represent both candidates.
  • Identify the null hypothesis and degrees of freedom for each nested deviance test.
  • Interpret separate tests against the encompassing model without declaring a winner between candidates.
  • Recognize when differences in likelihood, link, or data make an encompassing comparison invalid.

Why Use an Encompassing Model?

Sometimes two scientific explanations lead to different regression models, but neither model is a special case of the other. For example, one hypothesis may predict an outcome from age, while another predicts it from a biomarker. A deviance difference between those two nonnested models is not, by itself, a likelihood-ratio test. A useful alternative is to ask whether both models can be represented as restrictions of a broader, scientifically defensible model.

That broader model is an encompassing model. Comparing each candidate with it gives two nested tests: one asks whether the restrictions defining the first candidate are compatible with the data, and the other asks the corresponding question about the second. These tests can assess the candidates’ restrictions, but they do not automatically identify which candidate is true or which is better.

Definition: An encompassing model is a model that contains each candidate model as a restricted submodel, with all models specified for the same response data and a common likelihood. The candidate models are competing restrictions when neither is generally a submodel of the other.

Building the Common Model

For GLMs with the same response, distributional family, link, offset, and other fixed assumptions, a common construction is to combine the candidate linear-predictor terms. Suppose the candidates are \(g(\mu_i)=\alpha+\beta x_i\) and \(g(\mu_i)=\alpha+\gamma z_i\). An encompassing model is \(g(\mu_i)=\alpha+\beta x_i+\gamma z_i\). The first candidate is obtained by imposing \(\gamma=0\), and the second by imposing \(\beta=0\). Neither candidate has to contain the other.

The construction is valid only if the encompassing model is scientifically and statistically coherent. Combining columns of a design matrix is not enough if the candidate models use different response observations, likelihoods, or incompatible assumptions. Nor does simply placing two different link functions side by side produce a standard GLM that encompasses both. The common model must be specified before the tests are interpreted.

Worked Example: Competing Predictors in a Poisson GLM

A study records independent event counts \(Y_i\), with \(Y_i\sim\operatorname{Poisson}(\mu_i)\), and uses the log link. Researchers propose either an age association or a biomarker association. All models include an intercept and use the same observations and offset \(o_i\).

The age model is \(\log(\mu_i)=o_i+\alpha+\beta x_i\), and the biomarker model is \(\log(\mu_i)=o_i+\alpha+\gamma z_i\). A common model is \(\log(\mu_i)=o_i+\alpha+\beta x_i+\gamma z_i\).

The age hypothesis is the restriction \(\gamma=0\) in the common model; the biomarker hypothesis is the restriction \(\beta=0\). The common model has three regression parameters, and each candidate has two, provided the relevant design columns are identifiable and of full rank. Thus each candidate-versus-common comparison tests one restriction. The data can provide evidence against either restriction, but these tests do not directly test age against biomarker.

Result: If candidate models \(A\) and \(B\) are restrictions of a common encompassing model \(E\), then each comparison \(A\) versus \(E\), and \(B\) versus \(E\), is nested. If the models use the same likelihood and the maximum-likelihood fits exist, then \(D(A)-D(E)=2\{\ell_E-\ell_A\}\geq 0\), and likewise \(D(B)-D(E)\geq 0\). A negative difference signals that the fits or reported deviances are not comparable as stated.

To verify the result, define the deviance relative to a common saturated-model log-likelihood \(\ell_{\mathrm{sat}}\) by \(D(M)=2\{\ell_{\mathrm{sat}}-\ell_M\}\), where \(\ell_M\) is the maximized log-likelihood under model \(M\). Subtracting gives \(D(A)-D(E)=2\{\ell_{\mathrm{sat}}-\ell_A-\ell_{\mathrm{sat}}+\ell_E\}=2(\ell_E-\ell_A)\). Because every parameter value allowed by \(A\) is also allowed by \(E\), maximizing over \(E\) cannot produce a smaller likelihood than maximizing over \(A\). Hence \(\ell_E\geq\ell_A\), proving the inequality. The same reasoning applies to \(B\). \(\square\)

What Each Deviance Test Asks

The comparison \(A\) versus \(E\) tests the null hypothesis that the restrictions defining \(A\) hold, against the larger model \(E\). The comparison \(B\) versus \(E\) tests the restrictions defining \(B\). When regularity conditions for Wilks’ theorem hold—among them an identifiable, finite-dimensional model, a true null parameter in the interior of the parameter space, and nonsingular information—the likelihood-ratio statistic has an asymptotic chi-square distribution under the null. Its degrees of freedom are the difference in model dimensions, or equivalently the number of independent restrictions in the regular case.

These are separate null hypotheses. Rejecting \(A\) says the data are not adequately described by the restrictions defining \(A\), relative to the specified \(E\), at the chosen calibration and significance level. Failure to reject \(B\) says the test did not find sufficient evidence against the restrictions defining \(B\); it does not establish that \(B\) is true. In particular, it does not follow that \(B\) is better than \(A\).

Worked Example: Reading Two Tests Against the Same Model

Suppose three fitted Poisson log-linear models use the same response data and likelihood. The encompassing model \(E\) has three parameters and deviance 84.2. Candidate \(A\) has two parameters and deviance 90.7; candidate \(B\) has two parameters and deviance 87.5. Assume the restrictions are regular and each candidate is nested in \(E\).

For \(A\) versus \(E\), the deviance difference is \(90.7-84.2=6.5\), with \(3-2=1\) degree of freedom. Under the null, the reference tail probability is \(P(\chi^2_1\geq 6.5)\), approximately 0.011.

For \(B\) versus \(E\), the difference is \(87.5-84.2=3.3\), also with one degree of freedom. The reference tail probability is \(P(\chi^2_1\geq 3.3)\), approximately 0.069. At the 0.05 level, the first test rejects its candidate restrictions and the second does not.

The result is evidence against \(A\)'s restrictions relative to \(E\), but insufficient evidence against \(B\)'s restrictions at this threshold. It is not a test showing that \(B\) is superior to \(A\). The arithmetic also checks the required nesting pattern: both candidate deviances exceed the encompassing deviance.

When the Encompassing Model Is a Sound Comparison

An encompassing model is useful when the scientific question can be expressed as a small number of restrictions within a common model. The restriction should correspond to a meaningful hypothesis, such as excluding a predictor or setting a block of coefficients to zero. The terms added to form \(E\) should be selected for that purpose, not merely because a larger model can always be written down.

A valid comparison requires a common likelihood for the same observed response data. The response definition, sampling units, likelihood family, and fixed modeling assumptions must be aligned. For example, a Poisson model and a binomial model do not become comparable likelihood-ratio models just because both contain a predictor named “age.” When candidate models differ in distribution or link, a common encompassing construction may require additional justification and may not exist as a regular GLM. In that situation, the ordinary nested deviance test is not licensed by the terminology “encompassing.”

The choice of \(E\) also shapes the conclusion. A candidate can fit poorly relative to an overly flexible or misspecified encompassing model for reasons that do not isolate the scientific restriction of interest. The interpretation is always conditional on the encompassing model and its assumptions. A non-significant test is not a goodness-of-fit guarantee, and it does not rule out departures the encompassing model cannot represent.

Worked Example: Both Candidates Can Be Rejected

Suppose the response is a count modeled using independent Poisson observations and a log link. Candidate \(A\) includes an intercept and a linear exposure term; candidate \(B\) includes an intercept and a threshold indicator for high exposure. An encompassing model includes both terms, using the same observations and any common offset. These candidates are generally nonnested, while each is nested in the three-parameter encompassing model, assuming full rank.

Suppose the fitted deviances are \(D(E)=50.0\), \(D(A)=55.2\), and \(D(B)=54.0\). Each candidate has two parameters, so each difference has one degree of freedom. The statistics are \(55.2-50.0=5.2\) for \(A\) and \(54.0-50.0=4.0\) for \(B\). Their approximate chi-square-one tail probabilities are 0.023 and 0.046, respectively.

At the 0.05 level, both candidate restrictions are rejected against \(E\). This does not contradict the fact that neither candidate contains the other: the encompassing model can improve on both. The result says that neither specified restriction is adequate relative to this encompassing model under the test’s assumptions. It does not establish that the encompassing model is scientifically correct, nor does it select a different model automatically.

What the Tests Cannot Establish

The deviance tests against \(E\) do not directly compare the candidates’ fit to one another. The test statistics are \(2(\ell_E-\ell_A)\) and \(2(\ell_E-\ell_B)\), each measuring a candidate-to-encompassing improvement. Their difference is related algebraically to the candidate log-likelihoods, but the usual chi-square calibration applies to each nested null comparison, not to that difference as a test of \(A\) against \(B\).

Nor does “not rejected” mean “confirmed.” The test may have limited power, especially when data are sparse or the restriction is weakly identified. Interpretation also depends on the calibration being suitable for the model and data; boundary parameters, overdispersion, or small samples can invalidate a routine asymptotic reference distribution. The relevant question is therefore not merely whether a software output reports a small p-value, but which restriction was tested, against which encompassing model, and under what assumptions.

Common Pitfall

Common mistake: “Model \(A\) was rejected against \(E\), while model \(B\) was not, so the test proves \(B\) is the true model.”

Correction: These outcomes address separate null hypotheses: the restrictions defining \(A\), and the restrictions defining \(B\). A failure to reject \(B\) is not proof of \(B\), and the tests are not a direct contest between the candidates. Report each comparison and its assumptions, then make any model choice using an explicitly justified method and scientific context.
Key takeaway: Embed competing hypotheses in a common, defensible GLM only when they share a likelihood and each becomes a restriction of that model. The resulting deviance tests assess each restriction against the encompassing alternative; they do not, by themselves, establish truth or rank nonnested candidates.

Check Your Understanding

For each question, identify the hypotheses being compared and state what the result would and would not support.

  1. Two Poisson GLMs use the same responses and log link. One includes predictor \(x\), the other predictor \(z\), and an encompassing model includes both. State the restrictions defining each candidate.
  2. Why must the candidate and encompassing fits use a common likelihood for their deviance difference to be a likelihood-ratio statistic?
  3. If a candidate has deviance 73.4 and its encompassing model has deviance 70.1, calculate the likelihood-ratio statistic. If the dimension difference is two, state its asymptotic reference distribution under regularity conditions.
  4. At level 0.05, a candidate-versus-encompassing test has \(p=0.18\). What conclusion is justified, and what conclusion is not?
  5. Can two candidates both be rejected against their encompassing model? Explain what such a result says about the candidates and what it does not establish about the encompassing model.
Clinical Biostats