1
$\begingroup$

I have a question regarding the scale invariance property of log-log-regression models.

Consider the following model: $$\log (y) = {\beta _0} + {\beta _1}\log (x) + \varepsilon $$

As we know, $\beta_1$ is the elasticity. Furthermore, I've read a couple of times, that the log-log specification is scale invariant, i.e. $\beta_1$ is not affected by the scale of $x$ or $y$.

However, in a simple simulation experiment with the model

$$\log (a+y) = {\beta _0} + {\beta _1}\log (x) + \varepsilon $$

with $a = 1,...,200$ the following graph was produced: Regression coefficient beta_1 for a = 1,...,200

Obviously, $\beta_1$ gets smaller the bigger $a$ gets. This means, that the elasticity decreases, due to adding a constant to the dependent before taking the log.

Question: How does this behaviour correspond to the scale-invariance property of the log-log model?

Thank you in advance for your comments and thoughts. I've also included the code of the simulation below.

# Seed
set.seed(123)

# Simulate data
x <- rnorm(100, mean = 10, sd = 1)
y <- 200 - 10 * x + rnorm(100, sd = 15)

# Apply log
log_x <- log(x)
log_y <- log(y)

# Fit OLS model without offset
mod <- lm(log_y ~ log_x)
summary(mod)
beta <- coef(mod)[2]

# Simulation:
# Add a constant to the dependent, prior to log
max_constant <- 200
for (i in 1:max_constant){
  # Add constant to y and take log
  log_y <- log(i + y)
  # Fit model
  mod <- lm(log_y ~ log_x)
  # Store coef
  beta <- c(beta, coef(mod)[2])
}

# Plots
plot(0:max_constant, beta, xlab = "a", ylab = "Coefficient")
$\endgroup$
2
  • $\begingroup$ Can you clarify exactly what you understand by changing the scale of $y$? $\endgroup$
    – mdewey
    Jul 9, 2016 at 16:03
  • $\begingroup$ Sure, I mean a level shift in $y$. $\endgroup$
    – STATWORX
    Jul 9, 2016 at 17:11

1 Answer 1

4
$\begingroup$

The problem is that you are generating the error term before you add a constant to $y$ and take its log. That does not correspond to the model you wrote above, and therefore there are issues that go beyond heteroscedasticity. That's an issue because the log is not a linear operator, so log(y)+error is not the same as log(y+error).

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.