Message/Author 

Nidhi Kohli posted on Monday, October 24, 2011  1:01 pm



Hello, I have a 3level nested dataset where level1 is time (Year), level2 is patient, and level3 is physician. I am interested in comparing thresholds and factor loadings across two groups with respect to the dependent variable. Is it possible to do MultiLevel MultiGroup Path Analysis in Mplus? Thank You. 


Yes, you should be able to do this. 

Nidhi Kohli posted on Monday, October 24, 2011  3:56 pm



Thanks. I tried to run the following code, but I got the error message saying, "Grouping label has no corresponding value: PRACTICE". The grouping label has two values: FAMILY PRACTICE, and GENERAL INTERNAL MEDICINE. I am not sure why I am getting this error? DATA: FILE IS ...; DATA LONGTOWIDE: LONG = BP; WIDE = BP1BP5; IDVARIABLE = Patient_Key; REPITITION = Year; VARIABLE: NAMES = Patient_Key Year Provider_Key Phy_Prim_BA Female AsianPI Black NHW Latino Othrace Age DM BP; USEVAR = Patient_Key Year Provider_Key Phy_Prim_BA Female AsianPI Black NHW Latino Age DM BP1BP5; GROUPING = Phy_Prim_BA (1 = FAMILY PRACTICE 2 = GENERAL INTERNAL MEDICINE); CATEGORICAL = BP1BP5; WITHIN = Female AsianPI Black NHW Latino Age DM; CLUSTER = Provider_Key; ANALYSIS: TYPE=TWOLEVEL; MODEL: %WITHIN% iw sw  BP1@0 BP2@1 BP3@2 BP4@3 BP5@4; iw sw ON Female AsianPI Black NHW Latino Age DM; %BETWEEN% ib sb  BP1@0 BP2@1 BP3@2 BP4@3 BP5@4; 


Please send the full output and your license number to support@statmodel.com. 

Nidhi Kohli posted on Thursday, November 10, 2011  9:00 am



I am trying to run three versions of MultiLevel MultiGroup Model. Model 1A is the unrestrictive model where I am estimating all the model parameters. Model 1B is the same as Model 1A, except that the betweenlevel slope factor variance and covariance is fixed to zero. Model 1C adds one additional restriction by fixing the residual variance to zero. All three models ran successfully. However, I noticed that as I add constraints to the model, df should goes *up* rather than going down, that is: 1A: df = 16 1B: df = 14 1C: df = 9 The chisquare difference between the first two models, IA and IB is: 2lnL0 + 2lnL1 ...where "0" refers to the more constrained model. For models 1A and 1B, 2lnL0 + 2lnL1 = 2(12141.821) + 2(12160.558) = 37.474 which is negative even without a scaling correction, so something is wrong somewhere. Can you tell me what is going on? I am not able to figure out the problem. Thanks. 


You don't give enough information to answer the question. Please send the three outputs and your license number to support@statmodel.com. 

Nidhi Kohli posted on Thursday, November 10, 2011  12:18 pm



My apologies for not giving more information. I am trying to fit three different versions (basically, minor differences in constraints) of a MultiGroup MultiLevel Growth Model on 3level nested dataset where level1 is time (Year), level2 is patient, and level3 is physician. I am interested in comparing thresholds and factor loadings across two groups with respect to the dependent variable. The loglikelihood keeps going up as I add constraints to the model when in fact the opposite should happen. I want to understand why this is happening? Thanks. 

Nidhi Kohli posted on Thursday, December 22, 2011  2:57 pm



Hello, I am trying to fit a multilevel growth mixture model with known classes. The best loglikelihood for the model replicated 4 times so it seems that the model is converging well. However, I am getting the following error message: THE STANDARD ERRORS OF THE MODEL PARAMETER ESTIMATES MAY NOT BE TRUSTWORTHY FOR SOME PARAMETERS DUE TO A NONPOSITIVE DEFINITE FIRSTORDER DERIVATIVE PRODUCT MATRIX. THIS MAY BE DUE TO THE STARTING VALUES BUT MAY ALSO BE AN INDICATION OF MODEL NONIDENTIFICATION. THE CONDITION NUMBER IS 0.419D21. PROBLEM INVOLVING PARAMETER 23. ONE OR MORE PARAMETERS WERE FIXED TO AVOID SINGULARITY OF THE INFORMATION MATRIX. THE SINGULARITY IS MOST LIKELY BECAUSE THE MODEL IS NOT IDENTIFIED, OR BECAUSE OF EMPTY CELLS IN THE JOINT DISTRIBUTION OF THE CATEGORICAL VARIABLES IN THE MODEL. THE FOLLOWING PARAMETERS WERE FIXED: 24 Can you please tell me what these error messages mean and what can I do to fix these errors? Thanks. 


