Contents - Index

PROCEDURES

In this section we document each ALGEBRA procedure individually, giving the syntax and a brief description for each one.  The syntax gives the minimum abbreviation and any alternate spellings.  The procedures are arranged in alphabetical order.

CHANGE FOLDER - Syntax: cd <drive:\folder>).  Change default folder (and/or drive).  Affects where UCINET will look for data and where data will be saved.

cd \ucinet\data
cd a:

DISPLAY - Syntax: disp <mnat> or dsp <mat>.  Displays all cells of <mat> to the screen.

dsp ginv(transp(davis))

EIGEN - Syntax: eigen <mat>.  Calculates eigenvectors and eigenvalues for the matrix.  Outputs eigenvectors into dataset V and eigenvalues into dataset E.  (For square matrices only.)

eigen campnet

LET - Syntax: let <function call>.  Technically, the LET command is always implicit before any function statement.  For example, the following two commands are identical:

xtx = prod(transp(x),x)
let xtx = prod(transp(x),x)

The only reason to use LET is if your output dataset has the same name as an ALGEBRA procedure, which would confuse the interpreter.  For example, the following command would NOT create a dataset called "DSP":

dsp = inverse(xtx)

Instead, the interpreter would assume that you wanted to display a matrix called "= inverse(xtx)".  However, the following would work:

let dsp = inverse(xtx)

REIGEN - Syntax: reigen <mat1>.  Calculates right eigenvectors and associated eigenvalues for symmetric and non-symmetric matrices.  Note:  fails if matrix has repeated eigenvalues or if eigenvalues are complex (i.e., contain imaginary parts).  Outputs eigenvector as dataset V.  Outputs eigenvalue to output log. (For square matrices only.)

reigen campnet

REIGENQR -  Calculates eigenvalues of symmetric and non-symmetric matrices, including those requiring imaginary numbers.  Outputs eigenvectors into dataset V and eigenvalues into dataset E. (For square matrices only.)

reigenrq UnicornLineage

QAP - Syntax:  QAP <mat1> <mat2> ....  Runs QAP on all possible pairs of matrices entered.

QAP RDGAM RDPOS RDNEG RDCON

All matrices must be square and the same size.  The correlations are output to the window only, no dataset is created.

QUIT - Syntax: quit or exit.  Leave ALGEBRA and close the matrix algebra windows.  Usage:

exit
quit

SINGULAR VALUE DECOMPOSITION - Syntax: svd <amat> <umat> <dmat> <vtmat>, where <amat> is an m-by-n data matrix of rank r, <umat> will be an m-by-r output matrix, <dmat> will be a diagonal r-by-r output matrix, and <vtmat> will be an n-by-r output matrix.  The program requires m ³ n.  Usage:

The <umat> and <vtmat> matrices are often referred to as "row scores" and "column scores" respectively.  The <dmat> matrix contains singular values down the main diagonal and zeros elsewhere.

svd inmat [umat [dmat [vmat]]]

Parameters in the brackets may be excluded.  If you do not specify the names for the output matrices, they will default to u, d, and v, respectively.  For example:

svd davis RScores

will create a matrix named RScores to store the row scores, another named V to store the column scores, and another named D to store the singular values along the diagonal.

The singular value decomposition of a square, symmetric matrix gives row and column scores equal to the eigenvectors of the matrix, and the singular values are their eigenvalues.  The SVD of any matrix X gives row scores equal to the eigenvectors of XX' and column scores equal to the eigenvectors of X'X.  The singular values of X are the square of the eigenvalues of both XX' and X'X.

FURTHER INFORMATION

Uniary Operations

Binary Operations

Inner Products

Matrix Algebra