Uncategorized

Rick Wicklin 0
Add a diagonal line to a scatter plot

In my statistical analysis of coupons article, I presented a scatter plot that includes the identity line, y=x. This post describes how to write a general program that uses the SGPLOT procedure in SAS 9.2. By a "general program," I mean that the program produces the result based on the

Rick Wicklin 0
The area under a density estimate curve

Readers' comments indicate that my previous blog article about computing the area under an ROC curve was helpful. Great! There is another common application of numerical integration: finding the area under a density estimation curve. This article provides an overview of density estimation and computes an empirical cumulative density function.

Rick Wicklin 0
Overlaying two histograms in SAS

A reader commented to me that he wants to use the HISTOGRAM statement of the SGPLOT procedure to overlay two histograms on a single plot. He could do it, but unfortunately SAS was choosing a large bin width for one of the variables and a small bin width for the

Rick Wicklin 0
Pre-allocate arrays to improve efficiency

Recently Charlie Huang showed how to use the SAS/IML language to compute an exponentially weighted moving average of some financial data. In the commentary to his analysis, he said: I found that if a matrix or a vector is declared with specified size before the computation step, the program’s efficiency

Rick Wicklin 0
A statistical analysis of coupons

Each Sunday, my local paper has a starburst image on the front page that proclaims "Up to $169 in Coupons!" (The value changes from week to week.) One day I looked at the image and thought, "Does the paper hire someone to count the coupons? Is this claim a good

Learn SAS
0
SAS Press to debut new statistical titles at JSM 2011

The 2011 Joint Statistical Meetings (JSM) will be from July 31-August 3 in Miami Beach. Look for acquisitions editor and SAS Press conference mega-maven Shelley Sessoms at the SAS Publishing booth (#504). Shelley can talk with you about: New and forthcoming statistics-related books from SAS Press, including Statistical Analysis for

Rick Wicklin 0
Enumerating levels of a classification variable

A colleague asked, "How can I enumerate the levels of a categorical classification variable in SAS/IML software?" The variable was a character variable with n observations, but he wanted the following: A "look-up table" that contains the k (unique) levels of the variable. A vector with n elements that contains

Chris Hemedinger 0
Moved again. Did you blink and miss it?

Sometime very recently, probably while you weren't looking, I changed jobs at SAS (yes, again). This time it's a bigger change for me, because I'm no longer part of the SAS R&D organization, where I've worked for nearly 14 years. Instead, I'm part of the team known internally as Professional

Rick Wicklin 0
Blogging, programming, and Johari windows

My primary purpose in writing The DO Loop blog is to share what I know about statistical programming in general and about SAS programming in particular. But I also write the blog for various personal reasons, including the enjoyment of writing. The other day I encountered a concept on Ajay

Shelly Goodin 0
SAS Author's Tip: A Typical Clinical Trial Table

This week's featured tip from SAS Press author Jack Shostak should spark the interest of those of you working in the pharmaceutical or clinical trials industries. While I'm not a programmer, myself, Jack's book has been consistently described as being accessible, practical, and helpful for both beginners and advanced SAS

Analytics
Vincent Talucci 0
The police police

Policing has profoundly changed over the last several decades and its evolution will continue as long as there are crimes to commit and communities to serve. The very nature of policing is dynamic – it always has been and always will be. Those dynamics are driven by many things –

Rick Wicklin 0
Use subscript reduction operators!

Writing efficient SAS/IML programs is very important. One aspect to efficient SAS/IML programming is to avoid unnecessary DO loops. In my book, Statistical Programming with SAS/IML Software, I wrote (p. 80): One way to avoid writing unnecessary loops is to take full advantage of the subscript reduction operators for matrices.

Rick Wicklin 0
The trapezoidal rule of integration

In a previous article I discussed the situation where you have a sequence of (x,y) points and you want to find the area under the curve that is defined by those points. I pointed out that usually you need to use statistical modeling before it makes sense to compute the

1 235 236 237 238 239 255