Please send the output and your license number to support@statmodel.com. 


Hi, I want to run a multilevel multigroup analysis where the grouping variable is at the within level  is this possible? For example, could I compare a sample of boys and a sample of girls where they are clustered within schools? Thanks, Matt 


The grouping variable should be a betweenlevel variable. Using a withinlevel grouping variable violates the assumption that the groups contain independent observations. 

Genta posted on Sunday, March 03, 2013  3:41 pm



Hello, I am running a multilevel multigroup analyses with known groups (observations nested within individuals). My main question involves group differences in the withinlevel part. However, I am also in testing group differences in the betweenlevel too. The model runs fine when the dependent variables are continuous (using grouping option). However, when I add a dependent variable that is binary, I am asked to use knownclass and mixture modeling. I managed to fit the model at the withinperson and get groupspecific estimates. However, it doesn't see possible to get group specific estimates at the betweenlevel. The output produces estimates that are identical for both groups. I tried specifying 2 "latent" classes at the betweenlevel. But, while the withinlevel solution is similar to the solution of the model with one betweenlevel group and while I also get groupspecific estimates at the betweenlevel, the model takes a long time to converge and there seems to be more patterns than I expect. It would be immensely helpful to learn how to run a multigroup model with binary and continuous outcomes. IS there any example I could follow? I read Henry & Muthen paper, but still couldn't figure out how to get a proper solution. Many thanks in advance for your reply! 


Take a look at Asparouhov & Muthen (2012). Multiple group multilevel analysis. Web note 16. which you find through our home page (see Latest News). If that doesn't help, send to Support. 

Fritz posted on Wednesday, March 20, 2013  8:59 am



Dear all, I'm working on the question if instructors' feedback has differential effects on male and female trainees' performance at T2 controlling for performance at T1 and IQ. Since every instructor has male and female trainees, I have a group variable at level 1, which cannot be tested too easy as I understood. I tried the following workaround: within = IQ t1perf; between = feedb; cluster is instr; classes = c(2); knownclass = c(sex=0 sex=1); model: %within% %overall% t2perf on IQ t1perf; %between% %overall% t2perf on feedb; %between% %c#1% t2perf on feedb; %c#2% t2perf on feedb; This model works and the results seem to corroborate my hypotheses. However, I've just seen the new web note 16 and the models presented there look quite different. Thus, I was wondering if my model is appropriate or just wrong? Any advice is appreciated. Thanks in advance! 

Fritz posted on Wednesday, March 20, 2013  9:05 am



Just to clarify: Feedback is an overall feedback for the whole group of trainees and as such it is a indeed a between variable. Sorry! 


For multiple group analysis when the grouping variable is not a between variable, you need to use the approach given in Web Note 16. 

Fritz posted on Thursday, March 21, 2013  1:53 am



Dear Linda, thank you. Actually, I find the Web note quite hard to understand since I'm not a statistician. And  as far as I've seen it, there is no example including predictors at the between level. So, maybe you can give me a hint, which of the many models presented in the Web note is a good starting point. And two additional questions: Is there any applied example (like a full paper) for the models presented in the Web note? And would it be possible to explain, what exactly was wrong about my approach? Thanks again! 


The key issues are discussed in Section 3, see particularly page 9 and the corresponding Appendix E. Equations (13) and (14) are e1, e2 of Appendix E. See also the application in Section 4.1. More to follow. 

Fritz posted on Friday, March 22, 2013  9:58 am



Well thanks again! I will read these sections carefully and hope to get an idea of what to do. Looking forward to the followup. 


The reason you can't use a withinlevel variable are a grouping variable is because the groups are not independent. They consist of members of the same cluster, for example, males and females from the same cluster are in different groups. 

Fritz posted on Friday, March 22, 2013  11:59 am



