Message/Author 

xue li posted on Friday, June 16, 2006  12:32 pm



Hi, every one: There are 3000 clusters, within each cluster there are 10 subjects . Each subject has a depent variable measured 0 or 1, and each subject has no covariate. I want to use two level mixture model to analysis this data. The reason is the observed data are grouped into 2 classes. Class one has mean 3 and variance approximately 0; and the second class has mean 0 and variance approcimately 4.Approximately 37.7% subjects are in class 1. The problem is the model never converge. Could someone tells me whether there is mistakes in my program. Thanks. my email xli28@uic.edu I use the following code. Title: Mixture model for breast cancer projectrace by age specific poverty twolevel logistic regression Data: !file is C:\xli28\project1\EB\mplus for EB\EB6ageg.dat; file is C:\xli28\project1\EB\sim_age3.dat; !file is F:\xue new\sim_age3.dat; variable: names are ncluster povind int; usevariables are povind; missing are . ; classes = c (2); categorical=povind; cluster=ncluster; analysis: type =twolevel random mixture; algorithm=integration; estimator=ML; integration=GAUSSHERMITE(15); adaptive=on; model: %within% %overall% ipovind@0; [i]; i; %c#1% [i*3]; i@0; %c#2% [i*0]; i*4; %between% %overall% [povind$1@0]; output: tech1; tech8; 

xue li posted on Friday, June 16, 2006  12:37 pm



Hi, the error message is as follows. Since the data set is created by simulation. The starting value will be plausible. I can't figure out the reason. Error message: Unperturbed starting value run did not converge. THE ESTIMATED WITHIN COVARIANCE MATRIX IN CLASS 1 COULD NOT BE INVERTED. COMPUTATION COULD NOT BE COMPLETED IN ITERATION 1. CHANGE YOUR MODEL AND/OR STARTING VALUES. THE ESTIMATED WITHIN COVARIANCE MATRIX IN CLASS 0 COULD NOT BE INVERTED. COMPUTATION COULD NOT BE COMPLETED IN ITERATION 1. CHANGE YOUR MODEL AND/OR STARTING VALUES. SERIOUS PROBLEM IN THE OPTIMIZATION WHEN COMPUTING THE POSTERIOR DISTRIBUTION. CHANGE YOUR MODEL AND/OR STARTING VALUES. THE LOGLIKELIHOOD DECREASED IN THE LAST EM ITERATION. CHANGE YOUR MODEL, STARTING VALUES AND/OR THE NUMBER OF INTEGRATION POINTS. THE MODEL ESTIMATION DID NOT TERMINATE NORMALLY DUE TO AN ERROR IN THE COMPUTATION. CHANGE YOUR MODEL AND/OR STARTING VALUES. MODEL RESULTS Estimates Within Level Latent Class 1 I  POVIND 1.000 Means I 3.000 Variances I 0.000 Latent Class 2 I  POVIND 1.000 Means I 0.000 Variances I 4.000 Between Level Latent Class 1 Thresholds POVIND$1 0.000 Latent Class 2 Thresholds POVIND$1 0.000 Categorical Latent Variables Within Level Means C#1 0.000 


I'm running a mixture twolevel model in mplus. However, I would like to define the latent class variable as a between level variable. In other words, I would like to classify 'clusters' (in the mplus multilevel language). How can I do this? I tried including the statement BETWEEN = c; but it looks as if this statement is being ignored. The reason why I want to classify at the between level is that my respondents are situated at this level; the within level has 18 ratings of different experimental scenario's by each respondent. I'm not interested in segmenting at this level (because I would probably end up with 18 classes corresponding to the 18 ratings), but at the respondent level. In the previous discussion I found the following statement  has this been implemented? "In future Mplus versions, we will also have a latent class variable varying on the between level. That would be a schoollevel variable, classifying different schools." 


See Example 10.2. If this is being ignored, perhaps you are using a version of Mplus where this was not yet implemented. 


I was wrong. "between=c" is not being ignored, but I misinterpreted the output: it lists the class counts in terms of level 1 (the within level), but I now see that observations from the same cluster are indeed assigned to the same class. Thanks. 

M.Heidari posted on Thursday, July 21, 2016  9:50 pm



Hi, Is it possible to run multilevel mixture factor models in Mplus? Is it related to example 10.4 & 10.5? Thank you very much. 


Yes to both. 

Ryan Marek posted on Friday, August 26, 2016  11:12 am



I'm working with some behavioral weight loss data. We have two variables: percent weight loss and a date variable (converted to number of days since starting treatment). We have more data (i.e., baseline lab results, psychosocial measures, etc., that are being entered). We're curious to see at this point if the longitudinal weight loss curves can be clustered into a subset of classes (such as weight losers, weight plateauers, etc.). Because the data were not collected in discrete time intervals, I thought multilevel modeling was the best approach to use. I found a 3 class solution to fit the data best. I wanted to read these classes out to place in our database; however, it appears individuals are being placed in different classes at different time points. For example, case 508 shows that they were classified in class 3 on day 0, but class 2 by day 36. Any idea what may be wrong? TITLE: LCA for Weight Loss Trajectories; DATA: File is wtloss.dat; VARIABLE: names are caseid wt pwl days; Usevar = pwl days; Classes = c (3); Cluster = caseid; within = days; missing are all (999); ANALYSIS: type = twolevel mixture; Estimator = ML; Starts = 0; MODEL: %WITHIN% %OVERALL% pwl on days; c on days; Output: sampstat stdyx tech1 tech8; PLOT: Type = PLOT2; SAVEDATA: FILE IS "threeclass.txt"; SAVE IS CPROB; 


I think you want classes of subjects where in this case subjects is level 2. This means that the latent class variable should be put on the Between list. See UG for betweenlevel latent class examples. 

Linda Lin posted on Monday, November 14, 2016  10:02 am



I'm running a mixture twolevel model in mplus. I tried to let the between level model to be different across classes. However, it seems like the Mplus does not allowed between level parameter to be different across classes. Here is the code and the error message I got: Model: %within% %Overall% M_w by M1M8; SS_w by SS1SS4; M_w (fw); M_w on SS_w; [M_w ]; SS_w; [SS_w]; %G#2% M_w (nw); M_w on SS_w@0; %between% %Overall% M_b by M1M8; SS_b by SS1SS4; M_b on SS_b; M_b (fb); [M_b ]; SS_b; [SS_b]; %G#2% M_b on SS_b@0; M_b (nb); *** ERROR in MODEL command Parameters involving betweenlevel variables are not allowed to vary across classes. Parameter: M_B ON SS_B *** ERROR in MODEL command Variances of betweenlevel variables are not allowed to vary across classes. Variance of betweenlevel variable: M_B Does Mplus allow me to fit two different between level models for two different groups? Thanks! 


If the latent class variable is a within level variable it is illogical to expect that it affects these coefficients. It has to be a between level variable. If so that has to be specified in the input. See user's guide example 10.2. 

Melvin C Y posted on Sunday, October 29, 2017  9:42 am



I'm trying to specify a 3 class ML LPA model and specified classes cw(3); However I've seen past papers that specified both within and between level classes: classes cw(3) cb(3); I've tried both and know there's a difference but just not sure which is more appropriate. If it helps, my LPA indicators are at the within level and I'd like to test a between level predictor on profile membership. Thank you. 


If your are interested in a betweenlevel latent class variable you should use only cb (declared as Between= cb). 

Back to top 