In a paper I am working on, I am using a "between-within" hybrid panel model to estimate the effect of an (almost) time-invariant variable (transparency; pctscore below) on state welfare expenditures (welfpc below) (T = 22 years; N = 48 states; balanced panel). Notably, the between-variance in budget transparency is significantly higher than the within-variance. I hypothesize that the effect of transparency on social welfare expenditures is conditioned by both (a) the level of media-market penetration and (b) differences in voter turnout between wealthy and poor citizens. After some consideration, I have decided to use the "between-within" hybrid panel model given its several advantages (concomitant estimation of both RE/FE; allowance for slowly-evolving, almost time-invariant independent variables; ability to include dynamics) over simple fixed/random effects static models (xtreg), dynamic estimators (Arellano-Bond; xtabond2), and variations of FE (fixed-effects vector decomposition; xtfevd) which all seem to encounter greater weaknesses than the hybrid class of models for my particular data-set.
However, it is unclear to me how to best model interaction terms + associated marginal effects within the context of a between-within model. Building off of Bartels (2008), this was my initial attempt:
However, Schunck (2013) argues, "There are pitfalls to the application of these [hybrid/correlated random effects] models when including interactions...Because the correlated random-effects model does not include deviations from the cluster means but does include the variables in their uncentered form, it is possible to include the interaction of these variables with the operator #. However, to obtain the correct within effect of the interaction, we still have to include the respective interaction of the cluster means. This, again, cannot be done with the # operator." Schunck advises manually creating cluster-level means/deviations, but this method is somewhat cumbersome and does not allow one to take advantage of the margins command. See below my first attempt at Schunck's method:
As I am relatively new to panel data methods, I suspect I am missing something - doesn't the clustergen command take care of the demeaning process of the within-variables - i.e. when I interact x_wi*z_wi, does this not explicitly account for within-deviations from the cluster (state) means? Which specification is more appropriate? Any thoughts, comments, or criticisms would be much appreciated!
*Cross-Posted at: http://stackoverflow.com/questions/4...models-w-stata
However, it is unclear to me how to best model interaction terms + associated marginal effects within the context of a between-within model. Building off of Bartels (2008), this was my initial attempt:
Code:
clustergen welfpc pctscore media_pen cbias gsp_ad new_black govparty_c leg_cont citi nominate divided_gov *Non-Interactive Model xtreg welfpc pctscore_wi media_pen_wi cbias_wi new_black_wi govparty_c_wi leg_cont_wi citi_wi nominate_wi divided_gov_wi pctscore_bw media_pen_bw cbias_bw new_black_bw govparty_c_bw leg_cont_bw citi_bw nominate_bw divided_gov_bw i.year , i(state_id) mle *Interactive Model (Transparency x Class Bias) xtreg welfpc c.pctscore_wi##c.cbias_wi media_pen_wi new_black_wi govparty_c_wi leg_cont_wi citi_wi nominate_wi divided_gov_wi c.pctscore_bw##c.cbias_bw media_pen_bw new_black_bw govparty_c_bw leg_cont_bw citi_bw nominate_bw divided_gov_bw i.year , i(state_id) mle margins, dydx(pctscore_wi) at(cbias_wi=(0(.1).7)) vsquish marginsplot, yline(0) margins, dydx(pctscore_bw) at(cbias_bw=(0(.1).7)) vsquish marginsplot, yline(0)
Code:
egen mpctscore = mean(pctscore), by(state_id) generate dpctscore = pctscore-mpctscore egen mmedia = mean(media_pen), by(state_id) generate dmedia = media_pen-mmedia egen mcbias = mean(cbias), by(state_id) generate dcbias = cbias-mcbias egen mgsp = mean(gsp_ad), by(state_id) generate dgsp = gsp_ad-mgsp egen mblack = mean(new_black), by(state_id) generate dblack = new_black-mblack egen mgov = mean(govparty_c), by(state_id) generate dgov = govparty_c-mgov egen mcont = mean(leg_cont), by(state_id) generate dcont = leg_cont-mcont egen mciti = mean(citi), by(state_id) generate dciti = citi-mciti egen mnom = mean(nominate), by(state_id) generate dnom = nominate - mnom egen mdiv = mean(divided_gov), by(state_id) generate ddiv = divided_gov-mdiv generate tranXbias = pctscore*cbias egen mtranbias = mean(tranXbias), by(state_id) generate dtranbias = tranXbias - mtranbias xi: xtreg welfpc c.pctscore##c.cbias media_pen gsp_ad new_black govparty_c leg_cont citi nominate divided_gov mtranbias mgsp mblack mgov mcont mciti mnom mdiv mint i.year, i(state_id) re
*Cross-Posted at: http://stackoverflow.com/questions/4...models-w-stata