New Features for Mx 1.26

New Matrix functions

\aorder

- get ascending order of a vector, e.g., 
\aorder(A) with A full 3 1 =
.6
.1
.3

would yield
3
1
2

\dorder

- get descending order, e.g., for A above 
\dorder(A) = 
1
3
2

\sortr

Sorts a column vector or matrix by rows. If a vector, the vector elements themselves are used to sort. If a matrix, the first column is taken to be the sort order - and must contain a permutation of the integers 1 to nrows, as extracted using e.g. \aorder above.

\sortr

works the same way as \sortr but by columns.

\part(A,B)

Extracts (partitions) a submatrix from matrix A. Formerly this was possible only by pre- & post-multiplying by elementary matrices. One has to be very careful to initialize matrix B before this statement is given, because the result dimensions are needed to check syntax. To pre-initialize B you would use the following job structure

Title
Data Calc Ngroups=1
Begin Matrices;
A Symm 3 3
B Full 4 1
End Matrices;  !    <- End matrix definitions with this statement
Matrix A
1
2 3
4 5 6
Matrix B
2 2 3 3
Compute \part(A,B) /  !  <- Compute statement *after* matrix statement
Option rs
End

Thus the rectangle from 2,2 to 3,3 will be extracted, in this case
3 5
5 6
The elements of B can define any two opposite corners of a submatrix of A.

\mean(A)

Compute means of columns of A

\cov(A)

Compute covariance matrix of (columns of) A

New binary matrix operator: &

This does quadratic expressions simply, so that A*B*A' can be more efficiently specified as A&B

New optional goodness-of-fit statistics

User may supply the results of fitting a null model (usually a simple diagonal model of variances, but others are possible) with the command

 
Option null=10.5,3

which will extend the output in the following way:


  Fit statistic                    Estimate
 Tested Model fit >>>>>>>>>>>>>     4.73426
 Tested Model df >>>>>>>>>>>>>>     4.00000
 Null Model fit* >>>>>>>>>>>>>>  1563.94400
 Null Model df* >>>>>>>>>>>>>>>     6.00000
 Normed fit Index >>>>>>>>>>>>>     0.99697
 Normed fit Index 2 >>>>>>>>>>>     0.99953
 Tucker Lewis Index >>>>>>>>>>>     0.99929
 Parsimonious Fit Index>>>>>>>>     0.66465
 Parsimonious Fit Index 2 >>>>>     0.02940
 Relative Non-centrality Index>     0.99953
 Centrality Index >>>>>>>>>>>>>     0.99961

  * Note: user-supplied null-model statistic

There is some variance in notation; these formulae are calculated as follows:

NFI = Nullfit
NFI =(Nullfit-TestFit)/Nullfit
NFI2=(Nullfit-TestFit)/(Nullfit-Testdf)
TLI =((Nullfit/Nulldf)-(TestFit/Testdf))/((Nullfit/Nulldf)-1.0)
PFI =(Testdf/Nulldf)*NFI
PFI2=((2*Testdf)/(Npar*(Npar-1)))*NFI2
RNI =((Nullfit-Nulldf)-(TestFit-Testdf))/(Nullfit-Nulldf)
CI  =exp(-.5*((TestFit-Testdf)/SampleN))

where Nullfit and Testfit are the goodness-of-fit (chi-squared) statistics respectively obtained under the Null and Tested model which have Nulldf and Testdf degrees of freedom. SampleN is the total sample size (over all groups) and Npar is the number of free parameters in the model.

Minor bug fixes

1. When trying to handle FULL input covariance matrices intelligently, the FULL command would cause too few elements to be read. This bug was introduced at 1.25.

2. Eigenvalues of non-symmetric matrices were previously not sorted (contrary to the documentation). Now they are sorted, and corresponding real & imaginary components of the eigenvectors are sorted according to the same order.

Mike Neale, neale@gems.vcu.edu Medical College of Virginia