Why Fit Is Not the Only Goal
A more flexible regression curve can usually follow the observed data more closely than a simpler one. That improvement is not automatically useful: extra flexibility can follow random variation, make the fitted relationship harder to explain, and produce a curve whose shape is not well supported. A useful comparison therefore asks not only which curve fits better, but also whether the improvement is large and meaningful enough to justify the extra complexity.
This tutorial focuses on comparisons made using the same observations and outcome. Adjusted \(R^2\) and, for nested models, a partial \(F\) test provide formal summaries of fit improvement and complexity. Residual patterns and scientific interpretation remain important: a statistic alone does not establish that a curve is plausible or appropriate.
Complexity, Fit, and Comparable Models
A quadratic curve, for example, has an intercept, a linear coefficient, and a quadratic coefficient, so \(p=3\). A cubic curve adds a coefficient and has \(p=4\). For a smoothing spline, the number of basis coefficients may not directly describe its flexibility; effective degrees of freedom summarize that flexibility. In every comparison, the complexity measure should match the type of model being fitted.
Let \(\mathrm{SSE}\) be the sum of squared residuals and \(\mathrm{SST}\) the total sum of squares about the sample mean. Ordinary \(R^2=1-\mathrm{SSE}/\mathrm{SST}\) records the fraction of observed variation accounted for by the fitted model. When a model adds parameters, its \(\mathrm{SSE}\) cannot increase for nested least-squares models, so ordinary \(R^2\) cannot decrease. It does not, by itself, charge the more complex model for its added flexibility.
Adjusted \(R^2\) is not a probability that a model is correct, and it does not guarantee that the selected curve will predict well on new observations. It is most directly comparable when candidate fits use the same response, observations, and scale. A model with an extra parameter can have a higher ordinary \(R^2\) but a lower adjusted \(R^2\).
Comparing Nested Models with a Partial \(F\) Test
One formal comparison is available when the simpler model is a special case of the more complex model. Such models are nested. For instance, a quadratic curve is nested within a cubic curve: setting the cubic coefficient to zero gives the quadratic form. If the larger model adds \(q\) parameters, the partial \(F\) statistic measures the reduction in residual variation per added parameter relative to the larger model's residual mean square.
Under the null hypothesis and these assumptions, this statistic has an \(F\) distribution with \(q\) and \(n-p_{\mathrm{large}}\) degrees of freedom. A small p-value is evidence that the added terms improve the fit beyond what would be expected from random error under the null. It is not proof that the larger model is the best scientific explanation, nor does a non-small p-value prove that the simpler model is true.
Worked Example: Does a Quadratic Term Improve a Linear Fit?
Suppose 20 hypothetical observations have \(\mathrm{SST}=300\). A linear model has \(p=2\) and \(\mathrm{SSE}=180\); a quadratic model fitted to the same observations has \(p=3\) and \(\mathrm{SSE}=120\). Assume the observations are independent, residual plots show no substantial pattern or changing spread, the residual distribution is reasonably consistent with normality, and the quadratic model is nested within the linear model plus one added term. These checks make the usual comparison reasonable for this example.
For the linear model, \(n-p=20-2=18\). Thus,
For the quadratic model, \(n-p=20-3=17\), so the residual degrees of freedom are 17. Its adjusted \(R^2\) is
The partial \(F\) statistic for the one added quadratic coefficient is
This has \(1\) and \(17\) degrees of freedom, with a p-value of approximately \(0.0095\). The result is evidence that the quadratic term improves the fit under the model assumptions. The increase in adjusted \(R^2\), together with the test result, supports using the quadratic form over the linear form here, provided its shape is also plausible in context. It does not establish a causal effect or guarantee the curve is suitable beyond the observed predictor range.
Why the Adjusted Measure Penalizes Complexity
The adjustment uses \(\mathrm{SSE}/(n-p)\), rather than \(\mathrm{SSE}\) alone, to account for the degrees of freedom consumed by fitting parameters. The total variation is scaled by \(n-1\), the degrees of freedom used to estimate the sample mean. Consequently, adding a term must reduce residual variation enough to compensate for the smaller residual degrees of freedom if adjusted \(R^2\) is to rise.
For one added parameter, let the smaller model have \(p\) parameters and the larger model have \(p+1\). Because both use the same \(\mathrm{SST}\), adjusted \(R^2\) increases exactly when
Rearranging this inequality gives
The left side is the partial \(F\) statistic for that one added parameter. Thus adjusted \(R^2\) rises when this statistic exceeds 1. That is a much less demanding threshold than many conventional significance levels; an increase in adjusted \(R^2\) is not the same claim as statistically significant evidence. This distinction is one reason to use several kinds of evidence rather than treating adjusted \(R^2\) as a final decision rule.
Worked Example: A Cubic Term Gives Only a Small Gain
Consider 24 hypothetical observations with \(\mathrm{SST}=240\). A quadratic model has \(\mathrm{SSE}=96\) and \(p=3\); a nested cubic model has \(\mathrm{SSE}=90\) and \(p=4\). Suppose the observations are independent, diagnostic plots show approximately constant spread and no strong residual pattern, and the residual distribution is reasonably compatible with normality.
The adjusted \(R^2\) values are
The cubic model has a slightly higher adjusted \(R^2\). Its partial \(F\) statistic is
With \(1\) and \(20\) degrees of freedom, the p-value is approximately \(0.261\). The observed reduction in \(\mathrm{SSE}\) is not strong evidence against the null hypothesis that the cubic coefficient is zero. Given the small adjusted-\(R^2\) gain and no compelling reason to prefer a cubic shape, the quadratic curve is a defensible simpler choice. This conclusion is not proof that the true relationship is quadratic; it says the available evidence does not clearly justify this added term.
Use Residual Evidence and Interpretation Too
Fit summaries answer limited questions. Adjusted \(R^2\) summarizes residual variation after a parameter-count adjustment. A partial \(F\) test evaluates a specified set of added terms under its assumptions. Neither tells you by itself whether the fitted shape corresponds to a credible relationship or whether remaining residual structure is important. Compare residual plots across candidates, paying attention to whether a more complex curve removes a broad, systematic pattern or merely follows a few observations. Also ask whether the added shape can be described in a way that makes sense for the problem.
For models that are not nested, the partial \(F\) comparison above does not apply. Adjusted \(R^2\) can still be a descriptive comparison when models use the same response, data, and outcome scale, but it should not be presented as a nested-model test. Interpretability and residual evidence then remain essential parts of the choice. Prediction on held-out observations is another kind of evidence, but it answers a different question.
Worked Example: A Flexible Curve Must Earn Its Extra Parameter
Suppose 30 hypothetical observations have \(\mathrm{SST}=500\). A quadratic fit has \(p=3\) and \(\mathrm{SSE}=210\). A more flexible curve adds one coefficient, is nested within the larger model, and has \(p=4\) and \(\mathrm{SSE}=175\). Assume the observations are independent, residual plots show no major remaining pattern or changing spread for either fit, and the residual distribution is reasonably consistent with normality. In addition, suppose the extra term corresponds to a shape that has a meaningful scientific interpretation in this hypothetical setting.
For the quadratic model,
For the four-parameter model,
The partial \(F\) statistic is
With \(1\) and \(26\) degrees of freedom, the p-value is approximately \(0.031\). Here, the improvement is supported by the test, adjusted \(R^2\) rises appreciably, and the added shape is interpretable. Together, these considerations provide a reasonable case for the more flexible curve. If the additional term had no useful interpretation or if the improvement came from one isolated observation, the decision would be less convincing even with the same summary statistics.
Common Mistakes
- Choosing the largest ordinary \(R^2\). For nested least-squares fits, ordinary \(R^2\) does not decrease when terms are added. Compare complexity as well, and inspect residual evidence.
- Treating adjusted \(R^2\) as a significance test. It is a complexity-adjusted descriptive measure. Use a partial \(F\) test for the specified nested-model hypothesis when its assumptions are reasonable.
- Calling a non-small p-value proof of the simpler curve. It means the data do not provide strong evidence against the stated null under the assumptions; it does not prove that every added effect is absent.
- Using a partial \(F\) test for nonnested curves. The formula requires the smaller model to be a special case of the larger model. For nonnested candidates, do not interpret this statistic as the relevant test.
- Ignoring meaning and residuals. A numerical improvement does not by itself make a curve scientifically credible. Ask what shape the model asserts and whether the residual pattern supports it.
Check Your Understanding
Use these questions to check how fit and complexity work together.
- A nested model adds two coefficients. What does the null hypothesis of the partial \(F\) test say about those coefficients?
- Why can ordinary \(R^2\) rise when an unnecessary term is added, and how does adjusted \(R^2\) address this?
- A cubic model has a slightly higher adjusted \(R^2\) than a quadratic model, but the partial \(F\) test has a large p-value. What can you conclude, and what can you not conclude?
- Why is the partial \(F\) test not automatically appropriate for comparing two nonnested curve forms?
- Name two kinds of evidence, besides a higher adjusted \(R^2\), that could help justify a more flexible curve.