import {Inputs, tex} from "@observablehq/stdlib"
// --- Controls ---
viewof loglinear = Inputs.form({
nameX: Inputs.text({label: html`Name of ${tex`X`}`, value: "Good Banana"}),
nameY: Inputs.text({label: html`Name of ${tex`Y`}`, value: "Loan Spread (bps)"}),
beta: Inputs.number({label: html`Coefficient estimate ${tex`\hat{\beta}`}`, value: -0.38, step: 0.0001}),
sigmaX: Inputs.number([0, Infinity], {label: html`Standard deviation of ${tex`X`}`, value: 0.06, step: 0.0001}),
muY: Inputs.number({label: html`Sample mean of ${tex`Y`}`, value: 205.31, step: 0.0001}),
mulnY: Inputs.number({label: html`Sample mean of ${tex`\ln Y`}`, value: 5.066, step: 0.0001}),
showVarName: Inputs.toggle({label: "Show variable names in output", value: true})
})
_DeltaY = (Math.exp(loglinear.mulnY + loglinear.beta * loglinear.sigmaX) - Math.exp(loglinear.mulnY)).toFixed(4)
_absDeltaY = Math.abs(_DeltaY)
A Calculator of Economic Significance
Research Notes
This note provides interactive calculators to articulate the economic significance of regression estimates in empirical finance studies, producing discussions that are almost publication-ready.
Log-linear model
Suppose we have estimated a regression model: \[ \ln Y = \beta X + \cdots + \varepsilon, \tag{1}\] where \(Y\) is the dependent variable, \(X\) is a key independent variable, and \(\varepsilon\) is the error term.
Derivation
Note that the regression is linear between \(\ln Y\) and \(X\).
This means that if \(X\) increases by one unit, then \(\ln Y\) increases by approximately \(\hat\beta\) units.
If \(X\) increases by \(\Delta X\), then \(\ln Y\) increases by \(\hat\beta \Delta X\) units, which implies that
\[ \Delta \ln Y \equiv \ln(Y_{\text{new}}) - \ln(Y_{\text{old}}) = \ln\left(\frac{Y_{\text{new}}}{Y_{\text{old}}}\right) = \hat{\beta} \Delta X. \tag{2}\]
Therefore,
\[ Y_{\text{new}} = Y_{\text{old}} \exp\left(\hat\beta \Delta X\right). \tag{3}\]
\(\Delta Y\), the additive change in \(Y\), is therefore
\[ \begin{align} \Delta Y &= Y_{\text{new}} - Y_{\text{old}} \\ &= Y_{\text{old}} \exp\left( \hat\beta \Delta X \right) - Y_{\text{old}} \\ &= \exp\left( \ln Y_{\text{old}} + \hat\beta \Delta X \right) - \exp\left( \ln Y_{\text{old}} \right). \end{align} \tag{4}\]
The last step of Equation 4 keeps \(\ln Y_{\text{old}}\) instead of \(Y_{\text{old}}\) to be consistent with the fact that the regression in Equation 1 is log-linear.
Equation 4 also shows that the change in \(Y\) depends on the baseline level of \(\ln Y_{\text{old}}\). To interpret the economic significance of \(\hat\beta\), we therefore need to choose a reference level of \(\ln Y_{\text{old}}\). A common choice is its sample mean.
Let \(\mu_{\ln Y}\) be the sample mean of \(\ln Y\). Then the representative change in \(Y\) from a change in \(\ln X\) of \(\Delta \ln X\) is \[ \Delta Y = \exp\big(\mu_{\ln Y} + \beta \Delta X\big)-\exp(\mu_{\ln Y}). \tag{5}\]
If we consider a one-standard-deviation move in \(X\), i.e., \(\Delta X = \sigma_X\), then
\[ \Delta Y = \exp\big(\mu_{\ln Y} + \beta \sigma_X\big)-\exp(\mu_{\ln Y}). \tag{6}\]
A Note on Means of Logs vs. Logs of Means
Note that the sample mean of \(\ln Y\) is NOT equal to the log of the sample mean of \(Y\), unless \(Y\) is constant.
Mathematically, mean of \(\ln Y\) is \(\mathbb{E}[\ln Y]\), while log of the mean of \(Y\) is \(\ln(\mathbb{E}[Y])\). By Jensen’s inequality, since the natural logarithm function \(\ln(\cdot)\) is concave, \[ \mathbb{E}[\ln Y] \le \ln\big(\mathbb{E}[Y]\big), \tag{7}\] with equality only when \(Y\) is constant.
Log-log model
Suppose we have estimated a regression model: \[ \ln Y = \beta \ln X + \cdots + \varepsilon, \tag{8}\] where \(Y\) is the dependent variable, \(X\) is a key independent variable, and \(\varepsilon_{it}\) is the error term.
Derivation
Note that the regression is linear in the logs of \(Y\) and \(X\).
This means that if \(\ln(X)\) increases by one unit, then \(\ln(Y)\) increases by approximately \(\hat\beta\) units.
If \(X\) increases from \(X_0\) to \(X_0 + \Delta X\), then change in \(\ln(X)\) is
\[ \Delta \ln X \equiv \ln(X_0 + \Delta X) - \ln(X_0) = \ln\left(1 + \frac{\Delta X}{X_0}\right). \tag{9}\]
\(\ln Y\) therefore increases by \(\hat\beta \Delta \ln X\) units, which implies that
\[ \Delta \ln Y \equiv \ln(Y_{\text{new}}) - \ln(Y_{\text{old}}) = \ln\left(\frac{Y_{\text{new}}}{Y_{\text{old}}}\right) = \hat{\beta} \Delta \ln X. \tag{10}\]
Therefore,
\[ Y_{\text{new}} = Y_{\text{old}} \exp\left(\hat\beta \Delta \ln X\right). \tag{11}\]
\(\Delta Y\), the additive change in \(Y\), is therefore
\[ \begin{align} \Delta Y &= Y_{\text{new}} - Y_{\text{old}} \\ &= Y_{\text{old}} \exp\left( \hat\beta \, \Delta \ln X \right) - Y_{\text{old}} \\ &= Y_{\text{old}} \left[ \exp\left( \hat\beta \Delta \ln X \right) - 1 \right] \\ &= Y_{\text{old}} \left[ \exp\left( \hat\beta \ln\left(1 + \frac{\Delta X}{X_0}\right)\right) - 1 \right] \\ &= Y_{\text{old}} \left[ \left(1 + \frac{\Delta X}{X_0}\right)^{\hat\beta} - 1 \right]. \end{align} \tag{12}\]
The last step of Equation 12 shows that we need two reference levels, \(Y_{\text{old}}\) and \(X_0\), to interpret the economic significance of \(\hat\beta\) (in terms of additive changes in the outcome variable \(Y\)).
Using the sample mean of \(Y\) and the sample mean of \(X\) as the reference levels, then the representative change in \(Y\) from a change in \(X\) of \(\Delta X\) is
\[ \Delta Y = \mu_{Y} \left[ \left(1 + \frac{\Delta X}{\mu_X}\right)^{\beta} - 1 \right]. \tag{13}\]
If we consider a one-standard-deviation move in \(X\), i.e., \(\Delta X = \sigma_X\), then
\[ \Delta Y = \mu_{Y} \left[ \left(1 + \frac{\sigma_X}{\mu_X}\right)^{\beta} - 1 \right]. \tag{14}\]
Linear model
Too simple. Skipped.