\documentstyle[11pt]{article}
\setlength{\topmargin}{-.5in}
\setlength{\oddsidemargin}{.0in}
\setlength{\evensidemargin}{.0in}
\setlength{\textheight}{8.8in}
\setlength{\textwidth}{6.6in}
\begin{document}
\newpage
\hspace{-.145in}\Huge\bf{Mx Scripts of Book Examples}
\normalsize
\section*{The Alphabet}
\begin{table}
\begin{center}
\begin{tabular}{ccc}
\hline
Uppercase & Lowercase & Name\\
\hline
A & a &\\
B & b &\\
C & c &\\
D & d &\\
E & e &\\
F & f &\\
G & g &\\
H & h &\\
I & i &\\
J & j &\\
K & k &\\
L & l &\\
M & m &\\
N & n &\\
O & o &\\
P & p &\\
Q & q &\\
R & r &\\
S & s &\\
T & t &\\
U & u &\\
V & v &\\
W & w &\\
X & x &\\
Y & y &\\
Z & z &\\
\hline
\end{tabular}
\end{center}
\end{table}

\newpage
\section*{Mx Scripts for Univariate Models}
\subsection*{C1. Univariate Path Coefficients Model\newline
 Australian BMI Data of Young Female Twins}
\small\begin{verbatim}
G1: genetic structure
Data Calc NGroups=6
Matrices
A Lower 1 1 Free
Compute A*A' /      ! estimate a^2
End

G2: common environmental structure
Data Calc 
Matrices
C Lower 1 1 Fixed   ! parameters are fixed by default, unless declared free
Compute C*C' /      ! estimate c^2
End

G3: specific environmental structure
Data Calc 
Matrices
E Lower 1 1 Free
Compute E*E' /      ! estimate e^2
End

G4: dominance structure
Data Calc  
Matrices
D Lower 1 1 Free
Compute D*D' /      ! estimate d^2
End

G5: young female MZ twin pairs
Data NInput_vars=2 NObservations=534
Labels
bmi_t1 bmi-t2
CMatrix Symmetric
.7247
.5891 .7915
Matrices
A Symm 1 1 = %E1  ! expected matrix of group 1
C Symm 1 1 = %E2  ! expected matrix of group 2
E Symm 1 1 = %E3  ! ..
D Symm 1 1 = %E4
Covariances A+C+D+E | A+C+D _
            A+C+D   | A+C+D+E /
Options RSidual
End 

G6: young female DZ twin pairs
Data NInput_vars=2 NObservations=328
Labels
bmi_t1 bmi-t2
CMatrix Symmetric
.7786
.2461 .8365
Matrices
A Symm 1 1 = %E1
C Symm 1 1 = %E2
E Symm 1 1 = %E3
D Symm 1 1 = %E4
H Full 1 1
Q Full 1 1
Covariances A+C+D+E   | H@A+C+Q@D _
            H@A+C+Q@D | A+C+D+E /
Matrix H .5
Matrix Q .25
Start .6 All
Options RSidual NDecimals=4
End
\end{verbatim}\normalsize

\subsection*{C3. Univariate Model for Means and Covariances\newline
 Australian BMI Data of Older Female Twins}
\small\begin{verbatim}
G1: genetic structure
Data Calc NGroups=6
Matrices
A Lower 1 1 Free
Compute A*A' /
End

G2: common environmental structure
Data Calc 
Matrices
C Lower 1 1 Fixed
Compute C*C' /
End

G3: specific environmental structure
Data Calc 
Matrices
E Lower 1 1 Free
Compute E*E' /
End

G4: dominance structure
Data Calc  
Matrices
D Lower 1 1 Fixed
Compute D*D' /
End

G5: older female MZ twin pairs
Data NInput-vars=2 NObservations=637
Means
.3408 .3510
CMatrix Symmetric
.9759
.6656 .9544
Labels
bmi_t1 bmi-t2
Matrices
A Symm 1 1 = %E1  ! expected matrix of group 1
C Symm 1 1 = %E2  ! expected matrix of group 2
E Symm 1 1 = %E3  ! ..
D Symm 1 1 = %E4
M Full 2 1 free
Means M /         ! model for means
Covariances       ! model for covariances
 A+C+D+E | A+C+D _
 A+C+D   | A+C+D+E /
Options RSidual
End 

G6: older female dz twin pairs
Data NInput-vars=2 NObservations=380
Means
.4444 .4587
CMatrix Symmetric
.9150
.3124 1.0420
Labels
bmi_t1 bmi-t2
Matrices
A Symm 1 1 = %E1
C Symm 1 1 = %E2
E Symm 1 1 = %E3
D Symm 1 1 = %E4
H Full 1 1
Q Full 1 1
M Full 2 1 free
Means M /
Covariances A+C+D+E   | H@A+C+Q@D _
            H@A+C+Q@D | A+C+D+E /
Matrix H .5
Matrix Q .25
Start .6 All
Start .3 M 5 1 1 M 5 2 1 M 6 1 1 M 6 2 1
Options Multiple RSidual
End

!no heterogeneity of means for birthorder
Specify 5 M   ! equate pt1=pt2 for mz twins, 5 refers to group 5
3 3
Specify 6 M   ! equate pt1=pt2 for dz twins
5 5
End

!no heterogeneity of means for zygosity
Specify 6 M   ! equate means in group 2 to group 1
3 3
End
\end{verbatim}\normalsize

\subsection*{C4. Univariate Genetic Model for Twin pairs and Singles\newline
 Australian BMI Data of Older Female Twins}
\small\begin{verbatim}
G1: genetic structure
Data Calc NGroups=8
Matrices
A Lower 1 1 Free
Compute A*A' /
End

G2: common environmental structure
Data Calc 
Matrices
C Lower 1 1 Fixed
Compute C*C' /
End

G3: specific environmental structure
Data Calc 
Matrices
E Lower 1 1 Free
Compute E*E' /
End

G4: dominance structure
Data Calc  
Matrices
D Lower 1 1 Fixed
Compute D*D' /
End

G5: older female MZ twin pairs
Data NInput-vars=2 NObservations=637
Means
.3408 .3510
CMatrix Symmetric
.9759
.6656 .9544
Labels
bmi_t1 bmi-t2
Matrices
A Symm 1 1 = %E1  ! expected matrix of group 1
C Symm 1 1 = %E2  ! expected matrix of group 2
E Symm 1 1 = %E3  ! ..
D Symm 1 1 = %E4
M Full 2 1 
Means M /         ! model for means
Covariances       ! model for covariances
 A+C+D+E | A+C+D _
 A+C+D   | A+C+D+E /
Specify M 3 3
Option RSidual
End 

G6: older female dz twin pairs
Data NInput-vars=2 NObservations=380
Means
.4444 .4587
CMatrix Symmetric
.9150
.3124 1.0420
Labels
bmi_t1 bmi-t2
Matrices
A Symm 1 1 = %E1
C Symm 1 1 = %E2
E Symm 1 1 = %E3
D Symm 1 1 = %E4
H Full 1 1
Q Full 1 1
M Full 2 1 
Means M /
Covariances A+C+D+E   | H@A+C+Q@D _
            H@A+C+Q@D | A+C+D+E /
Specify M 3 3
Matrix H .5
Matrix Q .25
Option RSidual
End

G7: older female mz twins whose cotwins did not respond
Data NInput-vars=1 NObservations=44
Means
.6852
CMatrix Symmetric
1.1461
Labels
bmi
Matrices
A Symm 1 1 = %E1
C Symm 1 1 = %E2
E Symm 1 1 = %E3
D Symm 1 1 = %E4
M Full 1 1 
Means M /
Covariances A+C+D+E /
Specify M 3
Option RSidual
End

G8: older female dz twins whose cotwins did not respond
Data NInput-vars=1 NObservations=62
Means
1.0168
CMatrix Symmetric
1.7357
Labels
bmi
Matrices
A Symm 1 1 = %E1
C Symm 1 1 = %E2
E Symm 1 1 = %E3
D Symm 1 1 = %E4
M Full 1 1 
Means M /
Covariances A+C+D+E /
Specify M 3
Start .6 All
Start .3 M 5 1 1 M 5 2 1 M 6 1 1 M 6 2 1 M 7 1 1 M 8 1 1
Options NDecimals=4
Option RSidual
End 
\end{verbatim}\normalsize

\subsection*{C5. Age-correction Model\newline
 Australian Conservatism Data of Female Twins}
\small\begin{verbatim}
G1: genetic structure
Data Calc NGroups=6
Matrices
A Lower 1 1 Free
Compute A*A' /
End

G2: common environmental structure
Data Calc 
Matrices
C Lower 1 1 Free
Compute C*C' /
End

G3: specific environmental structure
Data Calc 
Matrices
E Lower 1 1 Free
Compute E*E' /
End

G4: age
Data Calc 
Matrices
Y Lower 1 1 Free   ! effect of age on phenotype
Compute Y*Y' /
End

G5: female MZ twin pairs
Data NInput_vars=3 NObservations=941
Labels
age cons_t1 cons-t2
CMatrix Symmetric
179.522
 63.463 143.361
 66.167  97.159 141.530
Matrices
A Symm 1 1 = %E1  ! expected matrix of group 1
C Symm 1 1 = %E2  ! expected matrix of group 2
E Symm 1 1 = %E3  ! ..
Y Symm 1 1 = %E4
S Lower 1 1 =Y4
V Lower 1 1 Free  ! variance of age
Covariances V*V  | S*V     | S*V    _
            S*V  | A+C+E+Y | A+C+Y  _
            S*V  | A+C+Y   | A+C+E+Y /
Option RSidual
End 

