Posts Tagged ‘ Getting Started ’

Errors that cause SAS to "freeze"… and what to do about them

August 19, 2013
By
Errors that cause SAS to "freeze"… and what to do about them

Even the best programmers make mistakes. For most errors, SAS software displays the nature and location of the error, returns control to the programmer, and awaits further instructions. However, there are a handful of insidious errors that cause SAS to think that a statement or program is not finished. For [...]

Read more »

How old is your version of SAS? Release dates for SAS software

August 2, 2013
By
How old is your version of SAS? Release dates for SAS software

How old is your version of SAS software? The graph on the left shows the release dates for various releases of SAS software, beginning with SAS 8.0. The graph is based on a graph on Jiangtang Hu's blog that shows the major SAS releases. As this graph demonstrates, SAS software [...]

Read more »

Read data sets that are specified by an array of names

July 29, 2013
By
Read data sets that are specified by an array of names

One of my favorite features of SAS/IML 12.1 (released with 9.3m2) is that the USE and CLOSE statements support reading data set names that are specified in a SAS/IML matrix. The IMLPlus language in SAS/IML Studio has supported this syntax since the early 2000s, so I am pleased that this [...]

Read more »

The inverse CDF method for simulating from a distribution

July 22, 2013
By
The inverse CDF method for simulating from a distribution

There are many techniques for generating random variates from a specified probability distribution such as the normal, exponential, or gamma distribution. However, one technique stands out because of its generality and simplicity: the inverse CDF sampling technique. If you know the cumulative distribution function (CDF) of a probability distribution, then [...]

Read more »

Bin observations by using custom cut points and unevenly spaced bins

July 15, 2013
By
Bin observations by using custom cut points and unevenly spaced bins

It is often useful to partition observations for a continuous variable into a small number of intervals, called bins. This familiar process occurs every time that you create a histogram, such as the one on the left. In SAS you can create this histogram by calling the UNIVARIATE procedure. Optionally, [...]

Read more »

How does the IF-THEN statement in SAS treat a missing value?

July 8, 2013
By
How does the IF-THEN statement in SAS treat a missing value?

Every programming language has an IF-THEN statement that branches according to whether a Boolean expression is true or false. In SAS, the IF-THEN (or IF-THEN/ELSE) statement evaluates an expression and braches according to whether the expression is nonzero (true) or zero (false). The basic syntax is if numeric-expression then    do-computation; [...]

Read more »

Obtain data sets from the book Statistical Programming with SAS/IML Software

July 5, 2013
By
Obtain data sets from the book Statistical Programming with SAS/IML Software

On the Web site for the book Statistical Programming with SAS/IML Software, I provide instructions on how to download the sample data sets and install them so that they can be used from within SAS/IML Studio. When I wrote the book I did not anticipate that SAS users might want [...]

Read more »

Passing values from PROC IML into SAS procedures

June 3, 2013
By
Passing values from PROC IML into SAS procedures

A SAS user told me that he computed a vector of values in the SAS/IML language and wanted to use those values on a statement in a SAS procedure. The particular application involved wanting to use the values on the ESTIMATE and CONTRAST statements in a SAS regression procedure, but [...]

Read more »

Ways to multiply in the SAS/IML language

May 20, 2013
By
Ways to multiply in the SAS/IML language

For programmers who are learning the SAS/IML language, it is sometimes confusing that there are two kinds of multiplication operators, whereas in the SAS DATA step there is only scalar multiplication. This article describes the multiplication operators in the SAS/IML language and how to use them to perform common tasks [...]

Read more »

Initializing vectors by using repetition factors

February 25, 2013
By
Initializing vectors by using repetition factors

The SAS/IML language has a curious syntax that enables you to specify a "repetition factor" when you initialize a vector of literal values. Essentially, the language enables you to specify the frequency of an element. For example, suppose you want to define the following vector: proc iml; x = {1 [...]

Read more »

Subscribe

Email:

  Subscribe