The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs![Graphs for multiple comparisons of means: The lines plot Lines plot for multiple comparison of means in SAS](https://blogs.sas.com/content/iml/files/2017/10/linesplot1-400x336.png)
Last week Warren Kuhfeld wrote about a graph called the "lines plot" that is produced by SAS/STAT procedures in SAS 9.4M5. (Notice that the "lines plot" has an 's'; it is not a line plot!) The lines plot is produced as part of an analysis that performs multiple comparisons of
![Simulate correlations by using the Wishart distribution](https://blogs.sas.com/content/iml/files/2017/10/WishartCorr-640x336.png)
The article "Fisher's transformation of the correlation coefficient" featured a Monte Carlo simulation that generated sample correlations from bivariate normal data. The simulation used three steps: Simulate B samples of size N from a bivariate normal distribution with correlation ρ. Use PROC CORR to compute the sample correlation matrix for
![Order correlations by magnitude Heat map of correlations between variables](https://blogs.sas.com/content/iml/files/2017/08/corrbarchart1-640x336.png)
Correlations between variables are typically displayed in a matrix. Because the correlation matrix is determined by the order of the variables, it is difficult to find the largest and smallest correlations, which is why analysts sometimes use colors to visualize the correlation matrix. Another visualization option is the pairwise correlation
![Create and interpret a weighted histogram Weighted histogram in SAS](https://blogs.sas.com/content/iml/files/2017/10/WeightedHistogram-640x336.png)
If you perform a weighted statistical analysis, it can be useful to produce a statistical graph that also incorporates the weights. This article shows how to construct and interpret a weighted histogram in SAS. How to construct a weighted histogram Before constructing a weighted histogram, let's review the construction of
![How to understand weight variables in statistical analyses Visualization of regression that uses a weight variable in SAS](https://blogs.sas.com/content/iml/files/2016/10/weightedreg1.png)
How can you specify weights for a statistical analysis? Hmmm, that's a "weighty" question! Many people on discussion forums ask "What is a weight variable?" and "How do you choose a weight for each observation?" This article gives a brief overview of weight variables in statistics and includes examples of
![Data-driven simulation Results of a data-driven simulation in which parameters are stored in a file and processed by a SAS program](https://blogs.sas.com/content/iml/files/2016/03/datadrivensim2-640x336.png)
In a large simulation study, it can be convenient to have a "control file" that contains the parameters for the study. My recent article about how to simulate multivariate normal clusters demonstrates a simple example of this technique. The simulation in that article uses an input data set that contains