G6: female dz twin pairs
Data NInput_vars=3 NObservations=548
Labels
age cons_t1 cons-t2
CMatrix Symmetric
168.343
 66.365 141.840
 76.316  88.083 157.763
Matrices
A Symm 1 1 = %E1
C Symm 1 1 = %E2
E Symm 1 1 = %E3
D Symm 1 1 = %E4
H Full 1 1
Y Symm 1 1 = %E4
S Lower 1 1 =Y4
V Lower 1 1 =V5
Covariances V*V  | S*V     | S*V    _
            S*V  | A+C+E+Y | H@A+C+Y  _
            S*V  | H@A+C+Y | A+C+E+Y /
Matrix H .5
Start 5 All
Start 15 V 5 1 1
Options NDecimals=4
Option RSidual
End
\end{verbatim}\normalsize

\newpage
\section*{Mx Script for Power Calculation}
\subsection*{D1. ACE Model for Power Calculations\newline
 Power calculation with classical twin design}
\small\begin{verbatim}
! Part 1: simulate the data

! To simulate: 
!    30% additive genetic   (.5477^2=.3)
!    20% common environment (.4472^2=.2)
!    50% random environment (.7071^2=.5)

G1: genetic structure
Data Calc NGroups=5
Matrices
A Lower 1 1 Fixed
Compute A*A' /
Matrix A .5477 
End

G2: common environmental structure
Data Calc 
Matrices
C Lower 1 1 Fixed
Compute C*C' /
Matrix C .4472 
End

G3: specific environmental structure
Data Calc 
Matrices
E Lower 1 1 Fixed
Compute E*E' /
Matrix E .7071
End

G4: MZ twin pairs
Data Calc NInput_vars=2 
Matrices
A Symm 1 1 = %E1  ! expected matrix of group 1
C Symm 1 1 = %E2  ! expected matrix of group 2
E Symm 1 1 = %E3  ! ..
Covariances A+C+E | A+C _
            A+C   | A+C+E /
Options MX%E=mzsim.cov  
Options NO_output
End

G5: DZ twin pairs
Data Calc NInput_vars=2 
Matrices
A Symm 1 1 = %E1
C Symm 1 1 = %E2
E Symm 1 1 = %E3
H Full 1 1
Covariances A+C+E  | H@A+C _
            H@A+C  | A+C+E /
Matrix H .5
Options MX%E=dzsim.cov
Options NO_output  
End

! The simulation is complete.  Now the next, stacked, problem
! will fit the wrong model to the simulated data

G1: genetic structure
Data Calc NGroups=5
Matrices
A Lower 1 1 Free
Compute A*A' /
End

G2: common environmental structure
Data Calc 
Matrices
C Lower 1 1 Fixed
Compute C*C' /
End

G3: specific environmental structure
Data Calc 
Matrices
E Lower 1 1 Free
Compute E*E' /
End

G4: MZ twin pairs
Data NInput_vars=2 NObservations=1000
Labels Twin_1 Twin_2
CMatrix Full File=mzsim.cov
Matrices
A Symm 1 1 = %E1  ! expected matrix of group 1
C Symm 1 1 = %E2  ! expected matrix of group 2
E Symm 1 1 = %E3  ! ..
Covariances A+C+E | A+C _
            A+C   | A+C+E /
Option RSiduals
End

G5: DZ twin pairs
Data NInput_vars=2 NObservations=1000
Labels Twin_1 Twin_2
CMatrix Full File=dzsim.cov
Matrices
A Symm 1 1 = %E1
C Symm 1 1 = %E2
E Symm 1 1 = %E3
H Full 1 1
Covariances A+C+E  | H@A+C _
            H@A+C  | A+C+E /
Matrix H .5
Start .5 All
Options RSiduals Power= .05,1     ! For .05 level of sig. and 1 df.
End
\end{verbatim}\normalsize

\newpage
\section*{Mx Scripts for Multivariate Models}
\subsection*{E1. Genetic Factor Model\newline
 Australian Arithmetic Computation Data of Female Twins}
\small\begin{verbatim}
G1: genetic structure
Data Calc NGroups=5
Matrices
A Full 4 1 Free  ! genetic common factor
Compute A*A' /
End

G2: common environmental structure
Data Calc 
Matrices
C Full 4 1 Free  ! shared environmental common factor
Compute C*C' /
End

G3: specific environmental structure
Data Calc 
Matrices
E Full 4 1 Free  ! specific environmental common factor
F Diag 4 4 Free  ! specific environmental specifics
Compute E*E' + F*F'/
End

G4: female MZ twin pairs
Data NInput_vars=8 NObservations=43
Labels
Tw1-T0 Tw1-T1 Tw1-T2 Tw1-T3 Tw2-T0 Tw2-T1 Tw2-T2 Tw2-T3
CMatrix 
 .259664D+03 .209325D+03 .259939D+03 .209532D+03 .220755D+03 .245235D+03
 .221610D+03 .221491D+03 .221317D+03 .249298D+03 .211678D+03 .200684D+03
 .191937D+03 .196068D+03 .283802D+03 .166020D+03 .187932D+03 .164335D+03
 .177413D+03 .193615D+03 .249487D+03 .184389D+03 .191922D+03 .182497D+03
 .188341D+03 .213771D+03 .220240D+03 .262092D+03 .179332D+03 .188079D+03
 .180813D+03 .195734D+03 .218767D+03 .224939D+03 .230575D+03 .270928D+03
Matrices
A Symm 4 4 = %E1  ! expected matrix of group 1
C Symm 4 4 = %E2  ! expected matrix of group 2
E Symm 4 4 = %E3  ! ..
Covariances A+C+E | A+C _
            A+C   | A+C+E /
Option RSidual
End 

G5: female DZ twin pairs
Data NInput_vars=8 NObservations=44
Labels
Tw1-T0 Tw1-T1 Tw1-T2 Tw1-T3 Tw2-T0 Tw2-T1 Tw2-T2 Tw2-T3
CMatrix
 .297917D+03 .232357D+03 .229414D+03 .231170D+03 .213544D+03 .247423D+03
 .236979D+03 .214943D+03 .225486D+03 .274943D+03 .670523D+02 .790291D+02
 .951977D+02 .932791D+02 .281959D+03 .730122D+02 .919974D+02 .102842D+03
 .120643D+03 .257657D+03 .359701D+03 .490507D+02 .628626D+02 .754841D+02
 .105886D+03 .240163D+03 .295774D+03 .326934D+03 .661126D+02 .777743D+02
 .907304D+02 .103362D+03 .227552D+03 .273660D+03 .263839D+03 .281088D+03
Matrices
A Symm 4 4 = %E1
C Symm 4 4 = %E2
E Symm 4 4 = %E3
H Full 1 1
Covariances A+C+E   | H@A+C _
            H@A+C   | A+C+E /
Matrix H .5
Start .5 All
Option RSidual
Options Multiple NDecimals=4
End

! no shared environmental common factor
Drop 5 to 8
End
\end{verbatim}\normalsize

\subsection*{E3. Bivariate Genetic Factor Model (Second Genetic Factor)\newline
 Australian Arithmetic Computation Data of Female Twins}
\small\begin{verbatim}
G1: genetic structure
Data Calc NGroups=5
Matrices
A Full 4 2 Free  ! genetic common factor
Compute A*A' /
Specify A
1 0
2 5              ! 5: second genetic common factor
3 5
4 5
End

G2: common environmental structure
Data Calc 
Matrices
C Full 4 1 Fixed  ! shared environmental common factor
Compute C*C' /
End

G3: specific environmental structure
Data Calc 
Matrices
E Full 4 1 Free  ! specific environmental common factor
F Diag 4 4 Free  ! specific environmental specifics
Compute E*E' + F*F'/
End

G4: female MZ twin pairs
Data NInput_vars=8 NObservations=43
Labels
Tw1-T0 Tw1-T1 Tw1-T2 Tw1-T3 Tw2-T0 Tw2-T1 Tw2-T2 Tw2-T3
CMatrix 
 .259664D+03 .209325D+03 .259939D+03 .209532D+03 .220755D+03 .245235D+03
 .221610D+03 .221491D+03 .221317D+03 .249298D+03 .211678D+03 .200684D+03
 .191937D+03 .196068D+03 .283802D+03 .166020D+03 .187932D+03 .164335D+03
 .177413D+03 .193615D+03 .249487D+03 .184389D+03 .191922D+03 .182497D+03
 .188341D+03 .213771D+03 .220240D+03 .262092D+03 .179332D+03 .188079D+03
 .180813D+03 .195734D+03 .218767D+03 .224939D+03 .230575D+03 .270928D+03
Matrices
A Symm 4 4 = %E1  ! expected matrix of group 1
C Symm 4 4 = %E2  ! expected matrix of group 2
E Symm 4 4 = %E3  ! ..
Covariances A+C+E | A+C _
            A+C   | A+C+E /
Option RSidual
End 

G5: female DZ twin pairs
Data NInput_vars=8 NObservations=44
Labels
Tw1-T0 Tw1-T1 Tw1-T2 Tw1-T3 Tw2-T0 Tw2-T1 Tw2-T2 Tw2-T3
CMatrix
 .297917D+03 .232357D+03 .229414D+03 .231170D+03 .213544D+03 .247423D+03
 .236979D+03 .214943D+03 .225486D+03 .274943D+03 .670523D+02 .790291D+02
 .951977D+02 .932791D+02 .281959D+03 .730122D+02 .919974D+02 .102842D+03
 .120643D+03 .257657D+03 .359701D+03 .490507D+02 .628626D+02 .754841D+02
 .105886D+03 .240163D+03 .295774D+03 .326934D+03 .661126D+02 .777743D+02
 .907304D+02 .103362D+03 .227552D+03 .273660D+03 .263839D+03 .281088D+03
