SAS Interactive Matrix Language
SAS/IML is an interactive programming environment. It consists of
a matrix programming language with rich in control structures, a
powerful set of operators and a wide variety of functions. The
software also offers integrated graphics, dataset processing and
programmable windowing capabilities. SAS/IML applications can be
run either interactively or in batch.
- Summary of Features
- Built-in Functions
A variety of mathematical and statistical functions are
built directly into the software.
- Scalar Functions
- ABS: absolute value
- EXP: exponential
- INT: truncates to integer value
- LOG: natural logarithm
- MOD: modulo (remainder)
- NORMAL: normal random number
- SQRT: square root
- UNIFORM: uniform random number
- Reduction Functions
- MAX: maximum value in a matrix
- MIN: minimum value in a matrix
- SSQ: sum of squares of all elements
- SUM: sum of all elements
- Matrix Inquiry Commands and Functions
- ALL: checks for all elements nonzero
- ANY: checks for any nonzero element
- LOC: finds nonzero elements of a vector
- NCOL: finds number of columns
- NLENG: gets the length of a character element
- NROW: finds the number of rows
- TYPE: type of a matrix
- Matrix Arithmetic Functions
- CUSUM: cumulative sum
- HDIR: horizontal direct product
- TRACE: sum of diagonal elements
- Matrix Manipulation and Reshaping
- BLOCK: creates block diagonal matrix
- BTRAN: computes block transpose
- DIAG: creates square matrix from diagonal elements
- I: creates an identity matrix
- INSERT: inserts rows or columns
- J: produces a matrix of identical values
- REMOVE: removes elements
- REPEAT: creates a matrix of repeated argument values
- SHAPE: shapes a matrix
- SQRSYM: converts symmetric to square
- SYMSQR: converts square to symmetric
- T: produces the transpose
- VECDIAG: creates a column vector from diagonal elements
- Character Manipulation
- BYTE: gets ASCII byte by number
- CHANGE: changes substrings
- CHAR: converts numeric to character
- CHOOSE: chooses elements conditionally
- CONCAT: performs elementwise concatenation
- CSHAPE: reshapes by characters
- LENGTH: finds lengths of elements
- NAME: returns the names of arguments
- NUM: converts character to numeric
- ROWCAT: concatenates elements across a row
- ROWCATC: ROWCAT with blank compression
- SUBSTR: produces a substring
- Set Functions
- SETDIF: finds set difference
- UNION: finds set union
- UNIQUE: removes duplicates
- XSECT: finds set intersection
- Linear Algebraic and Statistical Functions
- CVEXHULL: finds a set of planar points
- DESIGN: creates design matrices
- DESIGNF: creates full-rank design matrices
- DET: computes the determinant
- ECHELON: reduces matrix to row-echelon normal form
- EIGEN: computes eigenvalues and eigenvectors
- EIGVAL: computes eigenvalues
- EIGVEC: creates a matrix with orthonormal eigenvectors
- GENEIG: computes eigenvalues and eigenvectors for generalized eigenproblems
- GINV: creates the generalized inverse
- GSORTH: computes Gram-Schmidt orthonormal factorization
- HALF: performs Cholesky decomposition
- HERMITE: reduces a matrix to Hermite normal form
- HOMOGEN: solves a homogeneous linear system
- INV: produces the inverse
- INVUPDT: updates a matrix inverse
- IPF: performs an iterative proportional fit
- LCP: solves a linear complementarity problem
- LP: solves a linear program
- MARG: evaluates marginal totals in a multiway contingency table
- ORPOL: generates orthogonal polynomials
- POLYROOT: finds zeros of a real polynomial
- PRODUCT: multiplies matrices of polynomials
- RANK: performs ranking
- RANKTIE: performs ranking with ties averaged
- RATIO: divides matrices of polynomials
- ROOT: performs Cholesky decomposition
- SOLVE: solves a system of linear equations
- SVD: performs singular value decomposition
- SWEEP: performs sweep function
- Time Series Functions
- ARMACOV: computes autocovariance sequence for an ARMA model
- ARMALIK: computes log likelihood and residuals for an ARMA model
- ARMASIM: simulates a univariate ARMA time series
- COVLAG: computes autocovariance estimates for time series
- FFT: performs a finite Fourier transformation
- HANKEL: generates a Hankel matrix
- IFFT: performs an inverse finite Fourier transformation
- TOEPLITZ: generates a Toeplitz matrix or block Toeplitz matrix
- Numerical Analysis Functions
- ODE : solves ordinary differential equations
- QUAD : performs numerical integration
- NLP : nonlinear optimization routines
- Syntax
PROC IML; /* enters the SAS/IML procedure */
...
...
SAS/IML programming statements
...
...
QUIT; /* exits the SAS/IML procedure */
- Alphabetical Index of Commands and Functions
- abort ab all any append apply armacov armalik armasim
- block branks btran byte
- call change choose close closefile concat contents convmod
covlag create cshape cusum cvexhull
- datasets delete delete()
design designf det diag display do() do/end do/loop
do/data do/until do/while schar
- echelon edit eigen eigval eigvec execute exp
- fft file find free
- gblkvp gblkvpd gclose gdelete gdraw gdrawl geneig ggrid
ginclude ginv gopen goto gpie gpiexy gpoint gpoly
gport gportpop gportstk gscale gscript gset gshow
gsorth gstart gstop gstrlen gtext gwindow gxaxis
- half hankel hdir hermite homogen
- i if/then ifft index infile input insert int inv invupdt ipf
- j jroot
-
- lcp length link list load loc log lp
- marg mattrib max maxqform min mod
- name ncol nleng nlp* normal nrow num
- ode opscal orpol ortvec
- parse pause pgraf polyroot print product purge
push put
- qr quad queue quit
- rank ranktie ratio rdodt read rename remove remove()
repeat replace reset resume return
root rowcat rowcatc run rupdt
- save setdif setin setout shape show solve sort sound
spline splinec splinev sqrsym sqrt ssq start stop
storage store substr sum summary svd sweep symsqr
- toeplitz trace type
- uniform union unique use
- valset value vecdiag
- window
- xmult xsect
-
-
- Alphabetical Index of Module Library
COLVEC : returns a matrix as a column vector
CORR : computes correlation coefficients
GBXWHSKR : box-whisker plot for a vector
GPROBCNT : probability contours for any x y data
GXYPLOT : scatter plot of any x y data
MEDIAN : returns medians of columns of matrix x
QUADREG : quadratic response surface regression
QUARTILE : returns quartiles of columns of matrix x
REGRESS : regression analysis
ROWVEC : returns a matrix as a row vector
RSUBSTR : replaces substrings
STANDARD : returns standardized data
TABPRT : tabular printing of matrix x
JZone.com 2000
|