Thanks again! I know that this was not possible with the "grouping" command. That is why I tried a workaround treating males and females as classes as presented in my syntax. As I wrote, the presented model worked fine and thus, I was (and still am) wondering what was wrong about the idea of using the "knownclass" option. Anyway, I'm going to read the Web note in more detail and hope to comprehend what is presented there and to adapt it to my research. 


In addition to using the mixture knownclass feature, you need to include the ksi_jg of equation (13) in your model to properly account for correlation among subjects within a class/group that can be different across classes/groups. Here, the subscript "j" refers to cluster j. 

Fritz posted on Thursday, April 04, 2013  9:38 am



Dear Bengt and Linda, thanks for your patience and the great support the Mplus team provides. I read the Web Note again and learned from the text and your comments that I have to account for the dependency between members from different groups in one cluster. However, I'm afraid that I'm still not sure how to implement this in my syntax. I tried the following: %within% %overall% t2perf on IQ t1perf; [c#1*0]; %between% %overall% e1 by t2perf@0; e2 by t2perf@0; t2perf@0; [e1@0 e2@0]; e1 with e2; t2perf on feedb; %between% %c#1% t2perf on feedb; e1 by t2perf@1; %c#2% t2perf on feedb; e2 by t2perf@1; Is this syntax correct? The model works and the results still look fine, but the correlation of e1 and e2 is approximately 0 and nonsignificant. Is this a problem? How do I interpret this correlation? Thanks again so much! 


The zero correlation is not a problem. This is in factor Model H3 discussed at the bottom of page 10 and on page 11 in Web Note 16. Just report it, saying that the contributions from the clusters are uncorrelated for the two groups. See discussion on page 11. This shows that we need not have worried. 

Fritz posted on Friday, April 05, 2013  2:53 am



Well, thanks again! 

Fritz posted on Wednesday, April 10, 2013  1:30 am



I have one final question: The results in my model provide a significant relation for 't2perf on feedb;' for males but not for females. Should I test if these parameters differ? And if so, would the Wald test as provided in the 'model test' option be appropriate? I Understood that something is difficult about the loglikelihoods from your Web Note. Thanks again! 


Yes, I would test that equality since you are interested in group differences. Use MODEL TEST. 


Dear Linda, dear Bengt, I'm interessted in testing a pathmodel. My data consits of employees nested within supervisors. However, my model is on the WITHINLevel only (no BETWEENLevelPredictors included). I was hoping to simply adjust the standard errors using "TYPE=Complex", however my groupingvariable is on the WITHINLevel, too. When reading about it, I found out that this might be an issue. I guess I can't simply use "Type=COMPLEX" in combination with the SUBPOPULATION command but need to apply your approach outlined in webnote 16? Thank you for your help! 


Yes, Web Note 16 is the way to go. 

Sanne Smith posted on Thursday, October 31, 2013  2:11 am



Dear Linda, Bengt and/or Tihomir, With the help of web note 16 I can model a multiple group multilevel analysis where the grouping variable is on the withinlevel and where y is an observed variable. I have some trouble, however, to replicate this when the dependent variable is a latent variable and I did not find an example in the webnote. Should I just make my latent variable an observed variable or is there another way? Best wishes, Sanne 


It should work the same with a latent variable. Send the files you have created and your license number to support@statmodel.com. 

Anonymous posted on Wednesday, December 04, 2013  7:33 pm



Dear Linda, dear Bengt, I unterstand that for running a multilevel multigroup analysis I should use the models from webnote 16. For models with a withinlevel groupvariable: Is it basically possible to model random slopes predicted by betweenlevel variables? I want (1) to model random slopes that are allowed to vary between the groups and (2) the impact of the level2 predictor on the random slopes should be allowed to vary between the groups. Is that possible? Thanks! 


It is possible. Your starting point would be Appendix E, model H1. Try this first with random intercept. 

Anonymous posted on Thursday, December 05, 2013  3:17 pm



Thank you, Tihomir! Just to understand appendix E correctly: (1) Why did you set the starting values? (2) How do I know the exact value to set my starting values? (3) And why did you put several parameters in brackets, what does this exactly mean? Didn't brackets mean that the parameters would be estimated with the default starting values? So why use brackes + set the starting values by myself? I am a novice in MLM and I still do not fully understand the logic of this. And just to make sure I got it right: I have to define an overallmodel that applies to the whole data set. Additionally I have to define the models for my subgroups (like %c#1% and %c#2%) for the part of the overallmodel in which the specific subgroup differs from the overallmodel. So, if I assume that the two subgroups vary in several parameters from each other + from the whole data set, I have to define groupspecific models for both of them. (4) When would I only define a groupspecific model for one of my subgroups? Does this mean this subgroup varies from the other + from the overallmodel, but the model for second subgroup is identical with the overallmodel? Thank you very much for your help! 


(12) you don't need starting values. (3) [] parameters are mean parameters, for example %C#1% [y*1]; is the mean of y in class 1. Also H1 is the most advanced model. Consider all the models H1H7  some of these are simpler to understand. In fact support for H1 requires good amount of data. You have to also understand the difference between  subgroups vary in several parameters v.s. the more advanced concept of  subgroups vary in random effects (not just the parameters) (4) Mplus has certain defaults about how the overall impacts the group specific parameters. If you are unsure about what those defaults are it is best to specify the entire model for each class and specify all the parameters and if you want them to be different or equal across the groups. If you are unsure what to put as your overall model, just copy the model from class 1 in the overall section. Also familiarize yourself with OUTPUT:TECH1; option which gives complete details on which parameters are estimated etc and if the aye equal across group or not. 

Anonymous posted on Monday, December 09, 2013  4:00 pm



Thank you very much, Tihomir! One further question: When I run a model similar to your H1model but with fixed slopes, using the KNOWNCLASSoption (I have 2 groups with CVARIABLE = 0, 1): Why does Mplus give me this in the output: __________ Within Level Means CVARIABLE#1 0.162 0.019 8.403 0.000 __________ Doesn't this suggest that the latent class variable is estimated (by default?), although I sepcified a KNOWNCLASS variable? Thanks again for your help! 

Anonymous posted on Monday, December 09, 2013  4:02 pm



Sorry, the output is: __________ Categorical Latent Variables Within Level Means CVARIABLE#1 0.162 0.019 8.403 0.000 __________ 


They are estimated at the known value. 

Anonymous posted on Tuesday, December 10, 2013  12:03 pm



Sorry, but what exactly is "Means CVARIABLE#1"? How can I interpret it? Thank you again. 


It is a logit which can be translated into a probability which will equal the proportion of people in that group. So it is an uninteresting parameter. 

SY Khan posted on Wednesday, December 11, 2013  1:05 pm



Dear all, I new to MLM and am trying to run a path model in which my level 2 factors (4 continuous latent variables with binary indicators) are predictors and level 1 (continuous latent variables with categorical indicators are outcome variables. I.e. Employee responses are nested at the workplace in relation to the type of HR practices used at the workplace. I want to model impact of each level 2 factor on level 1 factor separately. So four paths separately and then see the effects of level 1 control variables on the separate paths. the grouping variables are level 1 variables such as employees gender and marital status etc. I understand that web note 16 should be followed ; section 4.2 from appendix S to Z. 1 Please advise if in my case cluster level variable be one of the four factors (HR type) at level 2 instead of sgsf93 specified in example code as in my case the cluster will be the factor that specifies type of HR practice at workplace ? How Do I incorporate the code to specify which variables make my factor at level 2? 2 in the appendices code what does (lam2lam13) , e1, e2 and c# 12 refer to ? How will these changes in my case? Thank you for your time and guidance. 


Note that the analysis described in web note 16 is advanced. If you are new to MLM, this will be a difficult starting point. You might instead want to use gender and marital status as level1 covariates and not do a multiplegroup, multilevel SEM. The web note example talks about students clustered in classrooms. Here, sgsf93 is the clusteridentifying variable, namely the classroom variable. Cluster variables are not latent variables. For 2level FA, see UG examples. 

SY Khan posted on Thursday, December 12, 2013  4:12 pm



Hi, In continuation of the discussion above regarding multilevel path analysis Can you please suggest which example in the users guide are closest in my case as I am unable to find an example in which a level 1 outcome (as a latent continuous variable) is regressed upon level 2 predictor which is also a continuous latent variable . The level 1 control variables are gender, marital status which have 2 and 4 categories respectively. I am not sure if these would ideally be treated as covariates on the within level or studied as multigroup analysis. I was interested in first seeing the path between level 2 factor and level 1 factor and then in a separate model seeing if there is a difference due to gender or marital status. The clustering variable is workplace # (level 2) . QUERIES: I am not sure how to specify code for what I want to study! Will 1as a first step I will have to specify which variable form the level 1 and level 2 factors. Would this be written under model command but not under either %WITHIn% or %BETWEEN% sections? 2Second step would be to specify within level intercepts which will be modeled as continuous variables at level 2? Third, run separate model that incorporates covariates at level 1. An example input instructions would be very helpful. Thanks very much for your help. 


You cannot have a path between a level 1 factor and a level 2 factor. Please see the Topic 7 course handout and video on the website. 

SY Khan posted on Friday, December 13, 2013  11:10 am



Hello Linda, Thanks for your reply. I do not fully understand this. I want to evaluate the impact of my Level 2 predictors which are categorized in four factors on employee outcomes(categorized in 5 factors)measured at level 1 and evaluate the models for men/women and people with different marital status. I understand that this will be TYPE=TWOLEVEL. In the topic seven handout/video or user guides example I do not see any example of model of two factors at different levels. Does this mean that I will have to evaluate level 1 outcome as a variable/single item and not as a factor? For example: HR practice (factor 1 at level 2)ON Job Satisfactions (9 item factor at level 1)is not possible SO HR practice (factor 1 at level 2)ON one item measuring Job Satisfactions (at level 1). Kindly correct me if I am wrong in understanding that the closest the users guide examples to what I want to evaluate may be example 9.9 but with categorical factors indicators on within and between level,random intercept factors at between level and no covariate at the between level.Kindly advise if I can estimate my model following/editing the codes of example 9.9. Thanks for you cooperation and guidance. 


Dear Dr. Muthen, I have a multilevel SEM model where 1) families are nested within 2) cohorts, which are nested within 3) therapists, which are nested within 4) teams. Nonindependence of therapists is accounted for with the COMPLEX command, nonindependence of cohorts with the TWOLEVEL command, and nonindependence of teams by modelling it as a fixed effect on the BETWEEN level. I am now interested in extending the model into a multiple group analysis, comparing two time periods (the first 5 years since implementation of the treatment, and the second 5 years since implementation of the treatment). Families (within level) are indepedent in both time periods, however the therapists and teams are (to a large extent) similar in both time periods. With regard to the cohorts, some cohorts (between level) will be indepedent, whereas others may be present in both time periods. Would this be a problem for the multiple group analysis? I hope this makes sense. Thank you for your time and advice! Kind regards, Aurelie 


