! ordinal2_bivariate_correlated.mx ! Fitting correlated liability dimensions model ! #define nvar 2 #define nvar2 4 #define maxthres 1 Analysis of ordinal regular smoking and smoking persistence data: MZ data NI=5 NG=3 la wtmz init persist xinit xersist Ordinal fi=smkmz.rec definition_variables wtmz / Begin matrices; W DI nvar nvar fr ! additive genetic X DI nvar nvar fr ! shared environment Y DI nvar nvar fr ! non-shared environment M FU maxthres nvar fr B FU nvar2 nvar2 fi ! matrix of causal paths F ID nvar2 nvar2 J FU nvar nvar K ID nvar nvar T DI 1 1 ! Used to read weight variable end matrices; SP T -1 SP M 7 8 sp b 0 0 0 0 9 0 0 0 0 0 0 0 0 0 9 0 sp j 0 0 9 0 MATRIX M -0.45 0.0 mat w 0.728 0.6 mat x 0.5292 0.1162 mat y 0.4392 0.6 st 0.6 b(2,1) Begin algebra; A=W*W'; N=(K-J)~*(A)*((K-J)~)'; Q=\stnd(N); C=X*X'; D=(K-J)~*(C)*((K-J)~)'; R=\stnd(D); E=Y*Y'; H=(K-J)~*(E)*((K-J)~)'; S=\stnd(H); P=A+C+E; V=N+D+H; end algebra; TH M|M; FREQ T; CO (F-B)~* ( P | A + C _ A' + C'| P ) * ((F-B)~)' ; bo 0.001 1.0 y(1,1) y(2,2) bo 0.001 0.999 x(1,1) x(2,2) w(1,1) w(2,2) bo -0.999 0.999 b(2,1) bo -5.0 5.0 m(1,1) m(1,2) interval a(1,1) n(2,2) q(1,2) !interval c(1,1) d(2,2) r(1,2) e(1,1) h(2,2) s(1,2) OPT func=1.E-12 OPT RS END Analysis of ordinal alcohol tolerance and dependence data: DZF data NI=5 la wtdz init persist xinit xersist OR fi=smkdz.rec definition_variables wtdz/ Begin matrices = group 1; N FU maxthres nvar fr g fu 1 1 U DI 1 1 ! Used to read weight variable end matrices; sp U -1 MATRIX N 0.0 0.0 mat g 0.5 TH N|N; FREQ U; CO (F-B)~* ( P | g@A + C _ g@A' + C'| P ) * ((F-B)~)' ; bo -5.0 5.0 n(1,1) n(1,2) ! n(1,3) n(1,4) OPT RS END Constraint function - constrain phenotypic variances to unity CO NI=1 Begin matrices = group 1; U unit 1 nvar end matrices; CO \d2v((V)) = u; end