The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs![The math you learned in school: Yes, it’s useful!](https://blogs.sas.com/content/iml/files/2019/08/icon-teaching-702x336.jpg)
What is this math good for, anyway? –Every student, everywhere I am a professional applied mathematician, yet many of the mathematical and statistical techniques that I use every day are not from advanced university courses but are based on simple ideas taught in high school or even in grade school.
![The essential guide to binning in SAS](https://blogs.sas.com/content/iml/files/2019/08/binheatmap-640x336.png)
Do you want to bin a numeric variable into a small number of discrete groups? This article compiles a dozen resources and examples related to binning a continuous variable. The examples show both equal-width binning and quantile binning. In addition to standard one-dimensional techniques, this article also discusses various techniques
![How to use PROC HPBIN to bin numerical variables](https://blogs.sas.com/content/iml/files/2017/01/ProgrammingTips-2.png)
Binning transforms a continuous numerical variable into a discrete variable with a small number of values. When you bin univariate data, you define cut point that define discrete groups. I've previously shown how to use PROC FORMAT in SAS to bin numerical variables and give each group a meaningful name
![Use numeric values for column headers when printing a matrix](https://blogs.sas.com/content/iml/files/2017/01/ProgrammingTips-2.png)
Sometimes a little thing can make a big difference. I am enjoying a new enhancement of SAS/IML 15.1, which enables you to use a numeric vector as the column header or row header when you print a SAS/IML matrix. Prior to SAS/IML 15.1, you had to use the CHAR or
![Vectorize the computation of the Mandelbrot set in a matrix language](https://blogs.sas.com/content/iml/files/2019/07/Mandelbrot1-702x336.png)
When my colleague, Robert Allison, blogged about visualizing the Mandelbrot set, I was reminded of a story from the 1980s, which was the height of the fractal craze. A research group in computational mathematics had been awarded a multimillion-dollar grant to purchase a supercomputer. When the supercomputer arrived and got
![Implement the Gumbel distribution in SAS](https://blogs.sas.com/content/iml/files/2019/07/Gumbel3-640x336.png)
SAS supports more than 25 common probability distributions for the PDF, CDF, QUANTILE, and RAND functions. Of course, there are infinitely many distributions, so not every possible distribution is supported. If you need a less-common distribution, I've shown how to extend the functionality of Base SAS (by using PROC FCMP)