Matrices
A Symm 4 4 = %E1
C Symm 4 4 = %E2
E Symm 4 4 = %E3
H Full 1 1
Covariances A+C+E   | H@A+C _
            H@A+C   | A+C+E /
Matrix H .5
Start .5 All
Option RSidual
Options NDecimals=4
End
\end{verbatim}\normalsize

\subsection*{E4. Genetic Cholesky Model\newline
 Schieken Skinfold Measurements of Male Twins}
\small\begin{verbatim}
G1: genetic structure
Data Calc NGroups=4
Matrices
A Lower 4 4 Free  ! genetic cholesky (lower triangular)
Compute A*A' /
End

G2: specific environmental structure
Data Calc 
Matrices
E Lower 4 4 Free  ! specific environmental cholesky
Compute E*E' /
End

G3: MZ twin pairs
Data NInput_vars=8 NObservations=84
Labels
Bicep1 Subsca1 Supra1 Tricep1 Bicep2 Subsca2 Supra2 Tricep2
CMatrix
.1285 
.1270  .1759 
.1704  .2156  .3031 
.1035  .1101  .1469  .1041 
.0982  .1069  .1491  .0824  .1233 
.0999  .1411  .1848  .0880  .1295  .1894
.1256  .1654  .2417  .1095  .1616  .2185  .2842 
.0836  .0907  .1341  .0836  .1010  .1134  .1436  .1068
Matrices
A Symm 4 4 = %E1  ! expected matrix of group 1
E Symm 4 4 = %E2  ! expected matrix of group 2
Covariances A+E | A _
            A   | A+E /
Option RSidual
End 

G4: DZ twin pairs
Data NInput_vars=8 NObservations=33
Labels
Bicep1 Subsca1 Supra1 Tricep1 Bicep2 Subsca2 Supra2 Tricep2
CMatrix
.1538 
.1999  .3007 
.2266  .3298  .3795 
.1285  .1739  .2007  .1271 
.0435  .0336  .0354  .0376  .1782 
.0646  .0817  .0741  .0543  .2095  .3081 
.0812  .0901  .0972  .0666  .2334  .3241  .3899 
.0431  .0388  .0376  .0373  .1437  .1842  .2108  .1415
Matrices
A Symm 4 4 = %E1
E Symm 4 4 = %E2
H Full 1 1
Covariances A+E   | H@A _
            H@A   | A+E /
Matrix H .5
Start .5 All
Option RSidual
Options NDecimals=4
End
\end{verbatim}\normalsize

\subsection*{E5. Independent Pathway Model\newline
 Australian Atopy Data (asthma,hayfever,dust allergy,eczema) of Female Twins}
\small\begin{verbatim}
G1: genetic structure
Data Calc NGroups=5
Matrices
A Full 4 1 Free  ! genetic common factor
G Diag 4 4 Free  ! genetic specifics
Compute A*A' + G*G' /
End

G2: dominance structure
Data Calc 
Matrices
D Full 4 1 Free  ! dominance common factor
Compute D*D' /
End

G3: specific environmental structure
Data Calc 
Matrices
E Full 4 1 Free  ! specific environmental common factor
F Diag 4 4 Free  ! specific environmental specifics
Compute E*E' + F*F'/
End

G4: female MZ twin pairs
Data NInput_vars=8 NObservations=1232
Labels
asthma1 hayfvr1 dustal1 eczema1 asthma2 hayfvr2 dustal2 eczema2
PMatrix 
1.000
 .556    1.000
 .573     .758    1.000
 .273     .264     .309    1.000
 .592     .366     .398     .232    1.000
 .411     .593     .451     .145     .549    1.000
 .434     .421     .518     .192     .640     .770    1.000
 .087     .196     .193     .589     .145     .122     .218    1.000
!ACov File=ahdemzf.acv
Matrices
A Symm 4 4 = %E1  ! expected matrix of group 1
D Symm 4 4 = %E2  ! expected matrix of group 2
E Symm 4 4 = %E3  ! ..
Covariances A+D+E | A+D _
            A+D   | A+D+E /
Option RSidual
End 

G5: female DZ twin pairs
Data NInput_vars=8 NObservations=751
Labels
asthma1 hayfvr1 dustal1 eczema1 asthma2 hayfvr2 dustal2 eczema2
PMatrix
1.000
 .524    1.000
 .588     .749    1.000
 .291     .314     .279    1.000
 .262     .170     .041     .139    1.000
 .129     .318     .262     .093     .395    1.000
 .079     .171     .214     .019     .684     .723    1.000
 .217     .114     .087     .313     .254     .218     .276    1.000
!ACov File=ahdedzf.acv
Matrices
A Symm 4 4 = %E1
D Symm 4 4 = %E2
E Symm 4 4 = %E3
H Full 1 1
Q Full 1 1
Covariances A+D+E   | H@A+Q@D _
            H@A+Q@D | A+D+E /
Matrix H .5
Matrix Q .25
Start .3 All
Option RSidual
Options DFreedom=-12 NDecimals=4 Iterations=200
End
\end{verbatim}\normalsize

\subsection*{E6. Common Pathway Model\newline
 Australian Atopy Data (asthma,hayfever,dust allergy,eczema) of Female Twins}
\small\begin{verbatim}
G1: genetic structure
Data Calc NGroups=8
Matrices
A Lower 1 1 Free  ! genetic factor on latent phenotype
Compute A*A' /
End

G2: shared environmental structure
Data Calc 
Matrices
C Lower 1 1 Free  ! shared environmental factor on latent phenotype
Compute C*C' /
End

G3: dominance structure
Data Calc 
Matrices
D Lower 1 1 Free  ! dominance factor on latent phenotype
Compute D*D' /
End

G4: specific environmental structure
Data Calc 
Matrices
E Lower 1 1 Free  ! specific environmental factor on latent phenotype
Compute E*E' /
End

G5: genetic structure
Data Calc 
Matrices
G Diag 4 4 Free  ! genetic factors on variables
Compute G*G' /
End

G6: specific environmental structure
Data Calc 
Matrices
J Diag 4 4 Free  ! specific environmental factors on variables
Compute J*J' /
End

G4: female MZ twin pairs
Data NInput_vars=8 NObservations=1232
Labels
asthma1 hayfvr1 dustal1 eczema1 asthma2 hayfvr2 dustal2 eczema2
PMatrix File=ahdemzf.cor
!ACov File=ahdemzf.acv
Matrices
A Symm 1 1 = %E1  
C Symm 1 1 = %E2  
D Symm 1 1 = %E3  
E Symm 1 1 = %E4  
F Full 4 1 Free   ! factor structure
G Symm 4 4 = %E6  
J Symm 4 4 = %E7  
I Iden 2 2
Covariances G+J | G _
            G   | G+J  +  I@F*(A+C+D+E | A+C+D _
                               A+C+D   | A+C+D+E )*(I@F)'/
Option RSidual
End 

G5: female DZ twin pairs
Data NInput_vars=8 NObservations=751
Labels
asthma1 hayfvr1 dustal1 eczema1 asthma2 hayfvr2 dustal2 eczema2
PMatrix File ahdedzf.cor
!ACov File=ahdedzf.acv
Matrices
Matrices
A Symm 1 1 = %E1  
C Symm 1 1 = %E2  
D Symm 1 1 = %E3  
E Symm 1 1 = %E4  
F Full 4 1 Free
G Symm 4 4 = %E6  
J Symm 4 4 = %E7  
I Iden 2 2
H Full 1 1
Q Full 1 1
Covariances G+J | H@G _
            H@G | G+J  +  I@F*(A+C+D+E   | H@A+C+Q@D _
                               H@A+C+Q@D | A+C+D+E  )*(I@F)'/
Matrix H .5
Matrix Q .25
Start .3 All
Option RSidual
Options DFreedom=-12 NDecimals=4 Iterations=200
End
\end{verbatim}\normalsize

\newpage
\section*{Mx Script for Sibling Interaction Model}
\subsection*{F1. Sibling Interaction Model\newline
 Maternal Ratings of Children's Externalizing Behavior Problems\newline
 Data from Achenbach Child Behavior Checklist of School Age Twins in Virginia}
\small\begin{verbatim}
G1: genetic structure
Data Calc NGroups=4
Matrices
A Lower 1 1 Free
Compute A*A' /
End

G2: specific environmental structure
Data Calc 
Matrices
E Lower 1 1 Free
Compute E*E' /
End

G3: Male MZ twins in larger families
Data NInput_vars=2 NObservations=171
Labels
exter1 exter2
CMatrix Symmetric
0.923
0.798 0.907
Matrices
A Symm 1 1 = %E1  
E Symm 1 1 = %E2
B Symm 2 2        ! sibling interaction parameters
I Iden 2 2
Covariances (I-B)~ *(A+E | A _
                     A   | A+E) *((I-B)~)' /
Specify B
0 3 0
Options RSidual
End 

G4: Male DZ twins in larger families
Data NInput_vars=2 NObservations=194
Labels
exter1 exter2
CMatrix Symmetric
0.671
0.448 0.700
Matrices
A Symm 1 1 = %E1
E Symm 1 1 = %E2
B Symm 2 2 = B3
H Full 1 1
I Iden 2 2
Covariances (I-B)~ *(A+E | H@A _
                     H@A | A+E) *((I-B)~)' /
Matrix H .5
Start .3 All
Start .0 B 3 2 1 B 4 2 1
Options NDecimals=4
Options RSidual
End
\end{verbatim}\normalsize

\newpage
\section*{Mx Scripts for Sex and G$\times$E Interaction Models}
\subsection*{G1. General Model for Scalar Sex-Limitation\newline
 US BMI in Male and Female Twins}
