Hello,
I am writing to ask for help with a plausible mixed model specification for a cross-classified data structure. The data structure is as follows:
So far, I have run a two-way error components model, as such:
I would like to find a way to include engtype and subject in the random portion of the model, if possible. That led me to a different specification for the random part of the model with the level 3 wave model including R.engtype:
AIC and BIC both favor this model by a wide margin. However, I'm not exactly sure what this model specifies and what it buys me over the previous model.
Also, I still haven't figured out how to get subject in the random part of the model.
Any help would be greatly appreciated.
I am writing to ask for help with a plausible mixed model specification for a cross-classified data structure. The data structure is as follows:
- Each individual was surveyed four times (call them waves)
- At each wave, they reported on four different aspects of their Engagement in school (call this engtype)
- At each wave, they reported on their engagement in two different academic subjects
So far, I have run a two-way error components model, as such:
Code:
. mixed Engagement || _all: R.wave || id: , var Mixed-effects ML regression Number of obs = 44,278 ------------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+-------------------------------------------- _all | 1 44,278 44,278.0 44,278 id | 2,393 1 18.5 32 ------------------------------------------------------------- Wald chi2(0) = . Log likelihood = -44880.619 Prob > chi2 = . ------------------------------------------------------------------------------ Engagement | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _cons | 3.258472 .1456379 22.37 0.000 2.973027 3.543917 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ _all: Identity | var(R.wave) | .0846874 .0599358 .0211543 .3390308 -----------------------------+------------------------------------------------ id: Identity | var(_cons) | .061308 .0025416 .0565236 .0664973 -----------------------------+------------------------------------------------ var(Residual) | .4149092 .0028671 .4093276 .4205669 ------------------------------------------------------------------------------ LR test vs. linear model: chi2(2) = 9255.05 Prob > chi2 = 0.0000
Code:
. mixed Engagement || wave: R.engtype || id: , var Mixed-effects ML regression Number of obs = 44,278 ------------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+-------------------------------------------- wave | 4 5,539 11,069.5 14,356 id | 6,725 1 6.6 8 ------------------------------------------------------------- Wald chi2(0) = . Log likelihood = -43293.596 Prob > chi2 = . ------------------------------------------------------------------------------ Engagement | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _cons | 3.266367 .0748391 43.65 0.000 3.119685 3.413049 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ wave: Identity | var(R.engtype) | .089105 .0317192 .0443502 .1790229 -----------------------------+------------------------------------------------ id: Identity | var(_cons) | .1340975 .0032878 .1278059 .1406989 -----------------------------+------------------------------------------------ var(Residual) | .3413223 .0024899 .336477 .3462374 ------------------------------------------------------------------------------ LR test vs. linear model: chi2(2) = 12429.09 Prob > chi2 = 0.0000
Also, I still haven't figured out how to get subject in the random part of the model.
Any help would be greatly appreciated.
Comment