\documentstyle[11pt,twocolumn]{article}
\setlength{\topmargin}{-1cm}
\setlength{\oddsidemargin}{.0cm}
\setlength{\textheight}{23.0cm}
\setlength{\textwidth}{16.5cm}
\newcounter{bean0}
\newcounter{bean1}
\newcounter{bean2}
\newcounter{bean3}
\newcounter{bean4}
\newcounter{bean5}
\newcounter{bean6}
\newcounter{bean7}
\newcounter{bean8}
\begin{document}

\section*{Mx quick reference}
\subsection*{Syntax}
The syntax described for commands follows these conventions:
\begin{list}%
{$\bullet$}{\usecounter{bean0}}
\item
alternatives are represented by \verb+/+
\item
optional parameters or keywords are enclosed by \{ and \}
\item
items to be substituted according to the specific application are enclosed by 
\verb+<+ and \verb+>+
\end{list}
\subsection*{Minimum specifications}
Groups must contain at minimum the following lines:
\begin{list}%
{$\bullet$}{\usecounter{bean1}}
\item
Title
\item
DAta 
\item
MAtrices 
\item
COvariance 
\item
OUtput or ENd
\end{list}
See also the section on save and get commands for Mx system files.
\subsection*{Data line options}
{\em Syntax:}
\begin{verbatim}
DA {CA/CO} {NI=n NG=n NO=n}
\end{verbatim}
\begin{list}%
{$\bullet$}{\usecounter{bean1}}
\item
First group {\em must} specify number of groups (NG)
\item
Specifies type of group: CA forces calculation group; CO forces
constraint group.
\item
Supplies parameters, NI number of input variables; NO number of observations.
\end{list}
\subsection*{Input data}
{\em Syntax:}
\begin{verbatim}
ME/AV/RA/VL {FI=filename}
CM/KM/PM/AC/AI {FU} {FI=filename}
CT <r> <c> {FI=filename} 
\end{verbatim}
\smallskip
Several different commands to read raw data, contingency tables or
summary statistics, either from the input script or an external file:
Default for symmetric matrices \verb+CM KM PM AC AI+ is symmetric.
\begin{list}%
{$\bullet$}{\usecounter{bean2}}
\item
\verb+ME+ Vector of means
\item
\verb+CM+ Covariance matrix
\item
\verb+PM+ or \verb+KM+ Correlation matrix
\item
\verb+AC+ PRELIS type asymptotic covariance;
\verb+AI+ is for inverse
\item
\verb+CT+ Contingency table; requires number of rows and columns on same line.
\item
\verb+RA+ Rectangular matrix of raw data
\item
\verb+VL+ Variable length input for unbalanced raw data
\end{list}
\subsection*{Labels and select}
{\em Syntax:}
\begin{verbatim}
LAbels
<label list>
SElect
<label list>/<numlist>
LAbels row/col A
<label list>
\end{verbatim}
NI labels may be read for the input variables, and either labels or
variable numbers may be used to select variables.  After supplying
covariance or mean command, labels may be provided for the rows or
columns of defined matrices.
\subsection*{Matrices command}
{\em Syntax:}
\begin{verbatim}
MAT
<name> <type> <r> <c>{=<name><group>/FR} 
<name> <type> <r> <c>{=<name><group>/FR}
.
.
<name> <type> <r> <c>{=<name><group>/FR}
\end{verbatim}
Defines matrices for use in current or subsequent groups.  May be
equated to matrices in earlier groups, and all modifiable elements may
be freed with FR.  Type,
structure, shape and number of free elements are as follows:
\newline
\begin{tabular}{|l|l|l|}
\hline
\hline
&&\# free\\
Type & Structure & elements\\
\hline
ZE & Null  & 0\\
UN & Unit   & 0\\
ID & Identity & 0\\
IZ & Identity \verb+|+ Zero  & 0\\
ZI & Zero \verb+|+ Identity & 0\\
DI & Diagonal  & $r$\\
SD & Subdiagonal & $r(r-1)/2$\\
ST & Standardized & $r(r-1)/2$\\
SY & Symmetric & $r(r+1)/2$\\
LO & Lower triang. & $r(r+1)/2$\\
FU & Full & $r \times c$\\
\hline
\hline
\end{tabular}
\newline\medskip
Number of free elements indicates how many elements should be supplied
with commands such as \verb+PA MA+ and \verb+SP+

