Log transformation
Log transformation replaces a variable with its natural logarithm before including it in a regression.
Also known aslogarithm
See it move
The infographic is a formula card showing that replacing a variable x with its natural logarithm ln x converts a curved scatter into a straight OLS line. Three functional-form interpretations are presented: in a level–level model, a one-unit rise in x changes y by β₁ units; in a log–level model, a one-unit rise produces a 100β₁ per cent change in y (a semi-elasticity); and in a log–log model, a one per cent rise in x produces a β₁ per cent change in y, reading the elasticity directly from the slope. A caution note adds that ln(x) is undefined for x ≤ 0, so ln(x + 1) is used when x can equal zero.
The formula
Variables
- Dependent variable
- Explanatory variable
- Intercept
- Slope coefficient
- Error term
Log-level model: a 1-unit increase in X is associated with approximately β₁ × 100 % change in Y.
Variables
- Elasticity — % change in Y per 1% change in X
Log-log model: β₁ is the elasticity — a 1% increase in X is associated with β₁% change in Y.
Variables
- Change in Y associated with a 1% increase in X, divided by 100
Level-log model: a 1% increase in X is associated with β₁ ÷ 100 unit change in Y.