I have a 3-level nested dataset where level-1 is time (Year), level-2 is patient, and level-3 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 Multi-Level Multi-Group Path Analysis in Mplus?
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 = BP1-BP5; IDVARIABLE = Patient_Key; REPITITION = Year;
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 BP1-BP5;
GROUPING = Phy_Prim_BA (1 = FAMILY PRACTICE 2 = GENERAL INTERNAL MEDICINE);
I am trying to run three versions of Multi-Level Multi-Group 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 between-level 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 chi-square 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,
You don't give enough information to answer the question. Please send the three outputs and your license number to firstname.lastname@example.org.
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 Multi-Group Multi-Level Growth Model on 3-level nested dataset where level-1 is time (Year), level-2 is patient, and level-3 is physician. I am interested in comparing thresholds and factor loadings across two groups with respect to the dependent variable.
The log-likelihood 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.
I am trying to fit a multi-level growth mixture model with known classes. The best log-likelihood 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 NON-POSITIVE DEFINITE FIRST-ORDER 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.419D-21. 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?
Hello, I am running a multilevel multigroup analyses with known groups (observations nested within individuals). My main question involves group differences in the within-level part. However, I am also in testing group differences in the between-level 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 within-person and get group-specific estimates. However, it doesn't see possible to get group specific estimates at the between-level. The output produces estimates that are identical for both groups. I tried specifying 2 "latent" classes at the between-level. But, while the within-level solution is similar to the solution of the model with one between-level group and while I also get group-specific estimates at the between-level, 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!
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
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
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 reason you can't use a within-level 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.
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.
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 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!
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 WITHIN-Level only (no BETWEEN-Level-Predictors included). I was hoping to simply adjust the standard errors using "TYPE=Complex", however my grouping-variable is on the WITHIN-Level, 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!
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 within-level 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?
It should work the same with a latent variable. Send the files you have created and your license number to email@example.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 within-level group-variable: Is it basically possible to model random slopes predicted by between-level variables? I want (1) to model random slopes that are allowed to vary between the groups and (2) the impact of the level-2 predictor on the random slopes should be allowed to vary between the groups.
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 overall-model 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 overall-model in which the specific subgroup differs from the overall-model. So, if I assume that the two subgroups vary in several parameters from each other + from the whole data set, I have to define group-specific models for both of them. (4) When would I only define a group-specific model for one of my subgroups? Does this mean this subgroup varies from the other + from the overall-model, but the model for second subgroup is identical with the overall-model?
(1-2) you don't need starting values. (3)  parameters are mean parameters, for example
is the mean of y in class 1.
Also H1 is the most advanced model. Consider all the models H1-H7 - 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 H1-model but with fixed slopes, using the KNOWNCLASS-option (I have 2 groups with CVARIABLE = 0, 1): Why does Mplus give me this in the output:
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
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
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 (lam2-lam13) , e1, e2 and c# 1-2 refer to ? How will these changes in my case?
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 level-1 covariates and not do a multiple-group, multilevel SEM.
The web note example talks about students clustered in classrooms. Here, sgsf93 is the cluster-identifying variable, namely the classroom variable. Cluster variables are not latent variables. For 2-level FA, see UG examples.
SY Khan posted on Thursday, December 12, 2013 - 4:12 pm
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
1-as 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?
2-Second 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.
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
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?
HR practice (factor 1 at level 2)ON Job Satisfactions (9 item factor at level 1)is not possible
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.
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 (y1-y3) for individuals in three age groups who are nested in neighborhoods. There is a cluster-level variable 'aff' in the model as well. Here is the between portion of my input statement:
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 cross-level interaction). Is there a way to get that from this model or a variation thereof?
Steven John posted on Wednesday, August 12, 2015 - 11:45 pm
Ok thanks. I'd like to test if a regression coefficient differ statistically between years. Lets say the relation between X and Y (between level) is .20 Y2001 and .05 Y2011. How do I test if the relationship differ statistically?
I've tried to model variation in the variances on the between level across groups as William did an November 11, 2014.
However, different from his model, I don't have a growth model but just a multilevel CFA model with a slope on the within level that is allowed to vary across clusters (random slope). I also want this slope to have different variance values in my two groups.
This is my code:
%within% %overall% fw by i1-i10(1-10); s | f on x;
%between% %overall% fb by i1-i10(1-10); i01-i10@0;