According to this article, calculating elasticity of demand for different models is:
I generate data for 5% reduction in prices with a corresponding 10% increasing in sales: price elasticity = (+10%/-5%)=-2 and get different result coefficient from linear model.
price <- double(length = 10L)
price[1] <- 200
for(i in 2:10)price[i] <- price[i-1]*.95 # price sequence with step = -5% of last value
sales <- numeric(10)
sales[1] <- 1000
for(i in 2:10)sales[i] <- sales[i-1]*1.1 # sales sequence with step = +10% of last value
plot(price,sales,type="b")
+.1/-.05 #price elastic = -2
m <- lm(log(sales)~log(price))
coef(m) #price elastic = -1.858141 it's not equal -2