The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs![Where did it come from? Adding the source of each observation to a SAS data set](https://blogs.sas.com/content/iml/files/2015/08/t_indsname1.png)
Imagine the following scenario. You have many data sets from various sources, such as individual stores or hospitals. You use the SAS DATA step to concatenate the many data sets into a single large data set. You give the big data set to a colleague who will analyze it. Later
![Convert a vector to a string](https://blogs.sas.com/content/iml/files/2015/07/vectortostring.png)
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
![Create a density curve with shaded tails](https://blogs.sas.com/content/iml/files/2015/07/colordensitytails.png)
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
![Compare the performance of algorithms in SAS](https://blogs.sas.com/content/iml/files/2015/07/eigentime.png)
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 use of SAS/IML software in published research](https://blogs.sas.com/content/iml/files/2015/06/imlscholar.png)
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
![An easy way to use numbers for column headers](https://blogs.sas.com/content/iml/files/2015/06/numheader1.png)
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