#define nvar 3 ! n dependent variables per individual #define nthresh 2 ! maximum number of thresholds G1: Singleton (non-pair) data Data Ninput_vars=5 NGroups=2 ! Number of variables per family Ordinal file=ord.dat ! read raw data Labels Id depression anxiety stress sex select depression anxiety stress ; Begin matrices; T Full nthresh nvar free ! thresholds L Lower nthresh nthresh ! for adding up thresholds F Full nvar 1 free ! factor loadings R Diag nvar nvar free ! Residual Variance End matrices; Begin Algebra; C=F*F'+R*R' ; End Algebra; Value 1 L 1 1 to L nthresh nthresh Sp T 100 101 102 0 103 104 ! start values Start -1 T 1 1 T 1 2 T 1 3 Start 1 T 2 2 T 2 3 Start .5 F 1 1 F 2 1 F 3 1 Start .5 R 1 1 R 2 2 R 3 3 !Setting the 1st threshold to be negative as less than 50% in the 0 category Bound -4 0 T 1 1 T 1 2 T 1 3 !Setting the 2nd threshold to be possitive for anxiety and stress Bound 0.01 4 T 2 2 T 2 3 Thresholdss L*T ; ! thresholdss model Covariances C ; ! variance/covariance model end Standardize Constraint Begin Matrices = Group 1 ; U unit 1 3 !to constrain the total variance of the 3 variables End Matrices ; Begin Algebra; V = \d2v(C) ; !extract the variance S = F | \d2v(R)' ; ! summary matrix containing standardised factor loadings End Algebra; Constraint V=U ; !constrain the variance End