
! PDTW_ACE.MX	September 2000
! General ACE Model 
! PD Data from Kendler (FF), Scherrer (MM), and Perna Twin Studies


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

#NGroups 12

G1: Male model parameters
Calculation
Begin Matrices;
 X Full 1 1 Free        ! additive genetic factor
 Y Full 1 1 Free        ! shared environmental factor 
 Z Full 1 1 Free        ! specific environmental factor
 H Full 1 1
 Q Full 1 1
End Matrices;
 Specify X 1
 Specify Y 2
 Specify Z 3
 Matrix H .5
 Matrix Q .25
Begin Algebra;
 A= X*X';
 C= Y*Y';
 E= Z*Z';
End Algebra;
 Start .6 All
 Boundary 0.00001 .99999 all
 Boundary -5 5  20 30 
Interval A 1 1
Interval C 1 1
Interval E 1 1
End

G2: Female model parameters
Calculation
Begin Matrices;
 X Full 1 1 Free        ! additive genetic factor
 Y Full 1 1 Free        ! shared environmental factor 
 Z Full 1 1 Free        ! specific environmental factor
 H Full 1 1
 Q Full 1 1
End Matrices;
 Specify X 11
 Specify Y 12
 Specify Z 13
 Matrix H .5
 Matrix Q .25
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

G3: M-F model parameters for Perna data
Calculation
Begin Matrices;
 X Full 1 1 Free        ! additive genetic factor
 Y Full 1 1 Free        ! shared environmental factor 
 Z Full 1 1 Free        ! specific environmental factor
 H Full 1 1
 Q Full 1 1
End Matrices;
 Specify X 21
 Specify Y 22
 Specify Z 23
 Matrix H .5
 Matrix Q .25
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

G4: Scherrer Male MZ twin pairs
Data NInput_vars=2 
Lables STwin1 STwin2
Ctable 2 2	! Contingency Table (T1*T2)
 1673   83
   83   27
Begin Matrices= Group 1
 T Full 2 1
End Matrices
Specify T  30 30
Threshold T;
Covariances A+C+E | A+C _
            A+C   | A+C+E /
Option RSiduals
End 

G5: Scherrer Male DZ twin pairs
Data NInput_vars=2 
Lables STwin1 STwin2
Ctable 2 2	! Contingency Table (T1*T2)
 1325   82
   82    6
Begin Matrices= Group 1
 T Full 2 1
End Matrices
Specify T  30 30
Threshold T;
Covariances A+C+E   | H@A+C _
            H@A+C | A+C+E /
Option RSiduals
End 

G6: Kendler Female MZ twin pairs
Data NInput_vars=2 
Lables KTwin1 KTwin2
Ctable 2 2	! Contingency Table (T1*T2)
 511   35
  35    9
Begin Matrices= Group 2
 T Full 2 1
End Matrices
Specify T  40 40
Threshold T;
Covariances A+C+E | A+C _
            A+C   | A+C+E /
Option RSiduals
End 

G7: Kendler Female DZ twin pairs
Data NInput_vars=2 
Lables KTwin1 KTwin2
Ctable 2 2	! Contingency Table (T1*T2)
 376   29
  29    5
Begin Matrices= Group 2
 T Full 2 1
End Matrices
Specify T  40 40
Threshold T;
Covariances A+C+E   | H@A+C _
            H@A+C | A+C+E /
Option RSiduals
End 

G8: Perna MZ twin pairs
Data NInput_vars=2 
Lables PTwin1 PTwin2
Ctable 2 2	! Contingency Table (T1*T2)
 19   2
  1   4
Begin Matrices= Group 3
 T Full 2 1
End Matrices
Specify T  50 50
Threshold T;
Covariances A+C+E | A+C _
            A+C   | A+C+E /
Option RSiduals
End 

G9: Perna DZ twin pairs
Data NInput_vars=2 
Lables PTwin1 PTwin2
Ctable 2 2	! Contingency Table (T1*T2)
 28   3
  3   0
Begin Matrices= Group 3
 T Full 2 1
End Matrices
Specify T  50 50
Threshold T;
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
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;
Option NO_Output
End

G12: Constraint group (MF) to ensure a*a + c*c + e*e = 1
Data Constraint NInput=1
Begin Matrices = Group 3;
 I Iden 1 1
End Matrices;
Constraint I = A+C+E;
Option NO_Output
Option RSiduals
Option NDecimals=4 
Option Iterations=1000
End


!***** NOW FIT AE SUB-MODEL ********
Drop 2 12 22
End

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


