The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs![The Kullback–Leibler divergence between discrete probability distributions](https://blogs.sas.com/content/iml/files/2020/05/KLDiv4.png)
If you have been learning about machine learning or mathematical statistics, you might have heard about the Kullback–Leibler divergence. The Kullback–Leibler divergence is a measure of dissimilarity between two probability distributions. It measures how much one distribution differs from a reference distribution. This article explains the Kullback–Leibler divergence and shows
![Bilinear interpolation in SAS](https://blogs.sas.com/content/iml/files/2020/05/BilinearInterp1-480x336.png)
This article shows how to perform two-dimensional bilinear interpolation in SAS by using a SAS/IML function. It is assumed that you have observed the values of a response variable on a regular grid of locations. A previous article showed how to interpolate inside one rectangular cell. When you have a
![What is bilinear interpolation?](https://blogs.sas.com/content/iml/files/2020/05/bilinearSquare1-480x336.png)
I've previously written about linear interpolation in one dimension. Bilinear interpolation is a method for two-dimensional interpolation on a rectangle. If the value of a function is known at the four corners of a rectangle, an interpolation scheme gives you a way to estimate the function at any point in
![Find points where a regression curve has zero slope](https://blogs.sas.com/content/iml/files/2020/05/zeroSlope1-640x336.png)
This article shows how to find local maxima and maxima on a regression curve, which means finding points where the slope of the curve is zero. An example appears at the right, which shows locations where the loess smoother in a scatter plot has local minima and maxima. Except for
![Cubic spline interpolation in SAS](https://blogs.sas.com/content/iml/files/2020/05/cubicInterp1-640x336.png)
I recently showed how to use linear interpolation in SAS. Linear interpolation is a common way to interpolate between a set of planar points, but the interpolating function (the interpolant) is not smooth. If you want a smoother interpolant, you can use cubic spline interpolation. This article describes how to
![What does 'flatten the curve' mean? To which curve does it apply?](https://blogs.sas.com/content/iml/files/2020/05/flatten1-640x336.png)
During this coronavirus pandemic, there are many COVID-related graphs and curves in the news and on social media. The public, politicians, and pundits scrutinize each day's graphs to determine which communities are winning the fight against coronavirus. Interspersed among these many graphs is the oft-repeated mantra, "Flatten the curve!" As