Posts Tagged ‘ Getting Started ’

An easy way to use numbers for column headers

June 29, 2015
By
An easy way to use numbers for column headers

When I am computing with SAS/IML matrices and vectors, I often want to label the columns or rows so that I can better understand the data. The labels are called headers, and the COLNAME= and ROWNAME= options in the SAS/IML PRINT statement enable you to add headers for columns and

The post Read more »

Tags: ,
Posted in SAS | Comments Off on An easy way to use numbers for column headers

Everything you wanted to know about writing SAS/IML modules

June 17, 2015
By

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 Read more »

Tags: , ,
Posted in SAS | Comments Off on Everything you wanted to know about writing SAS/IML modules

SAS/IML functions that operate on columns of a matrix

June 1, 2015
By

A SAS programmer asked for a list of SAS/IML functions that operate on the columns of an n x p matrix and return a 1 x p row vector of results. The functions that behave this way tend to compute univariate descriptive statistics such as the mean, median, standard deviation, and quantiles. The following

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on SAS/IML functions that operate on columns of a matrix

Five reasons to use ODS EXCLUDE to suppress SAS output

May 28, 2015
By

I previously wrote about the best way to suppress output from SAS procedures. Suppressing output is necessary in simulation and bootstrap analyses, and it is useful in other contexts as well. In my previous article, I wrote, "many programmers use ODS _ALL_ CLOSE as a way to suppress output, but

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on Five reasons to use ODS EXCLUDE to suppress SAS output

Finding observations that satisfy multiple conditions

May 11, 2015
By

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 Read more »

Tags: , ,
Posted in SAS | Comments Off on Finding observations that satisfy multiple conditions

An easy way to clear your SAS titles

May 4, 2015
By
An easy way to clear your SAS titles

Did you know that if you have set multiple titles in SAS, that there is an easy way to remove them? For example, suppose that you've written the following statements, which call the TITLE statement to set three titles: title "A Great Big Papa Title"; title2 "A Medium-sized Mama Title";

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on An easy way to clear your SAS titles

Sum a series in SAS

April 22, 2015
By
Sum a series in SAS

A customer asked: Dear Rick, 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

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on Sum a series in SAS

Writing data in chunks: Does the chunk size matter?

March 9, 2015
By

I often blog about the usefulness of vectorization in the SAS/IML language. A one-sentence summary of vectorization is "execute a small number of statements that each analyze a lot of data." In general, for matrix languages (SAS/IML, MATLAB, R, ...) vectorization is more efficient than the alternative, which is to

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on Writing data in chunks: Does the chunk size matter?

Proc-x is looking for sponsors!

Dear readers, proc-x is looking for sponsors who would be willing to support the site in exchange for banner ads in the right sidebar of the site. If you are interested, please e-mail me at: tal.galili@gmail.com

Welcome!

SAS-X.com offers news and tutorials about the various SAS® software packages, contributed by bloggers. You are welcome to subscribe to e-mail updates, or add your SAS-blog to the site.

SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.