I have a question concerning the possibility of using interaction terms in a hybrid model for panel data. Especially, I'm interested in modeling a between-within-interaction effect.
Let's say, I have the following variables:
x - independent variable 1: time-variant
z - independent variable 2: time-variant
y - dependent variable
with id as the identification number of each individual.
The variables could be prepared for the hybrid-model following Schunck (2013):
Code:
mark nonmiss markout nonmiss y x z by id, sort: center x if nonmiss == 1, prefix(d) mean(m) by id, sort: center z if nonmiss == 1, prefix(d) mean(m)
Code:
xtreg y dx dz mx mz, re
y = b0 + b1*dx + b2*dz + b3*mx + b4*mz + b5*dx*mz, so an interaction of the within-effect of x with the between-effect of z. E.g. if x is the age and z is the smoking behaviour and y is the weight of a person, I want to know how the effect of age on weight differs between the levels of smoking.
Following Schunck (2013), it is incorrect to calculate the interaction term using ## and it is necessary to calculate them "by hand" in advance in order to obtain the correct results:
Code:
gen xXz = x*z by id, sort: center xXz if nonmiss == 1, prefix(d) mean(m)
Code:
xtreg y dx dz mx mz dxXz mxXz, re
So my question is now: Since it is incorrect to calculate the dx*mz term using ## and the method of Schunck only calculates one betweeninteraction-effect and one within-interaction-effect, how it is possible to calculate a between-within-interaction-effect in a hybrid model?
Thank you very much for your help.
Literature:
Schunck (2013) Within and between estimates in random-effects models: Advantages and drawbacks of correlated random effetcs and hybrid models. In: The Stata Journal 13(1), 65-76.
0 Response to within-between-Interations in hybrid models for panel data
Post a Comment