next up previous index
Next: 4 Interpreting the Mx Up: 2 Fitting Genetic Models Previous: 2 Body Mass Index   Index


3 Building a Path Coefficients Model Mx Script

With the introduction from the previous sections and chapters, we are now in a position to set up a simple genetic model using Mx. The script in Appendix [*] fits a simple univariate genetic model, estimating path coefficients, to covariance matrices for two like-sex twin groups: MZ twin pairs reared together, and DZ twin pairs reared together. The script is written to ignore information on means. The full path diagram is given in Figure 6.1

Figure 6.1: Univariate genetic model for data from monozygotic (MZ) or dizygotic (DZ) twins reared together. Genetic and environmental latent variables cause the phenotypes $P_1$ and $P_2$
\begin{figure}
\vspace{.25in}
\centerline{\psfig{figure=univf1.eps,width=5in}}
\end{figure}

We have drawn this figure to correspond to the variables in the model. The latent genetic and environmental variables $A, C, E$ and $D$ cause the observed variables $P_1$ and $P_2$. The script is written to fit a model with free parameters $e, a$, and $d$, and fixing $c$ to zero -- implying that there are no effects of shared environment on BMI. The script is extensively documented using the comment facility in Mx: any line beginning with an exclamation mark is interpreted as a comment. We shall consider this first example Mx script in detail. Please note that reading this section is not a substitute for reading in detail the Mx manual [], but merely a quick introduction to the essentials of a Mx script for genetic applications. Each new statement in a script begins on a new line. For each group, we will have the following structure:
  1. Title
  2. Group type
  3. Read and select any observed data, supply labels
  4. Declare matrices to express the model
  5. Specify parameters, (starting) values, equality constraints
  6. Define matrix formulae for the model
  7. Request fit functions, output and optimization options
  8. End
We shall now examine the structure in greater detail, focusing on our BMI model. We plan to test hypotheses about the contributions of genetic and environmental factors to individual differences in BMI using data collected from MZ and DZ twins reared together. The Mx script therefore will have at least two groups. To simplify the structure of the script, we have added a calculation group at the beginning. We start the Mx script by indicating how many groups our job consists of with the #NGroups 3 statement. The structure for the data groups for MZ and DZ twins is very similar. We will only discuss the first data group in detail. The first line gives the title for this group. The specification for the DZ group is very similar to that of the MZ group. Note the different number of observations, the new filename containing the DZ observed covariance matrix and the expected covariance matrix to match the expectation of the DZ covariance, $.5a^2+c^2+.25d^2$. A special form of matrix multiplication, the Kronecker product, represented by the symbol @, is used to premultiply the matrix A by the scalar .5 and the matrix D by the scalar .25. The specification extends easily to the multivariate case (see Section ?).

After successfully running the Mx input script, by default, Mx prints the
  1. User's input script
  2. Parameter Specifications
  3. Parameter Estimates
  4. Measures of overall goodness-of-fit.
Other useful output can be requested by additional options, including: The Mx manual should be consulted for a full description of the options.
next up previous index
Next: 4 Interpreting the Mx Up: 2 Fitting Genetic Models Previous: 2 Body Mass Index   Index
Jeff Lessem 2002-03-21