Posts Tagged ‘ Getting Started ’

Elementwise minimum and maximum operators

December 15, 2014
By
Elementwise minimum and maximum operators

Like most programming languages, the SAS/IML language has many functions. However, the SAS/IML language also has quite a few operators. Operators can act on a matrix or on rows or columns of a matrix. They are less intuitive, but can be quite powerful because they enable you perform computations without […]

Read more »

The direct product (Kronecker product) in SAS

December 8, 2014
By
The direct product (Kronecker product) in SAS

There are many ways to multiply scalars, vectors, and matrices, but the Kronecker product (also called the direct product) is multiplication on steroids. The Kronecker product looks scary, but it is actually simple. The Kronecker product is merely a way to pack multiples of a matrix B into a block […]

Read more »

Compute maximum and minimum values for rows and columns in SAS

December 1, 2014
By
Compute maximum and minimum values for rows and columns in SAS

A common question on SAS discussion forums is how to compute the minimum and maximum values across several variables. It is easy to compute statistics across rows by using the DATA step. This article shows how to compute the minimum and maximum values for each observation (across variables) and, for […]

Read more »

Overview of new features in SAS/IML 13.1

November 24, 2014
By
Overview of new features in SAS/IML 13.1

SAS software contains a lot of features, and each release adds more.To make sure that you do not miss new features that appear in the SAS/IML language, the word cloud on the right sidebar of my blog contains numbers that relate to SAS or SAS/IML releases. For example, you can […]

Read more »

The difference between RUN and CALL for SAS/IML subroutines

November 17, 2014
By
The difference between RUN and CALL for SAS/IML subroutines

Have you ever noticed that some SAS/IML programmers use the CALL statement to call a subroutine, whereas others use the RUN statement? Have you ever wondered why the SAS/IML language has two statements that do the same thing? It turns out that the CALL statement and the RUN statement do […]

Read more »

An efficient way to increment a matrix diagonal

November 10, 2014
By
An efficient way to increment a matrix diagonal

I was recently asked about how to use the SAS/IML language to efficiently add a constant to every element of a matrix diagonal. Mathematically, the task is to form the matrix sum A + kI, where A is an n x n matrix, k is a scalar value, and I is the […]

Read more »

The next power of 2 and other tricks with logarithms

October 31, 2014
By
The next power of 2 and other tricks with logarithms

The other day I was doing some computations that caused me to wonder, "What is the smallest power of 2 that is greater than a given number?" The mathematics is straightforward. Given a number n, find the least value of k such that 2k ≥ n or, equivalently, k ≥ […]

Read more »

Choosing bins for histograms in SAS

August 25, 2014
By
Choosing bins for histograms in SAS

When you create a histogram with statistical software, the software uses the data (including the sample size) to automatically choose the width and location of the histogram bins. The resulting histogram is an attempt to balance statistical considerations, such as estimating the underlying density, and "human considerations," such as choosing […]

Read more »

Ten tips for learning the SAS/IML language

August 11, 2014
By
Ten tips for learning the SAS/IML language

A SAS customer wrote, "Now that I have access to PROC IML through the free SAS University Edition, what is the best way for me to learn to program in the SAS/IML language? How do I get started with PROC IML?" That is an excellent question, and I'm happy to […]

Read more »

Overview of new features in SAS/IML 12.3

July 30, 2014
By
Overview of new features in SAS/IML 12.3

Unless you diligently read the "What's New" chapter for each release of SAS software, it is easy to miss new features that appear in the language. People who have been writing SAS/IML programs for decades are sometimes surprised when I tell them about a useful new function or programming feature. […]

Read more »


Subscribe

Email:

  Subscribe