Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: problem with tax simulation using nlsurquaids


From   ben jones <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: problem with tax simulation using nlsurquaids
Date   Mon, 5 Mar 2012 14:34:24 +0000 (GMT)

Dear All

I am currently trying to exploit the structural properties of the NLSUR QUAIDS program of Mr. Poi (2008). 

My price elasticity estimates indicate downward sloping demand curves in own prices for all goods. However, when rI eestimate the model to evaluate the effects of a tax increase on a single good, the resulting budget shares and aggregate expenditures actually increase. The problem is not unique to this goods bundle.

I am new to demand side modelling, but believe these elasticity results and the structural results to be nconsistent. I have scoured the code to try and find my mistake but have so far been unsuccessful. I am using the error terms consistently to compare budget shares between the sample data and those predicted post tax increase.

I would be very grateful if any one with more experience in this field were able to spot my mistake

Many thanks,

Ben

Elasticity calculations

forvalues i=1(1)17 {
forvalues j=1(1)17 {
predictnl mu_`i'_`j' = _b[g_`i'_`j'] - ((mu_`i') * (_b[a_`j'] + sum`j'k)) - (_b[l_`i']*_b[b_`j']/bofp)*(lnexp-aofp)^2
}
}
/* apply mui's, muij's to generate elasticities */
forvalues i=1(1)17 {
predictnl e_`i' = mu_`i'/w`i' + 1
}
forvalues i=1(1)17 {
forvalues j=1(1)17 {
glo delta = cond(`i'==`j',1,0)
predictnl e_`i'_`j'u = mu_`i'_`j'/w`i' - ${delta}
}
}
forvalues i=1(1)17 {
forvalues j=1(1)17 {
predictnl e_`i'_`j'c = e_`i'_`j'u +  e_`i'*w`j'
}
}

/* Estimate effects of tax change using structural parameters */

use "H:\do files\data_2008_uncorrupted.dta"

estimates use quaids2

/* price indices */

gen sumalph = 0
forv i=1 (1) 17 {
replace sumalph = sumalph  + _b[a_`i']*lnp`i'
}
gen sumgamm = 0
forv i=1(1)17 {
forv j=1(1)17 {
replace sumgamm = sumgamm + 0.5*_b[g_`i'_`j']*lnp`i'*lnp`j'
}
}
gen aofp = sumalph + sumgamm
gen bofp = 0
forv i=1(1)17 {
replace bofp = bofp + _b[b_`i']*lnp`i'
}
replace bofp = exp(bofp)
gen lofp = 0
forv i=1 (1) 17 {
replace lofp = lofp  + _b[l_`i']*lnp`i'
}

/* baseline tax rates 2008 */
forv i=1/17 {
gen t`i' = 0.175
}
replace t1 = 0
replace t12 = 0
replace t14 = 0
replace t17 = 0
/* reduced rate */
replace t6 = .05
replace t7 = .05
replace t8 = .05
replace t9 = .05
/* VAT + excise */
replace t3 = 0.32
replace t4 = 0.64
replace t5 = 0.804
replace t13 = 0.68

/* predict pre reform budget shares for 2008 households */

forv i=1/17 {
gen w`i'hata_0 = _b[a_`i'] + _b[b_`i']*(lnexp-aofp) 
}
forv i = 1/17 {
gen w`i'hatb_0 = _b[g_`i'_1]*lnp1
}
forv i = 1/17 {
forv j = 2/17 {
replace w`i'hatb_0 = w`i'hatb_0 + _b[g_`i'_`j']*lnp`j'
}
}
forv i=1/17 {
gen w`i'hatc_0 = _b[l_`i']/bofp*(lnexp-aofp)^2
}
forv i=1/17 {
gen w`i'hat_0=  w`i'hata_0 + w`i'hatb_0 + w`i'hatc_0
}
forv i=1/17 {
drop w`i'hata_0
drop w`i'hatb_0
drop w`i'hatc_0
}

forv i=1/17 {
gen w`i'_err = w`i' - w`i'hat_0
}

/* estimate effects of a tax rise on good 6 */

/* create new price indices */

forv `i' = 1/17 {
gen t`i'_1 = t`i'
}
replace t6_1 = .323
forv i=1/17 {
gen p`i'_1 = p`i'*(1+t`i'_1/1+t`i')
}
forv i=1/17 {
gen lnp`i'_1 = log(p`i'_1)
}
gen sumalph_1 = _b[a_1]*lnp1_1
forv i=2 (1) 17 {
replace sumalph_1 = sumalph_1  + _b[a_`i']*lnp`i'_1
}
gen sumgamm_1 = 0
forv i=1(1)17 {
forv j=1(1)17 {
replace sumgamm_1 = sumgamm_1 + 0.5*_b[g_`i'_`j']*lnp`i'_1*lnp`j'_1
}
}
gen aofp_1 = sumalph_1 + sumgamm_1
gen bofp_1 = _b[b_1]*lnp1_1
forv i=2(1)17 {
replace bofp_1 = bofp_1 + _b[b_`i']*lnp`i'_1
}
replace bofp_1 = exp(bofp_1)
gen lofp_1 = _b[l_1]*lnp1_1
forv i=2 (1) 17 {
replace lofp_1 = lofp_1  + _b[l_`i']*lnp`i'_1  
}  
/* predict post reform budget shares for 2008 households */

forv i=1/17 {
gen w`i'hata_1 = _b[a_`i'] + _b[b_`i']*(lnexp-aofp_1) 
}
forv i = 1/17 {
gen w`i'hatb_1 = _b[g_`i'_1]*lnp1_1
}
forv i = 1/17 {
forv j = 2/17 {
replace w`i'hatb_1 = w`i'hatb_1 + _b[g_`i'_`j']*lnp`j'_1
}
}
forv i=1/17 {
gen w`i'hatc_1 = _b[l_`i']/bofp_1*(lnexp-aofp_1)^2
}
forv i=1/17 {
gen w`i'hat_1=  w`i'hata_1 + w`i'hatb_1 + w`i'hatc_1
}
forv i=1/17 {
drop w`i'hata_1
drop w`i'hatb_1
drop w`i'hatc_1
}
forv i=1/17 {
gen w`i'hat_err_1 =  w`i'hat_1 + w`i'_err
}                   

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index