Significant groups
Message/Author
 Andy Luse posted on Tuesday, March 29, 2011 - 1:56 pm
I have got a SEM with multiple latent variables predicting an observed variable. I am running a multilevel analysis with students at the within level and school at the between level. I have set the SAVEDATA to save factor scores and have both the beta value for the DV and the SE of the beta for the DV for each school. To see whether a school is significantly different, I assume I would take the (beta - grandmean)/se(beta). Is this correct?
 Bengt O. Muthen posted on Tuesday, March 29, 2011 - 6:05 pm
You get the factor score for the random intercept/mean of the DV (so not the beta value) for each school and its SE. But if you want to see if a school is significantly different from the average school, I think you want the estimated between-level residual for the school and its SE, testing against it being zero. You don't get that residual directly but you can get it by defining the residual as a factor and then get the factor score. Hope I am understanding you correctly.
 Andy Luse posted on Saturday, October 08, 2011 - 2:07 pm
Still working on this and have run into problems, so I wanted to make sure I was doing this correctly. I am going back to the basics and just doing a ML regression model of x on y (see code below). How would I define the residual as a factor?

TITLE:
MLM example;

DATA:
FILE IS lect_exp.dat;

VARIABLE:
NAMES ARE id y x grp;

USEVARIABLES = y x;
CLUSTER = grp;

ANALYSIS:
TYPE = TWOLEVEL;
ESTIMATOR = ML;
ALGORITHM = EM;

MODEL:
%WITHIN%
y ON x;

!OUTPUT:

SAVEDATA:
FILE = mlsem_output.txt;
SAVE = FS;
 Linda K. Muthen posted on Sunday, October 09, 2011 - 9:30 am
Use the following MODEL command:

MODEL:
%WITHIN%
y ON x;
%BETWEEEN%
y;

You will get a factor score for the random intercept y on between.
 Andy Luse posted on Saturday, October 15, 2011 - 10:58 am
Ok, I ran this. I then use the formula B_Y (FS for Y) minus the overall mean for B_Y (from the Mplus output) divided by the B_Y_SE to try to get a t-value for the significance of each group from the overall mean, but I am not getting (not really even close) the same values as if I run the same model with the same data in SAS specifying I want the solution for random intercepts. Here is my Mplus and SAS syntax...

TITLE:
MLM example;

DATA:
FILE IS lect_exp.dat;

VARIABLE:
NAMES ARE id y x grp;

USEVARIABLES = y x;
CLUSTER = grp;

ANALYSIS:
TYPE = TWOLEVEL;
ESTIMATOR = ML;
ALGORITHM = EM;

MODEL:
%WITHIN%
y ON x;

%BETWEEN%
y;

!OUTPUT:

SAVEDATA:
FILE = mlsem_output.txt;
SAVE = FS;

proc mixed data=mlmexp method=ml info ic covtest asycov mmeq mmeqsol;
class grp;
model y = x /solution ddfm=contain residual outpred=e1;
random intercept /solution subject=grp type=un;
repeated / type=un;
run;
 Bengt O. Muthen posted on Saturday, October 15, 2011 - 6:16 pm
I think when you subtract the between mean for y, the SE is no longer correct because the estimated mean is a stochastic vble. How about instead saying on Between

f by y;
y@0;
[f@0];

Then the factor score for f would correspond to a variable with mean zero - your residual - because the mean is picked up in the y intercept mu: y = mu+f.

If that doesn't help, please send the Mplus and SAS outputs to Support.