! Genetic Factor Model
! Weight data in Swedisch twins

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

G2: young female MZ twin pairs
Data NInput_vars=12 NObservations=32
CMatrix Symmetric File=swwtmz.cov
Matrices= Group 1
Covariances A+E | A _
            A   | A+E /
Option RSidual
End 

G6: young female DZ twin pairs
Data NInput_vars=12 NObservations=51
CMatrix Symmetric File=swwtdz.cov
Matrices= Group 1
H Full 1 1
Covariances A+E | H@A _
            H@A | A+E /
Matrix H .5
Start 4 All
Option RSidual
Options NDecimals=4
End