\small\begin{verbatim}
G1: female genetic structure
Data Calc NGroups=13
Matrices
A Lower 1 1 Free
Compute A*A' /
End

G2: female dominance structure
Data Calc  
Matrices
D Lower 1 1 Free
Compute D*D' /
End

G3: female specific environmental structure
Data Calc 
Matrices
E Lower 1 1 Free
Compute E*E' /
End

G4: male genetic structure
Data Calc 
Matrices
A Lower 1 1 Free
Compute A*A' /
End

G5: male dominance structure
Data Calc  
Matrices
D Lower 1 1 Free
Compute D*D' /
End

G6: male specific environmental structure
Data Calc 
Matrices
E Lower 1 1 Free
Compute E*E' /
End

G7: male set of genes 
Data Calc 
Matrices
A Lower 1 1 Free
Compute A*A' /
End

G8: male set of dominance genes
Data Calc  
Matrices
D Lower 1 1 Fixed
Compute D*D' /
End

G9: Female MZ twin pairs
Data NInput_vars=2 NObservations=1802
Labels
bmi_t1 bmi-t2
CMatrix Symmetric
.276533 0.203348 0.269922
Matrices
A Symm 1 1 = %E1
D Symm 1 1 = %E2
E Symm 1 1 = %E3
Covariances A+D+E | A+D _
            A+D   | A+D+E /
Option RSidual
End 

G10: Female DZ twin pairs
Data NInput_vars=2 NObservations=1142
Labels
bmi_t1 bmi-t2
CMatrix Symmetric
.284734 0.098942 0.278211 
Matrices
A Symm 1 1 = %E1
D Symm 1 1 = %E2
E Symm 1 1 = %E3
H Full 1 1
Q Full 1 1
Covariances A+D+E   | H@A+Q@D _
            H@A+Q@D | A+D+E /
Matrix H .5
Matrix Q .25
Start .5 All
Option RSidual
End

G11: Male MZ twin pairs
Data NInput_vars=2 NObservations=750
Labels
bmi_t1 bmi-t2
CMatrix Symmetric
0.154669 0.104787 0.144701
Matrices
A Symm 1 1 = %E4
D Symm 1 1 = %E5
E Symm 1 1 = %E6
M Symm 1 1 = %E7
Covariances A+D+E+M | A+D+M _
            A+D+M   | A+D+E+M /
Option RSidual
End 

G12: Male DZ twin pairs
Data NInput_vars=2 NObservations=553
Labels
bmi_t1 bmi-t2
CMatrix Symmetric
0.160091 0.050899 0.168401
Matrices
A Symm 1 1 = %E4
D Symm 1 1 = %E5
E Symm 1 1 = %E6
H Full 1 1
Q Full 1 1
M Symm 1 1 = %E7
Covariances A+D+E+M     | H@A+Q@D+H@M _
            H@A+Q@D+H@M | A+D+E+M   /
Matrix H .5
Matrix Q .25
Start .5 All
Option RSidual
End

G13: Female-Male DZ twin pairs
Data NInput_vars=2 NObservations=1341
Labels
bmi_t1 bmi-t2
CMatrix Symmetric
0.273517 0.054524 0.172811
Matrices
A Symm 1 1 = %E1
D Symm 1 1 = %E2
E Symm 1 1 = %E3
J Symm 1 1 = %E4
K Symm 1 1 = %E5
L Symm 1 1 = %E6
H Full 1 1
Q Full 1 1
M Symm 1 1 = %E7
Covariances A+D+E                         | H@(\sqrt(A*J))+Q@(\sqrt(D*K)) _
            H@(\sqrt(A*J))+Q@(\sqrt(D*K)) | J+K+L+M   /
Matrix H .5
Matrix Q .25
Start .5 All
Option RSidual
Options NDecimals=4
End
\end{verbatim}\normalsize

\subsection*{G2. Scalar Sex-Limitation Model\newline
 US BMI}
\small\begin{verbatim}
G1: genetic structure
Data Calc NGroups=8
Matrices
A Lower 1 1 Free
Compute A*A' /
End

G2: dominance structure
Data Calc  
Matrices
D Lower 1 1 Free
Compute D*D' /
End

G3: specific environmental structure
Data Calc 
Matrices
E Lower 1 1 Free
Compute E*E' /
End

G4: Female MZ twin pairs
Data NInput_vars=2 NObservations=1802
Labels
bmi_t1 bmi-t2
CMatrix Symmetric
.276533 0.203348 0.269922
Matrices
A Symm 1 1 = %E1
D Symm 1 1 = %E2
E Symm 1 1 = %E3
Covariances A+D+E | A+D _
            A+D   | A+D+E /
Option RSidual
End 

G5: Female DZ twin pairs
Data NInput_vars=2 NObservations=1142
Labels
bmi_t1 bmi-t2
CMatrix Symmetric
.284734 0.098942 0.278211 
Matrices
A Symm 1 1 = %E1
D Symm 1 1 = %E2
E Symm 1 1 = %E3
H Full 1 1
Q Full 1 1
Covariances A+D+E   | H@A+Q@D _
            H@A+Q@D | A+D+E /
Matrix H .5
Matrix Q .25
Option RSidual
End

G6: Male MZ twin pairs
Data NInput_vars=2 NObservations=750
Labels
bmi_t1 bmi-t2
CMatrix Symmetric
0.154669 0.104787 0.144701
Matrices
A Symm 1 1 = %E1
D Symm 1 1 = %E2
E Symm 1 1 = %E3
K Diag 2 2        ! common multiplier
Covariances K *(A+D+E | A+D _
                A+D   | A+D+E) *K' /
Specify K 4 4
Option RSidual
End 

G7: Male DZ twin pairs
Data NInput_vars=2 NObservations=553
Labels
bmi_t1 bmi-t2
CMatrix Symmetric
0.160091 0.050899 0.168401
Matrices
A Symm 1 1 = %E1
D Symm 1 1 = %E2
E Symm 1 1 = %E3
H Full 1 1 = H5
Q Full 1 1 = Q5
K Diag 2 2 = K6
Covariances K *(A+D+E   | H@A+Q@D _
                H@A+Q@D | A+D+E) *K' /
Option RSidual
End

G8: Female-Male DZ twin pairs
Data NInput_vars=2 NObservations=1341
Labels
bmi_t1 bmi-t2
CMatrix Symmetric
0.273517 0.054524 0.172811
Matrices
A Symm 1 1 = %E1
D Symm 1 1 = %E2
E Symm 1 1 = %E3
H Full 1 1 = H5
Q Full 1 1 = Q5
K Diag 2 2 
Covariances K *(A+D+E   | H@A+Q@D _
                H@A+Q@D | A+D+E) *K' /
Specify K 0 4
Matrix K 1 0
Bound 0 1 K 6 1 1 K 6 2 2 K 7 1 1 K 7 2 2 K 8 2 2
Start .7 All
Option RSidual
Options NDecimals=4
End
\end{verbatim}\normalsize

\subsection*{G3. General Model for GxE Interaction\newline
 Australian Depression Data in Concordant and Discordant Married Twins}
\small\begin{verbatim}
G1: singles genetic structure
Data Calc NGroups=14
Matrices
A Lower 1 1 Free
Compute A*A' /
End

G2: singles dominance structure
Data Calc  
Matrices
D Lower 1 1 Free
Compute D*D' /
End

G3: singles specific environmental structure
Data Calc 
Matrices
E Lower 1 1 Free
Compute E*E' /
End

G4: married genetic structure
Data Calc 
Matrices
A Lower 1 1 Free
Compute A*A' /
End

G5: married dominance structure
Data Calc  
Matrices
D Lower 1 1 Free
Compute D*D' /
End

G6: married specific environmental structure
Data Calc 
Matrices
E Lower 1 1 Free
Compute E*E' /
End

G7: set of genes for married couples
Data Calc 
Matrices
A Lower 1 1 Free
Compute A*A' /
End

G8: set of dominance genes for married couples 
Data Calc  
Matrices
D Lower 1 1 Fixed
Compute D*D' /
End

G9: Concordant single MZ twin pairs
Data NInput_vars=2 NObservations=254
Labels
dep_t1 bmi-t2
CMatrix Symmetric
0.0968 0.0381 0.0896
Matrices
A Symm 1 1 = %E1
D Symm 1 1 = %E2
E Symm 1 1 = %E3
Covariances A+D+E | A+D _
            A+D   | A+D+E /
Option RSidual
End 

G10: Concordant single DZ twin pairs
Data NInput_vars=2 NObservations=155
Labels
dep_t1 bmi-t2
CMatrix Symmetric
0.1087 0.0250 0.1182
Matrices
A Symm 1 1 = %E1
D Symm 1 1 = %E2
E Symm 1 1 = %E3
H Full 1 1
Q Full 1 1
Covariances A+D+E   | H@A+Q@D _
            H@A+Q@D | A+D+E /
Matrix H .5
Matrix Q .25
Start .5 All
Option RSidual
End

G11: Concordant married MZ twin pairs
Data NInput_vars=2 NObservations=177
Labels
dep_t1 bmi-t2
CMatrix Symmetric
0.1002 0.0336 0.0769
Matrices
A Symm 1 1 = %E4
D Symm 1 1 = %E5
E Symm 1 1 = %E6
M Symm 1 1 = %E7
Covariances A+D+E+M | A+D+M _
            A+D+M   | A+D+E+M /
Option RSidual
End 

