! Reciprocal Causation Model
! Alcohol Consumption and Sensitivity in Australian female 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
End Matrices;
Specify Y 5 0
Specify W 0 6
Begin Algebra;
A= X*X' ;
C= Y*Y' ;
E= Z*Z' ;
D= W*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
P Full 4 4        ! reciprocal causation parameters
I Iden 4 4
R Diag 4 4        ! specific environmental parameters
Covariances ((I-P)~ *(A+C+E+D | A+C+D _
                      A+C+D   | A+C+E+D) *((I-P)~)') + R*R' /
Specify P
0 7 0 0
8 0 0 0
0 0 0 7
0 0 8 0
Specify R
9 9 9 9
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
P Full 4 4 = P2
I Iden 4 4
R Diag 4 4 = R2
Covariances ((I-P)~ *(A+C+E+D   | H@A+C+Q@D _
                      H@A+C+Q@D | A+C+E+D) *((I-P)~)') + R*R' /
Matrix H .5
Matrix Q .25
Start .6 All
Start .1 P 2 1 1 - P 2 4 4   R 2 1 1 - R 2 4 4
Option RSidual
Options NDecimals=4
End

