The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs![Sampling with replacement](https://blogs.sas.com/content/iml/files/2011/08/t_samplewithreplace.png)
Sampling with replacement is a useful technique for simulations and for resampling from data. Over at the SAS/IML Discussion Forum, there was a recent question about how to use SAS/IML software to sample with replacement from a set of events. I have previously blogged about efficient sampling, but this topic
![Statistics can save you money: Estimates, areas, and arithmetic means](https://blogs.sas.com/content/iml/files/2011/08/roof.png)
This post is about an estimate, but not the statistical kind. It also provides yet another example in which the arithmetic mean is not the appropriate measure for a computation. First, some background. Last week I read a blog post by Peter Flom that reminded me that it is wrong
![SAS/IML software featured at WUSS](https://blogs.sas.com/content/iml/files/2017/02/AdvancedAnalytics-3.png)
Today I'm in San Diego at the 2010 meeting of the Western Users of SAS Software (WUSS). I am giving several presentations on SAS/IML and SAS/IML Studio: A tutorial workshop on SAS/IML Studio for the SAS/STAT User. The material in this tutorial is a small sampling of Chapters 4–11 of
![Tips and techniques - What’s the difference?](https://blogs.sas.com/content/iml/files/2017/02/AdvancedAnalytics-4.png)
In this blog and in the book Statistical Programming with SAS/IML Software, I present tips and techniques for writing efficient SAS/IML programs for data analysis, simulation, matrix computations, and other topics of interest to statistical programmers. When I was writing my book, one of the reviewers commented that he wasn’t
![Tricks and Treats](https://blogs.sas.com/content/iml/files/2017/02/AdvancedAnalytics-4.png)
How can you change a programming trick into a programming treat? Try this algorithm: If you develop a clever snippet of code, squirrel it away. This snippet is a "trick." If you use the trick a second time, copy and modify the code. The trick has become a "treat." If
![Evaluate an iterated integral](https://blogs.sas.com/content/iml/files/2011/08/singleintegral.png)
The SAS/IML language provides the QUAD function for evaluating one-dimensional integrals. You can also use the QUAD function to compute a double integral as an iterated integral. A One-Dimensional Integration Suppose you want to evaluate the following integral: To evaluate this integral in the SAS/IML language: Define a function module