G12: Concordant married DZ twin pairs
Data NInput_vars=2 NObservations=107
Labels
dep_t1 bmi-t2
CMatrix Symmetric
0.0692 0.0076 0.0882
Matrices
A Symm 1 1 = %E4
D Symm 1 1 = %E5
E Symm 1 1 = %E6
H Full 1 1 = H10
Q Full 1 1 = Q10
M Symm 1 1 = %E7
Covariances A+D+E+M     | H@A+Q@D+H@M _
            H@A+Q@D+H@M | A+D+E+M   /
Option RSidual
End

G13: Discordant MZ twin pairs
Data NInput_vars=2 NObservations=139
Labels
dep_t1 bmi-t2
CMatrix Symmetric
0.1198 0.0359 0.1009
Matrices
A Symm 1 1 = %E1
D Symm 1 1 = %E2
E Symm 1 1 = %E3
J Symm 1 1 = %E4
K Symm 1 1 = %E5
L Symm 1 1 = %E6
H Full 1 1 = H10
Q Full 1 1 = Q10
M Symm 1 1 = %E7
Covariances A+D+E                         | (\sqrt(A*J))+(\sqrt(D*K)) _
            (\sqrt(A*J))+(\sqrt(D*K)) | J+K+L+M   /
Option RSidual
End

G14: Discordant DZ twin pairs
Data NInput_vars=2 NObservations=87
Labels
dep_t1 bmi-t2
CMatrix Symmetric
0.1013 0.0050 0.0694
Matrices
A Symm 1 1 = %E1
D Symm 1 1 = %E2
E Symm 1 1 = %E3
J Symm 1 1 = %E4
K Symm 1 1 = %E5
L Symm 1 1 = %E6
H Full 1 1 = H10
Q Full 1 1 = Q10
M Symm 1 1 = %E7
Covariances A+D+E                         | H@(\sqrt(A*J))+Q@(\sqrt(D*K)) _
            H@(\sqrt(A*J))+Q@(\sqrt(D*K)) | J+K+L+M   /
Start .5 All
Option RSidual
Options NDecimals=4
End
\end{verbatim}\normalsize

\subsection*{G4. Scaler GxE Interaction\newline
 Australian Depression Data of Concordant and Discordant Married Twins}
\small\begin{verbatim}
G1: genetic structure
Data Calc NGroups=9
Matrices
A Lower 1 1 Free
Compute A*A' /
End

G2: dominance structure
Data Calc  
Matrices
D Lower 1 1 Fixed
Compute D*D' /
End

G3: specific environmental structure
Data Calc 
Matrices
E Lower 1 1 Free
Compute E*E' /
End

G4: Concordant single MZ twin pairs
Data NInput_vars=2 NObservations=254
Labels
dep_t1 bmi-t2
CMatrix Symmetric
0.0968 0.0381 0.0896
Matrices
A Symm 1 1 = %E1
D Symm 1 1 = %E2
E Symm 1 1 = %E3
Covariances A+D+E | A+D _
            A+D   | A+D+E /
Option RSidual
End 

G5: Concordant single DZ twin pairs
Data NInput_vars=2 NObservations=155
Labels
dep_t1 bmi-t2
CMatrix Symmetric
0.1087 0.0250 0.1182
Matrices
A Symm 1 1 = %E1
D Symm 1 1 = %E2
E Symm 1 1 = %E3
H Full 1 1
Q Full 1 1
Covariances A+D+E   | H@A+Q@D _
            H@A+Q@D | A+D+E /
Matrix H .5
Matrix Q .25
Start .5 All
Option RSidual
End

G6: Concordant married MZ twin pairs
Data NInput_vars=2 NObservations=177
Labels
dep_t1 bmi-t2
CMatrix Symmetric
0.1002 0.0336 0.0769
Matrices
A Symm 1 1 = %E1
D Symm 1 1 = %E2
E Symm 1 1 = %E3
K Diag 2 2        ! scalar
Covariances K *(A+D+E | A+D _
                A+D   | A+D+E) *K' /
Specify K 4 4
Option RSidual
End 

G7: Concordant married DZ twin pairs
Data NInput_vars=2 NObservations=107
Labels
dep_t1 bmi-t2
CMatrix Symmetric
0.0692 0.0076 0.0882
Matrices
A Symm 1 1 = %E1
D Symm 1 1 = %E2
E Symm 1 1 = %E3
H Full 1 1 = H5
Q Full 1 1 = Q5
K Diag 2 2 = K6
Covariances K *(A+D+E   | H@A+Q@D _
                H@A+Q@D | A+D+E ) *K' /
Option RSidual
End

G8: Discordant MZ twin pairs
Data NInput_vars=2 NObservations=139
Labels
dep_t1 bmi-t2
CMatrix Symmetric
0.1198 0.0359 0.1009
Matrices
A Symm 1 1 = %E1
D Symm 1 1 = %E2
E Symm 1 1 = %E3
K Diag 2 2
Covariances K *(A+D+E | A+D _
                A+D   | A+D+E  ) *K' / 
Specify K 0 4
Matrix K 1 .7
Option RSidual
End

G9: Discordant DZ twin pairs
Data NInput_vars=2 NObservations=87
Labels
dep_t1 bmi-t2
CMatrix Symmetric
0.1013 0.0050 0.0694
Matrices
A Symm 1 1 = %E1
D Symm 1 1 = %E2
E Symm 1 1 = %E3
H Full 1 1 = H5
Q Full 1 1 = Q5
K Diag 2 2 = K8
Covariances K *(A+D+E   | H@A+Q@D _
                H@A+Q@D | A+D+E ) *K' /
Start .5 All
Option RSidual
Options NDecimals=4
End
\end{verbatim}\normalsize

\newpage
\section*{Mx Script for Rater Bias Model}
\subsection*{H1. Rater Bias Model\newline
 Parents Ratings of Younger Twins: CBC Internalizing Problems}
\small\begin{verbatim}
G1: genetic structure
Data Calc NGroups=15
Matrices
A Lower 1 1 Free  ! genetic factor on latent phenotype
Compute A*A' /
End

G2: shared environmental structure
Data Calc 
Matrices
C Lower 1 1 Free  ! shared environmental factor on latent phenotype
Compute C*C' /
End

G3: specific environmental structure
Data Calc 
Matrices
E Lower 1 1 Free  ! specific environmental factor on latent phenotype
Compute E*E' /
End

G4: rater structure
Data Calc 
Matrices
R Full 4 2        ! rater bias factors 
Compute R*R' /
Specify R 
4 0
4 0
0 5
0 5 
End

G5: specific environmental structure
Data Calc 
Matrices
J Diag 4 4        ! specific environmental factors
Compute J*J' /
Specify J 
6 6 7 7
End

G6: genetic structure
Data Calc 
Matrices
A Lower 1 1 Free  ! genetic factor on latent phenotype
Compute A*A' /
End

G7: shared environmental structure
Data Calc 
Matrices
C Lower 1 1 Free  ! shared environmental factor on latent phenotype
Compute C*C' /
End

G8: specific environmental structure
Data Calc 
Matrices
E Lower 1 1 Free  ! specific environmental factor on latent phenotype
Compute E*E' /
End

G9: rater structure
Data Calc 
Matrices
R Full 4 2        ! rater bias factors 
Compute R*R' /
Specify R 
11 0
11 0
0 12
0 12 
End

G10: specific environmental structure
Data Calc 
Matrices
J Diag 4 4        ! specific environmental factors
Compute J*J' /
Specify J 
13 13 14 14 
End

