! Bivaraite Genetic Model
! Alcohol Consumption and Sensitivity in Australian male twins

G1: model parameters
Data Calc NGroups=3
Begin Matrices;
X Diag 2 2 Free     ! genetic structure
Y Diag 2 2          ! common environmental structure
Z Diag 2 2 Free     ! specific environmental structure
W Diag 2 2          ! dominance structure
G Stand 2 2 Free    ! genetic correlation 
F Stand 2 2 Free    ! specific env correlation
O Stand 2 2 Free    ! dominance correlation
End Matrices;
Specify Y 8 0
Specify W 0 9
Matrix W 1 1
Begin Algebra;
A= X*G*X' ;
C= Y*Y' ;
E= Z*F*Z' ;
D= W*O*W' ;
End Algebra;
End

G2: female MZ twin pairs
Data NInput_vars=4 NObservations=43
Labels cons_t1 sens_t1 cons_t2 sens_t2
CMatrix Symmetric File=ozalcmzf.cov
Matrices= Group 1
Covariances A+C+E+D | A+C+D _
            A+C+D   | A+C+E+D /
Option RSidual
End 

G3: young female DZ twin pairs
Data NInput_vars=4 NObservations=42
Labels cons_t1 sens_t1 cons_t2 sens_t2
CMatrix Symmetric File=ozalcdzf.cov
Matrices= Group 1
H Full 1 1
Q Full 1 1
Covariances A+C+E+D   | H@A+C+Q@D _
            H@A+C+Q@D | A+C+E+D /
Matrix H .5
Matrix Q .25
Start .6 All
Bound 0 1 G 1 2 1 F 1 2 1 O 1 2 1
Option RSidual
End
