! univariate3x3.mx
! fitting a univariate genetic model to 3x3 data
The following MX script lines were read for group 1
#DEFINE NVAR 1
#DEFINE MAXTHRESF 2 ! NUMBER OF THRESHOLDS
ANALYSIS OF DEPRESSION DATA: ESTIMATING TETRACHORICS & CONFIDENCE INTERVALS
DATA NI=3 NO=9 NG=3
LABELS TWINA TWINB COUNTMZ
ORDINAL FI=SMKMZF.REC
Ordinal data read initiated
NOTE: Rectangular file contained 9 records with data
that contained a total of 27 observations
and 1 records where all data were missing
! Count is a definition variable that we use to tell MX the frequency count
! for each element of the 3x3 table
!
DEFINITION_VARIABLES COUNTMZ /
NOTE: Definition yields 9 data vectors for analysis
NOTE: Vectors contain a total of 18 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
L LO MAXTHRESF MAXTHRESF ! USED TO ENSURE T1 < T2
S DI NVAR NVAR ! MATRIX THAT WILL STORE WEIGHT VARIABLE
END MATRICES;
SP M
4
5
MATRIX M 1.5487
0.5
MATRIX L
1
1 1
! 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;
T=L*M;
END ALGEBRA;
FREQ S; ! TELLS MX THAT S CONTAINS THE WEIGHT (FREQUENCY) VARIABLE
TH T|T; ! TELLS MX THAT ROW AND COLUMN THRESHOLDS CONTAINED IN T|T
CO V|A+D+C_
A'+D'+C'|V; ! FORMULA FOR CORRELATION MATRIX!
BO 0.001 1.0 Y(1,1) M(2,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=9
LABELS TWINA TWINB COUNTDZ
OR FI=SMKDZF.REC
Ordinal data read initiated
NOTE: Rectangular file contained 9 records with data
that contained a total of 27 observations
and 1 records where all data were missing
DEFINITION_VARIABLES COUNTDZ /
NOTE: Definition yields 9 data vectors for analysis
NOTE: Vectors contain a total of 18 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
6
7
MATRIX N
1.4487
0.5
MAT G 0.5
MAT H 0.25
SP S
-1
BEGIN ALGEBRA;
T=L*N;
*** WARNING! ***
Matrix was previously defined for this group. New definition accepted
END ALGEBRA;
FREQ S;
TH T|T;
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)
BO 0.001 1.0 N(2,1)
OPT RS
END
The following MX script lines were read for group 3
CONSTRAINT FUNCTION - CONSTRAIN VARIANCES TO UNITY
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 9.0000E+00 9.0000E+00 9.0000E+00
Mean 1.3689E+02 1.0000E+00 1.0000E+00
Variance 3.1949E+04 6.6667E-01 6.6667E-01
Minimum 5.5000E+01 0.0000E+00 0.0000E+00
Maximum 6.2900E+02 2.0000E+00 2.0000E+00
Summary of VL file data for group 2
COUNTDZ TWINA TWINB
Code -1.0000 1.0000 2.0000
Number 9.0000 9.0000 9.0000
Mean 83.0000 1.0000 1.0000
Variance 6923.2778 0.6667 0.6667
Minimum 30.5000 0.0000 0.0000
Maximum 310.0000 2.0000 2.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 L
This is a LOWER TRIANGULAR matrix of order 2 by 2
It has no free parameters specified
MATRIX M
This is a FULL matrix of order 2 by 1
1
1 4
2 5
MATRIX S
This is a DIAGONAL matrix of order 1 by 1
1
1 -1
MATRIX T
This is a computed FULL matrix of order 2 by 1
It has no free parameters specified
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 L
This is a LOWER TRIANGULAR matrix of order 2 by 2
It has no free parameters specified
MATRIX M
This is a FULL matrix of order 2 by 1
1
1 4
2 5
MATRIX N
This is a FULL matrix of order 2 by 1
1
1 6
2 7
MATRIX S
This is a DIAGONAL matrix of order 1 by 1
1
1 -1
MATRIX T
This is a computed FULL matrix of order 2 by 1
It has no free parameters specified
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
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 L
This is a LOWER TRIANGULAR matrix of order 2 by 2
It has no free parameters specified
MATRIX M
This is a FULL matrix of order 2 by 1
1
1 4
2 5
MATRIX S
This is a DIAGONAL matrix of order 1 by 1
1
1 -1
MATRIX T
This is a computed FULL matrix of order 2 by 1
It has no free parameters specified
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 = 7
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.5836
MATRIX C
This is a computed FULL matrix of order 1 by 1
[=X*X']
1
1 0.1823
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.2341
MATRIX L
This is a LOWER TRIANGULAR matrix of order 2 by 2
1 2
1 1.0000
2 1.0000 1.0000
MATRIX M
This is a FULL matrix of order 2 by 1
1
1 0.2809
2 0.3979
MATRIX S
This is a DIAGONAL matrix of order 1 by 1
1
1 190.0000
MATRIX T
This is a computed FULL matrix of order 2 by 1
[=L*M]
1
1 0.2809
2 0.6788
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.7639
MATRIX X
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 0.4269
MATRIX Y
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 0.4839
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.2809 0.2809
Threshold 2 0.6788 0.6788
EXPECTED COVARIANCE MATRIX
TWINA TWINB
TWINA 1.0000
TWINB 0.7659 1.0000
Function value of this group: 4094.3378
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.5836
MATRIX C
This is a computed FULL matrix of order 1 by 1
[=X*X']
1
1 0.1823
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.2341
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 L
This is a LOWER TRIANGULAR matrix of order 2 by 2
1 2
1 1.0000
2 1.0000 1.0000
MATRIX M
This is a FULL matrix of order 2 by 1
1
1 0.2809
2 0.3979
MATRIX N
This is a FULL matrix of order 2 by 1
1
1 0.1992
2 0.4108
MATRIX S
This is a DIAGONAL matrix of order 1 by 1
1
1 99.0000
MATRIX T
This is a computed FULL matrix of order 2 by 1
[=L*N]
1
1 0.1992
2 0.6100
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.7639
MATRIX X
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 0.4269
MATRIX Y
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 0.4839
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.1992 0.1992
Threshold 2 0.6100 0.6100
EXPECTED COVARIANCE MATRIX
TWINA TWINB
TWINA 1.0000
TWINB 0.4741 1.0000
Function value of this group: 2765.7220
Where the fit function is -2 * Log-likelihood of raw ordinal
GROUP NUMBER: 3
Constraint function - constrain variances to unity
MATRIX A
This is a computed FULL matrix of order 1 by 1
[=W*W']
1
1 0.5836
MATRIX C
This is a computed FULL matrix of order 1 by 1
[=X*X']
1
1 0.1823
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.2341
MATRIX L
This is a LOWER TRIANGULAR matrix of order 2 by 2
1 2
1 1.0000
2 1.0000 1.0000
MATRIX M
This is a FULL matrix of order 2 by 1
1
1 0.2809
2 0.3979
MATRIX S
This is a DIAGONAL matrix of order 1 by 1
1
1 190.0000
MATRIX T
This is a computed FULL matrix of order 2 by 1
[=L*M]
1
1 0.2809
2 0.6788
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.7639
MATRIX X
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 0.4269
MATRIX Y
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 0.4839
MATRIX Z
This is a LOWER TRIANGULAR matrix of order 1 by 1
1
1 0.0000
Your model has 7 estimated parameters and 37 Observed statistics
Observed statistics include 1 constraints.
-2 times log-likelihood of data >>> 6860.060
Degrees of freedom >>>>>>>>>>>>>>>> 30
3 Confidence intervals requested in group 1
Matrix Element Int. Estimate Lower Upper Lfail Ufail
A 1 1 1 95.0 0.5836 0.3990 0.7781 0 0 0 0
C 1 1 1 95.0 0.1823 0.0000 0.3510 0 0 0 0
E 1 1 1 95.0 0.2341 0.1958 0.2777 0 1 0 0
This problem used 1.4% of my workspace
Task Time elapsed (DD:HH:MM:SS)
Reading script & data 0: 0: 0: 0.05
Execution 0: 0: 0: 9.29
TOTAL 0: 0: 0: 9.34
Total number of warnings issued: 2
______________________________________________________________________________