

Multilevel sem, modification, and cat... 

Message/Author 

phdstudent posted on Tuesday, February 03, 2009  11:17 am



I'm looking at relationship between a latent predictor var ( w/ 2 binary indicator vars, x1 x2) and an observed y var (binary). I want to examine whether the latent predictor at clus level modifies relationship at indiv level. For each clus, I calc mean values for the 2 indicators of the latent predictor var (representing % indiv in clus for whom x1=1, eg). These vars, cx1 cx2 are considered continuous. (1) Is my code correct? (2) This model takes too long to estimate. Is there a way to shorten time? When I got output I received this message. What does it mean? "THE ESTIMATED BETWEEN COVARIANCE MATRIX COULD NOT BE INVERTED. COMPUTATION COULD NOT BE COMPLETED IN ITERATION 81. CHANGE YOUR MODEL AND/OR STARTING VALUES.THE MODEL ESTIMATION DID NOT TERMINATE NORMALLY DUE TO AN ERROR IN THE COMPUTATION. CHANGE YOUR MODEL AND/OR STARTING VALUES." (3) how do I add my indivlevel categ covars to this model? VARIABLE: NAMES ARE clus y x1 x2 cx1 cx2; CATEGORICAL = y x1 x2; BETWEEN = cx1 cx2; CLUSTER = clus; MISSING ARE ALL (9999) ; ANALYSIS: TYPE = TWOLEVEL RANDOM; ALGORITHM = INTEGRATION; INTEGRATION = 7; MODEL: %WITHIN% fw by x1 x2; s  y ON fw; %BETWEEN% fb BY x1 x2; x1@0 x2@0; w by cx1 cx2; y s ON fb w; OUTPUT: TECH1 TECH8; 


You have not declared x1, x2 as Within= variables which implies that they have Between variation, that is random intercepts. So when you say on Between fb by x1 x2; you are talking about a factor for these 2 random intercepts. So your factor w is approx the same as fb  you only need one of them. Delete your w by... statement. So fb moderates the influence of fw on y. 


Hi: I am going to design a study which will be a twolevel SEM. My question is how many cluster do I need and what should be the size of each cluster. I have two latent variable indogenous variables (one with two indicator another with 3 indicators), 5 exgoneous (continuous)variables. Could you please guide me how to perform a montecarlo analysis to have an idea to determine the number of clusters and the cluster size. I have 16 clusters in total. Thanks 


You should look at mcex9.6.inp which is a multilevel CFA. Usually a minimum of 3050 clusters is recommended with multilevel modeling. See papers by Joop Hox for further information. 

Back to top 

