Building Response Models in R
Kathrin Gruber
Assistant Professor of Econometrics Erasmus University Rotterdam
PRICE
is zero or very large?
Nonlinear model: $\ \ \ \ \ \ \ \ \ \textsf{Sales} \ \ = \ \ \ \ \beta_0 \star \exp(\beta_1 \star \textsf{Price})$
Linearized model: $\ \log (\textsf{Sales}) = \ \log (\beta_0) + (\beta_1 \star \textsf{Price})$
log.model <- lm(log(SALES) ~ PRICE, data = sales.data)
coef(log.model)
(Intercept) PRICE
5.0843983 -0.6622516
plot(log(SALES) ~ PRICE, data = sales.data)
log.model <- lm(log(SALES) ~ PRICE, data = sales.data)
abline(log.model)
Building Response Models in R