
! G3H1TWIN.MX	September 2000
! General Sex-limitation ACE Model with Female-specific Genetic Factor
! GAD data from Hettema  and Scherrer twin studies
! Hettema: DSM-III-R h1 definition; MM, FF, and MF Twin Pairs, 3 thresholds


!***** GENERAL ACE MODEL FIRST ***********

#NGroups 11

G1: Male model parameters
Calculation 
Begin Matrices;
 X Full 1 1 Free        ! additive genetic factor
 Y Full 1 1 Free        ! shared environmental factor (Fixed for AE model)
 Z Full 1 1 Free        ! specific environmental factor
 H Full 1 1
End Matrices;
 Specify X 1
 Specify Y 2
 Specify Z 3
 Matrix H .5
Begin Algebra;
A= X*X';
C= Y*Y';
E= Z*Z';
End Algebra;
Interval A 1 1
Interval C 1 1
Interval E 1 1
End

G2: Female model parameters
Calculation
Begin Matrices;
 J Full 1 1 Free        ! additive genetic factor
 K Full 1 1 Free        ! shared environmental factor
 L Full 1 1 Free        ! specific environmental factor
 M Full 1 1 Free        ! female specific genetic factor
 H Full 1 1
End Matrices;
 Specify J 4
 Specify K 5
 Specify L 6
 Specify M 7
 Matrix H .5
Begin Algebra;
 A= J*J';
 C= K*K';
 E= L*L';
 G= M*M';
End Algebra;
Interval A 1 1
Interval C 1 1
Interval E 1 1
Interval G 1 1
End

G3: Hettema Male MZ twin pairs
Data NInput_vars=2 
Ctable 2 2	! Contingency Table (T1*T2)
538  67
 81  22
Labels GAD1_m GAD2_m
Begin Matrices = Group 1
 T Full 2 1
End Matrices
Threshold T;
Specify T 20 20
Covariances A+C+E | A+C _
            A+C   | A+C+E /
Option RSiduals
End 

G4: Hettema Male DZ twin pairs
Data NInput_vars=2 
Ctable 2 2	! Contingency Table (T1*T2)
352  60
 64  15
Labels GAD1_m GAD2_m
Begin Matrices = Group 1
 T Full 2 1
End Matrices
Threshold T;
Specify T 20 20
Covariances A+C+E | H@A+C _
            H@A+C | A+C+E /
Option RSiduals
End

G5: Hettema Female MZ twin pairs
Data NInput_vars=2 
Ctable 2 2	! Contingency Table (T1*T2)
348  59
 61  37
Labels GAD1_f GAD2_f
Begin Matrices= Group 2
 T Full 2 1
End Matrices
Threshold T;
Specify T 30 30
Covariances A+C+E+G | A+C+G _
            A+C+G   | A+C+E+G /
Option RSiduals
End 

G6: Hettema Female DZ twin pairs
Data NInput_vars=2 
Ctable 2 2	! Contingency Table (T1*T2)
221  42
 37  27
Labels GAD1_f GAD2_f
Begin Matrices= Group 2
 T Full 2 1
End Matrices
Threshold T;
Specify T 30 30
Covariances A+C+E+G | H@A+C+H@G _
            H@A+C+H@G | A+C+E+G /
Option RSiduals
End

G7: Hettema Male-female DZ twin pairs
Data NInput_vars=2 
Ctable 2 2	! Contingency Table (T1*T2)
647 252
110  61
Labels GAD1_m GAD2_f
Begin Matrices
 X Full 1 1 = X1
 Y Full 1 1 = Y1
 Z Full 1 1 = Z1
 J Full 1 1 = J2
 K Full 1 1 = K2
 L Full 1 1 = L2
 M Full 1 1 = M2
 H Full 1 1 = H1
 T Full 2 1
End Matrices
Threshold T;
Specify T 20 40
Covariances (X*X') + (Y*Y') + (Z*Z') | H@(X*J) + (Y*K) _
            H@(X*J) + (Y*K) | (J*J') + (K*K') + (L*L') + (M*M') /
End

G8: TS2 (Scherrer) - MZ males
Data Ninput=2
Labels Twin1 Twin2
Ctable  2 2
1474  163
 163   67
Labels Tw1 Tw2
Begin Matrices = Group 1
 T Full 2 1
End Matrices
Threshold T;
Specify T 50 50
Covariances A+C+E | A+C _
            A+C   | A+C+E /
Option RSiduals
End 

G9: TS2 (Scherrer) - DZ males
Data Ninput=2
Labels Twin1 Twin2
Ctable  2 2
1158    152
 152    31
Labels Tw1 Tw2
Begin Matrices = Group 1
 T Full 2 1
End Matrices
Threshold T;
Specify T 50 50
Covariances A+C+E | H@A+C _
            H@A+C | A+C+E /
Option RSiduals
End


G10: Constraint group (male) to ensure a*a + c*c + e*e = 1
Data Constraint NInput=1
Begin Matrices = Group 1
 I Iden 1 1
End Matrices;
Constraint I = A+C+E;
Option NO_Output
Option Rsiduals Multiple
End

G11: Constraint group (female) to ensure a*a + c*c + e*e = 1
Data Constraint NInput=1
Begin Matrices = Group 2
 I Iden 1 1
End Matrices;
Constraint I = A+C+E+G;
Start .6 All
Boundary 0.00001 .99999 all
Boundary -.99999 .99999  7
Boundary -5 5  20 30 40 50
Option NO_Output
Option Multiple Issat
Option RSiduals
Option NDecimals=4 
Option Iterations=1000
End

!***** NOW DROP FEMALE-SPECIFIC GENETIC EFFECTS *********
Drop 7
End

!***** NOW EQUATE MALE AND FEMALE GENETIC PARAMETERS *********
Equate X 1 1 1  J 2 1 1   
End

!***** NOW FIT AE SUB-MODEL (MALE) ********
Drop 2
End

!***** NOW FIT AE SUB-MODEL (FEMALE) ********
Drop 5
End

