! Script for univariate ACE model ! Variable: Age of smoking onset. ! Categories = non-smoker | smoker after 18 years | smoker before/at 18 years ! The age at onset variable has 3 smoking categories, 2 thresholds per variable, 2 for twin1 and 2 for twin2 ! Equality in Thresholds are tested ! THRESHOLD MODEL 2x2 : (thresholds twin1, thresholds twin2) #define nvar 1 ! number of variables per twin #define nvarx2 2 ! number of variables x number of twins #define nthresh 2 ! number of thresholds #ngroups 4 G1: Parameters for the Genetic model Calculation Begin Matrices; X LOW nvar nvar FREE ! Additive genetic path coefficient Y LOW nvar nvar FREE ! Shared environmental path coefficient Z LOW nvar nvar FREE ! Unique environmental path coefficient End matrices; Begin Algebra; A=X*X' ; ! Additive genetic variance (path X squared) C=Y*Y' ; ! Shared environmental variance(path Y squared) E=Z*Z' ; ! Unique Environmental variance(path Z squared) End Algebra; start .6 X 1 1 Y 1 1 Z 1 1 ! starting values for X, Y, Z Interval @95 A 1 1 C 1 1 E 1 1 ! intervals for male h2, c2 and c2 End G2: Data and model for MZM pairs DAta NInput_vars=3 Missing=. Ordinal File=smk_prac.ord Labels zyg ageon_t1 ageon_t2 SELECT IF zyg = 2 SELECT ageon_t1 ageon_t2 / Matrices = group 1 T FULL nthresh nvarx2 FREE ! thresh tw1, thresh tw2 L Lower nthresh nthresh end matrices; Value 1 L 1 1 to L nthresh nthresh ! initialize L COVARIANCE !Predicted Correlation matrix for MZM ( A + C + E | A + C _ A + C | A + C + E ) / THRESHOLDS L*T / !Threshold Model to ensure t1>t2>t3 etc....... Start .2 T 1 1 T 1 2 ! starting values for the thresholds start .2 T 2 1 T 2 2 Bound 0.01 1 T 1 1 T 1 2 Bound 0.1 5 T 2 1 T 2 2 Option rs End G3: Data and model for DZM pairs DAta NInput_vars=3 Missing=. Ordinal File=smk_prac.ord Labels zyg ageon_t1 ageon_t2 SELECT IF zyg = 4 SELECT ageon_t1 ageon_t2 / Matrices = group 1 T FULL nthresh nvarx2 FREE ! thresh tw1, thresh tw2 L Lower nthresh nthresh = L2 H FULL 1 1 ! .5 end matrices; COVARIANCE ! Predicted Correlation matrix for DZM ( A + C + E | H@A + C _ H@A + C | A + C + E ) / THRESHOLDS L*T / ! Threshold Model Start .2 T 1 1 T 1 2 ! starting values for the thresholds start .2 T 2 1 T 2 2 Bound 0.01 1 T 1 1 T 1 2 Bound 0.1 5 T 2 1 T 2 2 MA H .5 Option rs End G4: CONSTRAIN VARIANCES OF OBSERVED VARIABLES TO 1 CONSTRAINT Matrices = Group 1 I UNIT 1 1 CO A+C+E= I / Option Jiggle Option func=1.E-10 ! function precision is less than usual End