Lesson M05.L01: Log Transformations in Regression
| Field | Detail |
|---|---|
| Module | 05 — Functional Forms & Dummy Variables |
| Level | Graduate |
| Duration | 30–35 min |
| Learning Objective | Understand the four log/level functional forms, interpret coefficients correctly in each case, and know when to apply logarithmic transformations. |
| Provenance | Wooldridge Introductory Econometrics, Ch 6.2 |
Explanation
Why Functional Form Matters
OLS assumes the relationship between \(y\) and \(x\) is linear in parameters — but it does not require linearity in the original variables. By transforming variables before estimating, we can capture a wide range of non-linear economic relationships while keeping the machinery of OLS intact.
Logarithmic transformations are by far the most common such device in applied econometrics.
Convention: In econometrics, \(\log\) always means the natural logarithm \(\ln\) (base \(e \approx 2.718\)). It never means \(\log_{10}\). Software commands like
log()in Stata and R also default to the natural log.
The Four Functional Forms
1. Level-Level
Interpretation: A one-unit increase in \(x\) is associated with a \(\beta_1\)-unit change in \(y\).
Use when both variables are naturally measured in levels and the relationship is approximately linear (e.g. test score on class size).
2. Log-Level (Semi-Elasticity)
Interpretation: A one-unit increase in \(x\) is associated with an approximate \(100\beta_1\) percent change in \(y\).
This is called a semi-elasticity — \(x\) is in levels, \(y\) is in logs. Use when \(y\) is right-skewed (wages, income, prices) and the effect of \(x\) is proportional rather than additive.
Example: If \(\hat{\beta}_1 = 0.082\) in a log-wage regression on years of education, then each additional year of education is associated with approximately an 8.2% increase in wages.
3. Level-Log
Interpretation: A 1% increase in \(x\) is associated with a \(\beta_1/100\) unit change in \(y\).
Use when \(x\) exhibits diminishing marginal impact — each extra unit of \(x\) matters less than the previous (e.g. \(y\) = test score, \(x\) = expenditure per student).
4. Log-Log (Constant Elasticity)
Interpretation: A 1% increase in \(x\) is associated with a \(\beta_1\)% change in \(y\). Here \(\beta_1\) is the elasticity of \(y\) with respect to \(x\).
This is the workhorse model for demand equations and production functions. The elasticity is constant across all values of \(x\).
Example: If \(\hat{\beta}_1 = -0.5\) in a log-log demand equation, the price elasticity of demand is \(-0.5\) (inelastic).
Summary Table
| Model | Dep. Var. | Indep. Var. | Interpretation of \(\hat{\beta}_1\) |
|---|---|---|---|
| Level-level | \(y\) | \(x\) | \(\Delta y = \hat{\beta}_1 \Delta x\) (units) |
| Log-level | \(\log(y)\) | \(x\) | \(\% \Delta y \approx 100\hat{\beta}_1 \Delta x\) (semi-elasticity) |
| Level-log | \(y\) | \(\log(x)\) | \(\Delta y \approx (\hat{\beta}_1/100)\% \Delta x\) |
| Log-log | \(\log(y)\) | \(\log(x)\) | \(\% \Delta y \approx \hat{\beta}_1 \% \Delta x\) (elasticity) |
When to Use Logs
Use logarithmic transformations when:
- The variable is right-skewed — wages, income, housing prices, firm revenues all tend to have long right tails. Taking logs compresses the distribution and makes OLS better behaved.
- You want an elasticity interpretation — log-log gives a clean, scale-free elasticity.
- The marginal effect is proportional rather than additive — if a $1 increase in \(x\) has a larger absolute effect at low values of \(y\) than at high values, a log-level model is more appropriate.
- To reduce heteroskedasticity — log transformations often stabilise variance across observations.
Limitations: What You Cannot Log
The natural log is undefined for zero and negative values:
Alternatives when \(y \geq 0\) with zeros:
- \(\log(1 + y)\): Adds 1 before taking logs. Simple, but coefficient interpretation is non-standard; the approximation \(\%\Delta y \approx 100\hat{\beta}_1\Delta x\) holds only when \(y\) is large.
- Inverse Hyperbolic Sine (IHS): \(\text{arcsinh}(y) = \log(y + \sqrt{y^2 + 1})\). Behaves like \(\log(2y)\) for large \(y\), equals 0 at \(y=0\), and is defined for negative values. Increasingly preferred in modern applied work.
- Two-part (Tobit-type) models: Separate models for the zero/non-zero decision and the level conditional on being positive.
Worked Example
Dataset: Cross-sectional sample of \(n = 526\) workers (Wooldridge WAGE1).
Equation estimated:
Coefficient on education: \(\hat{\beta}_{educ} = 0.082\)
Interpretation: Each additional year of education is associated with approximately 8.2% higher wages, holding experience constant.
This is a log-level model. The dependent variable is \(\log(wage)\); education is measured in years (a level).
Why log wages? Wages are right-skewed: a few very high earners pull the distribution. Taking logs produces a more symmetric distribution and stabilises variance. The percentage interpretation is also more economically natural ("a 10% wage premium") than an additive one ("$0.82/hour more").
Exact vs approximate interpretation: The exact percentage effect of a one-unit change in \(x\) in a log-level model is:
For \(\hat{\beta}_1 = 0.082\): \(100(e^{0.082} - 1) = 100(1.0854 - 1) = 8.54\%\). The approximation (\(8.2\%\)) is close enough for small coefficients but use the exact formula for coefficients above \(\approx 0.2\).
Common Misconception
"Log in a regression means log base 10."
Correction: In econometrics, \(\log\) universally refers to the natural logarithm (base \(e\)), not \(\log_{10}\). When Wooldridge writes \(\log(wage)\), he means \(\ln(wage)\). Stata's gen lwage = log(wage) and R's log(wage) both compute natural logs. If you use \(\log_{10}\) by accident, your coefficients will be off by a factor of \(\ln(10) \approx 2.303\) and your interpretations will be wrong. Always double-check which base your software uses (hint: it's always \(e\) by default in econometrics packages).
Practice Prompts
Prompt 1 — Identification A researcher estimates:
where \(price\) is in thousands of dollars and \(sqft\) is house size in square feet. What functional form is this? Interpret \(\hat{\beta}_1 = 0.95\). If house size increases by 10%, what is the predicted change in price (in dollars)?
Prompt 2 — Model choice You are studying the effect of advertising expenditure on firm sales. Sales range from $50,000 to $50 million across firms. Advertising expenditure ranges from $1,000 to $500,000. Which functional form would you choose and why? What does your choice imply about the marginal return to advertising?
Prompt 3 — Zero values A researcher wants to estimate the effect of government transfers on household savings. Savings takes the value zero for 35% of households in the sample. Why is \(\log(savings)\) problematic here? Name two alternatives and briefly explain each.
Further Resources
- Wooldridge, Introductory Econometrics (7th ed.), §6.2 — Functional Forms Involving Logarithms
- Bellemare & Wichman (2020), "Elasticities and the Inverse Hyperbolic Sine Transformation", Oxford Bulletin of Economics and Statistics
- Stata:
gen lnwage = log(wage)thenreg lnwage educ exper - R:
lm(log(wage) ~ educ + exper, data = wage1)