Tutorials › Regression Analysis (Undergraduate) › Choose Functional Forms from Mechanism and Measurement

Purpose-Driven Model Specification · Tutorial 607 of 991

Choose Functional Forms from Mechanism and Measurement

Use the mechanism behind a relationship and the way variables are measured to propose regression forms whose implications make scientific sense.

Intermediate 10 min read

What You'll Learn

  • Distinguish a straight-line conditional mean from a curved one
  • Match candidate functional forms to plausible mechanisms
  • Interpret transformed predictors and log-response models carefully
  • Check how measurement units and category scales affect specification
  • Avoid choosing a curve solely because it fits the observed data better

Why Functional Form Is a Scientific Choice

A regression specification says more than which variables to include. It also says how the mean outcome is expected to change as a predictor changes. A straight line, a curve with diminishing gains, and a proportional relationship make different claims about that change. Choosing among them is therefore part of defining the scientific question, not just a way to improve a numerical fit.

A plotted relationship can suggest candidate forms, but a small sample can make many curves appear plausible. Start instead with the mechanism and the measurement process: What change in the outcome would a given change in the predictor produce? Is a predictor a genuine quantity, a category label, or a measure with a meaningful zero? Which response patterns are possible? These questions help determine which forms deserve consideration before comparing their fit.

Definition: A functional form describes how a regression model represents the conditional mean of an outcome given its predictors. For a single predictor \(X\), write this mean as \(E(Y\mid X=x)=f(x)\). A linear form has \(f(x)=\beta_0+\beta_1x\); a nonlinear form uses a different function of \(x\), such as a logarithm or a polynomial.

The conditional-mean statement concerns the average outcome among cases with a specified predictor value; it does not say that every individual outcome lies on the curve. In a regression model, one may write \(Y=f(X)+\epsilon\), where the error \(\epsilon\) has conditional mean zero: \(E(\epsilon\mid X)=0\). This is the key condition that makes \(f(X)\) the conditional mean. Standard inference also requires appropriate assumptions about the errors and sampling, but choosing a plausible mean function does not by itself establish those assumptions.

What Common Forms Imply

A straight-line conditional mean, \(E(Y\mid X=x)=\beta_0+\beta_1x\), says that a one-unit increase in \(x\) is associated with the same average change, \(\beta_1\), throughout the range being modeled. The intercept \(\beta_0\) is the mean at \(x=0\), if zero is meaningful and within or near the relevant range. A line can be a useful local approximation even when the underlying relationship is not linear over all possible values.

Curvature terms can allow the change in the mean to vary with \(x\). For example, a quadratic mean \(f(x)=\beta_0+\beta_1x+\beta_2x^2\) has slope \(\beta_1+2\beta_2x\). It can represent a bend, but it also implies a particular shape and may eventually turn in a direction that is implausible outside the observed range. The earlier material on hierarchy for curvature terms gives the corresponding rule for retaining lower-order terms when a squared term is included.

A transformed predictor changes the rate at which the modeled mean varies with the original predictor. A log predictor can be plausible when equal proportional changes in \(x\), rather than equal absolute changes, are scientifically relevant. A transformed response is a different decision: a linear model for \(\log(Y)\) describes the mean of the log outcome, not automatically the arithmetic mean of \(Y\).

A useful alternative for a nonnegative predictor is a diminishing-returns form, \(f(x)=\beta_0+\beta_1\log(1+x/x_0)\), where \(x_0\) is a fixed positive reference amount with the same units as \(x\). The reference amount makes the logarithm's argument dimensionless and defines how quickly the curve bends. When \(\beta_1>0\), the model increases but its rate of increase declines as \(x\) grows.

Deriving the Diminishing-Returns Implication

The shape of a candidate form should be checked from its mathematical implications, not just its name. For \(f(x)=\beta_0+\beta_1\log(1+x/x_0)\), with \(x\geq 0\) and \(x_0>0\), differentiate with respect to \(x\):

$$ f'(x)=\frac{\beta_1}{x+x_0} \qquad\text{and}\qquad f''(x)=-\frac{\beta_1}{(x+x_0)^2}. $$

