What’s New in SAS/IML 9.3
Overview
SAS/IML 9.3 includes
two new features that are related to calling other languages from
within the IML procedure:
-
calling SAS procedures and DATA
steps from PROC IML
-
calling functions in the R statistical
programming language from PROC IML
In addition,
SAS/IML
9.3 provides several new functions and subroutines.
Calling SAS Procedures from PROC IML
SAS/IML 9.3 supports
the SUBMIT and ENDSUBMIT statements. These statements delimit a block
of statements that are sent to another language for processing.
The SUBMIT and ENDSUBMIT
statements enable you to call SAS procedures and DATA steps without
leaving the IML procedure. This feature has been very popular in
SAS/IML
Studio since it was introduced in 2002. The feature is now available
in PROC IML.
You can use SAS data
sets to transfer data between
SAS/IML matrices and SAS procedures.
SAS procedures require that data be in a SAS data set.
Calling R Functions from PROC IML
The SUBMIT and ENDSUBMIT
statements also provide an interface to the R statistical programming
language, so that you can submit R statements from within your
SAS/IML
program. To submit statements to R, specify the R option in the SUBMIT
statement.
You can transfer data
from
SAS/IML matrices and SAS data sets into R matrices and R data
frames, and vice versa. Specifically, the following subroutines are
available to transfer data from a SAS format into an R format:
Transferring from a SAS Source to an R Destination
In addition, the following
subroutines are available to transfer data from an R format into a
SAS format:
Transferring from an R Source to a SAS Destination
In the previous table,
an "R expression" can be the name of a data frame, the name of a matrix,
or an expression that results in either of these data structures.
New Functions and Subroutines
generates all combinations
of n elements taken k at
a time.
generates all permutations
of n elements.
divides numeric values
into a set of disjoint intervals called bins. The BIN function indicates
which elements are contained in each bin.
computes a sample correlation
matrix for data. The function supports Pearson’s product-moment
correlations, Hoeffding’s D statistics,
Kendall’s tau-b coefficients, and Spearman’s
correlation coefficients based on the ranks of the variables. The
function supports two different methods for dealing with missing values
in the data.
computes a sample variance-covariance
matrix for data. The function supports two different methods for dealing
with missing values in the data.
counts the number of
nonmissing values in a matrix.
counts the number of
missing values in a matrix.
counts the number of
unique values in a matrix.
computes the cumulative
product of elements in a matrix.
computes the differences
between data values and one or more lagged (shifted) values for time
series data.
returns a matrix that
indicates which elements of one matrix are also elements of a second
matrix.
converts a matrix stored
in a sparse format into a matrix stored in a dense format.
computes one or more
lagged (shifted) values for time series data.
computes a sample mean
of data. The function can compute arithmetic means, trimmed means,
and Winsorized means.
computes the product
of elements in one or more matrices.
computes sample quantiles
for data.
returns random combinations
of n elements taken k at
a time.
returns the range of
values for a set of matrices.
returns random permutations
of n elements.
reshapes and repeats
values by columns.
converts a symmetric
matrix which is stored columnwise to a square matrix.
computes a sample standard
deviation for each column of a data matrix.
converts a matrix that
contains many zeros into a matrix stored in a sparse format which
suitable for use with the ITSOLVER subroutine or the SOLVELIN subroutine.
counts the number of
elements in each of the unique categories of the argument.
computes a sample variance
for each column of a data matrix.
creates a vector from
the columns of the lower triangular elements of a matrix.
Changes to the IMLMLIB Library
The CORR module has
been removed from the IMLMLIB library. In its place is the built-in
CORR function.
The MEDIAN, QUARTILE,
and STANDARD modules now support missing values in the data argument.
Documentation Enhancements
The first six chapters
of the
SAS/IML User's Guide have been completely
rewritten in order to provide new users with a gentle introduction
to the
SAS/IML language. Two new chapters have been written:
-
Chapter 10, Submitting SAS Statements,
describes how to call SAS procedures from within PROC IML.
-
Chapter 11, Calling Functions in
the R Language, describes how to call R functions from within PROC
IML.
Copyright © SAS Institute Inc. All rights reserved.