I have just estimated a model following example H2 in Webnote 16. I am not sure how to interpret the results in a way that answers my RQ. This is a LGM with three waves of the outcome (y1y3) for individuals in three age groups who are nested in neighborhoods. There is a clusterlevel variable 'aff' in the model as well. Here is the between portion of my input statement: %Between% %Overall% ib sb  y1@0 y2@1 y3@2; ib sb on aff; ei by ib; [ei@0]; ei@1; ib@0; es by sb; [es@0]; es@1; sb@0; %c#1% [ib@0 sb@0]; ei by ib*1; es by sb*1; %c#2% [ib@0 sb@0]; ei by ib*1; es by sb*1; %c#3% [ib@0 sb@0]; ei by ib*1; es by sb*1; This model gives me separate random effects for each group, which makes sense. However, I am I am interested in whether the cluster level variable aff has a differential effect on the two slope parameters across the three groups (sort of like a crosslevel interaction). Is there a way to get that from this model or a variation thereof? 


Aurelie: Multiple group analysis requires independence of observations in each group so I don't think that would work for you. 


If it is the ib sb on aff; regressions that you want to vary by class you simply repeat that statement in each class. 


Yes thanks for the response. However, it doesn't seem to work, as I get this error: "Parameters involving betweenlevel variables are not allowed to vary across classes." 


If the latent class variable is specified as a betweenlevel variable, this should be possible. 


Thanks for the tip, but I'm not sure that will work in my situation because the grouping variable is age (three cohorts), a withinlevel variable. Is there a suitable workaround for this? As an alternative I have run a multilevel lgm with random slopes, and this seems to work ok but takes forever to run. 


If you like you can send your output, data, and license number to Support. 

Back to top 