If \(\beta_1>0\), the first derivative is positive, so the mean rises as \(x\) rises. The second derivative is negative, so the slope gets smaller. This provides a precise version of “increasing, but with diminishing gains.” If the subject-matter mechanism instead implies a constant gain per unit, the straight-line form is more directly aligned with that claim. Neither form is automatically correct merely because it can be calculated.

Worked Example: Study Time With Diminishing Gains

Suppose a hypothetical educational model relates practice time \(x\), measured in hours, to a quiz score \(Y\), measured in points. The scientific account is that additional practice can improve performance, but the gain from another hour is likely to shrink as practice accumulates. Consider a straight-line candidate and a log-predictor candidate:

$$ f_{\mathrm{linear}}(x)=50+4x, \qquad f_{\mathrm{log}}(x)=50+10\log(1+x/1\text{ hour}). $$

These are illustrative candidate means, not coefficients estimated from a study. Both predict 50 points at zero hours. At two hours, the straight-line candidate predicts \(50+4(2)=58\) points. The log candidate predicts \(50+10\log(3)\approx 50+10(1.0986)=60.99\) points.

At six hours, the line predicts \(50+4(6)=74\) points, while the log candidate predicts \(50+10\log(7)\approx50+10(1.9459)=69.46\) points. Under the log candidate, the modeled gain from zero to two hours is about \(60.99-50=10.99\) points; from two to six hours it is about \(69.46-60.99=8.47\) points over twice as many hours. Its smaller gain per hour is consistent with diminishing returns.

The regression assumptions concern the data and the conditional mean, not the arithmetic above. If using either candidate as a model, one would require the conditional mean to follow its stated form over the range of interest, and would assess independence and error behavior for any inference. The mechanism makes the log form a defensible candidate, but these hypothetical calculations do not establish that it describes actual quiz scores.

Choose Transformations With Measurement in Mind

A transformation must make sense for the variable as measured. Taking a logarithm requires a positive argument; a log-predictor form cannot be applied directly to zero or negative values. A form such as \(\log(1+x/x_0)\) accommodates a measured zero when \(x\geq0\), but the choice of \(x_0\) affects the curvature and should be fixed for a substantive reason, not tuned simply to get a preferred fit.

Units also matter. A linear relationship remains linear under a change of units, although the numerical coefficients change. A logarithm should be taken of a dimensionless ratio, such as \(x/x_0\), rather than an unqualified physical quantity. For a log-log model, the coefficient on \(\log(x/x_0)\) describes the change in the modeled log response for a proportional change in \(x\).

Worked Example: A Log-Log Form for a Proportional Relationship

Suppose a hypothetical biology model relates leaf area \(A\), in square centimetres, to leaf length \(L\), in centimetres. A scientific account proposes that proportional changes in length correspond to proportional changes in area. A candidate model for the mean log response is:

$$ E\!\left[\log\left(\frac{A}{1\text{ cm}^2}\right)\middle|L\right] = \log(12)+2\log\left(\frac{L}{10\text{ cm}}\right). $$

At \(L=20\) cm, the predictor ratio is \(20/10=2\). The modeled mean log area is \(\log(12)+2\log(2)=\log(48)\). Thus, the model implies a geometric-mean area of \(48\text{ cm}^2\) at that length. At \(L=30\) cm, the ratio is 3, giving \(\log(12)+2\log(3)=\log(108)\), or geometric-mean area \(108\text{ cm}^2\).

Doubling length multiplies the modeled geometric-mean area by \(2^2=4\). More generally, the coefficient 2 means that multiplying length by a factor \(c\) changes the modeled mean log area by \(2\log(c)\). This interpretation concerns the log response. It does not, without additional assumptions about the errors, establish that the arithmetic conditional mean area follows the same power relationship.

For this model to be usable, lengths and areas must be positive, and the proposed proportional pattern must be plausible over the range studied. A log-response regression would additionally require a suitable model for errors on the log scale; the calculation alone checks neither that assumption nor the model's empirical adequacy.

Measurement can also make a numerical straight-line form inappropriate. If \(X\) is an ordered set of labels such as “low,” “medium,” and “high,” assigning scores 1, 2, and 3 imposes equal spacing. That is a scientific assumption, not a consequence of the ordering. If categories represent groups without defensible numerical distances, model their group means separately or use quantitative measurements that preserve the relevant distances.

