Dear STATA colleagues,
I am working with data containing approximately 300 000 individuals, grouped into 100 groups and I would like to ask your help to check two specifications of a mixed-effects model with two levels and to code the appropriate model with random slopes with different decompositions of X’s Betas.
Considering that:
Xij=Explanatory variables (unit: individual)
Wij=Control variables (unit: individual)
Zj=Group Variables (unit: group - GroupID)
We first formulated the following specification with a random-intercept:
Specification 1: Y=B0+B1.X1+B2.X2+B3.X3+B4.W1+B5.W2+B6.W3+B7.W4+B8. Z1+B9.Z2+B10.Z3+error1
Here, we want to decompose the intercept considering different levels explained by group variables, as follows:
B0=a00 + a01.Z1 + a02.Z2 + a03.Z3 + error2
To do that on STATA (knowing that Y; X1; W2; W3; W4; Z2; Z3 are continuous variables and that X2; X3; W1; Z1 are binary Variables) we built the following code:
mixed Y X1 X2 X3 W1 W2 W3 W4 Z1 Z2 Z3|| GroupID: , covariance(unstructured)
Then, as we found that B1, B2 and/or B3 in Specification 1 are statistically significant, we moved to the Specification 2 with random-intercept and random-slopes, as follows:
Specification 2:
Y=B0+B1.X1+B2.X2+B3.X3+B4.W1+B5.W2+B6.W3+B7.W4+B8. Z1+B9.Z2+B10.Z3+error1
Where we want to decompose the intercept but also (by assumption) the slope of X1; X2 and X3 with different specifications as follows:
B0=a00+ a01.Z1+a02.Z2+a03.Z3+error2
B1=a10+ a11.Z1+error3
B2=a20+ a21.Z1+a22.Z2+error4
B3=a30+ a31.Z1+a32.Z2+a33.Z3+error5
With specification 2, we intend not only to control the effect of Group on betas’ slope but also to verify how Group variables (i.e., Z1; Z2 and Z3) influence that slope: mitigating or exacerbating the effect of explanatory variables on the dependent.
In other words, analogous with other models, we want to capture the interactive effect between explanatory and group variables.
I will appreciate it very much if you could help me with the design of the code on STATA addressing our specification 2.
Thank you in advance for all insights we can provide me about.
Related Posts with MULTILEVEL – Mixed Effects Model Specification with Random Intercept and Slopes
xteurostat (SSC) to download Eurostat information not working (?)Dear all, I have worked with xteurostat in the past and I have a nice Do-File which I was hoping to…
Estimating CES function three level (Borjas 2003) Hi, I look for thr means to build my database. Indeed in the context of my memory it will be quest…
asdoc commandHello everybody, I am using this formula "asdoc estimates table est1 est2 est3 est4 est5 est6 est7, …
Reporting outputs for publications from psmatch2 and pstestDear colleagues, I am applying a propensity score matching by using the commands psmatch2 and pstest…
Lincom result when the main var is not sig. but the interaction is sig.Hi members, Got a quick question about linear combination of coefficients (using lincom command). I…
Subscribe to:
Post Comments (Atom)
0 Response to MULTILEVEL – Mixed Effects Model Specification with Random Intercept and Slopes
Post a Comment