! Mixture distribution model for MZ & DZ misclassification

G1: Model parameters
Data Calc NGroups=2
Begin Matrices;
I Unit 1 1
H Full 1 1
Q Full 1 1
M Full 1 1 Free
X Lower 1 1 Free
Y Lower 1 1 Free
Z Lower 1 1 Free
W Lower 1 1 
End Matrices;
! parameters are fixed by default, unless declared free
Matrix H .5
Matrix Q .25
Start .6 All

Begin Algebra;
A= X*X';
C= Y*Y';
E= Z*Z';
D= W*W';
N=M|M_M|M;
End Algebra:
End

G2: All twin pairs
Data NInput_vars=3 Nmodel=2
Labels t1 t2 pmz
Rectangular File=sim1.mz
Select t1 t2 pmz ;
Definition pmz ;

Matrices= Group 1
P Full 1 1
End Matrices;

Specify P pmz

Means N;
Covariances A+C+D+E | A+C+D _
            A+C+D   | A+C+D+E _
            A+C+D+E   | H@A+C+Q@D _
            H@A+C+Q@D | A+C+D+E ;
Weights P_I-P;
Options RSidual
End 



