Widetolong with twolevel data PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Kelly Harper posted on Sunday, January 28, 2018 - 2:33 pm
Hello,

I am trying to run a path analysis with two-level data. I was able to transform the data with the widetolong command when the analysis was "basic". However, when I try to run the path analysis (using type = twolevel), I receive the error "DATA LONGTOWIDE is currently not available with TYPE=COMPLEX or TYPE=TWOLEVEL." I wanted to check to see if I cannot use longtowide command with two-level data or if something is wrong in my syntax. Also, could I use this command and type=twolevel with version 8 (I am using version 7)?
 Kelly Harper posted on Sunday, January 28, 2018 - 2:34 pm
here is my syntax:

Data longtowide:
Long = lonely | ns_comp | exp_mean;
Wide = lonely1-lonely3 | ns_comp1-ns_comp3 | exp_mean1-exp_mean3;
IDvariable = ID;
Repetition = TOD (0, 1, 2);

Variable:
Names are ...;

Usevariables = spp sop lonely2 lonely3 ns_comp1 ns_comp2
exp_mean1 exp_mean2;
useobservations = surveys gt 7 and valid lt 6;
within = ;
between = SPP SOP;
cluster = ID;
MISSING = ALL (-999);

Define:
center SPP SOP (grandmean);

Analysis:
Type = twolevel;
estimator = mlr;

Model:
%within%
exp_mean1 on ns_comp1;
lonely2 on exp_mean1;
exp_mean2 on ns_comp2;
lonely3 on exp_mean2;

%between%
ns_comp1 ns_comp2 on spp sop;
exp_mean1 on ns_comp1;
exp_mean2 on ns_comp2;
lonely2 on exp_mean1;
lonely3 on exp_mean2;
 Bengt O. Muthen posted on Sunday, January 28, 2018 - 5:00 pm
See UG ex 9.16. If you want to do twolevel analysis you should use WIDETOLONG, not LONGTOWIDE.

We ask that postings be limited to one window. Otherwise, send to Support.
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: