Reputation: 2508
I am trying to estimate tax elasticity with OLS. Below you can see example of my dataset.
dataset<-data.frame(
gross_income_new=c(5000,4000,3000,2000,1500,200,1000,200,1500),
gross_income_old=c(4500,3900,2100,1500,1450,210,980,100,1200),
tax_burden=c(10,10,9,8,7,10,10,8,8),
tax_burden1=c(17,11,12,14,15,14,12,17,15),
gross_income_index=c(90,97.5,70,75,97,105,98,50,80),
tax_burden_Index=c(170,110,133,175,214,140,120,213,188))
Elasticity = lm(log(gross_income_index)~log(tax_burden_Index), data = dataset)
summary(Elasticity)
And this is results from regression.
Call:
lm(formula = log(gross_income_index) ~ log(tax_burden_Index),
data = dataset)
Residuals:
Min 1Q Median 3Q Max
-0.36995 -0.05404 0.04150 0.11507 0.29487
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 6.7252 1.6104 4.176 0.00416 **
log(tax_burden_Index) -0.4557 0.3176 -1.435 0.19447
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.2197 on 7 degrees of freedom
Multiple R-squared: 0.2273, Adjusted R-squared: 0.1169
F-statistic: 2.059 on 1 and 7 DF, p-value: 0.1945
So for this example first I converted data into indexes, convert in logs an after that I estimate elasticity which is -0.4557 %.
Now I want to make prediction into sample for column gross_income_new in order to see how my model works. Here I want to emphasize that I want to try this only with coefficient of elasticity (not with regression equation). In order to do that I try with this equation but I am little bit confused because I worked in indices and now I need to estimate values in different normal values not indexes. So I try with formula
Prediction=(gross_income_old) + (tax_burden-tax_burden1)*elasticity
But obviously I made same mistakes and result are not good. So can anybody help me how to solve this problem ?
Upvotes: 0
Views: 106
Reputation: 21937
Using the formula you suggested, this is what I get:
library(dplyr)
dataset <- dataset %>%
mutate(Prediction = gross_income_old + (tax_burden - tax_burden1)*coef(Elasticity)[2])
dataset
# gross_income_new gross_income_old tax_burden tax_burden1 gross_income_index tax_burden_Index Prediction
# 1 5000 4500 10 17 90.0 170 4503.1901
# 2 4000 3900 10 11 97.5 110 3900.4557
# 3 3000 2100 9 12 70.0 133 2101.3672
# 4 2000 1500 8 14 75.0 175 1502.7344
# 5 1500 1450 7 15 97.0 214 1453.6458
# 6 200 210 10 14 105.0 140 211.8229
# 7 1000 980 10 12 98.0 120 980.9115
# 8 200 100 8 17 50.0 213 104.1015
# 9 1500 1200 8 15 80.0 188 1203.1901
Upvotes: 0