Message/Author 

ph posted on Sunday, April 19, 2015  7:58 pm



Hi there Trying to run a GMM and introduce one covariate (BMI) . If I do not add BMI into the USEVAR section, it cannot read the variable and I get the error message: "Unknown variable(s) in an ON statement: BMI" If I do add my covariate into the USEVAR list, I get another error message: "Variable is uncorrelated with all other variables within class: BMI" Not sure what to do. Here's the syntax: Thanks VARIABLE: names are ID age length pre wk5 wk10 wk15 wk20 wk25 wk30 wk35 wk40 wk45 wk50 wk55 wk60 post bmi; USEVAR= pre wk5 wk10 wk15 wk20 wk25 wk30 wk35 wk40 wk45 wk50 wk55 wk60 post bmi; MISSING = all(999); CLASSES = c(2); ANALYSIS: type= MIXTURE; MODEL: %OVERALL% I S pre@0 wk5@1 wk10@2 wk15@3 wk20@4 wk25@5 wk30@6 wk35@7 wk40@8 wk45@9 wk50@10 wk55@11 wk60@12 post@13; %c#1% I S; %c#2% I S; I S ON bmi; c#1 ON bmi; c#2 ON bmi; 


You should move the ON statements to the overall part of the MODEL command. 

ph posted on Monday, April 20, 2015  5:09 pm



I tried doing that and now I am getting one of two error messages depending on what part of the "overall" section I put the ON statements in "to declare random effect variables, TYPE = RANDOM must be specified in the ANALYSIS command" (which I don't want?) or "No reference to the slopes of the last class is allowed." 


Try the following. You can't refer to class 2. It is the reference class in the multinomial logistic regression. MODEL: %OVERALL% I S pre@0 wk5@1 wk10@2 wk15@3 wk20@4 wk25@5 wk30@6 wk35@7 wk40@8 wk45@9 wk50@10 wk55@11 wk60@12 post@13; I S ON bmi; c#1 ON bmi; %c#1% I S; %c#2% I S; 

ph posted on Monday, April 20, 2015  6:09 pm



Thank you so much, it worked! Now that I am reading the syntax I was copying from I realise that there was in fact 1 less class in the "MODEL" section than they were testing for  can't believe I missed that. 

Nour Azhari posted on Tuesday, April 17, 2018  12:29 pm



Hi, here is part of my input USEVARIABLES ARE y1 y3 y5 y7 y9 y11 y13 y15 y17 y19 y21 y23 y25 y27 x1 ; MISSING ARE ALL (666666666); CLASSES C(3); IDVARIABLE=ID; ANALYSIS: TYPE IS MIXTURE missing; ESTIMATOR = MLR; ITERATIONS = 1000; CONVERGENCE = 0.00005; COVERAGE = 0.05; STARTS =500 100; MODEL: %OVERALL% I sy1@0 y3@1 y5@2 y7@3 y9@4 y11@5 y13@6 y15@7 y17@8 y19@9 y21@10 y23@11 y25@12 y27@13 ; I@0; S@0; i s ON x1; c#1 ON x1; c#2 ON x1; c#3 ON x1; I am getting an error "*** ERROR in MODEL command No reference to the slopes of the last class is allowed." Could you help? Thanks 


You should not refer to the last class as you did: c#3 ON x1; The coefficient is fixed at zero for the last class as is discussed in our Short Courses on the web. 


I am regressing my latent class variable (C) onto several covariates using some code my advisor gave me. I am curious about the meaning of the class specific statements at the bottom of the code. The values are the logits from the classification probabilities from the GMM. but what purpose do they serve in this regression??? He said soemthing about accounting for uncertainty in classification, but I'm just not clear on how they factor into the regression analyses and what they are actually doing to the results? (These are all binary vars, so it's logistic regression.) %OVERALL% C ON MALE BLACK WELFARE POVERTY TWOPAR ART BUILD SCIENCE GAMES READTO NUMBERS EXPECT SPANK DINNER BEDTIME PTO FUNDRS VOLSCH; %c#1% [CLASS#1@2.292] %c#2% [CLASS#1@1.621] 


See our web notes 15 and 21 on our website. 


Hi, I'm trying to compare a free LTA model with an LTA model where 3 transition probabilities are constrained to be equal to zero. As I'm using the threestep approach, this is my constrained model: %OVERALL% c2 on c1; c2#1 on c1#2@0; c2#1 on c1#3@0; c2#2 on c1#3@0; MODEL C1: %C1#1% [C_T1#1@2.727]; [C_T1#2@2.203]; %C1#2% [C_T1#1@4.432]; [C_T1#2@2.859]; %C1#3% [C_T1#1@3.790]; [C_T1#2@0.517]; MODEL C2: %C2#1% [C_T2#1@1.678]; [C_T2#2@0.385]; %C2#2% [C_T2#1@2.273]; [C_T2#2@2.278]; %C2#3% [C_T2#1@3.005]; [C_T2#2@2.359]; I get this error: *** ERROR in MODEL command No reference to the slopes of the last class is allowed. This means that I should remove: c2#1 on c1#3@0; c2#2 on c1#3@0; How can I test these two constraints without referring to the last class? 


Have a look at the V8 UG, page 559 (it's on the web if you don't have the book). The table at the top shows that transition logits are a function of not only "b" parameters but also "a" parameters. See also our Web Note 13 where the relationship between logits and probabilities is explained. 

Back to top 