Dears, I am analysing data from a Cluster-randomized control trial conducted in different schools in different cities, thus with three RANDOM FACTORS. Students are assigned to to either a treatment or a control group (CONDITION), and the goal is to evaluate the effect of the treatment on two DVs. So far I have analysed the data with PROC MIXED (syntax included), separately for each DV. However, I am now required to consider the two DVs as indicators of a Latent variable, and I am thus used PROC CALIS to test a Latent Change Model. The syntax of both the PROC MIXED and the PROC CALIS are attached. However, my PROC CALIS syntax, at present, is not taking into consideration the random factors and it is also not considering other individual difference variables, such as SEX and Age, which are considered in PROC MIXED. I believe I may have to test a Multilevel Structural Equation Model, but this is stretching my SAS programming skills, and I am thus here I am. Any suggestion on how to add the random factors (and ideally also age and sex in a manner equivalent to what is now in PROC MIXED) to the PROC CALIS would be much appreciated. /*
NOTE
data long (PROC MIXED)is in long format; variable TIME (time1 and time2) represents the repeated-measure factor
data wide (for PROC CALIS) is in wide format.
DV1_1 and DV2_1 are measurement at time1
DV1_2 and DV2_2 are measurement at time2
*/
proc mixed data=long;
class id Condition school class place sex time;
model DV1= condition|time|sex|age ;
Random intercept /subject=class(school); Random intercept /subject=school(place); Random intercept /subject=place; proc mixed data=long;
class id Condition school class place sex time;
model DV2= condition|time|sex|age ;
Random intercept /subject=class(school); Random intercept /subject=school(place); Random intercept /subject=place; proc calis data=wide; lineqs DV1_1 = 1 fLatent1 + e1, DV2_1 = 1 fLatent1 + e2, DV1_2 = 1 fLatent2 + e3, DV2_2 = 1 fLatent2 + e4, fLatent2 = 1 fLatent1 + 1 fdelta + e5, fdelta = a6 Condition + e6; cov e1 e3 =DV1corr, e2 e4 =DV2corr; std fLatent1 = eFL1, e1-e4 = evar1-evar4, e5 = 0, e6 = evar6; run;
... View more