In my article on computing confidence intervals for rankings, I had to generate p random vectors that each contained N random numbers. Each vector was generated from normal distribution with different parameters. This post compares two different ways to generate p vectors that are sampled from independent normal distributions. Sampling
Tag: Tips and Techniques
I recently blogged about how to eliminate a macro loop in favor of using SAS/IML language statements. The purpose of the program was to extract N 3x3 matrices from a big 3Nx3 matrix. The main portion of my PROC IML program looked something like this: proc iml; ... do i=0
String comparisons in SAS software are case-sensitive. For example, the uppercase letter "F" and lowercase letter "f" are treated as unique characters. When these two letters represent the same condition (for example, a female patient), the strings need to be handled in a case-insensitive manner, and a SAS programmer might
If you haven't signed up for SAS Global Forum 2011 in Las Vegas, you'd better get moving: February 28 is the last day for early registration and the discounted hotel prices. You should also sign up for the pre-conference statistical tutorials, which are filling up fast! I was tempted to
The other day I needed to check that a sequence of numerical values was in strictly increasing order. My first thought was to sort the values and compare the sorted and original values, but I quickly discarded that approach because it does not detect duplicate values in a montonic (nondecreasing)
When I wake up early to write my blog, I often wonder, "Is anyone going to read this?" Apparently so. I started writing The DO Loop in September, 2010. Since then, I've posted about 60 entries about statistical programming with SAS/IML software. Since this is a statistical blog, it is
NOTE: SAS stopped shipping the SAS/IML Studio interface in 2018. The references in this article to IMLPlus and SAS/IML Studio are no longer relevant. There are three kinds of programming errors: parse-time errors, run-time errors, and logical errors. It doesn't matter what language you are using (SAS/IML, MATLAB, R, C/C++,
The SAS/IML language enables you to perform matrix-vector computations. However, it also provides a convenient "shorthand notation" that enables you to perform elementwise operation on rows or columns in a natural way. You might know that the SAS/IML language supports subscript reduction operators to compute basic rowwise or columnwise quantities.
Errors. We all make them. After all, “to err is human.” Or, as programmers often say, “To err is human, but to really foul things up requires a computer” (Farmer’s Almanac, 1978). This post describes how to interpret error messages from PROC IML that appear in the SAS log. The
I am pleased to announce that the fine folks at SAS Press have made Chapter 2 of my book, Statistical Programming with SAS/IML Software available as a free PDF document. The chapter is titled "Getting Started with the SAS/IML Matrix Programming Language," and it features More than 60 fully functional