! The dataset is limited to DZ twin pairs only ! Test -- simulated data from Stacey ! #define nvar 1 #define nvarx2 2 G1: DZ twins only DATA NGroups = 2 NInput=9 Rectangular File=set2.rec Labels p1 p2 a1s1 a2s1 a1s2 a2s2 share1 share2 type !Select p1 p2 share1 share2 type ; Definition_variables a1s1 a2s1 a1s2 a2s2 share1 share2 type ; Begin Matrices A Lower nvarx2 nvarx2 Free ! Additive genetic influences F Full 2 1 ! Allele count for sib1 H Full 2 1 ! Allele count for sib2 I Full 1 1 J Unit 1 1 K Full 1 1 B Full 1 1 ! Beta weight for individual allele count N Full 1 1 Free ! Overall mean U Unit 1 2 V Full 9 1 W Full 2 1 Free ! ab and aw parameters X Full 9 1 End Matrices Specify F a1s1 a2s1 Specify H a1s2 a2s2 Matrix I 1 Specify I type Matrix K 2 !Specify V 101 102 103 102 104 105 103 105 0 Matrix V 1 .5 0 .5 0 -.5 0 -.5 -1 Matrix X 0 .5 1 -.5 0 .5 -1 -.5 0 Begin Algebra; E = I|J|I|K ; Z = \part((V|X),E)*W | \part((V|-X),E)*W ; End Algebra; Means (N + (B@U)*F | N + (B@U)*H) + Z; Covariance A*A' ; Matrix A 1 0 1 Start 0.0 B 1 1 Bound -5 5 B 1 1 Bound -5 5 N 1 1 !INtervals B 1 1 Option nd=4 it=5000 OPtion RS Multiple Option issat End Title check Calc Begin Matrices = Group 1; End Matrices; Begin Algebra; Q = (V|X)*W | (V|-X)*W ; End Algebra; End save set2.mxs equate w 1 1 1 w 1 2 1 End Drop w 1 1 1 End