Posts Tagged ‘ Statistical Programming ’

The use of SAS/IML software in published research

July 6, 2015
By
The use of SAS/IML software in published research

SAS/IML software is used by many SAS programmers, primarily for creating custom algorithms and macros that implement statistical analyses that are not built into any SAS procedure. I know that PROC IML is used regularly by pharmaceutical companies, by the financial and insurance industries, and by researchers in medical colleges […] The post The use of SAS/IML software in published research appeared first on The DO Loop.

Read more »

Everything you wanted to know about writing SAS/IML modules

June 17, 2015
By
Everything you wanted to know about writing SAS/IML modules

One of the fundamental principles of computer programming is to break a task into smaller subtasks and to modularize the program by encapsulating each subtask into its own function. I have written many blog posts over the years about how to define and use functions in the SAS/IML language. I […] The post Everything you wanted to know about writing SAS/IML modules appeared first on The DO Loop.

Read more »

Execute SAS/IML statements that are in a file at run time

June 15, 2015
By
Execute SAS/IML statements that are in a file at run time

A feature of SAS/IML 13.2 (shipped with SAS 9.4m2, Aug 2014) is the ability to execute SAS/IML statements that are in a file. The feature is implemented by the new EXECUTEFILE subroutine. This feature is similar to the CALL EXECUTE statement. The difference is that the EXECUTEFILE subroutine reads, parses, […] The post Execute SAS/IML statements that are in a file at run time appeared first on The DO Loop.

Read more »

Finding observations that satisfy multiple conditions: The LOC-ELEMENT technique

May 11, 2015
By
Finding observations that satisfy multiple conditions: The LOC-ELEMENT technique

A common task in data analysis is to locate observations that satisfy multiple criteria. For example, you might want to locate all zip codes in certain counties within specified states. The SAS DATA step contains the powerful WHERE statement, which enables you to extract a subset of data that satisfy […] The post Finding observations that satisfy multiple conditions: The LOC-ELEMENT technique appeared first on The DO Loop.

Read more »

Sum a series in SAS

April 22, 2015
By
Sum a series in SAS

A customer asked: How do we go about summing a finite series in SAS? For example, I want to compute for various integers n ≥ 3. I want to output two columns, one for the natural numbers and one for the summation of the series. Summations arise often in statistical […] The post Sum a series in SAS appeared first on The DO Loop.

Read more »

Vectors that have a fractional number of elements

March 23, 2015
By
Vectors that have a fractional number of elements

The title of this article makes no sense. How can the number of elements (in fact, the number of anything!) not be a whole number? In fact, it can't. However, the title refers to the fact that you might compute a quantity that ought to be an integer, but is […]

Read more »

Matrix multiplication with missing values in SAS

March 11, 2015
By
Matrix multiplication with missing values in SAS

Sometimes I get contacted by SAS/IML programmers who discover that the SAS/IML language does not provide built-in support for multiplication of matrices that have missing values. (SAS/IML does support elementwise operations with missing values.) I usually respond by asking what they are trying to accomplish, because mathematically matrix multiplication with […] The post Matrix multiplication with missing values in SAS appeared first on The DO Loop.

Read more »

Complete cases: How to perform listwise deletion in SAS

February 23, 2015
By
Complete cases: How to perform listwise deletion in SAS

SAS procedures usually handle missing values automatically. Univariate procedures such as PROC MEANS automatically delete missing values when computing basic descriptive statistics. Many multivariate procedures such as PROC REG delete an entire observation if any variable in the analysis has a missing value. This is called listwise deletion or using […]

Read more »

Creating an array of matrices

February 9, 2015
By
Creating an array of matrices

The SAS DATA step supports multidimensional arrays. However, matrices in SAS/IML are like mathematical matrices: they are always two dimensional. In simulation studies you might need to generate and store thousands of matrices for a later statistical analysis of their properties. How can you accomplish that unless you can create […]

Read more »

Specify the order of variables at run time in SAS

February 4, 2015
By
Specify the order of variables at run time in SAS

In SAS, the order of variables in a data set is usually unimportant. However, occasionally SAS programmers need to reorder the variables in order to make a special graph or to simplify a computation. Reordering variables in the DATA step is slightly tricky. There are Knowledge Base articles about how […]

Read more »


Subscribe

Email:

  Subscribe