|
Message/Author |
|
Ray F posted on Friday, April 05, 2013 - 9:02 am
|
|
|
Hi, I wrote out A two-level SEM program (factors:t1sc, t2sc and t1lsc; t1sc and t2sc are level-1 factors and t1lsc is a level-2 factor) as follows: VARIABLE: MISSING ARE ALL (-999); NAMES = id sex groupid class pa1 psn1 tsc1 forl1 pa2 psn2 tsc2 forl2 lpa1 lpsn1 ltsc1 lforl1 ; USEVARIABLES = groupid pa1 psn1 tsc1 forl1 pa2 psn2 tsc2 forl2 lpa1 lpsn1 ltsc1 lforl1 ; WITHIN = pa1 psn1 tsc1 forl1; BETWEEN = lpa1 lpsn1 ltsc1 lforl1; CLUSTER = groupid; ANALYSIS: TYPE = TWOLEVEL RANDOM; ESTIMATOR = MLR; MODEL: t1lsc BY lpa1 lpsn1 ltsc1 lforl1; %WITHIN% t1sc BY pa1 psn1 tsc1 forl1; t2sc BY pa2 psn2 tsc2 forl2; t2sc ON t1sc; edslope | t2sc ON t1sc; %BETWEEN% t2sc ON t1lsc; edslope ON t1lsc; t1lsc WITH t1sc; But I got a warning saying that "*** ERROR in MODEL command The labels %BETWEEN% or %WITHIN% must be specified." I don't know how to fix it and also wonder if it is because I use wide form rather than long form data. I don't think I need to reshape the dataset into a long set because I only have two time occasions here. Indeed, variables at time1 are indepent while same variables measured at time2 are dependent. |
|
|
The following statement should not come before %WITHIN% t1lsc BY lpa1 lpsn1 ltsc1 lforl1; You can have the data in wide format. |
|
Ray F posted on Friday, April 05, 2013 - 10:42 am
|
|
|
Thank you for your prompt response, Linda! In this case, where should I put this statement in the program so as to represent the CFA part? In addition, a general question, is long format specific to longitudinal data? I am confused here that although my data is longitudinal (measured at two occasions), it is actually not that time-repeated as most of the examples illustrated in the Mplus User's Guide. Thank you! |
|
|
See the examples in Chapter 9 of the user's guide. There are many examples that are not growth models. Long format is generally used for growth models. |
|
Back to top |
|
|