The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs![Finding elements in one vector that are not in another vector](https://blogs.sas.com/content/iml/files/2014/03/t_element.png)
The SAS/IML language has several functions for finding the unions, intersections, and differences between sets. In fact, two of my favorite utility functions are the UNIQUE function, which returns the unique elements in a matrix, and the SETDIF function, which returns the elements that are in one vector and not
![For pi day: A continued fraction expansion of pi](https://blogs.sas.com/content/iml/files/2014/03/continuedfraction1.png)
Many geeky mathematical people celebrate "pi day" on March 14, because the date is written 3/14 in the US, which is evocative of the decimal representation of π = 3.14.... Most people are familiar with the decimal representation of π. The media occasionally reports on a new computational tour-de-force that
![How to get started with SAS: Free videos for beginners](https://blogs.sas.com/content/iml/files/2017/02/AdvancedAnalytics-4.png)
On most Mondays I blog about a function, programming technique, or resource that is useful for programmers who are getting started with SAS software. Recently I learned that my colleagues in the SAS education division have been hard at work developing a series of short videos that explain basic tasks
![Aborting a SAS/IML program upon encountering an error](https://blogs.sas.com/content/iml/files/2017/01/AdvancedAnalytics-1.png)
A colleague sent me an interesting question: What is the best way to abort a SAS/IML program? For example, you might want to abort a program if the data is singular or does not contain a sufficient number of observations or variables. As a first attempt would be to try
![Three ways to add a smoothing spline to a scatter plot in SAS](https://blogs.sas.com/content/iml/files/2014/02/splinesm1.png)
Like many SAS programmers, I use the Statistical Graphics (SG) procedures to graph my data in SAS. To me, the SGPLOT and SGRENDER procedures are powerful, easy to use, and produce fabulous ODS graphics. I was therefore surprised when a SAS customer told me that he continues to use the
![Techniques for scoring a regression model in SAS](https://blogs.sas.com/content/iml/files/2014/02/scorereg.png)
My previous post described how to use the "missing response trick" to score a regression model. As I said in that article, there are other ways to score a regression model. This article describes using the SCORE procedure, a SCORE statement, the relatively new PLM procedure, and the CODE statement.