The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs![Estimate percentiles in SAS Viya](https://blogs.sas.com/content/iml/files/2022/01/percentilesCAS4.png)
How can you estimate percentiles in SAS Viya? This article shows how to call the percentile action from PROC CAS to estimate percentiles of variables in a CAS data table. Percentiles and quantiles are essentially the same (the pth quantile is the 100*pth percentile for p in [0, 1]), so
![How often do different statistical tests agree? A simulation study](https://blogs.sas.com/content/iml/files/2022/01/normtests3-480x336.png)
Here's a fun problem to think about: Suppose that you have two different valid ways to test a statistical hypothesis. For a given sample, will both tests reject or fail to reject the hypothesis? Or might one test reject it whereas the other does not? The answer is that two
![Simulate events when some probabilities are zero](https://blogs.sas.com/content/iml/files/2017/01/ProgrammingTips-2.png)
Several probability distributions model the outcomes of various trials when the probabilities of certain events are given. For some distributions, the definitions make sense even when a probability is 0. For other distributions, the definitions do not make sense unless all probabilities are strictly positive. This article examines how zero
![How to assign a name to a color](https://blogs.sas.com/content/iml/files/2022/01/NamedHex5.png)
Some colors have names, such as "Red," "Magenta," and "Dark Olive Green." But the most common way to specify a color is to use a hexadecimal value such as CX556B2F. It is not obvious that "Dark Olive Green" and CX556B2F represent the same color, but they do! I like to
![12 blog posts from 2021 that deserve a second look](https://blogs.sas.com/content/iml/files/2021/06/ImanConover5-678x336.png)
On this blog, I write about a diverse set of topics that are relevant to statistical programming and data visualization. In a previous article, I presented some of the most popular blog posts from 2021. The most popular articles often deal with elementary or familiar topics that are useful to
![A block-Cholesky method to simulate multivariate normal data](https://blogs.sas.com/content/iml/files/2021/12/CholBig1.png)
You can use the Cholesky decomposition of a covariance matrix to simulate data from a correlated multivariate normal distribution. This method is encapsulated in the RANDNORMAL function in SAS/IML software, but you can also perform the computations manually by calling the ROOT function to get the Cholesky root and then