The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs![Pooled, within-group, and between-group covariance matrices](https://blogs.sas.com/content/iml/files/2020/07/pooledCov5-400x336.png)
A previous article discusses the pooled variance for two or groups of univariate data. The pooled variance is often used during a t test of two independent samples. For multivariate data, the analogous concept is the pooled covariance matrix, which is an average of the sample covariance matrices of the
![What is a pooled variance?](https://blogs.sas.com/content/iml/files/2020/06/pooledVar1.png)
The first time I saw a formula for the pooled variance, I was quite confused. It looked like Frankenstein's monster, assembled from bits and pieces of other quantities and brought to life by a madman. However, the pooled variance does not have to be a confusing monstrosity. The verb "to
![The Kolmogorov D distribution and exact critical values](https://blogs.sas.com/content/iml/files/2020/06/KolDExact7-640x336.png)
If you have ever run a Kolmogorov-Smirnov test for normality, you have encountered the Kolmogorov D statistic. The Kolmogorov D statistic is used to assess whether a random sample was drawn from a specified distribution. Although it is frequently used to test for normality, the statistic is "distribution free" in
![Visualize the structure of a sparse matrix](https://blogs.sas.com/content/iml/files/2020/06/SparseViz2-400x336.png)
Sometimes in matrix computations, it is important to display the nonzero elements of a matrix. This can be useful for visualizing the structure of a sparse matrix (one that has many zeros) and it is also useful when describing a matrix algorithm (such as Gaussian elimination) that introduces zeros at
![Write a CAS data table by using the iml action Architecture of an MPP session in SAS Viya. The client calls an action, which can use multiple nodes and threads.](https://blogs.sas.com/content/iml/files/2020/06/imlcasMPP1-702x336.png)
A previous article shows how to use the iml action to read a CAS data table into an IML matrix. This article shows how to write a CAS table from data in an IML matrix. You can read an overview of the iml action, which was introduced in SAS Viya
![Read a CAS data table by using the iml action Architecture of an MPP session in SAS Viya. The client calls an action, which can use multiple nodes and threads.](https://blogs.sas.com/content/iml/files/2020/06/imlcasMPP1-702x336.png)
A previous article compares a SAS/IML program that runs in PROC IML to the same program that runs in the iml action. (You can read an overview of the iml action.) The example in the previous article was very simple and did not read or write data. This article compares