!
! Script for threshold model
! MDD data, Kendler et al, 1992
! Described in Neale & Miller, submitted
! The interval command is the second to last line of the script
! Note how it works equally for a parameter matrix like X and for
! a computed (i.e. non-linearly constrained) matrix like A or E.
!
G1: Model parameters
Data Calc NGroups=3
Begin Matrices;
I Ident 1 1
X Lower 1 1 Free
Y Lower 1 1 Free
W Lower 1 1
T Full 2 1
End Matrices;
! parameters are fixed by default, unless declared free
Begin Algebra;
A= X*X';
C= Y*Y';
D= W*W';
E= I-A-C-D;
End Algebra;
Specify T 3 3 ! put two new, equated parameters in T
End Group;

G2: Female MZ twin pairs
Data NInput_vars=2
Labels dep_t1 dep-t2
CTable 2 2
329 83
95 83
Matrices= Group 1
Thresholds T /
Covariances A+C+D+E | A+C+D _
            A+C+D   | A+C+D+E /
Options RSidual
End Group;

G3: Female DZ twin pairs
Data NInput_vars=2 
Labels dep_t1 dep-t2
CTable 2 2
201 94
82 63
Matrices= Group 1
H Full 1 1
Q Full 1 1
Thresholds T /
Covariances A+C+D+E   | H@A+C+Q@D _
            H@A+C+Q@D | A+C+D+E /

Matrix H .5
Matrix Q .25
Start .6 All
Bound .001 1 Y 1 1 X 1 1
Intervals A 1 1 1 C 1 1 1 E 1 1 1 X 1 1 1 Y 1 1 1
End Group;   

