Multiformity model. ! You can express B&A if you are above second threshold on A or ! above the second threshold on B ! A & B are otherwise independent. ! ! MZ correlation matrix A factor DA CALC NG=8 MATRICES A Lo 1 1 Free C Lo 1 1 Free I id 1 1 begin algebra; X = A*A' ; Y = C*C' ; end algebra; COMPUTE I|X+Y_ X+Y|I ; Option RS SE End G2 CALCULATION GROUP DZ Correlation matrix A factor DA CALC MATRICES A Lo 1 1 =A1 C Lo 1 1 =C1 H fu 1 1 I id 1 1 begin algebra; X = A*A' ; Y = C*C' ; end algebra ; COMPUTE I|H@X+Y_ H@X+Y|I ; Matrix H .5 Option RS End G3 MZ correlation matrix B factor DA CALC MATRICES A Lo 1 1 Free C Lo 1 1 Free I id 1 1 begin algebra; X = A*A' ; Y = C*C' ; end algebra; COMPUTE I|X+Y_ X+Y|I ; Option RS SE End G4 CALCULATION GROUP DZ Correlation matrix B factor DA CALC MATRICES A Lo 1 1 =A3 C Lo 1 1 =C3 H fu 1 1 I id 1 1 begin algebra; X = A*A' ; Y = C*C' ; end algebra ; COMPUTE I|H@X+Y_ H@X+Y|I ; Matrix H .5 Option RS End Compute predicted MZ proportions Data CALC Matrices A Full 2 2 =%E1 ! corr between A factors B Full 2 2 =%E3 ! corr between B factors Q Full 1 1 ! scalar 2.0 R Full 1 1 Free ! Positive Deviation of upper from lower Threshold for A S Full 1 1 Free ! Lower Threshold for A T Full 1 1 Free ! Positive Deviation of upper from lower Threshold for B U Full 1 1 Free ! Lower Threshold for B W Zero 1 2 ! + + These are to control integral type X Zi 1 2 ! + - Z Unit 1 2 ! - - Begin Algebra; C = \muln((A_S|S_S|S_Z)) ; ! lower/lower stripe of A D = \muln((A_S|S+R_S|S_Z+X)) ; ! lower/middle stripe of A E = \muln((A_S+R|S_S+R|S_X)) ; ! lower/upper stripe of A F = \muln((A_S+R|S+R_S|S_Z+Z)) ; ! middle/middle stripe of A G = \muln((A_S+R|S+R_S+R|S_X+X)) ; ! middle/upper stripe of A H = \muln((A_S+R|S+R_S+R|S+R_W)) ; ! upper/upper stripe of A I = \muln((B_U|U_U|U_Z)) ; ! lower/lower stripe of B J = \muln((B_U|T+U_U|U_Z+X)) ; ! lower/middle stripe of B K = \muln((B_T+U|U_T+U|U_X)) ; ! lower/upper stripe of B L = \muln((B_T+U|T+U_U|U_Z+Z)) ; ! middle/middle stripe of B M = \muln((B_T+U|T+U_T+U|U_X+X)) ; ! middle/upper stripe of B N = \muln((B_T+U|T+U_T+U|T+U_W)) ; ! upper/upper stripe of B V = C.I _ Q.(C.J) _ Q.(D.I) _ Q.(E.(I+J+K) + D.(J+K) + C.K) _ C.L _ Q.(D.J) _ Q.(E.(J+L+M) + D.(L+M) + C.M) _ F.I _ Q.(G.(I+J+K) +F.(J+K) + D.K) _ H + N - H.N + G.(J+K+L+M+M) + E.(K+M) + G.(J+L+M+K+M) + F.(L+M+M) + D.M + E.(K+M) + D.M; end algebra; compute V ; Matrix Q 2 Matrix R 1 Matrix S 0 Matrix T 1 Matrix U -1 Option RS End G6 Compute predicted DZ proportions Data CALC Matrices A Full 2 2 =%E2 ! corr between A factors B Full 2 2 =%E4 ! corr between B factors Q Full 1 1 =Q5 ! scalar 2.0 R Full 1 1 =R5 ! Positive Deviation of upper from lower Threshold for A S Full 1 1 =S5 ! Lower Threshold for A T Full 1 1 =T5 ! Positive Deviation of upper from lower Threshold for B U Full 1 1 =U5 ! Lower Threshold for B W Zero 1 2 ! + + These are to control integral type X Zi 1 2 ! + - Z Unit 1 2 ! - - Begin Algebra; C = \muln((A_S|S_S|S_Z)) ; ! lower/lower stripe of A D = \muln((A_S|S+R_S|S_Z+X)) ; ! lower/middle stripe of A E = \muln((A_S+R|S_S+R|S_X)) ; ! lower/upper stripe of A F = \muln((A_S+R|S+R_S|S_Z+Z)) ; ! middle/middle stripe of A G = \muln((A_S+R|S+R_S+R|S_X+X)) ; ! middle/upper stripe of A H = \muln((A_S+R|S+R_S+R|S+R_W)) ; ! upper/upper stripe of A I = \muln((B_U|U_U|U_Z)) ; ! lower/lower stripe of B J = \muln((B_U|T+U_U|U_Z+X)) ; ! lower/middle stripe of B K = \muln((B_T+U|U_T+U|U_X)) ; ! lower/upper stripe of B L = \muln((B_T+U|T+U_U|U_Z+Z)) ; ! middle/middle stripe of B M = \muln((B_T+U|T+U_T+U|U_X+X)) ; ! middle/upper stripe of B N = \muln((B_T+U|T+U_T+U|T+U_W)) ; ! upper/upper stripe of B V = C.I _ Q.(C.J) _ Q.(D.I) _ Q.(E.(I+J+K) + D.(J+K) + C.K) _ C.L _ Q.(D.J) _ Q.(E.(J+L+M) + D.(L+M) + C.M) _ F.I _ Q.(G.(I+J+K) +F.(J+K) + D.K) _ H + N - H.N + G.(J+K+L+M+M) + E.(K+M) + G.(J+L+M+K+M) + F.(L+M+M) + D.M + E.(K+M) + D.M; end algebra; compute V ; Start 1 R 1 1 T 1 1 Start 0 S 1 1 U 1 1 Option RS End G7 Fit model to MZ data Data No=1 NI=1 Matrices O Full 10 1 ! observed data Y Full 1 1 ! Sample size K Full 10 1 =%E5 begin algebra; L = Y@K ; end algebra; compute \sum((L-O).(L-O)%L) ; Matrix O File=admz.frq Matrix Y File=admz.n Option func=.000001 Option RS User-def End G8 Fit model to DZ data Data No=1 NI=1 Matrices O Full 10 1 ! observed data Y Full 1 1 ! Sample size K Full 10 1 =%E6 ! predicted DZ proportions begin algebra; L = Y@K ; end algebra; compute \sum((L-O).(L-O)%L) ; Matrix O File=addz.frq Matrix Y File=addz.n Bound 0 1 1 2 3 4 Bound -2 3 6 8 Bound 0 3 5 7 Option func=.000001 Option RS User-def th=-2 Option multiple End Save multiform.mxs ! multiformity of first variable only, anxiety Drop @3 7 End Get multiform.mxs ! multiformity of second variable, depression Drop @3 5 End