Lesson M02.L04: Units, Functional Forms, and R-Squared
| Field | Detail |
|---|---|
| Module | M02 — Simple Linear Regression (Wooldridge Chapter 2) |
| Level | Graduate |
| Duration | 35 minutes |
| Learning Objective | Interpret \(R^2\) correctly; predict how coefficient estimates change under rescaling; choose and interpret log-linear and log-log functional forms. |
| Provenance | Wooldridge, Introductory Econometrics, 7th ed., Chapter 2, Sections 2.4 (units and functional form) and 2.3 (\(R^2\)) |
Explanation
1. R-Squared: Definition and Interpretation
From M02.L03, we established the decomposition \(SST = SSE + SSR\). This motivates:
Interpretation: \(R^2\) is the fraction of total sample variation in \(y\) that is explained (linearly) by \(x\).
Key properties:
| Fact | Explanation |
|---|---|
| \(R^2 \in [0, 1]\) | SSE and SSR are non-negative and sum to SST |
| \(R^2 = 0\) | \(x\) explains none of the variation in \(y\); \(\hat{\beta}_1 = 0\) and \(\hat{y}_i = \bar{y}\) for all \(i\) |
| \(R^2 = 1\) | Perfect fit: every observation lies on the regression line; \(\hat{u}_i = 0\) for all \(i\) |
| \(R^2 = r_{xy}^2\) | In simple regression, \(R^2\) equals the square of the sample correlation between \(x\) and \(y\) |
2. Effect of Changing Units on OLS Estimates
A critical skill: knowing how \(\hat{\beta}_0\), \(\hat{\beta}_1\), and \(R^2\) respond when you rescale variables.
Case A: Multiply the dependent variable \(y\) by a constant \(c\)
Define \(y^* = c \cdot y\). Running OLS of \(y^*\) on \(x\):
Intuition: Every \(y_i\) is scaled by \(c\), so every \(\hat{y}_i\) must also scale by \(c\) to minimise the new SSR. Both SSE and SST scale by \(c^2\), so their ratio \(R^2\) is unchanged.
Example: If wages are in dollars and you convert to cents (\(c = 100\)), the slope multiplies by 100 (dollars-per-year becomes cents-per-year), but \(R^2\) stays the same.
Case B: Multiply the independent variable \(x\) by a constant \(c\)
Define \(x^* = c \cdot x\). Running OLS of \(y\) on \(x^*\):
Intuition: A one-unit change in \(x^*\) corresponds to a \(c\)-unit change in the original \(x\). So the slope (effect per unit of regressor) must be divided by \(c\) to keep predicted values identical. The intercept (value when \(x^* = 0\), i.e. \(x = 0\)) is unchanged.
Example: If education is measured in months instead of years (\(c = 12\)), the slope divides by 12, but \(R^2\) and \(\hat{\beta}_0\) are unchanged.
Summary table:
| Change | \(\hat{\beta}_1\) | \(\hat{\beta}_0\) | \(R^2\) |
|---|---|---|---|
| \(y \to c \cdot y\) | \(\times c\) | \(\times c\) | unchanged |
| \(x \to c \cdot x\) | \(\div c\) | unchanged | unchanged |
| \(y \to c \cdot y\) and \(x \to d \cdot x\) | \(\times (c/d)\) | \(\times c\) | unchanged |
3. Functional Forms: Why Log Transformations?
The linear model \(y = \beta_0 + \beta_1 x + u\) assumes a constant additive effect: one unit of \(x\) always changes \(y\) by \(\beta_1\), regardless of the level of \(x\). For many economic variables, this is unrealistic.
Common reasons to use \(\log(y)\) or \(\log(x)\):
- Right-skewed distributions: Wages, income, prices, and GDP are typically right-skewed with a few very large values. \(\log(\text{wage})\) is much more symmetric and closer to normally distributed.
- Elasticity interpretation: Taking logs converts the slope into a percentage-change interpretation — often more natural in economics.
- Heteroskedasticity reduction: Log transforms often stabilise variance across the range of \(x\) (relevant for inference; covered in later modules).
Note: \(\log\) in econometrics almost always means the natural logarithm (base \(e\), denoted \(\ln\) in mathematics). Wooldridge writes \(\log\) throughout and means \(\ln\).
4. The Log-Linear Model (Semi-Elasticity)
Model:
Interpretation of \(\hat{\beta}_1\):
Using the approximation \(\Delta \log(y) \approx \Delta y / y\) (valid for small changes):
More precisely: a one-unit increase in \(x\) is associated with approximately a \(100 \cdot \hat{\beta}_1\)% change in \(y\).
This is called a semi-elasticity — the dependent variable is in logs but the independent variable is in levels.
Example: If \(\log(\text{wage}) = 1.2 + 0.08 \times \text{Educ} + u\):
→ One additional year of education is associated with approximately an 8% increase in wages.
→ More precisely: the multiplicative factor is \(e^{0.08} \approx 1.0833\), so wages increase by about 8.33%.
5. The Log-Log Model (Constant Elasticity)
Model:
Interpretation of \(\hat{\beta}_1\):
A 1% increase in \(x\) is associated with a \(\hat{\beta}_1\)% change in \(y\). The slope is a constant elasticity.
Example: If \(\log(\text{sales}) = 2.0 - 0.5 \times \log(\text{price}) + u\):
→ A 1% increase in price is associated with a 0.5% decrease in sales.
→ \(\hat{\beta}_1 = -0.5\) is the price elasticity of demand (inelastic demand).
6. When to Use Each Form
| Model | \(x\) | \(y\) | Slope Interpretation |
|---|---|---|---|
| Level-Level | levels | levels | \(\Delta y\) per 1-unit \(\Delta x\) |
| Log-Level (semi-elasticity) | levels | logs | \(\approx \%\Delta y\) per 1-unit \(\Delta x\) |
| Level-Log | logs | levels | \(\Delta y\) per 1% \(\Delta x\) |
| Log-Log (elasticity) | logs | logs | \(\%\Delta y\) per 1% \(\Delta x\) |
Rule of thumb: Take the log of a variable if: - It has a strongly right-skewed distribution (positive values only, large range) - You want to interpret the coefficient as a percentage or elasticity - The relationship between \(y\) and \(x\) appears curved (concave) rather than linear
7. A Note on R-Squared Across Models
You cannot compare \(R^2\) across models with different dependent variables.
A log-wage regression (\(\log(\text{wage})\) as \(y\)) and a wage-level regression (\(\text{wage}\) as \(y\)) have different SSTs and are not comparable by \(R^2\).
Is a low R² bad? Not necessarily. \(R^2\) measures how much variation in \(y\) is explained by a single regressor. In cross-sectional economic data:
- A regression of wages on education alone with \(R^2 = 0.15\) is typical and informative
- The low \(R^2\) reflects that wages depend on many factors (ability, experience, employer, location) — not that the education coefficient is wrong or unimportant
- If \(\hat{\beta}_1\) is statistically significant (tested in Module 4) and economically meaningful in magnitude, the regression adds real value regardless of \(R^2\)
Key principle: \(R^2\) measures fit, not the validity, significance, or economic importance of a regression coefficient. Researchers who chase high \(R^2\) by adding irrelevant variables are making a mistake (the adjusted-\(R^2\) problem is addressed in later modules on multiple regression).
Worked Example
Setting: Log-Wage Regression
A researcher estimates the following log-linear model on \(n = 526\) workers from the CPS wage dataset (from Wooldridge, Chapter 2):
with \(R^2 = 0.186\).
Interpretation of the slope:
\(\hat{\beta}_1 = 0.083\): Each additional year of education is associated with approximately a 8.3% increase in hourly wage.
(More precisely: \(e^{0.083} - 1 = 0.0865\), so about 8.65% — the approximation \(\approx 8.3\%\) is good for small values.)
Interpretation of the intercept:
\(\hat{\beta}_0 = 0.584\): A worker with zero years of education is predicted to have \(\log(\text{wage}) = 0.584\), corresponding to \(\text{wage} = e^{0.584} \approx \$1.79\)/hour. Again, this is extrapolation far outside the data range (minimum education in the sample is typically 0–1 years) and should not be taken literally.
Predicted wage for a college graduate (16 years of education):
(Note: this dataset is from the early 1990s — the wage level reflects that era.)
Interpretation of \(R^2 = 0.186\):
Education alone explains approximately 18.6% of the variation in log wages. The remaining 81.4% reflects other factors (experience, industry, location, ability, etc.). This is a typical result for a single-variable wage regression and does not indicate a flawed model.
Effect of a units change: Suppose wages are measured in cents rather than dollars (\(y^* = 100 \times \text{wage}\)). Since we're working with \(\log(y^*)\):
So \(\hat{\beta}_0^* = 0.584 + 4.605 = 5.189\), while \(\hat{\beta}_1 = 0.083\) is unchanged (the log transform absorbs the scale change into the intercept), and \(R^2\) is unchanged.
Common Misconception
"A low R² means the regression is useless."
This is one of the most persistent misconceptions in applied econometrics.
\(R^2\) measures goodness of fit — how much of the variation in \(y\) the model explains. But the research question is often not "how much of \(y\) do I explain?" but rather "what is the effect of \(x\) on \(y\)?"
Consider this thought experiment: Suppose we regress individual annual income on whether the person was born in January vs. all other months. The \(R^2\) will be tiny — month of birth explains almost none of income variation. But in a randomised experiment, even a tiny \(R^2\) provides an unbiased estimate of the treatment effect; the regression is perfectly valid.
The relevant criteria for a useful regression are:
- Is \(\hat{\beta}_1\) statistically significantly different from zero? (Hypothesis testing, Module 4)
- Is the magnitude of \(\hat{\beta}_1\) economically meaningful?
- Are the assumptions (especially SLR.4: \(E(u|x) = 0\)) plausibly satisfied?
\(R^2\) answers none of these questions. Maximising \(R^2\) by adding variables indiscriminately can actually harm inference (see adjusted-\(R^2\) and overfitting in Module 3).
Practice Prompts
Problem 1
A regression of housing price (in $'000s) on house size (in square feet) yields:
(a) Interpret \(\hat{\beta}_1 = 0.12\) in context.
(b) If prices are instead measured in dollars (not $'000s), what is the new \(\hat{\beta}_1^*\)?
(c) If size is instead measured in hundreds of square feet, what is the new \(\hat{\beta}_1^*\)?
(d) In both (b) and (c), what happens to \(R^2\)?
Show Answer
(a) Each additional square foot of house size is associated with, on average, $120 more in house price (since price is in $'000s, so 0.12 × $1000 = $120 per sq ft).
(b) Converting price to dollars multiplies \(y\) by 1000 (\(c = 1000\)):
\(\hat{\beta}_1^* = 0.12 \times 1000 = 120\) (dollars per square foot).
\(\hat{\beta}_0^* = 40.0 \times 1000 = 40{,}000\) dollars.
(c) Converting size to hundreds of sq ft multiplies \(x\) by \(c = 100\):
\(\hat{\beta}_1^* = 0.12 / 100 \times 100 = 0.12 \times 100 / 100\)... more carefully: if \(x^* = x/100\) (size in hundreds), we're dividing \(x\) by 100, i.e. \(c = 1/100\), so \(\hat{\beta}_1^* = 0.12 \div (1/100) = 12\).
Interpretation: each additional 100 sq ft is associated with $12,000 more in price (since price is still in $'000s: \(12 \times \$1000 = \$12{,}000\)). \(\hat{\beta}_0\) unchanged at 40.0.
(d) \(R^2 = 0.62\) in all cases. \(R^2\) is invariant to linear rescaling of \(x\) or \(y\).
Problem 2
A researcher estimates two models on wages:
- Model A (level-level): \(\widehat{\text{Wage}} = -4.20 + 1.35 \times \text{Educ}\), \(R^2 = 0.974\)
- Model B (log-level): \(\widehat{\log(\text{Wage})} = 1.05 + 0.09 \times \text{Educ}\), \(R^2 = 0.961\)
(a) Interpret \(\hat{\beta}_1\) in Model A and Model B.
(b) Can you conclude Model A is better than Model B because its \(R^2\) is higher?
(c) What predicted wage does each model give for \(\text{Educ} = 14\)?
Show Answer
(a) Model A: Each additional year of education is associated with $1.35/hour more in wages (level effect). Model B: Each additional year of education is associated with approximately 9% more in wages (semi-elasticity). Model B is usually preferred for wages because it respects the lower bound of zero (log-wage can be any real number; predicted wage is always positive) and captures the multiplicative nature of wage growth.
(b) No. The \(R^2\) values come from regressions with different dependent variables (Wage vs. \(\log(\text{Wage})\)). SST for wages (\(\sum(y_i-\bar{y})^2\)) is completely different from SST for log-wages. The \(R^2\) values are not comparable. Model selection between these functional forms should be based on economic theory, distributional assumptions, and specification tests — not \(R^2\) comparison.
(c) Model A: \(\widehat{\text{Wage}} = -4.20 + 1.35 \times 14 = -4.20 + 18.90 = \$14.70\)/hr.
Model B: \(\widehat{\log(\text{Wage})} = 1.05 + 0.09 \times 14 = 1.05 + 1.26 = 2.31\); \(\widehat{\text{Wage}} = e^{2.31} \approx \$10.07\)/hr.
Problem 3
A log-log model is estimated for coffee sales:
(a) Interpret \(\hat{\beta}_1 = -1.2\).
(b) Is demand for coffee elastic or inelastic with respect to price?
(c) If price rises by 10%, what is the predicted percentage change in cups sold?
(d) A competitor's model uses levels: \(\widehat{\text{Cups}} = 5000 - 800 \times \text{Price}\). Can you compare the two models' \(R^2\) values? Why or why not?
Show Answer
(a) \(\hat{\beta}_1 = -1.2\) is the price elasticity of demand: a 1% increase in price is associated with a 1.2% decrease in cups sold.
(b) Since \(|\hat{\beta}_1| = 1.2 > 1\), demand is elastic with respect to price — consumers are relatively price-sensitive for coffee in this sample.
(c) A 10% price increase → predicted change in cups = \(-1.2 \times 10\% = -12\%\).
(d) No. The dependent variable in the log-log model is \(\log(\text{Cups})\) while the level model uses \(\text{Cups}\). These have different SSTs and the \(R^2\) values are not comparable. To compare models with different functional forms for \(y\), researchers typically use information criteria (AIC, BIC) or correlation-based measures that account for the transformation.
Further Resources
- Wooldridge: Chapter 2, Section 2.4 (Units of Measurement and Functional Form); see especially Examples 2.10 (CEO salary log model) and 2.11 (Wage-education log-linear)
- Wooldridge Data: The
wage1dataset (R:wooldridge::wage1) contains the CPS wage data used in this lesson's worked example - R:
lm(log(wage) ~ educ, data = wage1)for the log-linear model;exp(coef(fit)[1])converts log-intercept back to dollar units - Python:
import numpy as np; df['log_wage'] = np.log(df['wage']); ols('log_wage ~ educ', data=df).fit() - Functional form selection: Wooldridge Chapter 2, Appendix 2A briefly covers using \(R^2\) to compare models with the same dependent variable; for log vs level comparisons see Wooldridge Chapter 6 (further reading)