! Mike & Steve Jan 2002 ! Anything after a ! is a comment #ngroups 2 #define nocc 5 ! number of occasions of measurement #define nind 4 ! number of indicators #define ni 20 ! Product nocc*nind #define no 100 ! sample size Title Dynamic System Data NI=ni Nobs=no CM full file=temp.cov Begin Matrices; ! define matrices A Full 3 3 Free ! Paths between factors S Symm 3 3 Free ! Covariance/Variances of factors I Iden 3 3 ! Identity matrix K Full nocc 3 ! Pattern matrix for loadings over time U Unit nocc 1 ! Ones O Unit 1 1 ! Ones P Full nind 1 Free ! Loadings on factors T Full 1 1 ! Constant E Diag ni ni Free ! V Iden nocc nocc End Matrices; Fix P 1 1 Value 1 P 1 1 Specify A 0 0 0 0 0 0 1 2 0 Specify S 3 4 5 0 0 6 Matrix K 1 -2 2 1 -1 1 1 0 0 1 1 1 1 2 2 Bound .01 100 E 1 1 to E ni ni Bound 0 5 S 3 3 Start 1 E 1 1 to E ni ni Begin Algebra; L = P@(K.(U@(O|T|T.T))); R = (I-A)~&S; ! F = E@V; End Algebra; Covariance L&R + E; End Group; Group 2 Calculation Group for Parameters Data Calc Begin Matrices; P Full 3 3 = A1 Q Symm 3 3 = S1 R Full nind 1 = P1 S Full 4 1 F Full 4 1 G Full 4 1 H Full 4 1 J Full 4 1 K Full 4 1 O Full 1 1 = %F1 End Matrices; Matrix F 3 1 3 2 Matrix G 3 3 3 3 Matrix H 2 1 2 1 Matrix J 1 1 1 1 Matrix K 2 2 2 2 Matrix S 1 1 nind 1 Begin algebra; X = \part(P,F) | \part(Q,H) | \part(Q,J) | \part(Q,K) | \part(Q,G) | O | \part(R,S)'; End algebra; option SErrors option format=(13(F12.4,1x)) option mxx=t1pars.dat Options RSidual Options IT=1000 End;