G11: MZ boys twin pairs
Data NInput_vars=4 NObservations=96
Labels
morg_t1 morg_t2 farg_t1 farg_t2
CMatrix 
0.693855 
0.568978 0.665695 
0.312244 0.238173 0.63751
0.308165 0.293263 0.461195 0.647022
Matrices
A Symm 1 1 = %E1
C Symm 1 1 = %E2
E Symm 1 1 = %E3
F Diag 2 2 
R Symm 4 4 = %E4
J Symm 4 4 = %E5
I Iden 2 2
Covariances R + J + ((I_F)*(A+C+E | A+C _
                            A+C   | A+C+E )*(I_F)') /
Specify F 15 15
Option RSidual
End 

G12: DZ boys twin pairs
Data NInput_vars=4 NObservations=102
Labels
morg_t1 morg_t2 farg_t1 farg_t2
CMatrix 
0.565119 
0.291145 0.488443 
0.241471 0.137396 0.60361
0.171134 0.285151 0.346618 0.604151
Matrices
A Symm 1 1 = %E1
C Symm 1 1 = %E2
E Symm 1 1 = %E3
F Diag 2 2 = F11
R Symm 4 4 = %E4
J Symm 4 4 = %E5
I Iden 2 2
H Full 1 1
Covariances R + J + ((I_F)*(A+C+E | H@A+C _
                            H@A+C | A+C+E )*(I_F)') /
Matrix H .5
Option RSidual
End

G13: MZ girls twin pairs
Data NInput_vars=4 NObservations=102
Labels
morg_t1 morg_t2 farg_t1 farg_t2
CMatrix 
0.674638 
0.512857 0.713646 
0.265012 0.236512 0.652153 
0.291518 0.353789 0.513158 0.675623
Matrices
A Symm 1 1 = %E6
C Symm 1 1 = %E7
E Symm 1 1 = %E8
F Diag 2 2 
R Symm 4 4 = %E9
J Symm 4 4 = %E10
I Iden 2 2
Covariances R + J + ((I_F)*(A+C+E | A+C _
                            A+C   | A+C+E )*(I_F)') /
Specify F 16 16
Option RSidual
End 

G14: DZ girls twin pairs
Data NInput_vars=4 NObservations=97
Labels
morg_t1 morg_t2 farg_t1 farg_t2
CMatrix 
0.621255 
0.434264 0.623154 
0.315264 0.236398 0.719002  
0.232753 0.250744  0.53069 0.743137
Matrices
A Symm 1 1 = %E6
C Symm 1 1 = %E7
E Symm 1 1 = %E8
F Diag 2 2 = F13
R Symm 4 4 = %E9
J Symm 4 4 = %E10
I Iden 2 2 = I12
H Full 1 1 = H12
Covariances R + J + ((I_F)*(A+C+E | H@A+C _
                            H@A+C | A+C+E )*(I_F)') /
Option RSidual
End

G15: DZ girl-boy twin pairs
Data NInput_vars=4 NObservations=103
Labels
morg_t1 morg_t2 farg_t1 farg_t2
CMatrix 
0.538015 
0.243458 0.465392 
0.161654 0.101643 0.729673 
0.1025 0.191458 0.372469 0.574346
Matrices
A Symm 1 1 = %E1
C Symm 1 1 = %E2
E Symm 1 1 = %E3
M Symm 1 1 = %E6
N Symm 1 1 = %E7
O Symm 1 1 = %E8
F Diag 2 2 
R Full 4 2
J Diag 4 4
I Iden 2 2
H Full 1 1 = H12
Covariances R*R' + J*J' 
            + ((I_F) *(M+N+O                     | H@(\sqrt(A*M))+\sqrt(C*N) _
                       H@(\sqrt(A*M))+\sqrt(C*N) | A+C+E) *(I_F)') /
Specify F
16 15
Specify R
11 0
4 0
0 12
0 5 
Specify J
13 6 14 7
Start .2 All
Start .5 A 1 1 1 C 2 1 1 E 3 1 1 A 6 1 1 C 7 1 1 E 8 1 1
Option RSidual
Options NDecimals=4 Iterations=200
End
\end{verbatim}\normalsize

\newpage
\section*{Mx Scripts for Direction of Causation Models}
\subsection*{I1. Reciprocal Causation Model\newline
 Alcohol Consumption and Sensitivity}
\small\begin{verbatim}
G1: genetic structure
Data Calc NGroups=6
Matrices
A Diag 2 2 Free
Compute A*A' /
End

G2: common environmental structure
Data Calc 
Matrices
C Diag 2 2 
Compute C*C' /
Specify C 3 0
End

G3: specific environmental structure
Data Calc 
Matrices
E Diag 2 2 Free
Compute E*E' /
End

G4: dominance structure
Data Calc  
Matrices
D Diag 2 2
Compute D*D' /
Specify D 0 6
End

G5: female MZ twin pairs
Data NInput_vars=4 NObservations=43
Labels
cons_t1 sens_t1 cons_t2 sens_t2
CMatrix Symmetric
0.9927
0.5329 0.9829
0.5332 0.4859 0.9134
0.2731 0.5214 0.4285 1.2121
Matrices
A Symm 2 2 = %E1
C Symm 2 2 = %E2
E Symm 2 2 = %E3
D Symm 2 2 = %E4
P Full 4 4        ! reciprocal causation parameters
I Iden 4 4
R Diag 4 4        ! specific environmental parameters
Covariances ((I-P)~ *(A+C+E+D | A+C+D _
                      A+C+D   | A+C+E+D) *((I-P)~)') + R*R' /
Specify P
0 7 0 0
8 0 0 0
0 0 0 7
0 0 8 0
Specify R
9 9 9 9
Option RSidual
End 

G6: young female DZ twin pairs
Data NInput_vars=4 NObservations=42
Labels
cons_t1 sens_t1 cons_t2 sens_t2
CMatrix Symmetric
0.839
0.2731 0.7283
0.3578 -0.0584 1.2359
0.0698 -0.0208 0.2157 1.1453
Matrices
A Symm 2 2 = %E1
C Symm 2 2 = %E2
E Symm 2 2 = %E3
D Symm 2 2 = %E4
H Full 1 1
Q Full 1 1
P Full 4 4 = P5
I Iden 4 4
R Diag 4 4 = R5
Covariances ((I-P)~ *(A+C+E+D   | H@A+C+Q@D _
                      H@A+C+Q@D | A+C+E+D) *((I-P)~)') + R*R' /
Matrix H .5
Matrix Q .25
Start .6 All
Start .1 P 5 1 1 - P 5 4 4   R 5 1 1 - R 5 4 4
Option RSidual
Options NDecimals=4
End
\end{verbatim}\normalsize

\subsection*{I2. Bivariate Genetic Model\newline
 Alcohol Consumption and Sensitivity}
\small\begin{verbatim}
G1: genetic structure
Data Calc NGroups=6
Matrices
A Diag 2 2 Free   ! genetic paths
G Stand 2 2 Free  ! genetic correlation 
Compute A*G*A' /
End

G2: common environmental structure
Data Calc 
Matrices
C Diag 2 2
Compute C*C' /
Specify C 4 0
End

G3: specific environmental structure
Data Calc 
Matrices
E Diag 2 2 Free   ! specific environmental paths
F Stand 2 2 Free  ! specific environmental correlation
Compute E*F*E' /
End

G4: dominance structure
Data Calc  
Matrices
D Diag 2 2 Free   ! dominance paths
O Stand 2 2 Free  ! dominance correlation
Compute D*O*D' /
Specify D 0 9
Matrix D 1 1
End

G5: female MZ twin pairs
Data NInput_vars=4 NObservations=43
Labels
cons_t1 sens_t1 cons_t2 sens_t2
CMatrix Symmetric
0.9927
0.5329 0.9829
0.5332 0.4859 0.9134
0.2731 0.5214 0.4285 1.2121
Matrices
A Symm 2 2 = %E1
C Symm 2 2 = %E2
E Symm 2 2 = %E3
D Symm 2 2 = %E4
Covariances A+C+E+D | A+C+D _
            A+C+D   | A+C+E+D /
Option RSidual
End 

G6: young female DZ twin pairs
Data NInput_vars=4 NObservations=42
Labels
cons_t1 sens_t1 cons_t2 sens_t2
CMatrix Symmetric
0.839
0.2731 0.7283
0.3578 -0.0584 1.2359
0.0698 -0.0208 0.2157 1.1453
Matrices
A Symm 2 2 = %E1
C Symm 2 2 = %E2
E Symm 2 2 = %E3
D Symm 2 2 = %E4
H Full 1 1
Q Full 1 1
Covariances A+C+E+D   | H@A+C+Q@D _
            H@A+C+Q@D | A+C+E+D /
Matrix H .5
Matrix Q .25
Start .6 All
Bound 0 1 G 1 2 1 F 3 2 1 O 4 2 1
Option RSidual
Options NDecimals=4 Iterations=400
End
\end{verbatim}\normalsize

\subsection*{I3. Bivariate Genetic Cholesky Model\newline
 Alcohol Consumption and Sensitivity}
\small\begin{verbatim}
G1: genetic structure
Data Calc NGroups=6
Matrices
A Lower 2 2 Free  ! genetic cholesky
Compute A*A' /
End

G2: common environmental structure
Data Calc 
Matrices
C Lower 2 2 
Compute C*C' /
Specify C 0 0 4
End

G3: specific environmental structure
Data Calc 
Matrices
E Lower 2 2 Free  ! specific environmental cholesky
Compute E*E' /
End

G4: dominance structure
Data Calc  
Matrices
D Lower 2 2 
Compute D*D' /
Specify D 8 9 0
End

G5: female MZ twin pairs
Data NInput_vars=4 NObservations=43
Labels
cons_t1 sens_t1 cons_t2 sens_t2
CMatrix Symmetric
0.9927
0.5329 0.9829
0.5332 0.4859 0.9134
0.2731 0.5214 0.4285 1.2121
Select sens_t1 cons_t1 sens_t2 cons_t2 
Matrices
A Symm 2 2 = %E1
C Symm 2 2 = %E2
E Symm 2 2 = %E3
D Symm 2 2 = %E4
Covariances A+C+E+D | A+C+D _
            A+C+D   | A+C+E+D /
Option RSidual
End 

G6: young female DZ twin pairs
Data NInput_vars=4 NObservations=42
Labels
cons_t1 sens_t1 cons_t2 sens_t2
CMatrix Symmetric
0.839
0.2731 0.7283
0.3578 -0.0584 1.2359
0.0698 -0.0208 0.2157 1.1453
Select sens_t1 cons_t1 sens_t2 cons_t2 
Matrices
A Symm 2 2 = %E1
C Symm 2 2 = %E2
E Symm 2 2 = %E3
D Symm 2 2 = %E4
H Full 1 1
Q Full 1 1
Covariances A+C+E+D   | H@A+C+Q@D _
            H@A+C+Q@D | A+C+E+D /
Matrix H .5
Matrix Q .25
Start .6 All
Option RSidual
Options NDecimals=4
End
\end{verbatim}\normalsize

\newpage
\section*{Mx Scripts for Repeated Measures Models}
\subsection*{J1. Phenotypic Simplex Model\newline
 Swedisch Weight Data}
\small\begin{verbatim}
G1: Longitudinal Data
Data NGroups=1 NInput_vars=6 NObservations=66
Labels
wt_1 wt_2 wt_3 wt_4 wt_5 wt_6
CMatrix Symmetric
51.470
53.867   58.150
55.399   59.709   63.658
58.573   63.124   67.071   72.820
56.597   60.644   65.104   70.421   71.634
52.222   55.930   60.485   66.239   67.360   66.855
Matrices
S Lower 6 6
I Iden 6 6
D Diag 6 6 Free
E Diag 6 6
Covariances E*E' + ((I-S)~ *(D*D') *((I-S)~)') /
Specify S
0
7 0
0 8 0
0 0 9 0
0 0 0 10 0
0 0 0 0 11 0
Specify E
12 12 12 12 12 12
Option RSidual
End 
\end{verbatim}\normalsize

\subsection*{J2. Genetic Simplex Model\newline
 Swedisch Weight Data}
\small\begin{verbatim}
G1: genetic structure
Data Calc NGroups=4
Matrices
A Diag 6 6 Free   ! specific genetic factors
G Lower 6 6       ! genetic transmission paths
I Iden 6 6
Compute (I-G)~ *(A*A') *((I-G)~)' /
Specify G
0
7 0
0 8 0
0 0 9 0
0 0 0 10 0
0 0 0 0 11 0
End

G2: specific environmental structure
Data Calc 
Matrices
E Diag 6 6 Free   ! specific environmental specifics
F Lower 6 6       ! specific environmental transmission paths
I Iden 6 6
Compute (I-F)~ *(E*E') *((I-F)~)' /
Specify F
0
18 0
0 19 0
0 0 20 0
0 0 0 21 0
0 0 0 0 22 0
End

G3: young female MZ twin pairs
Data NInput_vars=12 NObservations=32
Labels
wt1_1 wt1_2 wt1_3 wt1_4 wt1_5 wt1_6
wt2_1 wt2_2 wt2_3 wt2_4 wt2_5 wt2_6
CMatrix Symmetric
30.347
33.096 37.443
33.993 38.210 42.319
34.778 39.356 44.020 47.606
34.703 39.403 44.038 48.239 50.931
33.202 37.419 41.574 45.373 47.971 48.154
33.469 36.124 36.005 36.979 38.484 37.885 44.188
35.551 39.813 39.439 41.009 42.988 41.554 45.593 49.280
37.010 40.972 42.773 44.962 46.657 45.031 46.284 49.359 52.083
38.504 42.658 45.377 48.841 50.994 49.015 47.113 50.631 54.266 58.924
38.829 42.866 46.065 49.803 53.449 51.444 48.183 51.669 55.154 59.748 63.154
38.266 42.058 44.320 47.550 50.958 51.082 48.319 51.284 53.965 57.913 61.290 62.310
Matrices
A Symm 6 6 = %E1
E Symm 6 6 = %E2
Covariances A+E | A _
            A   | A+E /
Option RSidual
End 

G6: young female DZ twin pairs
Data NInput_vars=12 NObservations=51
Labels
wt1_1 wt1_2 wt1_3 wt1_4 wt1_5 wt1_6
wt2_1 wt2_2 wt2_3 wt2_4 wt2_5 wt2_6
CMatrix Symmetric
28.873
29.423 31.546
31.087 33.341 38.996
30.395 32.557 37.267 38.366
30.987 32.649 37.896 38.620 41.418
29.880 31.727 36.752 37.826 40.317 42.379
16.157 15.524 16.402 16.393 16.040 16.231 20.032
16.319 15.992 16.393 16.431 15.513 15.809 20.140 21.577
15.946 15.356 16.315 15.873 15.253 15.175 21.600 22.822 26.738
16.367 15.565 16.465 17.038 15.913 14.977 21.730 23.331 26.453 28.948
15.763 14.633 16.289 15.970 16.144 14.905 21.520 22.878 26.361 27.891 30.103
13.692 12.443 13.782 13.592 13.583 12.886 20.940 22.117 25.784 27.361 29.373 31.204
Matrices
A Symm 6 6 = %E1
E Symm 6 6 = %E2
H Full 1 1
Covariances A+E | H@A _
            H@A | A+E /
Matrix H .5
Start 4 All
Start .4 G 1 1 1 - G 1 6 6   F 2 1 1 - F 2 6 6
Option RSidual
Options NDecimals=4
End
\end{verbatim}\normalsize

\subsection*{J5. Genetic Factor Model\newline
 Swedisch Weight Data}
\small\begin{verbatim}
G1: genetic structure
Data Calc NGroups=4
Matrices
A Diag 6 6 Free  ! genetic specifics
G Full 6 1 Free  ! genetic common factor
Compute G*G' + A*A' /
End

G2: specific environmental structure
Data Calc 
Matrices
E Diag 6 6 Free  ! specific environmental specifics
F Full 6 1 Free  ! specific environmental common factor
Compute F*F' + E*E' /
End

G3: young female MZ twin pairs
Data NInput_vars=12 NObservations=32
Labels
wt1_1 wt1_2 wt1_3 wt1_4 wt1_5 wt1_6
wt2_1 wt2_2 wt2_3 wt2_4 wt2_5 wt2_6
CMatrix Symmetric
30.347
33.096 37.443
33.993 38.210 42.319
34.778 39.356 44.020 47.606
34.703 39.403 44.038 48.239 50.931
33.202 37.419 41.574 45.373 47.971 48.154
33.469 36.124 36.005 36.979 38.484 37.885 44.188
35.551 39.813 39.439 41.009 42.988 41.554 45.593 49.280
37.010 40.972 42.773 44.962 46.657 45.031 46.284 49.359 52.083
38.504 42.658 45.377 48.841 50.994 49.015 47.113 50.631 54.266 58.924
38.829 42.866 46.065 49.803 53.449 51.444 48.183 51.669 55.154 59.748 63.154
38.266 42.058 44.320 47.550 50.958 51.082 48.319 51.284 53.965 57.913 61.290 62.310
Matrices
A Symm 6 6 = %E1
E Symm 6 6 = %E2
Covariances A+E | A _
            A   | A+E /
Option RSidual
End 

G6: young female DZ twin pairs
Data NInput_vars=12 NObservations=51
Labels
wt1_1 wt1_2 wt1_3 wt1_4 wt1_5 wt1_6
wt2_1 wt2_2 wt2_3 wt2_4 wt2_5 wt2_6
CMatrix Symmetric
28.873
29.423 31.546
31.087 33.341 38.996
30.395 32.557 37.267 38.366
30.987 32.649 37.896 38.620 41.418
29.880 31.727 36.752 37.826 40.317 42.379
16.157 15.524 16.402 16.393 16.040 16.231 20.032
16.319 15.992 16.393 16.431 15.513 15.809 20.140 21.577
15.946 15.356 16.315 15.873 15.253 15.175 21.600 22.822 26.738
16.367 15.565 16.465 17.038 15.913 14.977 21.730 23.331 26.453 28.948
15.763 14.633 16.289 15.970 16.144 14.905 21.520 22.878 26.361 27.891 30.103
13.692 12.443 13.782 13.592 13.583 12.886 20.940 22.117 25.784 27.361 29.373 31.204
Matrices
A Symm 6 6 = %E1
E Symm 6 6 = %E2
H Full 1 1
Covariances A+E | H@A _
            H@A | A+E /
Matrix H .5
Start 4 All
Option RSidual
Options NDecimals=4
End
\end{verbatim}\normalsize

\newpage
\section*{Mx Scripts for Assortment Models}
\subsection*{K1. Social Homogamy Model\newline
 Rose Fear Data}
\small\begin{verbatim}
Group 1: Mother-Father Covariance
!  cdc'
Data Calculation NGroups=8
Matrices
D Full 1 1 free    ! assortative mating paths
C Low  1 1 free    ! common environment paths
Compute C*D*C' /
End

Group 2: Mother-Child covariance
!  (Rpcm'+Rpcdf')c' + a.5a'
Data Calculation 
 Matrices
D Full 1 1 =D1     ! assortative mating paths
A Low  1 1 free    ! additive genetic paths
C Low  1 1 =C1     ! common environment paths
F Full 1 1 free    ! paternal cultural transmission
H Full 1 1         ! scalar, .5
M Full 1 1 free    ! maternal cultural transmission
Compute  (C*M' + C*D*F')*C' + A*H*A' /
Matrix H 0.5
End

Group 3: Father-Child Covariance
!  (Rpcf'+Rpcdm')c' + a.5a'
                                                      Data Calculation
Matrices
A Low  1 1 =A2     ! additive genetic paths
C Low  1 1 =C1     ! common environment paths
D Full 1 1 =D1     ! assortative mating delta paths 
F Full 1 1 =F2     ! paternal cultural transmission
H Full 1 1 =H2     ! scalar .5
M Full 1 1 =M2     ! maternal cultural transmission
Compute  (C*F' + C*D*M')*C' + A*H*A' /
Option No_output
End

Group 4:  MZ Twin Covariance
!  aRaa' + cRcc'
Data Calculation
Matrices
A Low  1 1 =A2     ! additive genetic paths
C Low  1 1 =C1     ! common environment paths
G Symm 1 1         ! additive genetic covariance (Ra)
R Symm 1 1 free    ! common environment covariance (Rc)
Compute  A*G*A' + C*R*C' /
Matrix G .5
End

Group 5:  DZ Twin Covariance
!  .5aRaa' + cRcc' 
Data Calculation
Matrices
A Low  1 1 =A2     ! additive genetic paths
C Low  1 1 =C1     ! common environment paths
G Symm 1 1 =G4     ! additive genetic covariance (Ra)
H Full 1 1 =H2     ! scalar, .5
R Symm 1 1 =R4     ! common environment covariance (Rc)
Compute  H@A*G*A' + C*R*C' /
End

Group 6: Phenotypic Variance 
!  Rp = aRaa + cRcc' + ee'
Data Calculation
Matrices
A Low  1 1 =A2     ! additive genetic paths
C Low  1 1 =C1     ! common environment paths
G Symm 1 1 =G4     ! additive genetic covariance (Ra)
J Low  1 1 free    ! specific environment paths
R Symm 1 1 =R4     ! common environment covariance
Constraint A*G*A' + C*R*C' + J*J' /
Start .3 All
Bound 0 1 D 1 1 1
Option RSidual
End

Group 7 - MZ Twins and parents  
DA NInput=4 NObservations=144
Labels
MZ1 MZ2 Mother Father 
CMatrix
0.95 
0.54 0.89 
0.08 0.21 1.11 
0.28 0.18 0.11 0.90 
Select Father Mother MZ1 MZ2
Matrices
A Full 1 1 =%E2    ! Mother-child covariances
B Full 1 1 =%E3    ! Father-child covariances
C Full 1 1 =%E4    ! MZ twin covariances
D Full 1 1 =%E1    ! Spouse covariances
E Symm 1 1 =%E6    ! Within person covariances
Covariance ( E | D'| B | B )_
           ( D | E | A | A )_
           ( B'| A'| E | C )_
           ( B'| A'| C'| E )   /
Option RSidual
End

Group 8 - DZ twins and parents  
Data NInput=4 NObservations=106
Labels
DZ1 DZ2 Mother Father 
CMatrix
1.21 
0.29 1.03 
0.23 0.16 0.91 
0.13 0.09 0.21 1.08 
Select Father Mother DZ1 DZ2
Matrices
A Full 1 1 =%E2    ! Mother-child covariances
B Full 1 1 =%E3    ! Father-child covariances
C Full 1 1 =%E5    ! DZ twin covariances
D Full 1 1 =%E1    ! Spouse covariances
E Symm 1 1 =%E6    ! Within person covariances
Covariance ( E | D'| B | B )_
           ( D | E | A | A )_
           ( B'| A'| E | C )_
           ( B'| A'| C'| E )   /
Option RSidual IT=800
End
\end{verbatim}\normalsize

\subsection*{K2. Phenotypic Assortment Model\newline
 Rose Fear Data}
\small\begin{verbatim}
Group 1: Mother-Father covariance
!  RpDRp
Data Calculation NGroups=12
Matrices
D Full 1 1 free    ! assortative mating delta paths
P Symm 1 1 free    ! within person covariance (Rp)
Compute  P*D*P /
Start 1.0 P 1 1
Option No_output
End

Group 2: Calculate T   Genotype-Phenotype covariance
!  T = a'Ra+c's
Data Calculation
Matrices
A Low  1 1 free    ! additive genetic paths
C Low  1 1 free    ! common environment paths
G Symm 1 1 free    ! additive genetic covariance (Ra)
S Full 1 1 free    ! A-C covariance
Compute  G*A' + S*C' /
Start 1.0 G 1 1 
Start  .5 A 1 1
Start  .5 C 1 1
Option No_output
End

Group 3: Mother-Child covariance
!  (Rpm'+Wf')c' + (1+RpDT')(.5a')
Data Calculation
Matrices
A Low  1 1 =A2     ! additive genetic paths
C Low  1 1 =C2     ! common environment paths
D Full 1 1 =D1     ! assortative mating delta paths 
F Full 1 1 free    ! paternal cultural transmission
H Full 1 1         ! scalar, .5
I Iden 1 1         ! identity matrix
M Full 1 1 free    ! maternal cultural transmission
P Symm 1 1 =P1     ! within person covariance (Rp)
T Full 1 1 =%E2    ! A-P covariance
W Full 1 1 =%E1    ! spouse covariance
Compute  (P*M' + W*F')*C' + (I + P*D)*T'*(H@A') /
Matrix H 0.5
End

Group 4: Father-Child Covariance
!  (Rpf'+Wm')c' + (1+RpDT')(.5a')
Data Calculation
Matrices
A Low  1 1 =A2     ! additive genetic paths
C Low  1 1 =C2     ! common environment paths
D Full 1 1 =D1     ! assortative mating delta paths 
F Full 1 1 =F3     ! paternal cultural transmission
H Full 1 1 =H3     ! scalar .5
I Iden 1 1         ! identity matrix
M Full 1 1 =M3     ! maternal cultural transmission
P Symm 1 1 =P1     ! within person covariance (Rp)
T Full 1 1 =%E2    ! A-P covariance
W Full 1 1 =%E1    ! spouse covariance
Compute  (P*F' + W'*M')*C' + (I + P*D')*T'*(H@A') /
Option No_output
End

Group 5:  MZ Twin Covariance
!  aRaa' + cRcc' + asc' + cs'a' + nn' 
Data Calculation
Matrices
A Low  1 1 =A2     ! additive genetic paths
C Low  1 1 =C2     ! common environment paths
G Symm 1 1 =G2     ! additive genetic covariance (Ra)
N Low  1 1         ! non-additive paths
R Symm 1 1 free    ! common environment covariance (Rc)
S Full 1 1 =S2     ! A-C covariance
Compute  A*G*A' + C*R*C' +A*S*C' + C*S'*A' + N*N' /
Start 1.0 R 1 1
End

Group 6:  DZ Twin Covariance
!  .5a(Ra+.5(T(D'+D)T'))a' + cRcc' + asc' + cs'a' + .25nn'
Data Calculation
Matrices
A Low  1 1 =A2     ! additive genetic paths
C Low  1 1 =C2     ! common environment paths
D Full 1 1 =D1     ! assortative mating delta paths
G Symm 1 1 =G2     ! additive genetic covariance (Ra)
H Full 1 1 =H3     ! scalar, .5
N Low  1 1 =N5     ! non-additive paths
R Symm 1 1 =R5     ! common environment covariance (Rc)
S Full 1 1 =S2     ! A-C covariance
T Full 1 1 =%E2    ! A-P covariance
Compute  H@A*(G + H@(T*(D'+D)*T'))*A' + C*R*C' +A*S*C' + C*S'*A' +H@H@N*N'/
Option No_output
End

Group 7:  Genetic Constraint
!  Ra = .5@(Ra+.5@(T(D'+D)T')+1)
Data Constraint NInput=1
Matrices
D Full 1 1 =D1     ! assortative mating delta paths
G Symm 1 1 =G2     ! additive genetic covariance (Ra)
H Full 1 1 =H3     ! scalar, .5
I Iden 1 1         ! segregation variance, .5I
T Full 1 1 =%E2    ! A-P covariance
Constraint  G - (H@(G + H@(T*(D'+D)*T') + I)) /
Option RSidual
End

Group 8:  A-C Constraint 
!  s = .5(T(m'+f'+DRpm'+DRpf'))
Data Constraint NInput=1 
Matrices
D Full 1 1 =D1     ! assortative mating delta paths
F Full 1 1 =F3     ! paternal cultural transmission
H Full 1 1 =H3     ! scalar, .5
M Full 1 1 =M3     ! maternal cultural transmission
P Symm 1 1 =P1     ! within person covariance (Rp)
S Full 1 1 =S2     ! A-C covariance
T Full 1 1 =%E2    ! A-P covariance
Constraint   S - (H@T*(M' + F' + D*P*M' + D'*P*F')) /
Option RSidual
End

Group 9: Common Environment Constraint
!  Rc = mPm'+fPf'+mWf'+fW'm'+1
Data Constraint NInput=1
Matrices
B Iden 1 1         ! common environment residual variance
F Full 1 1 =F3     ! paternal cultural transmission
M Full 1 1 =M3     ! maternal cultural transmission
P Symm 1 1 =P1     ! within person covariance
R Symm 1 1 =R5     ! common environment covariance (Rc)
W Full 1 1 =%E1    ! spouse covariance
Constraint R - (M*P*M' + F*P*F' + M*W*F' + F*W'*M' + B) /
Option RSidual
End

Group 10: Phenotypic Variance Constraint
!  Rp = aRaa + cRcc' + asc' + cs'a' + nn' + ee'
Data Constraint NInput=1
Matrices
A Low  1 1 =A2     ! additive genetic paths
C Low  1 1 =C2     ! common environment paths
G Symm 1 1 =G2     ! additive genetic covariance (Ra)
J Low  1 1 free    ! specific environment paths
N Low  1 1 =N5     ! non-additive paths
P Symm 1 1 =P1     ! within person covariance (Rp)
R Symm 1 1 =R5     ! common environment covariance
S Full 1 1 =S2     ! A-C covariance
Constraint P - (A*G*A' + C*R*C' + J*J'+ A*S*C' + C*S'*A' + N*N') /
Start .707 J 1 1 
Option RSidual
End

Group 11 - MZ Twins and parents  Rose Fear Factor 1 
DA NInput=4 NObservations=144
Labels
DAD_1 MOM_1 T1_1 T2_1 
CMatrix
.90
.11 1.11
.25 .09 .95
.16 .21 .49 .89
Matrices
A Full 1 1 =%E3    ! Mother-child covariances
B Full 1 1 =%E4    ! Father-child covariances
C Full 1 1 =%E5    ! MZ twin covariances
D Full 1 1 =%E1    ! Spouse covariances
E Symm 1 1 =P1     ! Within person covariances
Covariance ( E | D'| B | B )_
           ( D | E | A | A )_
           ( B'| A'| E | C )_
           ( B'| A'| C'| E )   /
Option RSidual
End

Group 12 - DZ twins and parents  Rose Fear Factor 1 
Data NInput=4 NObservations=106
Labels
DAD_1 MOM_1 T1_1 T2_1 
CMatrix
1.08
.21 .91
.14 .24 1.21
.10 .16 .32 1.03
Matrices
A Full 1 1 =%E3    ! Mother-child covariances
B Full 1 1 =%E4    ! Father-child covariances
C Full 1 1 =%E6    ! DZ twin covariances
D Full 1 1 =%E1    ! Spouse covariances
E Symm 1 1 =P1     ! Within person covariances
Covariance ( E | D'| B | B )_
           ( D | E | A | A )_
           ( B'| A'| E | C )_
           ( B'| A'| C'| E )   /
Option RSidual 
Option Iterations=800
End
\end{verbatim}\normalsize
\end{document}
