The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs![Fit a multivariate Gaussian mixture model by using the expectation-maximization (EM) algorithm](https://blogs.sas.com/content/iml/files/2020/07/EMalg4-640x336.png)
Last month a SAS programmer asked how to fit a multivariate Gaussian mixture model in SAS. For univariate data, you can use the FMM Procedure, which fits a large variety of finite mixture models. If your company is using SAS Viya, you can use the MBC or GMM procedures, which
![Compute within-group multivariate statistics and store them in a list](https://blogs.sas.com/content/iml/files/2020/07/MVStatLists1.png)
I recently showed how to compute within-group multivariate statistics by using the SAS/IML language. However, a principal of good software design is to encapsulate functionality and write self-contained functions that compute and return the results. What is the best way to return multiple statistics from a SAS/IML module? A convenient
![How to evaluate the multivariate normal log likelihood](https://blogs.sas.com/content/iml/files/2020/07/MVNLike3.png)
The multivariate normal distribution is used frequently in multivariate statistics and machine learning. In many applications, you need to evaluate the log-likelihood function in order to compare how well different models fit the data. The log-likelihood for a vector x is the natural logarithm of the multivariate normal (MVN) density
![A parallel implementation of Monte Carlo simulation in SAS Viya](https://blogs.sas.com/content/iml/files/2020/07/mrfig-702x336.png)
A previous article introduces the MAPREDUCE function in the iml action. (The iml action was introduced in Viya 3.5.) The MAPREDUCE function implements the map-reduce paradigm, which is a two-step process for distributing a computation to multiple threads. The example in the previous article adds a set of numbers by
![A general method for parallel computation in SAS Viya](https://blogs.sas.com/content/iml/files/2020/07/mrfig-702x336.png)
The iml action in SAS Viya (introduced in Viya 3.5) provides a set of general programming tools that you can use to implement a custom parallel algorithm. This makes the iml action different than other Viya actions, which use distributed computations to solve specific problems in statistics, machine learning, and
![Pool testing: The math behind combining medical tests](https://blogs.sas.com/content/iml/files/2020/07/poolTesting3-640x336.png)
Testing people for coronavirus is a public health measure that reduces the spread of coronavirus. Dr. Anthony Fauci, a US infectious disease expert, recently mentioned the concept of "pool testing." The verb "to pool" means "to combine from different sources." In a USA Today article, Dr. Deborah Birx, the coordinator