I want to compare the effect of one variable (i.e. public debt) on a dependent variable (i.e. public investment) across three subgroups:
- Countries where the average debt ratio is below the 34th percentile
- Countries where the average debt ratio is between the 34th percentile and the 67th percentile
- Countries where the average debt ratio is above the 67th percentile
PHP Code:
*******************
** DEBT 3 groups **
*******************
*<=40.3381
*<=61.50
*>61.50
*high
xtabond2 ipub l.ipub l.gov_deb cycle Lgdicap l.ipriv l.pub_expenditure l.y10_bond_yield l.trade f.expectations i.year if country==1| country==2|country==4|country==6|country==9|country==12|country==14|country==16|country==23, gmm(l.ipub l.gov_deb l.ipriv cycle l.pub_expenditure l.y10_bond_yield l.trade, lag(2 8)collapse) iv(Lgdicap f.expectations i.year) nolevel cluster() artest(3)
outreg2 using appendix5.doc, stats(coef se blank) asterisk(coef) dec(3) replace ctitle(high)
*medium
xtabond2 ipub l.ipub l.gov_deb cycle Lgdicap l.ipriv l.pub_expenditure l.y10_bond_yield l.trade f.expectations i.year if country==7| country==10| country==11|country==13|country==20|country==21|country==22|country==25|country==28, gmm(l.ipub l.gov_deb l.ipriv cycle l.pub_expenditure l.y10_bond_yield l.trade, lag(2 7)collapse) iv(Lgdicap i.year f.expectations ) nolevel cluster() artest(3)
outreg2 using appendix5.doc, stats(coef se blank) asterisk(coef) dec(3) append ctitle(medium)
*low
xtabond2 ipub l.ipub l.gov_deb cycle Lgdicap l.ipriv l.pub_expenditure l.y10_bond_yield l.trade f.expectations i.year if country==3|country==5| country==17|country==18|country==19|country==24| country==26|country==27, gmm(l.ipub l.gov_deb l.ipriv cycle l.pub_expenditure l.y10_bond_yield l.trade, lag(4 8)collapse) iv(Lgdicap i.year f.expectations ) nolevel cluster() artest(3)
xtabond2 ipub l.ipub l.gov_deb cycle Lgdicap l.ipriv l.pub_expenditure l.y10_bond_yield l.trade f.expectations i.year if country==3|country==5| country==8|country==17|country==18|country==19|country==24| country==26|country==27, gmm(l.ipub l.gov_deb l.ipriv cycle l.pub_expenditure l.y10_bond_yield l.trade, lag(2 8)collapse) iv(Lgdicap i.year f.expectations ) nolevel cluster() artest(3)
outreg2 using appendix5.doc, stats(coef se blank) asterisk(coef) dec(3) append ctitle(low)
I got feedback that I should try testing this with interactions terms, but I am struggling a bit with (i) how to model this in Stata and (ii) how to interpret the regression results.
Am I correct that I
- should create a one dummy which = 1 if the country is in the low debt group and another dummy which = 1 if the country is in the high debt group;
- insert both dummies + the interaction between each dummy and public debt in my regression?
Thank you for your help,
Willem
0 Response to Subgroup analysis vs. interaction terms
Post a Comment