! univariate.mx
! fitting a univariate genetic model to 2x2 data
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=3
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 ! ADDITIVE GENETIC PATH (A=W*W')
X LO NVAR NVAR FR ! SHARED ENVIRONMENTAL PATH (C=X*X')
Y LO NVAR NVAR FR ! NON-SHARED ENVIRONMENTAL PATH (E=Y*Y')
Z LO NVAR NVAR FI ! NON-ADDITIVE GENETIC PATH (D=Z*Z')
M FU MAXTHRESF NVAR FI ! MATRIX OF THRESHOLDS
S DI NVAR NVAR ! MATRIX THAT WILL STORE WEIGHT VARIABLE
END MATRICES;
SP M
4
MATRIX M 1.5487
! This tells MX to store the definition variable count in S
SP S
-1
MAT W 0.5
MAT X 0.5
MAT Y 0.7
BEGIN ALGEBRA;
A=W*W';
C=X*X';
E=Y*Y';
D=Z*Z';
V=A+C+D+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|A+D+C_
A'+D'+C'|V; ! FORMULA FOR CORRELATION MATRIX!
BO 0.001 1.0 Y(1,1)
BO 0.0001 0.999 W(1,1) X(1,1)
BO -5.0 5.0 M(1,1)
INTERVAL A(1,1) C(1,1) E(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 ALCOHOL TOLERANCE AND DEPENDENCE 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 = GROUP 1;
S DI NVAR NVAR ! MATRIX THAT WILL STORE WEIGHT VARIABLE
*** WARNING! ***
Matrix was previously defined for this group. Mx will redefine
G DI 1 1 ! CONSTANT (=0.5) FOR COEFFICIENT OF ADDITIVE GENETIC COMPONENT
H DI 1 1 ! CONSTANT (=0.25) FOR COEFFICIENT OF DOMINANCE GENETIC COMPONENT
N FU MAXTHRESF NVAR FI ! MATRIX OF THRESHOLDS
END MATRICES;
SP N
5
MATRIX N 1.4487
MAT G 0.5
MAT H 0.25
SP S
-1
FREQ S;
TH N|N;
CO V|G@A+H@D+C_
G@A'+H@D'+C'|V; ! FORMULA FOR CORRELATION MATRIX!
BO -5.0 5.0 N(1,1)
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
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 A
This is a computed FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX C
This is a computed FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX D
This is a computed FULL matrix of order 1 by 1
It has no free parameters specified
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 4
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 X
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 2
MATRIX Y
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 3
MATRIX Z
This is a LOWER TRIANGULAR matrix of order 1 by 1
It has no free parameters specified
GROUP NUMBER: 2
Analysis of ordinal alcohol tolerance and dependence data: DZm
MATRIX A
This is a computed FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX C
This is a computed FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX D
This is a computed FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX E
This is a computed FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX G
This is a DIAGONAL matrix of order 1 by 1
It has no free parameters specified
MATRIX H
This is a DIAGONAL 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 4
MATRIX N
This is a FULL matrix of order 1 by 1
1
1 5
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 X
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 2
MATRIX Y
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 3
MATRIX Z
This is a LOWER TRIANGULAR matrix of order 1 by 1
It has no free parameters specified
GROUP NUMBER: 3
Constraint function - constrain variances to unity for MZ group
MATRIX A
This is a computed FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX C
This is a computed FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX D
This is a computed FULL matrix of order 1 by 1
It has no free parameters specified
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 4
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 X
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 2
MATRIX Y
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 3
MATRIX Z
This is a LOWER TRIANGULAR matrix of order 1 by 1
It has no free parameters specified
Mx starting optimization; number of parameters = 5
MX PARAMETER ESTIMATES
GROUP NUMBER: 1
Analysis of depression data: estimating tetrachorics & confidence intervals
MATRIX A
This is a computed FULL matrix of order 1 by 1
[=W*W']
1
1 0.4250
MATRIX C
This is a computed FULL matrix of order 1 by 1
[=X*X']
1
1 1.0000E-08
MATRIX D
This is a computed FULL matrix of order 1 by 1
[=Z*Z']
1
1 0.0000
MATRIX E
This is a computed FULL matrix of order 1 by 1
[=Y*Y']
1
1 0.5750
MATRIX M
This is a FULL matrix of order 1 by 1
1
1 0.5493
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
[=A+C+D+E]
1
1 1.0000
MATRIX W
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 0.6519
MATRIX X
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 1.0000E-04
MATRIX Y
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 0.7583
MATRIX Z
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 0.0000
Matrix of EXPECTED thresholds
TWINA TWINB
Threshold 1 0.5493 0.5493
EXPECTED COVARIANCE MATRIX
TWINA TWINB
TWINA 1.0000
TWINB 0.4250 1.0000
Function value of this group: 1383.2782
Where the fit function is -2 * Log-likelihood of raw ordinal
GROUP NUMBER: 2
Analysis of ordinal alcohol tolerance and dependence data: DZm
MATRIX A
This is a computed FULL matrix of order 1 by 1
[=W*W']
1
1 0.4250
MATRIX C
This is a computed FULL matrix of order 1 by 1
[=X*X']
1
1 1.0000E-08
MATRIX D
This is a computed FULL matrix of order 1 by 1
[=Z*Z']
1
1 0.0000
MATRIX E
This is a computed FULL matrix of order 1 by 1
[=Y*Y']
1
1 0.5750
MATRIX G
This is a DIAGONAL matrix of order 1 by 1
1
1 0.5000
MATRIX H
This is a DIAGONAL matrix of order 1 by 1
1
1 0.2500
MATRIX M
This is a FULL matrix of order 1 by 1
1
1 0.5493
MATRIX N
This is a FULL matrix of order 1 by 1
1
1 0.4034
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
[=A+C+D+E]
1
1 1.0000
MATRIX W
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 0.6519
MATRIX X
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 1.0000E-04
MATRIX Y
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 0.7583
MATRIX Z
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 0.0000
Matrix of EXPECTED thresholds
TWINA TWINB
Threshold 1 0.4034 0.4034
EXPECTED COVARIANCE MATRIX
TWINA TWINB
TWINA 1.0000
TWINB 0.2125 1.0000
Function value of this group: 1126.5097
Where the fit function is -2 * Log-likelihood of raw ordinal
GROUP NUMBER: 3
Constraint function - constrain variances to unity for MZ group
MATRIX A
This is a computed FULL matrix of order 1 by 1
[=W*W']
1
1 0.4250
MATRIX C
This is a computed FULL matrix of order 1 by 1
[=X*X']
1
1 1.0000E-08
MATRIX D
This is a computed FULL matrix of order 1 by 1
[=Z*Z']
1
1 0.0000
MATRIX E
This is a computed FULL matrix of order 1 by 1
[=Y*Y']
1
1 0.5750
MATRIX M
This is a FULL matrix of order 1 by 1
1
1 0.5493
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
[=A+C+D+E]
1
1 1.0000
MATRIX W
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 0.6519
MATRIX X
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 1.0000E-04
MATRIX Y
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 0.7583
MATRIX Z
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 0.0000
Your model has 5 estimated parameters and 17 Observed statistics
Observed statistics include 1 constraints.
-2 times log-likelihood of data >>> 2509.788
Degrees of freedom >>>>>>>>>>>>>>>> 12
3 Confidence intervals requested in group 1
Matrix Element Int. Estimate Lower Upper Lfail Ufail
A 1 1 1 95.0 0.4250 0.1045 0.5325 0 0 0 0
C 1 1 1 95.0 0.0000 0.0000 0.2609 0 1 0 1
E 1 1 1 95.0 0.5750 0.4675 0.6940 0 0 0 0
This problem used 1.3% of my workspace
Task Time elapsed (DD:HH:MM:SS)
Reading script & data 0: 0: 0: 0.00
Execution 0: 0: 0: 7.63
TOTAL 0: 0: 0: 7.63
Total number of warnings issued: 1
______________________________________________________________________________