ECONOMETRICS · METHODS, INTERPRETATION & NUMERICAL AUDITS
Advanced regression analysis helps you model curved relationships, compare groups, measure delayed responses, forecast outcomes, and estimate probabilities. However, each technique changes what a coefficient means. This guide connects functional forms, dummy variables, distributed lags, prediction intervals, and binary choice models through worked examples and reproducible calculations.
A useful regression does more than draw a line through data. For example, a business might need to know whether a price increase changes demand by a fixed number of units or a fixed percentage. Similarly, an economist might ask whether investment responds immediately to sales or adjusts over several years. Choosing the right equation starts with choosing the right question.
Data note: Historical observations below come from the photographed teaching tables supplied for this article. They are historical teaching data, not current economic statistics. The photographs attribute several series to U.S. statistical agencies, but this article does not claim to have matched them to current agency vintages. Clearly labeled illustrative examples use constructed coefficients. All explanations and numerical audits are original.
How to choose an advanced regression analysis model
Start with the outcome, the timing, and the interpretation you need. A continuous quantity often supports a linear regression after suitable transformations. By contrast, a yes-or-no outcome calls for a probability model if you want fitted probabilities that respect the zero-to-one range.
| Question | Candidate model | Main interpretation | Important check |
|---|---|---|---|
| Does a 1% price change alter demand by a stable percentage? | Log-log | Elasticity | Positive values and a plausible multiplicative relationship |
| Does employment grow at a roughly constant rate? | Log-level time trend | Proportional growth per period | Structural changes and residual dependence |
| Does average cost first fall and then rise? | Quadratic | A changing slope and a turning point | Turning point inside the observed range |
| Do groups have different baselines or slopes? | Dummies and interactions | Conditional group differences | Reference group and sufficient overlap |
| Does an explanatory variable act over several periods? | Distributed lag | Impact and cumulative effects | Lag length, endogeneity, and time-series behavior |
| Will an event occur? | Logit or probit | Probability and marginal effects | Calibration, separation, and class balance |
| How uncertain is a future observation? | Regression prediction interval | A range for a new outcome | Future predictor values and error assumptions |
Linear in coefficients does not mean straight in variables
A model can describe a curve while remaining a linear regression. For instance, the coefficients enter the quadratic equation below linearly even though the predictor enters twice, once as X and once as X².
Consequently, ordinary least squares can estimate this equation by treating X and X² as separate columns in the design matrix. NIST explains this distinction in its discussion of polynomial models and interaction terms. A nonlinear relationship does not automatically require nonlinear optimization.
Transformation does not repair every assumption
Logging a variable may improve the functional form or reduce changing residual variance. However, it cannot automatically remove omitted-variable bias, measurement error, simultaneity, or sample selection. For unbiased OLS coefficients in a transformed model, the relevant zero-conditional-mean assumption must hold in that transformed equation.
Specifically, E(u | X) = 0 in a level equation does not imply that an arbitrary transformation of the error has conditional mean zero. Therefore, choose the statistical model and its error structure together. Consult the NIST guide to transformations for the separate goals of improving fit and stabilizing variation.
Functional forms: formulas and coefficient interpretation
Let ln denote the natural logarithm, and let u represent the unexplained component. Throughout this section, interpretations hold other included predictors fixed. Moreover, percentage interpretations for a logged outcome describe its fitted multiplicative component; a conditional-mean interpretation on the original scale requires an appropriate retransformation argument.
| Form | Equation | Marginal effect | Interpretation |
|---|---|---|---|
| Level-level | Y = α + βX + u | β | One extra unit of X changes fitted Y by β units. |
| Log-log | ln Y = α + β ln X + u | βY/X for the fitted curve | β is the elasticity of the fitted multiplicative curve. |
| Log-level | ln Y = α + βX + u | βY for the fitted curve | A one-unit increase in X changes the fitted component by 100(eβ − 1)%. |
| Level-log | Y = α + β ln X + u | β/X | A 1% increase in X changes fitted Y by about β/100 units. |
| Reciprocal | Y = α + β/X + u | −β/X² | The slope weakens as positive X grows. |
| Quadratic | Y = α + β₁X + β₂X² + u | β₁ + 2β₂X | The effect depends on the starting value of X. |
As a practical rule, always state the units before interpreting a coefficient. A price measured in cents produces a different numerical coefficient from the same price measured in dollars. Nevertheless, a correctly computed prediction remains unchanged after a consistent rescaling.
Worked example 1: demand elasticities
Consider the rounded teaching equation shown in the source material:
Here, Q denotes quantity demanded, P denotes price, and I denotes income. The price elasticity equals −0.26, so demand is locally price-inelastic. Meanwhile, the income elasticity equals 1.43, which describes an income-elastic relationship within this specification.
For a small price increase, multiplying the percentage change by −0.26 gives a useful approximation. However, a finite change requires the exact power formula.
For a 10% price increase, g = 0.10 and β = −0.26. Therefore, the exact fitted quantity change is 100(1.10−0.26 − 1) = −2.448%, compared with the linear approximation of −2.600%.
Similarly, a 5% income increase implies 100(1.051.43 − 1) = 7.226%. The approximation gives 7.150%, which is close in this case. These interpretations describe the estimated relationship, not proof that an intervention would cause the same response.
Worked example 2: simultaneous changes in price and income
Suppose price rises 10% while income rises 5%. Because the model multiplies the two effects, compute the combined ratio rather than simply adding two exact percentage changes.
Thus, the combined fitted increase is approximately 4.60%. By comparison, the first-order calculation gives −2.60% + 7.15% = 4.55%. The difference reflects compounding and curvature rather than a contradiction between methods.
Worked example 3: a level-log relationship
Imagine an illustrative model of weekly spending: Ŝ = 40 + 12 ln I. A 1% income increase changes fitted spending by 12 ln(1.01), or about 0.1194 spending units. In contrast, an income increase of one currency unit does not have the same effect at every income level.
For a 10% increase, the exact change is 12 ln(1.10) = 1.1437 units. Notice that this answer is a change in spending units, not a 1.1437% change. Confusing the two would change the economic meaning of the result.
Worked example 4: a reciprocal relationship
Consider the illustrative average-cost curve AĈ = 20 + 600/Q, with Q > 0. At Q = 30, fitted average cost equals 40. Doubling Q to 60 lowers it to 30.
Consequently, doubling output lowers average cost by 10 units in this example. The derivative, −600/Q², shows that the decline becomes smaller as output expands. This shape suits a fixed-cost component spread over increasing production, although it cannot represent an eventual rise in average cost by itself.
Why logs cannot accept zero
The logarithm of zero has no finite value, and the real logarithm of a negative number does not exist. As a result, software cannot directly fit ln Y for observations with Y ≤ 0. Adding one changes the model and its interpretation, particularly near zero.
For example, ln(1 + dollars) and ln(1 + thousands of dollars) do not differ by a simple constant. Therefore, do not use a plus-one transformation as an automatic cleaning rule. Instead, investigate why the zeros occur and choose an outcome model that matches the measurement process.
Further reading: UCLA OARC: interpreting log-transformed regression variables.
Production functions, growth rates, and quadratic costs
Worked example 5: Cobb-Douglas production and returns to scale
A Cobb-Douglas production function links output to labor and capital. Specifically, the common multiplicative form is Q = ALαKβeu, with positive Q, L, and K. Taking natural logs gives an equation that is linear in its coefficients.
The photographed solution reports rounded elasticities of 1.43 for labor and 3.05 for capital. Using that reported equation, a 1% labor increase corresponds to approximately 1.43% more output when capital stays fixed. Likewise, the capital elasticity is 3.05.
For a proportional expansion of both inputs, the sum of the elasticities determines returns to scale. Here, 1.43 + 3.05 = 4.48. Consequently, the fitted production function exhibits increasing returns to scale.
| Elasticity sum | Classification | Scaling both inputs by c |
|---|---|---|
| α + β < 1 | Decreasing returns | Output multiplies by cα+β, less than c when c > 1. |
| α + β = 1 | Constant returns | Output multiplies by c. |
| α + β > 1 | Increasing returns | Output multiplies by more than c when c > 1. |
However, the exact effect of a 10% joint input increase is 53.264%, because 100(1.104.48 − 1) = 53.264. Multiplying 4.48 by 10% gives only the first-order approximation, 44.8%. The difference reaches approximately 8.46 percentage points.
To test constant returns statistically, test H₀: α + β = 1. The standard error of the sum depends on both variances and their covariance. Therefore, adding two reported standard errors is not a valid substitute.
Worked example 6: a log-linear employment trend
The source material reports the rounded historical trend ln N̂ = 4.46 + 0.02T for U.S. employment observations from 1980 to 1999. In this equation, N represents millions of employed persons, and T advances by one each year. The slope is a log change per year.
Therefore, the exact annual fitted growth rate from the rounded slope is 100(e0.02 − 1) = 2.020%. Over ten time steps, the fitted ratio is e0.20 = 1.2214, which implies 22.140% growth. Neither result should serve as a current employment forecast without new estimation and validation.
Moreover, trend extrapolation assumes the fitted pattern continues. A recession, policy change, or measurement revision can disrupt that pattern. Consequently, a high historical R² cannot establish that the same growth rate will persist.
Worked example 7: finding the minimum of a quadratic cost curve
Use the 12 weekly observations from the photographed cost table. Re-estimating the quadratic with full precision gives the following equation:
Differentiate with respect to output, then set the derivative equal to zero. Because the squared coefficient is positive, the stationary point is a minimum.
Q* = 2.19594991 / 0.01493540730 ≈ 147.03
The observed output range runs from 100 to 209 units, so the fitted minimum lies within that range. However, the estimate still has sampling uncertainty. It also concerns average cost, which differs from profit maximization because revenue and demand enter the profit decision.
| Week | Output Q | Average cost AC | Week | Output Q | Average cost AC |
|---|---|---|---|---|---|
| 1 | 149 | 82 | 7 | 209 | 110 |
| 2 | 121 | 86 | 8 | 170 | 88 |
| 3 | 190 | 100 | 9 | 158 | 86 |
| 4 | 100 | 100 | 10 | 201 | 108 |
| 5 | 109 | 95 | 11 | 130 | 87 |
| 6 | 138 | 85 | 12 | 181 | 87 |
A rounding choice that changes the answer
The photographed solution displays approximately AĈ = 244.86 − 2.20Q + 0.01Q². If you differentiate those rounded coefficients, you get Q* = 110. However, differentiating the full-precision estimate gives about 147.
The squared coefficient changes from approximately 0.00747 to 0.01 when rounded to two decimals. Because the turning-point formula divides by that coefficient, the reporting error becomes economically meaningful. Therefore, retain sufficient precision for small polynomial coefficients and perform downstream calculations before rounding.
Method reference: Penn State: polynomial regression. Numerical estimates and the rounding comparison above come from this article’s own calculations.
Dummy variables, interactions, and seasonal patterns
A dummy variable records a category using zero and one. For instance, D = 1 can represent a promotion period, while D = 0 represents the comparison period. Although the coding is simple, its interpretation depends on whether the model includes an intercept shift, a slope shift, or both.
Worked example 8: separate baseline and slope differences
Consider an illustrative sales equation with advertising X:
When D = 0, the equation becomes Ŷ = 100 + 5X. For D = 1, it becomes Ŷ = 130 + 7X. Therefore, the group difference at a given X equals 30 + 2X.
| X | D = 0 | D = 1 | Difference |
|---|---|---|---|
| 0 | 100 | 130 | 30 |
| 10 | 150 | 200 | 50 |
| 20 | 200 | 270 | 70 |
Notice that the coefficient 30 measures the difference only at X = 0. If zero advertising lies far outside the observed data, that comparison may have little practical value. Instead, center X at a meaningful value such as 10.
Ŷ = 150 + 5Xc + 50D + 2(XcD)
Now the dummy coefficient equals the group difference at X = 10. The predictions have not changed; only the reference point has changed. Consequently, centering can improve interpretation without altering the fitted relationship.
Testing intercept and slope differences
In the general model Y = β₀ + β₁X + δD + γXD + u, test δ = 0 for the intercept difference at X = 0. To test equal slopes, test γ = 0. Meanwhile, the joint hypothesis δ = γ = 0 evaluates whether both restrictions hold together.
Use a joint F test under the classical homoskedastic model, or an appropriate robust Wald test when the covariance structure requires it. A failure to reject does not establish that the groups are identical. In particular, small samples can produce imprecise estimates even when meaningful differences exist.
Worked example 9: quarterly seasonality
For quarterly observations, include three seasonal indicators when the model has an intercept. Let Q1 serve as the reference quarter. An illustrative model is:
At a common trend value, the model places Q4 50 units above Q1. However, comparing consecutive observed quarters also includes the trend change. Moving from Q1 at time t to Q2 at time t + 1 increases the prediction by 3 + 20 = 23 units.
Including all four quarterly indicators plus an intercept creates perfect linear dependence because the indicators sum to one. Alternatively, you can use four indicators without an intercept. Both parameterizations can describe the same fitted seasonal pattern.
Reference: Hyndman and Athanasopoulos discuss seasonal indicators and lagged predictors in Forecasting: Principles and Practice, chapter 7.
Why a dummy coefficient is not automatically causal
Promotion periods may coincide with holidays, higher demand, or unusual inventory. Consequently, a promotion dummy can capture several simultaneous differences. A causal interpretation requires a research design and assumptions that separate the treatment from competing explanations.
For the same reason, an indicator for a demographic group estimates a conditional association within the specified sample and controls. It does not measure an inherent characteristic or explain why a difference exists. Always connect the coefficient to the actual variables and design.
Distributed lag models: effects that unfold over time
Economic decisions often have delayed consequences. For example, an advertising campaign may influence sales this week and continue influencing them next week. A distributed lag model represents that timing explicitly.
The coefficient b₀ measures the contemporaneous association, holding the included lagged values fixed. Each bⱼ describes the contribution from X observed j periods earlier. In a stable finite distributed lag without lagged Y, the sum of the coefficients gives the eventual response to a permanent one-unit increase in X.
Worked example 10: temporary versus permanent changes
Suppose the lag coefficients are 0.40, 0.30, and 0.10. A one-period increase of one unit in X produces the sequence 0.40, 0.30, and 0.10 in fitted Y, then zero afterward. By contrast, a permanent increase produces 0.40 initially, 0.70 in the next period, and 0.80 from the third period onward.
| Period after change | One-period increase in X | Permanent increase in X |
|---|---|---|
| 0 | 0.40 | 0.40 |
| 1 | 0.30 | 0.70 |
| 2 | 0.10 | 0.80 |
| 3 and later | 0.00 | 0.80 |
Therefore, the coefficient sum has two related interpretations: the total response across time to a temporary pulse and the eventual level response to a permanent step. Confusing these experiments can produce misleading forecasts. State explicitly which change you intend to simulate.
The Koyck transformation
The Koyck structure assumes geometric lag coefficients bⱼ = b₀λʲ, usually with 0 < λ < 1. Thus, the immediate response is largest in absolute value and later responses decline geometrically. Starting from an infinite lag equation, subtract λ times its one-period lag.
vt = ut − λut−1
This algebra replaces infinitely many lagged predictors with a lagged outcome and a current predictor. However, the transformed error shares a past shock with the lagged outcome. Under the standard original white-noise error setup, ordinary least squares on the transformed equation therefore faces endogeneity.
A model that merely looks like this equation can have a different error process and different estimation properties. Consequently, distinguish an algebraically transformed infinite-lag model from an independently specified autoregressive distributed lag model. Portland State’s distributed lag lecture notes set out the transformation and multiplier formulas.
Worked example 11: short-run and long-run multipliers
Take illustrative coefficients b₀ = 0.60 and λ = 0.50. The lag coefficients are 0.60, 0.30, 0.15, 0.075, and so forth. Because this geometric series converges, its sum is 0.60/(1 − 0.50) = 1.20.
Mean lag = λ/(1 − λ)
The mean lag equals one period in this example. Following a permanent one-unit increase, the response reaches 0.60 immediately, 0.90 one period later, and 1.05 two periods later. Consequently, the cumulative response approaches 1.20 without reaching it at any finite horizon.
As λ approaches one, the long-run multiplier becomes sensitive to small estimation changes. For instance, b₀ = 0.60 gives multipliers of 6.0 at λ = 0.90 and 12.0 at λ = 0.95. Therefore, report uncertainty rather than presenting a large long-run estimate as a precisely known quantity.
The Almon polynomial lag model
An Almon lag allows the lag coefficients to follow a polynomial in the lag index. Unlike geometric decay, a quadratic pattern can rise first and fall later. For a maximum lag of three, write:
Define three transformed predictors from the current and lagged X values. Then estimate one coefficient for each transformed predictor, together with the intercept.
Z1,t = Xt−1 + 2Xt−2 + 3Xt−3
Z2,t = Xt−1 + 4Xt−2 + 9Xt−3
Yt = α + c0Z0,t + c1Z1,t + c2Z2,t + ut
Notice the indexing: a maximum lag of three includes four X terms because lag zero is the current observation. This convention matters when counting parameters and available observations. Furthermore, polynomial restrictions do not automatically guarantee positive lag weights or valid OLS assumptions.
Worked example 12: constructing the transformed predictors
For 1984, the historical sales observations are 417, 396, 344, and 345 for the current year and the previous three years. Therefore, Z₀ = 417 + 396 + 344 + 345 = 1,502. Next, Z₁ = 396 + 2(344) + 3(345) = 2,119.
Finally, Z₂ = 396 + 4(344) + 9(345) = 4,877. These calculations reproduce the first usable transformed row. Since the sample begins in 1981, a three-lag regression starts in 1984 and retains 16 of the original 19 annual observations.
Recovering lag weights and their uncertainty
After estimating the polynomial coefficients, recover each lag coefficient through b̂ⱼ = ĉ₀ + jĉ₁ + j²ĉ₂. However, its standard error requires the full covariance matrix. Define aⱼ = (1, j, j²)′ and let V denote the covariance matrix of the three estimated polynomial coefficients.
Consequently, standard errors cannot come from simply adding the individual standard errors of ĉ₀, ĉ₁, and ĉ₂. Correlations among these estimates can materially change the uncertainty of a recovered lag weight. The same principle applies to sums of elasticities and other linear combinations.
A numerical audit of historical regression examples
Reproducing published calculations offers a stronger learning exercise than copying a reported coefficient. Accordingly, this section fits the models directly to the 19 inventory and sales observations visible in the teaching material. The units follow the source table: billions of dollars.
| Year | Inventories Y | Sales X |
|---|---|---|
| 1981 | 546 | 345 |
| 1982 | 574 | 344 |
| 1983 | 590 | 396 |
| 1984 | 650 | 417 |
| 1985 | 664 | 428 |
| 1986 | 663 | 445 |
| 1987 | 710 | 473 |
| 1988 | 767 | 522 |
| 1989 | 815 | 533 |
| 1990 | 841 | 542 |
| 1991 | 835 | 542 |
| 1992 | 843 | 585 |
| 1993 | 870 | 609 |
| 1994 | 935 | 672 |
| 1995 | 996 | 701 |
| 1996 | 1,014 | 730 |
| 1997 | 1,062 | 769 |
| 1998 | 1,100 | 797 |
| 1999 | 1,151 | 872 |
Source: photographed Table 8.15, which credits the St. Louis Federal Reserve and the U.S. Department of Commerce, Census Bureau. The transcription preserves the displayed historical values.
Worked example 13: checking the Koyck-style intercept
Regressing inventories on current sales and lagged inventories over 1982–1999 gives the following descriptive OLS fit:
n = 18; R2 ≈ 0.993531
The photographed solution appears to print an intercept of 88,426.14 despite listing observations in hundreds of billions. Substituting that printed intercept would produce predictions on an incompatible scale. In contrast, an intercept near 88 produces predictions consistent with the listed units.
For example, the re-estimated prediction for 1982 equals 88.371639 + 0.603067(344) + 0.499570(546), or approximately 568.59. The observed value is 574. Therefore, the discrepancy appears to involve a typographical or unit-reporting problem; the available page does not establish its exact cause.
Using the full-precision coefficients, the implied original intercept α is approximately 88.371639/(1 − 0.499570) = 176.59. The implied long-run multiplier is approximately 1.2051. However, these are algebraic summaries of a descriptive OLS fit, not a claim that this procedure resolves the transformed model’s endogeneity.
Worked example 14: recovering Almon weights without premature rounding
Estimating the quadratic Almon model over 1984–1999 produces the following coefficients from the visible data:
+ 0.265066301Z1,t − 0.154476873Z2,t
n = 16; R2 ≈ 0.992542
| Lag j | Full-precision recovery | Using c₀ = 0.44, c₁ = 0.27, c₂ = −0.15 |
|---|---|---|
| 0 | 0.442812 | 0.44 |
| 1 | 0.553401 | 0.56 |
| 2 | 0.355037 | 0.38 |
| 3 | −0.152281 | −0.10 |
| Sum | 1.198969 | 1.28 |
The squared lag index amplifies rounding in the quadratic coefficient. At lag three, its contribution multiplies by nine. Consequently, the last recovered coefficient changes noticeably when the polynomial estimates retain only two decimals.
Moreover, the estimated last weight is negative. That result does not establish a precise negative economic effect, especially in a small sample with correlated predictors. Interpret the shape together with standard errors, model restrictions, and the economic setting.
Why these high R² values do not settle model choice
The Koyck-style fit and the Almon fit use different samples, different regressors, and different restrictions. Therefore, a direct ranking by their displayed R² values would be misleading. A fair predictive comparison needs a common evaluation period and a clearly defined forecast horizon.
Both series also trend upward over much of the historical sample. Strong common trends can create impressive fits without a stable economic relationship. Consequently, an applied analysis should examine stationarity, possible cointegration, residual dynamics, and performance on later observations before making substantive claims.
Regression forecasting: point estimates and prediction intervals
A point forecast describes the model’s central prediction at specified predictor values. However, a useful decision often needs an uncertainty range as well. For this reason, distinguish uncertainty about the conditional mean from uncertainty about a new individual observation.
Confidence interval versus prediction interval
In simple linear regression, let s denote the residual standard error, n the sample size, x̄ the sample mean, and Sxx the sum of squared deviations of X from x̄. At a specified x₀, define leverage h₀ as follows:
Under the classical normal, independent, homoskedastic error model, a 95% interval for the conditional mean uses s√h₀. In contrast, a 95% prediction interval for a new observation uses s√(1 + h₀).
New-observation prediction interval: ŷ0 ± t0.975,n−2s√(1 + h0)
The extra one represents the new observation’s own unpredictable disturbance. Consequently, the prediction interval is wider even when the fitted mean is very precise. Both intervals also widen as x₀ moves away from the sample mean.
Worked example 15: calculating both intervals
Consider an illustrative regression with n = 25, s = 8, x̄ = 10, Sxx = 400, and a fitted equation ŷ = 20 + 3x. At x₀ = 14, the point forecast equals 62. Meanwhile, h₀ = 1/25 + 16/400 = 0.08.
Using t₀.₉₇₅,₂₃ ≈ 2.0687, the mean interval is 62 ± 2.0687 × 8√0.08, or approximately [57.32, 66.68]. The prediction interval is 62 ± 2.0687 × 8√1.08, or approximately [44.80, 79.20]. This wider range answers a different question rather than indicating a calculation error.
In multiple regression, replace h₀ with x₀′(X′X)−1x₀, including the intercept element in x₀. Use the appropriate residual degrees of freedom. However, time-series dependence or changing variance requires a forecasting framework that accounts for that structure.
Reference: Forecasting: Principles and Practice explains regression forecasts, predictor scenarios, and prediction uncertainty. The numerical example and figure here are original calculations.
Future predictors can also be uncertain
A standard conditional interval treats the supplied x₀ as known. In practice, next year’s income, prices, or advertising budget may themselves require forecasts. Therefore, an interval conditional on one assumed predictor path can understate total decision uncertainty.
A useful approach compares several explicitly defined scenarios or simulates future predictor paths and outcome disturbances together. Nevertheless, changing a scenario input does not convert an associational regression into a causal policy model. Interpret scenario forecasts according to the model’s design.
Worked example 16: converting a logged forecast back to levels
Suppose a fitted log outcome is m = 4.0. Simply exponentiating gives e⁴ ≈ 54.60. However, if the log error follows a conditional normal distribution with variance σ² = 0.16, the conditional mean on the original scale is e4 + 0.16/2 ≈ 59.15.
E(Y | X) = exp[m(X) + σ2/2]
The difference is about 8.33%. Under this normal-error model, exp(m) describes the conditional median, while exp(m + σ²/2) describes the conditional mean. Therefore, a forecast should state which target it estimates.
Without conditional normality, a smearing approach estimates the retransformation factor from exponentiated residuals. However, a single pooled factor needs justification when the error distribution changes with X. Stata discusses this issue in its guide to interpreting models for log-transformed outcomes.
Binary choice models: logit, probit, and marginal effects
A binary outcome takes two values, usually zero and one. Examples include whether a customer renews a subscription, whether a household purchases a product, or whether an application receives approval. In each case, the model targets a probability rather than an unrestricted continuous outcome.
What happens if you use OLS?
OLS with a binary dependent variable produces a linear probability model. This approach can provide an interpretable linear approximation, so it is not universally meaningless. However, its predictions may fall below zero or above one.
Furthermore, a Bernoulli outcome has conditional variance p(1 − p), which changes with its probability. Consequently, the usual constant-variance OLS standard errors generally do not apply. Logit and probit address the probability range through nonlinear response functions.
| Model | Probability function | Coefficient scale | Continuous-predictor marginal effect |
|---|---|---|---|
| Linear probability | p = Xβ | Probability units | βⱼ |
| Logit | p = 1/(1 + e−Xβ) | Log odds | p(1 − p)βⱼ for a main-effects index |
| Probit | p = Φ(Xβ) | Standard-normal index | φ(Xβ)βⱼ for a main-effects index |
Here, Φ denotes the standard normal cumulative distribution function, while φ denotes its density. Because the two functions differ, logit and probit coefficients use different scales. Consequently, compare fitted probabilities or marginal effects rather than raw coefficient sizes.
Worked example 17: logit probabilities and odds ratios
Use the illustrative logit model p(X) = 1/[1 + exp(−(−2 + 0.8X))]. At X = 2, the index equals −0.4 and the predicted probability is approximately 0.4013. Increasing X to 3 raises the index to 0.4 and the predicted probability to approximately 0.5987.
Therefore, this one-unit change increases predicted probability by 19.74 percentage points. The odds ratio is e0.8 ≈ 2.226. That value multiplies the odds, not the probability.
At X = 2, the derivative is 0.4013(1 − 0.4013)(0.8) ≈ 0.1922. This derivative approximates a very small change around X = 2. However, it need not equal the finite difference from X = 2 to X = 3.
Worked example 18: probit probability and marginal effect
Consider the illustrative probit model p(X) = Φ(−1 + 0.5X). At X = 2, the index equals zero, so the predicted probability is 0.5. The marginal effect equals φ(0) × 0.5 ≈ 0.19947 probability units per unit of X.
At X = 4, the index equals one and the probability rises to approximately 0.8413. However, the marginal effect falls to φ(1) × 0.5 ≈ 0.12099. Thus, a constant index coefficient does not imply a constant effect on probability.
Binary predictors need discrete changes
For an indicator D, calculate p(D = 1, X) − p(D = 0, X), holding the other covariates at specified values. A derivative treats the variable as continuously varying and does not directly describe the zero-to-one change. Similarly, interactions require differentiating the entire index rather than reading one coefficient alone.
An average marginal effect averages observation-specific effects across the sample. By contrast, a marginal effect at the means evaluates one synthetic covariate profile. These quantities generally differ because nonlinear functions do not commute with averaging.
Reference: SAS: marginal effects for logistic and probit models provides the derivatives, discrete-change interpretation, and average-effect distinction.
Likelihood and pseudo-R²
Logit and probit commonly use maximum likelihood. For independent Bernoulli observations with fitted probabilities pᵢ, the log-likelihood is:
One common fit summary is McFadden’s pseudo-R²: 1 − ℓfitted/ℓnull. As an illustration, log-likelihoods of −6.8647 and −13.8629 produce approximately 0.5048. This number measures an improvement relative to an intercept-only likelihood benchmark; it does not mean the model explains 50.48% of outcome variance.
Why classification accuracy is insufficient
Suppose 90 of 100 observations have Y = 0. A classifier that always predicts zero achieves 90% accuracy while identifying none of the positive cases. Consequently, compare accuracy with the majority-class baseline and report sensitivity, specificity, and the confusion matrix.
Probability forecasts also need calibration. For example, observations assigned a probability near 0.70 should exhibit the event at roughly that rate across an appropriate evaluation sample. Depending on the goal, examine log loss, the Brier score, and discrimination as well as any chosen classification threshold.
Finally, complete separation can prevent finite maximum-likelihood coefficient estimates. Small samples and rare outcomes can make estimates unstable even without perfect separation. Therefore, inspect estimation warnings and uncertainty before interpreting extreme odds ratios.
A practical workflow for reliable advanced regression analysis
The best workflow connects the substantive question, the measurement system, and the validation method. More complex equations do not automatically improve inference. Instead, each additional feature should solve a clearly identified problem.
- Define the target. Decide whether you need an association, a causal effect, a conditional mean, an individual forecast, or a probability.
- Audit the data. Check units, missing values, time alignment, duplicate records, and the meaning of zeros.
- Plot the relationships. Inspect levels, logs where appropriate, time patterns, and group overlap.
- Specify a manageable model. Use theory and the question to choose transformations, indicators, and lags.
- Estimate with suitable assumptions. Check exogeneity and choose covariance methods that reflect the sampling structure.
- Interpret on the correct scale. Convert coefficients into quantities that answer the original question.
- Validate honestly. Evaluate forecasts on observations that did not determine the fitted model.
- Retain precision. Calculate turning points, lag weights, and multipliers before rounding.
- Report limitations. State the data vintage, sample size, uncertainty, and conditions required for interpretation.
Diagnostics that answer specific questions
| Symptom | Possible issue | Useful response |
|---|---|---|
| Residual curve against fitted values | Incorrect conditional-mean form | Consider a justified transformation, polynomial, or flexible specification. |
| Residual spread rises with the fitted value | Heteroskedasticity | Assess robust covariance or a justified variance model. |
| Residuals persist across adjacent dates | Serial dependence | Examine residual autocorrelation and dynamic structure. |
| Large coefficient changes after adding correlated lags | Weak separation of individual lag effects | Study joint effects and justified lag restrictions. |
| Very high R² for trending series | Possible spurious fit | Investigate time-series properties and out-of-sample stability. |
| Extreme binary-model coefficients | Separation or sparse observations | Check convergence, class counts, and estimation alternatives. |
| Good average accuracy but poor minority-class detection | Class imbalance and threshold choice | Inspect probability quality and the confusion matrix. |
Robust standard errors address particular covariance problems. However, they do not repair an endogenous regressor or an incorrect conditional mean. Likewise, adding a time trend does not automatically eliminate every form of nonstationarity.
Reproduce the historical audit with Python
The following code uses NumPy to fit the equations directly. It keeps coefficients at full precision and prints the turning point and recovered lag weights. Consequently, readers can verify the main numerical claims without relying on a screenshot of software output.
Open the complete reproducible calculation
import numpy as np
# Historical teaching observations, not current agency data.
y = np.array([546,574,590,650,664,663,710,767,815,841,
835,843,870,935,996,1014,1062,1100,1151])
x = np.array([345,344,396,417,428,445,473,522,533,542,
542,585,609,672,701,730,769,797,872])
def ols(y, predictors):
design = np.column_stack([np.ones(len(y)), predictors])
beta = np.linalg.lstsq(design, y, rcond=None)[0]
residuals = y - design @ beta
r2 = 1 - (residuals @ residuals) / np.sum((y-y.mean())**2)
return beta, r2
# Descriptive OLS only: does not solve Koyck endogeneity.
koyck, r2_k = ols(y[1:], np.column_stack([x[1:], y[:-1]]))
print("Koyck-style coefficients:", koyck, "R2:", r2_k)
print("Implied alpha:", koyck[0] / (1-koyck[2]))
print("Implied multiplier:", koyck[1] / (1-koyck[2]))
# Current observation and three annual lags.
z = np.array([
[sum(x[t-j] for j in range(4)),
sum(j*x[t-j] for j in range(4)),
sum(j*j*x[t-j] for j in range(4))]
for t in range(3, len(x))
])
almon, r2_a = ols(y[3:], z)
weights = np.array([almon[1] + j*almon[2] + j*j*almon[3]
for j in range(4)])
print("Almon coefficients:", almon, "R2:", r2_a)
print("Lag weights:", weights, "Sum:", weights.sum())
q = np.array([149,121,190,100,109,138,209,170,158,201,130,181])
ac = np.array([82,86,100,100,95,85,110,88,86,108,87,87])
cost, r2_cost = ols(ac, np.column_stack([q, q*q]))
print("Cost coefficients:", cost, "R2:", r2_cost)
print("Cost minimum:", -cost[1]/(2*cost[2]))
For statistical inference, use software that provides covariance estimators and diagnostics appropriate to the model. The statsmodels linear regression documentation describes OLS and related estimators. Nevertheless, software output still requires a defensible specification and interpretation.
Four reporting habits that prevent avoidable errors
First, distinguish a percentage from a percentage point. Moving from a probability of 0.40 to 0.60 is a 20-percentage-point increase and a 50% relative increase. The two descriptions answer different questions.
Second, use enough coefficient digits for downstream calculations. The cost-minimum audit demonstrates why a small squared coefficient may need more than two decimal places. Third, compare fit statistics only when the response scale, observations, and relevant criterion permit a meaningful comparison.
Finally, preserve a clean separation between fitted associations and causal claims. A reliable forecast may use a variable that does not cause the outcome. Conversely, an estimated causal effect may come from a research design whose goal is not minimizing forecast error.
Frequently asked questions about advanced regression analysis
Can OLS estimate a nonlinear relationship?
Yes. OLS can estimate models that are nonlinear in variables but linear in coefficients, such as quadratic and log-log regressions. However, the transformed equation must satisfy the assumptions needed for the intended inference.
Is a log-log coefficient always an exact percentage change?
It is an elasticity, which describes a local proportional response. For a finite X increase of g, use 100[(1 + g)β − 1]%. Therefore, multiplying β by a large percentage change can yield a noticeable approximation error.
How many seasonal dummy variables do I need?
With an intercept, use one fewer indicator than the number of exhaustive categories. Thus, quarterly data need three seasonal indicators and monthly data need eleven. Alternatively, omit the intercept and use a separate indicator for every category.
What is the main difference between Koyck and Almon lags?
Koyck assumes geometric decay across an infinite lag sequence. Almon places a polynomial restriction on a chosen finite sequence of coefficients. Consequently, Almon can represent a delayed peak, while a positive geometric Koyck pattern peaks immediately.
Does a high R² prove the model is useful?
No. A high R² can coexist with poor forecasts, endogenous predictors, or unstable relationships. In particular, common time trends can generate strong in-sample fit without establishing a dependable economic mechanism.
Should I use logit or probit?
Choose a model that fits the application, assumptions, and validation evidence. Both map an unrestricted index into a probability between zero and one. For interpretation, compare predicted probabilities and marginal effects rather than the raw coefficient magnitudes.
Can I exponentiate a log prediction to obtain an average?
Not automatically. Exponentiation alone does not generally recover the conditional arithmetic mean. Instead, account for the conditional distribution of the log error and identify whether the target is a mean, median, or another quantity.
Why did the reported cost minimum change after recalculation?
The quadratic coefficient was too coarsely rounded for the turning-point calculation. Using the displayed value 0.01 gives about 110, while the fitted coefficient 0.0074677 gives about 147. Therefore, always calculate with unrounded estimates.
Conclusion: choose the interpretation before the equation
Advanced regression analysis becomes useful when each modeling choice answers a specific question. Logs describe proportional relationships, interactions describe conditional differences, lags describe timing, and probability models describe binary outcomes. Meanwhile, uncertainty intervals distinguish a fitted average from a future realization.
The numerical audits also reveal a practical lesson: correct algebra cannot rescue inconsistent units or excessive rounding. Consequently, retain full precision, reproduce key results, and explain the scale of every estimate. A clear interpretation, a transparent calculation, and an honest validation process make a regression more valuable than complexity alone.
