! tetrachoric.mx ! estimating tetrachoric correlations The following MX script lines were read for group 1 #DEFINE NVAR 1 #DEFINE MAXTHRESF 1 ! NUMBER OF THRESHOLDS ANALYSIS OF DEPRESSION DATA: ESTIMATING TETRACHORICS & CONFIDENCE INTERVALS DATA NI=3 NO=2 NG=4 LABELS TWINA TWINB COUNTMZ ORDINAL FI=DEPMZF.REC Ordinal data read initiated NOTE: Rectangular file contained 4 records with data that contained a total of 12 observations ! Count is a definition variable that we use to tell MX the frequency count ! for each element of the 2x2 table ! DEFINITION_VARIABLES COUNTMZ / NOTE: Definition yields 4 data vectors for analysis NOTE: Vectors contain a total of 8 observations BEGIN MATRICES; W LO NVAR NVAR FR ! W*W' IS THE TETRACHORIC CORRELATION Y LO NVAR NVAR FR ! Y*Y' IS 1-TETRACHORIC CORRELATION M FU MAXTHRESF NVAR FI S DI NVAR NVAR ! MATRIX THAT WILL STORE WEIGHT VARIABLE END MATRICES; SP M 3 MATRIX M 1.5487 ! This tells MX to store the definition variable count in S SP S -1 MAT W 0.7 MAT Y 0.7 BEGIN ALGEBRA; R=W*W'; E=Y*Y'; V=R+E; END ALGEBRA; FREQ S; ! TELLS MX THAT S CONTAINS THE WEIGHT (FREQUENCY) VARIABLE TH M|M; ! TELLS MX THAT ROW AND COLUMN THRESHOLDS CONTAINED IN M_M CO V|R_R'|V; ! FORMULA FOR CORRELATION MATRIX! BO 0.001 1.0 Y(1,1) BO 0.0001 0.999 W(1,1) BO -5.0 5.0 M(1,1) INTERVAL R(1,1) ! COMPUTE 95% CONFIDENCE INTERVAL FOR CORRELATION OPT FUNC=1.E-12 OPT RS END The following MX script lines were read for group 2 ANALYSIS OF ORDINAL DATA: DZM DATA NI=3 NO=4 LABELS TWINA TWINB COUNTDZ OR FI=DEPDZF.REC Ordinal data read initiated NOTE: Rectangular file contained 4 records with data that contained a total of 12 observations DEFINITION_VARIABLES COUNTDZ / NOTE: Definition yields 4 data vectors for analysis NOTE: Vectors contain a total of 8 observations BEGIN MATRICES; W LO NVAR NVAR FR ! W*W' IS THE TETRACHORIC CORRELATION FOR DZ GROUP Y LO NVAR NVAR FR ! Y*Y' IS 1-TETRACHORIC CORRELATION FOR DZ GROUP N FU MAXTHRESF NVAR FR S DI NVAR NVAR ! MATRIX THAT WILL STORE WEIGHT VARIABLE END MATRICES; SP N 6 MATRIX N 1.4487 SP S -1 MAT W 0.6 MAT Y 0.8 BEGIN ALGEBRA; R=W*W'; E=Y*Y'; V=R+E; END ALGEBRA; FREQ S; TH N|N; CO V|R_R'|V; BO 0.001 1.0 Y(1,1) BO 0.0001 0.999 W(1,1) BO -5.0 5.0 N(1,1) INTERVAL R(1,1) ! COMPUTE 95% CONFIDENCE INTERVAL FOR CORRELATION OPT RS END The following MX script lines were read for group 3 CONSTRAINT FUNCTION - CONSTRAIN VARIANCES TO UNITY FOR MZ GROUP CO NI=1 BEGIN MATRICES = GROUP 1; U UNIT 1 NVAR END MATRICES; CO \D2V(V) = U; END The following MX script lines were read for group 4 CONSTRAINT FUNCTION - CONSTRAIN VARIANCES TO UNITY FOR DZ GROUP CO NI=1 BEGIN MATRICES = GROUP 2; U UNIT 1 NVAR END MATRICES; CO \D2V(V) = U; END Summary of VL file data for group 1 COUNTMZ TWINA TWINB Code -1.0000E+00 1.0000E+00 2.0000E+00 Number 4.0000E+00 4.0000E+00 4.0000E+00 Mean 1.4750E+02 5.0000E-01 5.0000E-01 Variance 1.1005E+04 2.5000E-01 2.5000E-01 Minimum 8.3000E+01 0.0000E+00 0.0000E+00 Maximum 3.2900E+02 1.0000E+00 1.0000E+00 Summary of VL file data for group 2 COUNTDZ TWINA TWINB Code -1.0000 1.0000 2.0000 Number 4.0000 4.0000 4.0000 Mean 110.0000 0.5000 0.5000 Variance 2882.5000 0.2500 0.2500 Minimum 63.0000 0.0000 0.0000 Maximum 201.0000 1.0000 1.0000 PARAMETER SPECIFICATIONS GROUP NUMBER: 1 Analysis of depression data: estimating tetrachorics & confidence intervals MATRIX E This is a computed FULL matrix of order 1 by 1 It has no free parameters specified MATRIX M This is a FULL matrix of order 1 by 1 1 1 3 MATRIX R This is a computed FULL matrix of order 1 by 1 It has no free parameters specified MATRIX S This is a DIAGONAL matrix of order 1 by 1 1 1 -1 MATRIX V This is a computed FULL matrix of order 1 by 1 It has no free parameters specified MATRIX W This is a LOWER TRIANGULAR matrix of order 1 by 1 1 1 1 MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by 1 1 1 2 GROUP NUMBER: 2 Analysis of ordinal data: DZm MATRIX E This is a computed FULL matrix of order 1 by 1 It has no free parameters specified MATRIX N This is a FULL matrix of order 1 by 1 1 1 6 MATRIX R This is a computed FULL matrix of order 1 by 1 It has no free parameters specified MATRIX S This is a DIAGONAL matrix of order 1 by 1 1 1 -1 MATRIX V This is a computed FULL matrix of order 1 by 1 It has no free parameters specified MATRIX W This is a LOWER TRIANGULAR matrix of order 1 by 1 1 1 4 MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by 1 1 1 5 GROUP NUMBER: 3 Constraint function - constrain variances to unity for MZ group MATRIX E This is a computed FULL matrix of order 1 by 1 It has no free parameters specified MATRIX M This is a FULL matrix of order 1 by 1 1 1 3 MATRIX R This is a computed FULL matrix of order 1 by 1 It has no free parameters specified MATRIX S This is a DIAGONAL matrix of order 1 by 1 1 1 -1 MATRIX U This is a UNIT matrix of order 1 by 1 MATRIX V This is a computed FULL matrix of order 1 by 1 It has no free parameters specified MATRIX W This is a LOWER TRIANGULAR matrix of order 1 by 1 1 1 1 MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by 1 1 1 2 GROUP NUMBER: 4 Constraint function - constrain variances to unity for DZ group MATRIX E This is a computed FULL matrix of order 1 by 1 It has no free parameters specified MATRIX N This is a FULL matrix of order 1 by 1 1 1 6 MATRIX R This is a computed FULL matrix of order 1 by 1 It has no free parameters specified MATRIX S This is a DIAGONAL matrix of order 1 by 1 1 1 -1 MATRIX U This is a UNIT matrix of order 1 by 1 MATRIX V This is a computed FULL matrix of order 1 by 1 It has no free parameters specified MATRIX W This is a LOWER TRIANGULAR matrix of order 1 by 1 1 1 4 MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by 1 1 1 5 Mx starting optimization; number of parameters = 6 MX PARAMETER ESTIMATES GROUP NUMBER: 1 Analysis of depression data: estimating tetrachorics & confidence intervals MATRIX E This is a computed FULL matrix of order 1 by 1 [=Y*Y'] 1 1 0.5660 MATRIX M This is a FULL matrix of order 1 by 1 1 1 0.5489 MATRIX R This is a computed FULL matrix of order 1 by 1 [=W*W'] 1 1 0.4340 MATRIX S This is a DIAGONAL matrix of order 1 by 1 1 1 83.0000 MATRIX V This is a computed FULL matrix of order 1 by 1 [=R+E] 1 1 1.0000 MATRIX W This is a LOWER TRIANGULAR matrix of order 1 by 1 1 1 0.6588 MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by 1 1 1 0.7523 Matrix of EXPECTED thresholds TWINA TWINB Threshold 1 0.5489 0.5489 EXPECTED COVARIANCE MATRIX TWINA TWINB TWINA 1.0000 TWINB 0.4340 1.0000 Function value of this group: 1383.2565 Where the fit function is -2 * Log-likelihood of raw ordinal GROUP NUMBER: 2 Analysis of ordinal data: DZm MATRIX E This is a computed FULL matrix of order 1 by 1 [=Y*Y'] 1 1 0.8157 MATRIX N This is a FULL matrix of order 1 by 1 1 1 0.4038 MATRIX R This is a computed FULL matrix of order 1 by 1 [=W*W'] 1 1 0.1843 MATRIX S This is a DIAGONAL matrix of order 1 by 1 1 1 63.0000 MATRIX V This is a computed FULL matrix of order 1 by 1 [=R+E] 1 1 1.0000 MATRIX W This is a LOWER TRIANGULAR matrix of order 1 by 1 1 1 0.4294 MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by 1 1 1 0.9031 Matrix of EXPECTED thresholds TWINA TWINB Threshold 1 0.4038 0.4038 EXPECTED COVARIANCE MATRIX TWINA TWINB TWINA 1.0000 TWINB 0.1843 1.0000 Function value of this group: 1126.3757 Where the fit function is -2 * Log-likelihood of raw ordinal GROUP NUMBER: 3 Constraint function - constrain variances to unity for MZ group MATRIX E This is a computed FULL matrix of order 1 by 1 [=Y*Y'] 1 1 0.5660 MATRIX M This is a FULL matrix of order 1 by 1 1 1 0.5489 MATRIX R This is a computed FULL matrix of order 1 by 1 [=W*W'] 1 1 0.4340 MATRIX S This is a DIAGONAL matrix of order 1 by 1 1 1 83.0000 MATRIX U This is a UNIT matrix of order 1 by 1 MATRIX V This is a computed FULL matrix of order 1 by 1 [=R+E] 1 1 1.0000 MATRIX W This is a LOWER TRIANGULAR matrix of order 1 by 1 1 1 0.6588 MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by 1 1 1 0.7523 GROUP NUMBER: 4 Constraint function - constrain variances to unity for DZ group MATRIX E This is a computed FULL matrix of order 1 by 1 [=Y*Y'] 1 1 0.8157 MATRIX N This is a FULL matrix of order 1 by 1 1 1 0.4038 MATRIX R This is a computed FULL matrix of order 1 by 1 [=W*W'] 1 1 0.1843 MATRIX S This is a DIAGONAL matrix of order 1 by 1 1 1 63.0000 MATRIX U This is a UNIT matrix of order 1 by 1 MATRIX V This is a computed FULL matrix of order 1 by 1 [=R+E] 1 1 1.0000 MATRIX W This is a LOWER TRIANGULAR matrix of order 1 by 1 1 1 0.4294 MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by 1 1 1 0.9031 Your model has 6 estimated parameters and 18 Observed statistics Observed statistics include 2 constraints. -2 times log-likelihood of data >>> 2509.632 Degrees of freedom >>>>>>>>>>>>>>>> 12 1 Confidence intervals requested in group 1 Matrix Element Int. Estimate Lower Upper Lfail Ufail R 1 1 1 95.0 0.4340 0.3086 0.5477 0 0 0 0 1 Confidence intervals requested in group 2 Matrix Element Int. Estimate Lower Upper Lfail Ufail R 2 1 1 95.0 0.1843 0.0306 0.3316 0 0 0 0 This problem used 2.0% of my workspace Task Time elapsed (DD:HH:MM:SS) Reading script & data 0: 0: 0: 0.00 Execution 0: 0: 0: 2.03 TOTAL 0: 0: 0: 2.03 Total number of warnings issued: 0 ______________________________________________________________________________