! Bivariate Genetic Cholesky Model CCC ! Simulated ordinal data ! #ngroups 4 #define nthresh1 1 #define nthresh2 1 #define nvar 3 G1: set up model Calculation Begin Matrices; B Full nvar nvar Free ! causal pathways J Iden 2 2 K Iden nvar nvar I Lower nthresh2 nthresh2 X Diag nvar nvar Free ! genetic structure Y Diag nvar nvar Free ! common environmental structure Z Diag nvar nvar Free ! specific environmental structure W Lower nvar nvar ! dominance structure T Full nthresh2 6 Free End Matrices; Bound .0 1 X 1 1 X 2 2 X 3 3 Bound .0 1 Y 1 1 Y 2 2 Y 3 3 Bound .1 1 Z 1 1 Z 2 2 Z 3 3 Bound -3 3 T 1 1 - T 1 6 Specify B 0 0 0 101 0 0 0 1020 0 Bound -.99 .99 B 2 1 B 3 2 Labels Col B IS RS ND Labels Row B IS RS ND Matrix X .8 .7071 .6 Matrix Z .6 .5 .8 Matrix B 0 0 0 .5 0 0 0 .5 0 Begin Algebra; A= X*X' ; C= Y*Y' ; E= Z*Z' ; D= W*W' ; F= (J@(K-B))~ ; End Algebra; End G2: MZ twin pairs #include patccc1.dat select if zyg = 1 select evera rega nda everb regb ndb ; Begin Matrices= Group 1; Covariances F&(A+C+E+D | A+C+D _ A+C+D | A+C+E+D) / Thresholds T ; Option RSidual End G3: DZ twin pairs #include patccc1.dat select if zyg = 2 select evera rega nda everb regb ndb ; Begin Matrices= Group 1; H Full 1 1 Q Full 1 1 End Matrices; Matrix H .5 Matrix Q .25 Covariances F&(A+C+E+D | H@A+C+Q@D _ H@A+C+Q@D | A+C+E+D) / Thresholds T ; Option RSidual Options NDecimals=4 Option func=1.e-8 End G4: Constrain variances Constraint NI=1 Begin Matrices; U unit 1 nvar E symm 6 6 = %e2 Z iz 6 nvar End Matrices; Constraint U = \d2v(E) * Z ; Option Multiple th=-2 End