1. Home
  2. LINDEPENDENCE procedure

LINDEPENDENCE procedure

Finds the linear relations associated with matrix singularities (J.H. Maindonald).

Option

PRINT = string tokens Printed output (dependent, coefficients); default depe

Parameters

DATA = symmetric matrices Specifies the positive semi-definite matrix for which the information is required
COEFFICIENTS = matrices Stores the coefficients of the linear dependencies

Description

Procedure LINDEPENDENCE takes a positive semi-definite matrix S (e.g. a matrix formed as XX), and identifies any columns of S that are a linear combination of earlier columns. It determines the linear relations involved, and stores these in the columns of the matrix specified by the COEFFICIENTS parameter.

In more mathematical terms the output, stored as columns of COEFFICIENTS, is a basis for the null space of a positive semi-definite matrix S. If S = XX, then this will also be a basis for the column space of X.

The first parameter, DATA, specifies the symmetric matrix S for which the information is required. The columns of the COEFFICIENTS matrix store the linear relations. This matrix will be defined automatically if it has not been declared earlier.

Printed output information on either which columns are dependent and/or what the coefficients for the dependencies are can be requested with the settings dependent and coefficients of the PRINT option. By default the dependent columns are printed.

Option: PRINT.

Parameters: DATA, COEFFICIENTS.

Method

The matrix function CHOLESKI is used to determine a lower triangular matrix L such that LL′ = S. Zeros on the diagonal of L identify columns of S that are a linear combination of earlier columns. The corresponding columns of L′ form a matrix H. The algorithm then replaces zeros on the diagonal of L′ by ones, to give the matrix T, and solves the equation T B = H. Finally it identifies in each column of H the element that was originally on the diagonal of L, and sets each such element to -1. For further details, see Maindonald (1984) page 105.

Warning – if S is inaccurately formed, e.g. using single precision calculations, there is a risk that it will not be detected as singular, or that it will be detected as not positive semi-definite.

Reference

Maindonald, J.H. (1984). Statistical Computation. Wiley, New York.

See also

Procedure: POSSEMIDEFINITE.

Commands for: Calculations and manipulation.

Example

CAPTION       'LINDEPENDENCE example'; STYLE=meta
VARIATE       [VALUES=0...10] x[1]
VARIATE       [VALUES=6,5,5,4,3,3,2,1,1,0,0] x[2]
CALCULATE     x[3]=x[1]+0.5*x[2]
 "This ensures that x[3] is a linear combination of x[1] and x[2]"
VARIATE       [VALUES=(0,1)5,1] x[4]
CALCULATE     x[5]=0.5*x[1]+x[2]+0.5*x[4]
 "This ensures that x[5] is a linear combination of x[1], x[2], and x[4]"
MATRIX        [ROWS=5; COLUMNS=11; VALUES=#x[1...5]] xt
CALCULATE     ss=QPROD(xt;1)
LINDEPENDENCE [PRINT=dependent,coefficient] ss; b
Updated on March 7, 2019

Was this article helpful?