Dataplot Vol 2 Vol 1

# DISTANCE FROM MEAN

Name:
DISTANCE FROM MEAN (LET)
Type:
Let Subcommand
Purpose:
Compute the distance from the mean for a matrix.
Description:
The quadratic form of a matrix M and a vector X is defined as:

A=X'MX

where X' is the transpose of X. If the vector X has n rows, then M must be an nxn matrix.

The distance from the mean for a matrix X is a commonly used quadratic form:

where Xi is the ith row, is the vector of column means, and is the inverse of the variance-covariance matrix of X. That is, Di is the distance of the ith row of the matrix from the mean. D is a vector.

In Dataplot, you specify the original matrix, not the variance-covariance matrix.

Syntax:
LET <y> = DISTANCE FROM MEAN <mat1>
where <mat1> is a matrix for which the distance from the mean is to be computed;
and where <y> is a vector where the resulting distances are saved.
Examples:
LET Y = DISTANCE FROM MEAN M
Note:
Matrices are created with either the READ MATRIX command or the MATRIX DEFINITION command. Enter HELP MATRIX DEFINITION and HELP READ MATRIX for details.
Default:
None
Synonyms:
None
Related Commands:
 READ MATRIX = Read a matrix. MATRIX COLUMN DIMENSION = Dimension maximum number of columns for Dataplot matrices. QUADRATIC FORM = Compute the quadratic form of a matrix and a vector. MATRIX DISTANCE = Compute various row and column distances for a matrix. MATRIX MEAN = Compute the overall mean for a matrix. MATRIX COLUMN STATISTIC = Compute column statistics for a matrix. MATRIX ROW STATISTIC = Compute row statistics for a matrix. LINEAR COMBINATION = Compute a linear combination of a matrix and a vector.
Reference:
"Applied Multivariate Statistical Analysis", Third Edition, Johnson and Wichern, Prentice-Hall, 1992.
Applications:
Multivariate Analysis
Implementation Date:
1998/8
Program:
SKIP 25