! ACE Script for categorised variables (twin1/twin2) ! 3 categories: 2 Thresholds per liability, two for twin1 and two for twin2 ! 0 = bottom 22% (non-agressive at all) ! 1 = mid 66% (sometimes agressive) ! 2 = top 12% (very agressive) ! Thresholds are EQ across twins within each groups and across zygosity group. ! THRESHOLD MATRIX 2x2 : ! T(1,1) T(1,2) = threshold 1 of twin1 and twin2 ! T(2,1) T(2,2) = threshold 2 of twin1 and twin2 #define nvar 2 ! number of variables #define nthresh 2 ! number of thresholds G1: Matrices for the Genetic Analysis of the Binary data Calculation NGroups=4 Begin Matrices; X FULL 1 1 FREE ! Additive genetic path coefficient Y FULL 1 1 FREE ! Common environmental path coefficient Z FULL 1 1 FREE ! Unique environmental path coefficient End matrices; Begin Algebra; A=X*X' ; !Additive genetic variance (path X squared) C=Y*Y' ; !Common Environmental variance(path Y squared) E=Z*Z' ; !Unique Environmental variance(path Z squared) End Algebra; start .6 all !starting value for X, Y, Z Interval @95 A 1 1 C 1 1 E 1 1 End G2: Data and model for MZ pairs DAta NInput_vars=3 Missing=. Ordinal File=cat.dat Labels zyg bin1 bin2 SELECT IF zyg = 1 SELECT bin1 bin2 / Matrices = group 1 T FULL nthresh nvar FREE !thresh tw1, thresh tw2 L LOW nthresh nthresh end matrices; Value 1 L 1 1 to L nthresh nthresh ! initialize L COVARIANCE ( A + C + E | A + C _ A + C | A + C + E ) / !Predicted Correlation matrix for MZ pairs Thresholds L*T ; !to ensure t1>t2>t3 etc....... Matrix T -1 -1 !starting values for the first thresholds 2 2 !start values for the increment in threshold EQ T 1 1 T 1 2 !constrain TH 1 to be equal across twins (twin1/twin2) EQ T 2 1 T 2 2 !constrain TH 2 to be equal across twins (twin1/twin2) Option rs End G3: Data and model for DZ pairs DAta NInput_vars=3 Missing=. Ordinal File=cat.dat Labels zyg bin1 bin2 SELECT IF zyg = 2 SELECT bin1 bin2 / Matrices = group 1 T FULL nthresh nvar =T2 L LOW nthresh nthresh =L2 H FULL 1 1 !.5 end matrices; COVARIANCE ( A + C + E | H@A + C _ H@A + C | A + C + E ) / !Predicted Correlation matrix for DZ pairs Thresholds L*T ; !to ensure t1>t2>t3 etc....... MA H .5 Option func=1.E-10 !function precision is less than usual Option rs End G4: CONSTRAIN VARIANCES OF OBSERVED VARIABLES TO 1 CONSTRAINT Matrices = Group 1 I UNIT 1 1 CO A+C+E= I / Options RS ISSAT Multiple End Group; Save ace.mxs !this saves the full model so you can test reduced models Get ace.mxs drop 1 !this drops the A term - tests CE model end group; get ace.mxs drop 2 !this drops the C term - tests AE model end group; get ace.mxs drop 1 2 !this drops A and C from ACE - tests E model end group;