The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs![6 ways to use the _NULL_ data set in SAS](https://blogs.sas.com/content/iml/files/2017/01/ProgrammingTips-2.png)
In SAS, the reserved keyword _NULL_ specifies a SAS data set that has no observations and no variables. When you specify _NULL_ as the name of an output data set, the output is not written. The _NULL_ data set is often used when you want to execute DATA step code
![Video: A new syntax for lists in SAS/IML](https://blogs.sas.com/content/iml/files/2018/06/listsyntaxTitle.png)
I recently recorded a short video about the new syntax for specifying and manipulating lists in SAS/IML 14.3. This is a video of my Super Demo at SAS Global Forum 2018. The new syntax supports dynamic arrays, associative arrays ("named lists"), and hierarchical data structures such as lists of lists.
![Sample and obtain the results in random order](https://blogs.sas.com/content/iml/files/2011/08/generaterandom.png)
The SURVEYSELECT procedure in SAS 9.4M5 supports the OUTRANDOM option, which causes the selected items in a simple random sample to be randomly permuted after they are selected. This article describes several statistical tasks that benefit from this option, including simulating card games, randomly permuting observations in a DATA step,
![An easy way to make a "Top 10" table and bar chart in SAS](https://blogs.sas.com/content/iml/files/2018/06/Top10Freq2-640x336.png)
Years ago, I wrote an article about how to create a Top 10 table and bar chart. The program can be trivially modified to create a "Top N" table and plot, such as Top 5, Top 20, or even Top 100. Not long after the article was written, the developer
![Use a fringe plot to visualize binary data in logistic models](https://blogs.sas.com/content/iml/files/2018/05/binaryfring2-640x336.png)
A previous article showed how to use a calibration plot to visualize the goodness-of-fit for a logistic regression model. It is common to overlay a scatter plot of the binary response on a predicted probability plot (below, left) and on a calibration plot (below, right): The SAS program that creates
![6 easy ways to specify a list of variables in SAS](https://blogs.sas.com/content/iml/files/2017/01/ProgrammingTips-2.png)
The SAS language provides syntax that enables you to quickly specify a list of variables. SAS statements that accept variable lists include the KEEP and DROP statements, the ARRAY statement, and the OF operator for comma-separated arguments to some functions. You can also use variable lists on the VAR statements