! Independent Pathway Model
! Asthma, Hayfever, Dust allergy, Eczema in Australian female twins

G1: model parameters
Data Calc NGroups=3
Begin Matrices;
X Full 4 1 Free     ! genetic common factor
W Full 4 1 Free     ! dominance common factor
Z Full 4 1 Free     ! specific environmental common factor
G Diag 4 4 Free     ! genetic specifics
F Diag 4 4 Free     ! specific environmental specifics
End Matrices;
Begin Algebra;
A= X*X'+ G*G';
D= W*W' ;
E= Z*Z'+ F*F' ;
End Algebra;
End

G2: female MZ twin pairs
Data NInput_vars=8 NObservations=1232
Labels asthma1 hayfvr1 dustal1 eczema1
 asthma2 hayfvr2 dustal2 eczema2
PMatrix File=ozastmz.cov
ACov File=ahdemzf.acv
Matrices= Group 1
Covariances A+D+E | A+D _
            A+D   | A+D+E /
Option RSidual
End 

G3: female DZ twin pairs
Data NInput_vars=8 NObservations=751
Labels asthma1 hayfvr1 dustal1 eczema1
 asthma2 hayfvr2 dustal2 eczema2
Pmatrix File=ozastdz.cov
ACov File=ahdedzf.acv
Matrices= Group 1
H Full 1 1
Q Full 1 1
Covariances A+D+E   | H@A+Q@D _
            H@A+Q@D | A+D+E /
Matrix H .5
Matrix Q .25
Start .4 All
Option RSidual
Options DFreedom=-12 NDecimals=4 Iterations=200
End

