The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs![Fit a growth curve in SAS](https://blogs.sas.com/content/iml/files/2018/10/growthcurve1-640x336.png)
This article shows how to use SAS to fit a growth curve to data. Growth curves model the evolution of a quantity over time. Examples include population growth, the height of a child, and the growth of a tumor cell. This article focuses on using PROC NLIN to estimate the
![The intersection of multiple sets](https://blogs.sas.com/content/iml/files/2017/01/ProgrammingTips-2.png)
This article compares several ways to find the elements that are common to multiple sets. I test which method is the fastest in the SAS/IML language. However, all algorithms are intrinsically fast, which raises an important question: when is it worth the time and effort to optimize an algorithm? The
![Fast simulation of multivariate normal data with an AR(1) correlation structure](https://blogs.sas.com/content/iml/files/2012/02/choleskytransform.png)
It is sometimes necessary for researchers to simulate data with thousands of variables. It is easy to simulate thousands of uncorrelated variables, but more difficult to simulate thousands of correlated variables. For that, you can generate a correlation matrix that has special properties, such as a Toeplitz matrix or a
![Chi-square tests for proportions in one-way tables](https://blogs.sas.com/content/iml/files/2018/09/FreqTestp4-640x336.png)
Programmers on a SAS discussion forum recently asked about the chi-square test for proportions as implemented in PROC FREQ in SAS. One person asked the basic question, "how do I test the null hypothesis that the observed proportions are equal to a set of known proportions?" Another person said that
![Radial basis functions and Gaussian kernels in SAS](https://blogs.sas.com/content/iml/files/2018/09/gausskernel2-640x336.png)
A radial basis function is a scalar function that depends on the distance to some point, called the center point, c. One popular radial basis function is the Gaussian kernel φ(x; c) = exp(-||x – c||2 / (2 σ2)), which uses the squared distance from a vector x to the
![How many perfect riffle shuffles are required to restore a deck to its initial order?](https://blogs.sas.com/content/iml/files/2018/09/perfectshuffle2-640x336.png)
Last week I compared the overhand shuffle to the riffle shuffle. I used random operations to simulate both kinds of shuffles and then compared how well they mix cards. The article caused one my colleague and fellow blogger, Rob Pratt, to ask if I was familiar with a bit of