Worked Example: When Category Codes Do Not Mean Equal Steps

Consider a hypothetical experiment in which a material is classified by three application categories: low, medium, and high. The exact amounts used are not recorded. Suppose the observed average strengths are 20, 27, and 25 units, respectively. Coding these categories as 1, 2, and 3 and using a line assumes that the change from low to medium is the same as the change from medium to high.

For example, the candidate numeric-score model \(f(j)=20+3(j-1)\) predicts \(20+3(1-1)=20\) units for low, \(20+3(2-1)=23\) for medium, and \(20+3(3-1)=26\) for high. It imposes a rise of 3 units at each category step, despite the hypothetical group averages rising by 7 and then falling by 2 units. This discrepancy does not prove which model is right; it shows what the equal-step assumption means.

Without measured amounts or a scientific reason to treat the categories as equally spaced, it is safer to represent the categories as groups rather than as a quantitative predictor. If actual amounts were available and the mechanism supported a constant strength change per unit amount, a linear form in those amounts could be a reasonable candidate. The measurement process therefore constrains which functional forms can be interpreted.

How to Propose and Evaluate Candidate Forms

A disciplined specification process begins with the response and predictor definitions, then asks what change pattern the scientific account predicts. The candidate forms should be stated clearly enough that their implications can be examined, including the range over which the model is intended to apply. This builds on the earlier material about generating predictors from subject-matter knowledge and prespecifying candidate terms.

1
State the mechanism.
Describe whether the outcome should change by a constant amount, by a changing amount, or in relation to proportional changes in a predictor.
2
Check measurement.
Confirm that the predictor's scale, zero, units, and possible values support the proposed form and transformation.
3
Write and inspect candidates.
Translate the mechanism into formulas, then calculate or sketch what each formula implies across the relevant predictor range.
4
Keep fit in its proper role.
Use data to assess whether a scientifically motivated candidate is compatible with observations, not to invent a new curve solely because it fits the same observations more closely.

This does not mean that observed data are irrelevant. Strong, systematic disagreement between a proposed form and the data can reveal that the scientific account is incomplete, that measurements are problematic, or that the model is inadequate. But choosing among candidates requires more than asking which one has the largest in-sample fit statistic. A more flexible form will often track a sample more closely simply because it can bend more. Candidate models should also use the same outcome and observations when their fit is compared, and any added complexity should have a substantive rationale.

Common Mistakes

  • Choosing the curve with the best in-sample fit automatically. A flexible curve can follow sample-specific noise. Propose candidate forms from mechanism and measurement, then assess fit as one part of the decision.
  • Calling a transformed-predictor coefficient a per-unit effect. In a model using \(\log(x/x_0)\), the coefficient describes a change per unit of the transformed predictor; its meaning on the original scale depends on the transformation.
  • Interpreting a log-response model as an arithmetic-mean model. A linear model for \(\log(Y)\) specifies the conditional mean of \(\log(Y)\). Returning to the arithmetic mean requires assumptions about the error distribution.
  • Treating category scores as measured quantities. Scores 1, 2, and 3 assert equal spacing. Use them only when that assumption is defensible.
  • Extrapolating a convenient curve indefinitely. A polynomial or transformed form may imply implausible values far outside the observed range. State the range for which its scientific interpretation is credible.
Key takeaway: Choose functional forms by asking what response pattern a mechanism predicts and whether the measurement scale supports that representation. A better in-sample fit can prompt investigation, but it is not, by itself, a scientific reason to select a curve.

Check Your Understanding

Try these questions using the distinctions between mechanism, measurement, and model implication.

  1. A linear conditional mean has slope \(\beta_1\). In context, what does that slope say about the modeled average change for a one-unit increase in the predictor?
  2. For \(f(x)=\beta_0+\beta_1\log(1+x/x_0)\) with positive \(\beta_1\), what happens to the slope as \(x\) increases?
  3. Why does coding three ordered categories as 1, 2, and 3 make an additional assumption beyond their order?
  4. A regression models the conditional mean of \(\log(Y)\). Why is it not automatically correct to describe the exponentiated fitted value as the arithmetic conditional mean of \(Y\)?
  5. What is wrong with choosing a higher-degree curve solely because its in-sample fit statistic is larger?