Posts Tagged ‘ Getting Started ’

Those tricky PERCENT formats

August 10, 2015
By
Those tricky PERCENT formats

When using SAS to format a number as a percentage, there is a little trick that you need to remember: the width of the formatted value must include room for the decimal point, the percent sign, and the possibility of two parentheses that indicate negative values. The field width must

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Those tricky PERCENT formats

Convert a vector to a string

July 27, 2015
By
Convert a vector to a string

Base SAS contains many functions for processing strings, and you can call these functions from within a SAS/IML program. However, sometimes a SAS/IML programmer needs to process a vector of strings. No problem! You can call most Base SAS functions with a vector of parameters. I have previously written about

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Convert a vector to a string

Create a density curve with shaded tails

July 20, 2015
By
Create a density curve with shaded tails

A SAS programmer wanted to plot the normal distribution and highlight the area under curve that corresponds to the tails of the distribution. For example, the following plot shows the lower decile shaded in blue and the upper decile shaded in red. An easy way to do this in SAS

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Create a density curve with shaded tails

Compare the performance of algorithms in SAS

July 13, 2015
By
Compare the performance of algorithms in SAS

As my colleague Margaret Crevar recently wrote, it is useful to know how long SAS programs take to run. Margaret and others have written about how to use the SAS FULLSTIMER option to monitor the performance of the SAS system. In fact, SAS distributes a macro that enables you to

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Compare the performance of algorithms in SAS

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

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.