! Univariate example testing sex heterogeneity
! Dutch 3 year old Males - Externalizing problems from CBCL
!
! Homogeneity model
! - same magnitude of effects of A and E in males and females
!
! Group 1 calculates variance components
! Group 2 fits model to MZ male data
! Group 3 fits model to DZ male data
! Group 4 fits model to MZ female data
! Group 5 fits model to DZ female data
The following MX script lines were read for group 1
#DEFINE NVAR 1
#NGROUPS 5
Note: #NGroup set number of groups to 5
TITLE GROUP 1: PARAMETERS OF MODEL
CALCULATION
MATRICES
X FULL NVAR NVAR FREE ! A: ADDITIVE GENETIC PARAMETER
Y FULL NVAR NVAR FREE ! C: SHARED ENVIRONMENTAL PARAMETER
Z FULL NVAR NVAR FREE ! E: UNIQUE ENVIRONMENTAL PARAMETER
W FULL NVAR NVAR ! D: DOMINANCE PARAMETER
H FULL 1 1 ! SCALAR, .5
Q FULL 1 1 ! SCALAR, .25
END MATRICES;
MATRIX H .5
MATRIX Q .25
BEGIN ALGEBRA;
A=X*X'; ! A^2: ADDITIVE GENETIC VARIANCE
C=Y*Y'; ! C^2: SHARED ENVIRONMENTAL VARIANCE
E=Z*Z'; ! E^2: UNIQUE ENVIRONMENTAL VARIANCE
D=W*W'; ! D^2: DOMINANCE VARIANCE
V=A+C+E+D; ! TOTAL VARIANCE
P=A|C|E|D; ! PUT PARAMETER ESTIMATES IN ONE MATRIX
S=P@V~; ! STANDARDIZED PARAMETER ESTIMATES
END ALGEBRA;
LABELS ROW X MPAREST_A
LABELS ROW Y MPAREST_C
LABELS ROW Z MPAREST_E
LABELS ROW W MPAREST_D
LABELS ROW A A^2_F
LABELS ROW C C^2_F
LABELS ROW E E^2_F
LABELS ROW D D^2_F
LABELS ROW V VARIANCE
LABELS ROW P ESTIMATE
LABELS COL P A C E D
LABELS ROW S STANDEST
LABELS COL S A^2 C^2 E^2 D^2
END
The following MX script lines were read for group 2
TITLE G2: MALE MZ TWIN PAIRS
Note: Opening #include file 1 extmzm.dat
DATA NINPUTVARS=2 NOBSERVATIONS=1029
LABELS EXT3T1 EXT3T2
CMATRIX FILE=EXTMZM.COV
Note: Closing #include file 1
MATRICES = GROUP 1
COVARIANCES A+C+E+D | A+C+D _
A+C+D | A+C+E+D ;.
OPTION RSIDUALS
END
The following MX script lines were read for group 3
TITLE G3: MALE DZ TWIN PAIRS
Note: Opening #include file 1 extdzm.dat
DATA NINPUT=2 NOBSERVATION=1024
LABELS EXT3T1 EXT3T2
CMATRIX FILE=EXTDZM.COV
Note: Closing #include file 1
MATRICES= GROUP 1
COVARIANCES A+C+E+D | H@A+C+Q@D _
H@A+C+Q@D | A+C+E+D ;
OPTION RSIDUALS
OPTION NDECIMALS=4
END
The following MX script lines were read for group 4
TITLE G4: FEMALE MZ TWIN PAIRS
Note: Opening #include file 1 extmzf.dat
DATA NINPUTVARS=2 NOBSERVATIONS=1162
LABELS EXT3T1 EXT3T2
CMATRIX FILE=EXTMZF.COV
Note: Closing #include file 1
MATRICES = GROUP 1
COVARIANCES A+C+E+D | A+C+D _
A+C+D | A+C+E+D ;
OPTION RSIDUALS
END
The following MX script lines were read for group 5
TITLE G5: FEMALE DZ TWIN PAIRS
Note: Opening #include file 1 extdzf.dat
DATA NINPUTVARS=2 NOBSERVATIONS=968
LABELS EXT3T1 EXT3T2
CMATRIX FILE=EXTDZF.COV
Note: Closing #include file 1
MATRICES= GROUP 1
COVARIANCES A+C+E+D | H@A+C+Q@D _
H@A+C+Q@D | A+C+E+D ;
OPTION RSIDUALS
OPTION NDECIMALS=4
END
PARAMETER SPECIFICATIONS
GROUP NUMBER: 1
Title Group 1: parameters of model
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 H
This is a FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX P
This is a computed FULL matrix of order 1 by 4
It has no free parameters specified
MATRIX Q
This is a FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX S
This is a computed FULL matrix of order 1 by 4
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 FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX X
This is a FULL matrix of order 1 by 1
1
MPAREST_A 1
MATRIX Y
This is a FULL matrix of order 1 by 1
1
MPAREST_C 2
MATRIX Z
This is a FULL matrix of order 1 by 1
1
MPAREST_E 3
GROUP NUMBER: 2
Title G2: male MZ twin pairs
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 H
This is a FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX P
This is a computed FULL matrix of order 1 by 4
It has no free parameters specified
MATRIX Q
This is a FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX S
This is a computed FULL matrix of order 1 by 4
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 FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX X
This is a FULL matrix of order 1 by 1
1
MPAREST_A 1
MATRIX Y
This is a FULL matrix of order 1 by 1
1
MPAREST_C 2
MATRIX Z
This is a FULL matrix of order 1 by 1
1
MPAREST_E 3
GROUP NUMBER: 3
Title G3: male DZ twin pairs
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 H
This is a FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX P
This is a computed FULL matrix of order 1 by 4
It has no free parameters specified
MATRIX Q
This is a FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX S
This is a computed FULL matrix of order 1 by 4
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 FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX X
This is a FULL matrix of order 1 by 1
1
MPAREST_A 1
MATRIX Y
This is a FULL matrix of order 1 by 1
1
MPAREST_C 2
MATRIX Z
This is a FULL matrix of order 1 by 1
1
MPAREST_E 3
GROUP NUMBER: 4
Title G4: female MZ twin pairs
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 H
This is a FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX P
This is a computed FULL matrix of order 1 by 4
It has no free parameters specified
MATRIX Q
This is a FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX S
This is a computed FULL matrix of order 1 by 4
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 FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX X
This is a FULL matrix of order 1 by 1
1
MPAREST_A 1
MATRIX Y
This is a FULL matrix of order 1 by 1
1
MPAREST_C 2
MATRIX Z
This is a FULL matrix of order 1 by 1
1
MPAREST_E 3
GROUP NUMBER: 5
Title G5: female DZ twin pairs
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 H
This is a FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX P
This is a computed FULL matrix of order 1 by 4
It has no free parameters specified
MATRIX Q
This is a FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX S
This is a computed FULL matrix of order 1 by 4
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 FULL matrix of order 1 by 1
It has no free parameters specified
MATRIX X
This is a FULL matrix of order 1 by 1
1
MPAREST_A 1
MATRIX Y
This is a FULL matrix of order 1 by 1
1
MPAREST_C 2
MATRIX Z
This is a FULL matrix of order 1 by 1
1
MPAREST_E 3
Mx starting optimization; number of parameters = 3
*** WARNING! ***
I am not sure I have found a solution that satisfies
Kuhn-Tucker conditions for a minimum.
NAG's IFAIL parameter is 1
We probably have a minimum here, but you might consider trying different
starting values. You can randomize these with TH=n on the OU line, where
n is the number of times you wish to do this.
I STRONGLY recommend BOundaries to be set if you use TH
MX PARAMETER ESTIMATES
GROUP NUMBER: 1
Title Group 1: parameters of model
MATRIX A
This is a computed FULL matrix of order 1 by 1
[=X*X']
1
A^2_F 52.5232
MATRIX C
This is a computed FULL matrix of order 1 by 1
[=Y*Y']
1
C^2_F 28.6855
MATRIX D
This is a computed FULL matrix of order 1 by 1
[=W*W']
1
D^2_F 0.0000
MATRIX E
This is a computed FULL matrix of order 1 by 1
[=Z*Z']
1
E^2_F 21.8573
MATRIX H
This is a FULL matrix of order 1 by 1
1
1 0.5000
MATRIX P
This is a computed FULL matrix of order 1 by 4
[=A|C|E|D]
A C E D
ESTIMATE 52.5232 28.6855 21.8573 0.0000
MATRIX Q
This is a FULL matrix of order 1 by 1
1
1 0.2500
MATRIX S
This is a computed FULL matrix of order 1 by 4
[=P@V~]
A^2 C^2 E^2 D^2
STANDEST 0.5096 0.2783 0.2121 0.0000
MATRIX V
This is a computed FULL matrix of order 1 by 1
[=A+C+E+D]
1
VARIANCE 103.0660
MATRIX W
This is a FULL matrix of order 1 by 1
1
MPAREST_D 0.0000
MATRIX X
This is a FULL matrix of order 1 by 1
1
MPAREST_A 7.2473
MATRIX Y
This is a FULL matrix of order 1 by 1
1
MPAREST_C 5.3559
MATRIX Z
This is a FULL matrix of order 1 by 1
1
MPAREST_E -4.6752
GROUP NUMBER: 2
Title G2: male MZ twin pairs
MATRIX A
This is a computed FULL matrix of order 1 by 1
[=X*X']
1
A^2_F 52.5232
MATRIX C
This is a computed FULL matrix of order 1 by 1
[=Y*Y']
1
C^2_F 28.6855
MATRIX D
This is a computed FULL matrix of order 1 by 1
[=W*W']
1
D^2_F 0.0000
MATRIX E
This is a computed FULL matrix of order 1 by 1
[=Z*Z']
1
E^2_F 21.8573
MATRIX H
This is a FULL matrix of order 1 by 1
1
1 0.5000
MATRIX P
This is a computed FULL matrix of order 1 by 4
[=A|C|E|D]
A C E D
ESTIMATE 52.5232 28.6855 21.8573 0.0000
MATRIX Q
This is a FULL matrix of order 1 by 1
1
1 0.2500
MATRIX S
This is a computed FULL matrix of order 1 by 4
[=P@V~]
A^2 C^2 E^2 D^2
STANDEST 0.5096 0.2783 0.2121 0.0000
MATRIX V
This is a computed FULL matrix of order 1 by 1
[=A+C+E+D]
1
VARIANCE 103.0660
MATRIX W
This is a FULL matrix of order 1 by 1
1
MPAREST_D 0.0000
MATRIX X
This is a FULL matrix of order 1 by 1
1
MPAREST_A 7.2473
MATRIX Y
This is a FULL matrix of order 1 by 1
1
MPAREST_C 5.3559
MATRIX Z
This is a FULL matrix of order 1 by 1
1
MPAREST_E -4.6752
OBSERVED COVARIANCE MATRIX
EXT3T1 EXT3T2
EXT3T1 110.4300
EXT3T2 87.3080 108.7900
EXPECTED COVARIANCE MATRIX
EXT3T1 EXT3T2
EXT3T1 103.0660
EXT3T2 81.2087 103.0660
RESIDUAL MATRIX
EXT3T1 EXT3T2
EXT3T1 7.3640
EXT3T2 6.0993 5.7240
Function value of this group: 2.6817
Where the fit function is Maximum Likelihood
GROUP NUMBER: 3
Title G3: male DZ twin pairs
MATRIX A
This is a computed FULL matrix of order 1 by 1
[=X*X']
1
A^2_F 52.5232
MATRIX C
This is a computed FULL matrix of order 1 by 1
[=Y*Y']
1
C^2_F 28.6855
MATRIX D
This is a computed FULL matrix of order 1 by 1
[=W*W']
1
D^2_F 0.0000
MATRIX E
This is a computed FULL matrix of order 1 by 1
[=Z*Z']
1
E^2_F 21.8573
MATRIX H
This is a FULL matrix of order 1 by 1
1
1 0.5000
MATRIX P
This is a computed FULL matrix of order 1 by 4
[=A|C|E|D]
A C E D
ESTIMATE 52.5232 28.6855 21.8573 0.0000
MATRIX Q
This is a FULL matrix of order 1 by 1
1
1 0.2500
MATRIX S
This is a computed FULL matrix of order 1 by 4
[=P@V~]
A^2 C^2 E^2 D^2
STANDEST 0.5096 0.2783 0.2121 0.0000
MATRIX V
This is a computed FULL matrix of order 1 by 1
[=A+C+E+D]
1
VARIANCE 103.0660
MATRIX W
This is a FULL matrix of order 1 by 1
1
MPAREST_D 0.0000
MATRIX X
This is a FULL matrix of order 1 by 1
1
MPAREST_A 7.2473
MATRIX Y
This is a FULL matrix of order 1 by 1
1
MPAREST_C 5.3559
MATRIX Z
This is a FULL matrix of order 1 by 1
1
MPAREST_E -4.6752
OBSERVED COVARIANCE MATRIX
EXT3T1 EXT3T2
EXT3T1 97.9530
EXT3T2 53.5340 105.2900
EXPECTED COVARIANCE MATRIX
EXT3T1 EXT3T2
EXT3T1 103.0660
EXT3T2 54.9471 103.0660
RESIDUAL MATRIX
EXT3T1 EXT3T2
EXT3T1 -5.1130
EXT3T2 -1.4131 2.2240
Function value of this group: 2.0164
Where the fit function is Maximum Likelihood
GROUP NUMBER: 4
Title G4: female MZ twin pairs
MATRIX A
This is a computed FULL matrix of order 1 by 1
[=X*X']
1
A^2_F 52.5232
MATRIX C
This is a computed FULL matrix of order 1 by 1
[=Y*Y']
1
C^2_F 28.6855
MATRIX D
This is a computed FULL matrix of order 1 by 1
[=W*W']
1
D^2_F 0.0000
MATRIX E
This is a computed FULL matrix of order 1 by 1
[=Z*Z']
1
E^2_F 21.8573
MATRIX H
This is a FULL matrix of order 1 by 1
1
1 0.5000
MATRIX P
This is a computed FULL matrix of order 1 by 4
[=A|C|E|D]
A C E D
ESTIMATE 52.5232 28.6855 21.8573 0.0000
MATRIX Q
This is a FULL matrix of order 1 by 1
1
1 0.2500
MATRIX S
This is a computed FULL matrix of order 1 by 4
[=P@V~]
A^2 C^2 E^2 D^2
STANDEST 0.5096 0.2783 0.2121 0.0000
MATRIX V
This is a computed FULL matrix of order 1 by 1
[=A+C+E+D]
1
VARIANCE 103.0660
MATRIX W
This is a FULL matrix of order 1 by 1
1
MPAREST_D 0.0000
MATRIX X
This is a FULL matrix of order 1 by 1
1
MPAREST_A 7.2473
MATRIX Y
This is a FULL matrix of order 1 by 1
1
MPAREST_C 5.3559
MATRIX Z
This is a FULL matrix of order 1 by 1
1
MPAREST_E -4.6752
OBSERVED COVARIANCE MATRIX
EXT3T1 EXT3T2
EXT3T1 99.2650
EXT3T2 81.1320 106.2300
EXPECTED COVARIANCE MATRIX
EXT3T1 EXT3T2
EXT3T1 103.0660
EXT3T2 81.2087 103.0660
RESIDUAL MATRIX
EXT3T1 EXT3T2
EXT3T1 -3.8010
EXT3T2 -0.0767 3.1640
Function value of this group: 3.6222
Where the fit function is Maximum Likelihood
GROUP NUMBER: 5
Title G5: female DZ twin pairs
MATRIX A
This is a computed FULL matrix of order 1 by 1
[=X*X']
1
A^2_F 52.5232
MATRIX C
This is a computed FULL matrix of order 1 by 1
[=Y*Y']
1
C^2_F 28.6855
MATRIX D
This is a computed FULL matrix of order 1 by 1
[=W*W']
1
D^2_F 0.0000
MATRIX E
This is a computed FULL matrix of order 1 by 1
[=Z*Z']
1
E^2_F 21.8573
MATRIX H
This is a FULL matrix of order 1 by 1
1
1 0.5000
MATRIX P
This is a computed FULL matrix of order 1 by 4
[=A|C|E|D]
A C E D
ESTIMATE 52.5232 28.6855 21.8573 0.0000
MATRIX Q
This is a FULL matrix of order 1 by 1
1
1 0.2500
MATRIX S
This is a computed FULL matrix of order 1 by 4
[=P@V~]
A^2 C^2 E^2 D^2
STANDEST 0.5096 0.2783 0.2121 0.0000
MATRIX V
This is a computed FULL matrix of order 1 by 1
[=A+C+E+D]
1
VARIANCE 103.0660
MATRIX W
This is a FULL matrix of order 1 by 1
1
MPAREST_D 0.0000
MATRIX X
This is a FULL matrix of order 1 by 1
1
MPAREST_A 7.2473
MATRIX Y
This is a FULL matrix of order 1 by 1
1
MPAREST_C 5.3559
MATRIX Z
This is a FULL matrix of order 1 by 1
1
MPAREST_E -4.6752
OBSERVED COVARIANCE MATRIX
EXT3T1 EXT3T2
EXT3T1 99.8430
EXT3T2 52.1170 98.9270
EXPECTED COVARIANCE MATRIX
EXT3T1 EXT3T2
EXT3T1 103.0660
EXT3T2 54.9471 103.0660
RESIDUAL MATRIX
EXT3T1 EXT3T2
EXT3T1 -3.2230
EXT3T2 -2.8301 -4.1390
Function value of this group: 1.0255
Where the fit function is Maximum Likelihood
*** WARNING! ***
Minimization may not be successful. See above
CODE GREEN - it probably was OK
Your model has 3 estimated parameters and 12 Observed statistics
Chi-squared fit of model >>>>>>> 9.346
Degrees of freedom >>>>>>>>>>>>> 9
Probability >>>>>>>>>>>>>>>>>>>> 0.406
Akaike's Information Criterion > -8.654
RMSEA >>>>>>>>>>>>>>>>>>>>>>>>>> 0.009
This problem used 0.8% of my workspace
Task Time elapsed (DD:HH:MM:SS)
Reading script & data 0: 0: 0: 0.17
Execution 0: 0: 0:-0.06
TOTAL 0: 0: 0: 0.11
Total number of warnings issued: 2
______________________________________________________________________________