Why the Question Must Come Before the Test
Regression diagnostics can point toward features of the mean structure that deserve attention: curvature, group differences, interactions, or associations with a candidate predictor. A specification test can quantify evidence for a particular proposed change. But a test is most informative when its target comes from a question stated before examining the results, rather than from a search for any term that produces a small p-value.
The distinction matters because a p-value has a defined meaning only relative to a specified null hypothesis and analysis. If many possible terms are tried and only the smallest p-value is reported, that value does not convey the same evidence as a single test chosen in advance. The plots and subject-matter question help determine what to test; the test does not turn a pattern noticed after searching into independent confirmation.
What a Specification Test Compares
A common approach is to compare a reduced model with a full model. The reduced model contains the terms retained under the null hypothesis. The full model adds the proposed term or block. For example, a scientific question about whether the association between a continuous predictor and an outcome bends could be represented by testing a quadratic term while keeping the linear term in both models.
For a partial F test, let \(SSE_R\) and \(SSE_F\) be the residual sums of squares for the reduced and full models, respectively. Let \(q\) be the number of independent added coefficients being tested (equivalently, the number of independent restrictions), and let \(df_F\) be the full model's residual degrees of freedom. Under the null hypothesis, the test statistic is
The numerator measures the reduction in residual variation per added independent coefficient. The denominator estimates the error variance using the full model. A large value indicates that the reduction is large relative to the estimated error variation. The test is evaluated using an F distribution with \(q\) and \(df_F\) degrees of freedom, provided the model assumptions are reasonable.
The null hypothesis is that all \(q\) added coefficients equal zero; the alternative is that at least one is nonzero. This is a conditional statement: the test asks whether the proposed terms add evidence of association after accounting for the terms already in both models. It does not establish that the full model is the uniquely correct model, that an association is causal, or that the added terms are important in practice.
Worked Examples: A Planned Test and a Search
Worked Example: Testing a Prespecified Quadratic Term
Suppose a hypothetical laboratory study records response \(Y\) and concentration \(x\) for 40 independent experimental units. Before examining the outcome patterns, the research team specifies the question: does a quadratic component improve the linear mean model over the observed concentration range? They compare \(Y_i=\beta_0+\beta_1x_i+\varepsilon_i\) with \(Y_i=\beta_0+\beta_1x_i+\beta_2x_i^2+\varepsilon_i\). The reduced model has \(SSE_R=240\); the full model has \(SSE_F=200\) and \(df_F=37\), assuming a full-rank design so the added quadratic coefficient is independent. Thus \(q=1\), and the tested null is \(H_0:\beta_2=0\).
Assume for this calculation that observations are independent, the error spread is approximately constant, residuals show no serious departure from normality, and the full model's mean form is a plausible description for the tested range. The models are nested, and the linear term is retained in both. These checks do not prove the assumptions, but they make the reference distribution more defensible.
The partial F statistic is
With \(df=(1,37)\), the upper-tail p-value is approximately \(0.010\). At a prespecified significance level of \(\alpha=0.05\), this is evidence against \(H_0\) for the quadratic term, conditional on the linear term. The result supports the stated question; it does not prove that a quadratic curve is the true response pattern, nor does it justify extrapolating beyond the observed concentrations.
Worked Example: A Small P-Value Found After Trying Many Terms
In a separate hypothetical analysis, an analyst considers 12 candidate terms after inspecting residual plots and tries each one separately. One term has \(p=0.030\). Suppose, just to illustrate the search issue, that all 12 tests are independent and every null hypothesis is true. For any one test, the probability of not obtaining \(p<0.05\) is \(0.95\). Under independence, the probability that none of the 12 tests has \(p<0.05\) is \(0.95^{12}\). Therefore the probability of at least one such result is
So even in this simplified all-null setting, there is about a 46% chance of finding at least one nominally significant result. The 12 tests in a real analysis need not be independent, so this calculation is not a universal adjustment; it demonstrates why the number and choice of alternatives matter. A single \(p=0.030\) selected from the search should not be presented as if that term had been the only planned test.
If all 12 terms are genuinely part of one prespecified family of exploratory tests, a simple Bonferroni threshold is \(0.05/12\approx0.00417\). The observed \(p=0.030\) does not meet that threshold. This does not prove the term has no association. It means the result is not strong evidence under that conservative familywise criterion. The analyst should report how the term was selected and treat the finding as exploratory rather than as a confirmation of a prespecified claim.
Use the Plots to Refine the Question, Not to Shop for a Result
Residual plots have an important role: they can reveal that a working model leaves a systematic pattern and suggest what feature to investigate. A smooth trend against a predictor may motivate a curvature question; distinct residual patterns across groups may motivate a group-related term. The specification test then evaluates the stated term or block, conditional on the rest of the model.
However, inspecting many plots, trying multiple transformations, and testing several related terms creates a selection process. A p-value calculated after that process does not account automatically for the search. The more alternatives considered, the easier it is to find a seemingly striking result by chance. Further, a test targets only the terms encoded in its models. It cannot certify that other misspecifications are absent.
A careful analysis distinguishes three things: the scientific question, the diagnostic evidence that prompted attention, and the inferential status of the test. If the question and candidate term were set in advance, report the test as planned. If the term was selected after looking at residuals or comparing many possibilities, say so explicitly. The plot can be useful evidence about model adequacy, but using the same data to notice a pattern and then test that pattern does not make the result a fresh, independent confirmation.
Worked Example: Testing a Prespecified Block of Interactions
Consider a hypothetical study of 50 independent specimens. Before analyzing the outcomes, investigators ask whether the association of treatment group with response differs by either of two prespecified baseline categories. The reduced model includes the main effects; the full model adds two interaction coefficients. The reduced model has \(SSE_R=510\), while the full model has \(SSE_F=470\) and \(df_F=44\). Thus \(q=2\), and the null hypothesis is that both interaction coefficients are zero.
The models are nested, and the two added terms correspond to the joint scientific question. Suppose residual-versus-fitted and group-specific residual plots show no major mean pattern or unequal spread, observations are independent by design, and residuals are reasonably compatible with normal errors. These conditions are plausible, not guaranteed; notable departures would make the usual F reference less trustworthy.
The calculation is
For \(df=(2,44)\), the upper-tail p-value is approximately \(0.166\). At \(\alpha=0.05\), the test does not provide strong evidence against the joint null. The appropriate conclusion is not that the interactions are proved absent; the data do not show a sufficiently large reduction in residual variation for this test to reject the specified null. The result concerns the two interaction terms jointly, not each one separately.
A Short Justification: Why Searching Changes the Error Rate
The significance level \(\alpha\) is the probability of rejecting a true null in one specified test when the test's assumptions hold. When \(m\) independent true null hypotheses are each tested at level \(\alpha\), the probability of no false rejection is the product of the individual non-rejection probabilities, \((1-\alpha)^m\). Taking the complement gives
For \(m>1\), this probability exceeds \(\alpha\). Without independence, the exact expression need not hold, but the general concern remains: an unreported search can make a selected small p-value appear more compelling than it is. Prespecification helps by making clear which test addresses the primary question; it does not remove model assumptions or guarantee that all other analytic choices were harmless.
Common Mistakes and a Reporting Checklist
- Choosing the term because its p-value is smallest. This treats a selected result as though it were planned. State that the search was exploratory, report the alternatives considered when relevant, and avoid presenting the selected p-value as unadjusted confirmatory evidence.
- Calling a nonsignificant result proof of no effect. A failure to reject means the test did not provide sufficiently strong evidence against its null at the chosen \(\alpha\); it does not establish that the coefficient is exactly zero.
- Interpreting a block test as separate tests. A joint partial F test assesses whether at least one coefficient in the block is nonzero. It does not identify which coefficient is responsible.
- Ignoring diagnostic context. A small p-value does not establish that the model assumptions hold. Check whether the residual patterns, design, and context make the test's assumptions plausible.
- Reporting only “significant” or “not significant.” State the models compared, the term or block tested, the test statistic and degrees of freedom, the p-value, and whether the test was prespecified or exploratory.
Check Your Understanding
Answer each question using the distinction between a planned test and a search.
- What null hypothesis does a partial F test of a block of three added terms assess?
- Why does a p-value of \(0.03\) selected from 12 tried terms not have the same interpretation as a prespecified test with \(p=0.03\)?
- In a planned quadratic-term test, what does a small p-value support, and what does it not prove?
- Why is a nonsignificant joint test not evidence that every coefficient in the tested block is exactly zero?
- Name two assumptions or model conditions that should be considered before relying on the usual partial F reference distribution.