SEM with dummy vars PreviousNext
Mplus Discussion > Structural Equation Modeling >
Message/Author
 Lisa McGarrigle posted on Thursday, February 21, 2019 - 3:45 am
Hi, I ran a 2nd-order CFA and now trying to see how demographic vars predict the 1st and 2nd order latent variables. It ran ok when I forgot to create dummies, but not with them. Could you please help me troubleshoot?

DATA:
NGROUPS = 1;
NOBSERVATIONS = 0 ;
FILE IS data.csv;
TYPE IS INDIVIDUAL;
VARIABLE:
NAMES = sex agegrp area instit ... ;
USEVARIABLES = ... sex agegrp area instit;
DEFINE:
area2 = 0;
if (area eq 2) then area2 = 1;
area3 = 0;
if (area eq 3) then area3 = 1;

instit2 = 0;
if (instit eq 2) then instit2 = 1;
instit3 = 0;
if (instit eq 3) then instit3 = 1;

ANALYSIS: ESTIMATOR=ML;

OUTPUT:
MODINDICES (4);
TECH1 STANDARDIZED;
STAND RESIDUAL;
SAMPSTAT;
CINTERVAL;
TECH4;
stdyx;
MODEL:
f1 BY q18 q20 q32;
f2 BY q24 q26 q27;
f3 BY q23 q30;

second BY f1 f2 f3;

second f1 f2 f3 ON sex agegrp area instit;

THE MODEL ESTIMATION TERMINATED NORMALLY

THE STANDARD ERRORS OF THE MODEL PARAMETER ESTIMATES COULD NOT BE
COMPUTED. THE MODEL MAY NOT BE IDENTIFIED. CHECK YOUR MODEL.
PROBLEM INVOLVING THE FOLLOWING PARAMETER:
Parameter 65, SECOND ON SEX
THE CONDITION NUMBER IS -0.171D-10.
 Lisa McGarrigle posted on Friday, March 01, 2019 - 10:44 am
Hi,
I adjusted the syntax slightly and got the model to run ok except when I include one of the dummy variables. The error is:

*** ERROR
One or more variables have a variance of zero. Check your data and format statement.

I checked the syntax for input errors for the dummy, and checked the data and it has values just like the others. It doesn't seem to be a data or syntax issue - is it? Any help would be really useful. Thank you.
 Bengt O. Muthen posted on Friday, March 01, 2019 - 6:06 pm
Use the Savedata command to see that the data you analyze is the data you intended.
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: