The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs![Linear interpolation in SAS](https://blogs.sas.com/content/iml/files/2020/05/linealInterp1-640x336.png)
SAS programmers sometimes ask about ways to perform one-dimensional linear interpolation in SAS. This article shows three ways to perform linear interpolation in SAS: PROC IML (in SAS/IML software), PROC EXPAND (in SAS/ETS software), and PROC TRANSREG (in SAS/STAT software). Of these, PROC IML Is the simplest to use and
![How many imputations are enough?](https://blogs.sas.com/content/iml/files/2017/01/ProgrammingTips-2.png)
Recently I read an excellent blog post by Paul von Hippel entitled "How many imputations do you need?". It is based on a paper (von Hippel, 2018), which provides more details. Suppose you are faced with data that has many missing values. One way to address the missing values is
![The circular law for eigenvalues](https://blogs.sas.com/content/iml/files/2020/04/unifEigen1-480x336.png)
I've previously written about how to generate points that are uniformly distributed in the unit disk. A seemingly unrelated topic is the distribution of eigenvalues (in the complex plane) of various kinds of random matrices. However, I recently learned that these topics are somewhat related! A mathematical result called the
![Visualize the case fatality rate for COVID-19 in US counties](https://blogs.sas.com/content/iml/files/2020/04/casefatailtyUS5-640x336.png)
A previous article describes the funnel plot (Spiegelhalter, 2005), which can identify samples that have rates or proportions that are much different than expected. The funnel plot is a scatter plot that plots the sample proportion of some quantity against the size of the sample. The variance of the sample
![Use a funnel plot to visualize rates: The case fatality rate for COVID-19 in North Carolina counties](https://blogs.sas.com/content/iml/files/2020/04/casefatailtyNC-640x336.png)
Death is always a difficult topic to discuss, and death has been in the news a lot during this tragic coronavirus pandemic. Many news stories focus on states, counties, or cities that have the most cases or the most deaths. A related statistic is the case fatality rate, which is
![Add diagonal reference lines to SAS graphs: The LINEPARM and VECTOR statements](https://blogs.sas.com/content/iml/files/2020/04/diagline3-640x336.png)
I previously wrote about the advantages of adding horizontal and vertical reference lines to a graph. You can also add a diagonal reference line to a graph. The SGPLOT procedure in SAS supports two primary ways to add a diagonal reference line: The LINEPARM statement enables you to specify a