\subsection*{Matrix operators and functions}
The following unary and binary operators may be used:\newline
\begin{tabular}{|l|l|c|}
\hline
\hline
 Function  & Example & Priority\\
\hline
 Invert & \verb+A~+ & 1\\
 Transpose & \verb+A'+  & 1\\
\hline
 Power elem. &  \verb+A ^ B+ & 2 \\
 Multiply & \verb+A * B+ & 3\\
 Dot prod & \verb+A . B+ & 3\\
 Kronecker prod $\otimes$ & \verb+A @ B+ & 3\\
 Element div. & \verb+A % B+ & 3\\
 Add & \verb!A + B! & 4\\
 Subtract & \verb!A - B! & 4\\
 Horiz stick& \verb!A | B! & 5\\
 Vert stick & \verb!A _ B! & 6\\
\hline
\hline
\end{tabular}
\newline\medskip
Operations with lower numbers are evaluated
first, equal priority operations are carried out from left to right.
Matrix functions are defined by a keyword followed by parentheses.
The expression within the parentheses will be evaluated prior to the
function evaluation.\newline
\begin{tabular}{|l|l|l|l|}
\hline
\hline
Keyword & Function & Restriction\\
\hline
\verb+\tr()+ & Trace & $r=c$  \\
\verb+\det()+ & Determinant & $r=c$  \\
\verb+\exp()+ & Exponent ($e^{{\bf A}}$)& None  \\
\verb+\ln()+ & Natural logarithm& None\\
\verb+\sqrt()+ & Square root& None  \\
\verb+\d2v()+ & Diagonal to Vector& None \\
\verb+\v2d()+ & Vector to Diagonal & $r$ or $c=1$ \\
\verb+\m2v()+ & Matrix to Vector & None \\ 
\verb+\stnd()+ & Standardize matrix & $r=c$  \\
\verb+\eval()+ & Real eigenvalues & $r=c$ \\
\verb+\evec()+ & Real eigenvectors & $r=c$\\
\verb+\ival()+ & Imaginary eigenval & $r=c$ \\
\verb+\ivec()+ & Imaginary eigenvec & $r=c$ \\
\hline
\hline
\end{tabular}
\newline
\subsection*{Means/Thresholds/Covariance}
Means, thresholds and covariances may be formed with any combination
of matrices, operators and functions.  Parentheses may be used to
change order of evaluation.  Examples:
\begin{verbatim}
Means A /
Thresholds X|Y /
Covariances (I-B)~*(G*F*G'+P)*(I-B)~ /
Compute S-I*R*J /
\end{verbatim}
Thresholds can be used only in groups with contingency table data.
{ Mx} will use means in covariance analysis if both a means model and
observed means are supplied.  { Mx} requires means formulation in raw
data analysis.  Compute is recommended keyword for calculation groups,
to make reading input files easier.
\subsection*{Putting numbers in matrices}
\subsubsection*{MA command}
{\em Syntax:}\begin{verbatim}
MA <matrix name> {FI=filename}
<numlist>
\end{verbatim}
{\em where \verb+<numlist>+ is a free format list of numbers.  }
The list of numbers must be equal to the number of free elements of
that matrix, e.g. $r\times c$ for a full matrix of order ($r\times
c$), or $m$ for an $m\times m$ diagonal matrix. 

\subsubsection*{ST and VA commands}  
{\em Syntax:}\begin{verbatim}
ST/VA <value> <element list>/ ALL
\end{verbatim}
{\em where \verb+<element list>+ consists of matrix elements (e.g. A 1 2 3) and
may include the \verb+TO+ keyword}

The \verb+TO+ keyword operates differently for ST and VA, otherwise
these keywords are synonymous.


\subsection*{Putting parameters in matrices}
\subsubsection*{PA command}
{\em Syntax:}\begin{verbatim}
PA <matrix name> {FI=filename}
<numlist>
\end{verbatim}
{\em where \verb+<numlist>+ is a list of \verb+1+'s and \verb+0+'s}

\medskip
The PA command requests a different free parameter for every element
with a 1.  A zero fixes the corresponding matrix element.

\subsubsection*{SP command}
\label{SP}
\begin{verbatim}
SP <matrix name>
<numlist>
\end{verbatim}
{\em where \verb+numlist+ contains not necessarily distinct integers.}

SPecify is a convenient method of defining constraints between
parameters.  If two elements are given the same value, then the same
free parameter is assigned to both elements.  A zero indicates that
the element does not have a free parameter.

\subsubsection*{FRee and FIx commands}
{\em Syntax:}\begin{verbatim}
FI/FR <value> <element list>
\end{verbatim}
{\em where \verb+<element list>+ is a list of matrix elements}

\subsubsection*{DRop commands}
{\em Syntax:}\begin{verbatim}
DRop <parameter list>
\end{verbatim}
{\em where \verb+<element list>+ is a list of parameter specification numbers}
\smallskip
Drop fixes all occurences of a parameter with that `sp' number to zero.  
\subsubsection*{EQ command}
\label{EQ}
{\em Syntax:}\begin{verbatim}
EQ <matrix element list>
\end{verbatim}
EQ passes the value and the parameter specification of the first
matrix element in the list to the remaining elements in the list.
Elements of matrices in the current group may be specified with 2
subscripts (e.g. \verb+A 1 2+).  Elements in previous groups must be
specified with 3 subscripts (e.g. X 2 5 4).
\subsection*{BOundary command}
{\em Syntax:}\begin{verbatim}
BO low high <parlist> / ALL
\end{verbatim}
{\em where parlist is a list of parameter names or a list of parameter \verb+SP+
numbers. }
Free parameters in the list will be bounded to lie between low and
high.  Negative numbers will bound non-linear constraints.
\medskip
\subsection*{Mx system files}
Mx will save the current data, model specifications and parameter
estimates with the save command.  Estimation may proceed from this
point later in the same run or in another job by using Get.  Save
may be used only in multiple fit mode.  Get instead of a DAta line
will restore the saved dataset and allow model modifications.
\subsection*{Options}
A wide variety of options allow use of non-default fit functions,
decreasing or increasing printed output, saving of matrices and binary
files.  Optimization parameters may also be adjusted.
\subsubsection*{Optimization parameters}
\begin{list}%
{$\bullet$}{\usecounter{bean1}}
\item
MUltiple - special command that can be used on last group.  Causes 
Mx to enter multiple fit mode, in which models can be altered e.g.
\verb+SP 1 A+ to give new parameter specifications for matrix A in group 1
\item
NOne - prevents all output
\item
RS - gives observed, expected and residual (O-E) matrices
\item
IT=n Alters maximum numbers of iterations
\item
NAG=n If $n>0$ then creates separate output file NAGDUMP.OUT.   
\item
\verb+MXA=<filename>+ Writes values of matrix A to file.  Can write
expected covariances (\verb+%E+) or means (\verb+%M+)
\item
\verb+draw=<filename>+ If RAM-specified model, will create RAMPATH
graphics file
\end{list}


\subsection*{Limitations}
Any characters after column 120 in the input script are ignored.
External data files may be any length within operating system limits.
Workspace is normally 100,000 double precision words for MSDOS
versions and 1,000,000 for mainframe versions.
\end{document} 

