In my spare time, I enjoy browsing the StackOverflow discussion forum to see what questions people are asking about SAS, SAS/IML, and statistics. Last week, a statistics student asked for help with the following homework problem: I need to generate a one-dimensional random walk in which the step length and
Uncategorized
Several times a year, I am contacted by a SAS account manager who tells me that a customer has asked whether it is possible to convert a MATLAB program to the SAS/IML language. Often the customer has an existing MATLAB program and wants to include the computation as part of
When I began my job at SAS in 1999 (I was only 14 years old at the time), one of my responsibilities was taking over the production of a listserv called NEWDOCNEWS. The listserv consisted of all the new titles from Books By Users (now SAS Press) and SAS Documentation
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
Do you have many points in your scatter plots that overlap each other? If so, your graph exhibits overplotting. Overplotting occurs when many points have similar coordinates. For example, the following scatter plot (which is produced by using the ODS statistical graphics procedure, SGPLOT) displays 12,000 points, many of which
The ODS Graphics Designer allows you to design and build your own statistical graphs in SAS, without having to learn how to program in the new graph template language (GTL). The ODS Graphics Designer is a rich user interface that allows you to design these graphs based upon your own
I don't use the SAS macro language very often. Because the SAS/IML language has statements for looping and evaluating expressions, I rarely write a macro function as part of a SAS/IML programs. Oh, sure, I use the %LET statement to define global constants, but I seldom use the %DO and
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
As we discussed last week, the forecasting process is often contaminated by individuals whose input makes the forecast worse. Sometimes this is intentional. For example, if I'm tired of hearing customers complain about out-of-stocks on retail shelves, I'll try to drive up the forecast so that more inventory will be
I was inspired by Chris Hemedinger's blog posts about his daughter's science fair project. Explaining statistics to a pre-teenager can be a humbling experience. My 11-year-old son likes science. He recently set about trying to measure which of three projectile launchers is the most accurate. I think he wanted to
I’m sure you will all agree that a programmer’s favorite task is to maximize efficiency thus enhancing performance. Dear reader, in this blog post I’ll share my best programming practices so that you can benefit from what I typically show my students in class. At the end I’d like to
I don't know much about the SQL procedure, but I know that it is powerful. According to the SAS documentation for the SQL procedure, "PROC SQL can perform some of the operations that are provided by the DATA step and the PRINT, SORT, and SUMMARY procedures." Recently, a fellow blogger,
Contributed by Chris Hemedinger, coauthor of SAS for Dummies, Second Edition, the genius behind The SAS Dummy blog, and the moderator of the SAS Enterprise Guide discussion forum. The SAS log is your source for information if you want to know the following: What SAS did while running your program
If you are a statistical programmer, sooner or later you have to compute a confidence interval. In the SAS/IML language, some beginning programmers struggle with forming a confidence interval. I don't mean that they struggle with the statistics (they know how to compute the relevant quantities), I mean that they
A recurring theme of The Business Forecasting Deal (both this blog and the book) is that forecasting is a huge waste of management time. This doesn't mean that forecasting is pointless, irrelevant, or entirely useless in running our organizations. It only means that the amount of time, money, and human
The Flowing Data blog posted some data about how much TV actors get paid per episode. About a dozen folks have created various visualizations of the data (see the comments in the Flowing Data blog), several of them very glitzy and fancy. One variable in the data is a categorical
I've known several people who were raised during the Great Depression, and I've observed that they are very mindful of waste. My wife's grandmother used to save plastic bags, twist ties, and relatively clean aluminum foil for potential reuse in the household -- because such materials were once scarce. The
Suppose that you want to create a matrix in SAS/IML software that has a special structure, such as a tridiagonal matrix. How do you do it? Or suppose that you want to find elements of a matrix A such that A[i,j] satisfies a certain condition. How do you get the
Brian Whittington mentioned last month that government is innovating, and at great speed. Based on what I’ve seen in our line of work with state and local governments around the country in the past year, I have to agree. In the face of today’s daunting fiscal challenges, state and local
If you tell my wife that she's married to a statistical geek, she'll nod knowingly. She is used to hearing sweet words of affection such as You are more beautiful than Euler's identity. or My love for you is like the exponential function: increasing, unbounded, and transcendental. But those are
It’s no surprise that the coauthors of the latest Wiley and SAS Business Series book The Executive's Guide to Enterprise Social Media Strategy are extremely socially savvy. David B. Thomas and Mike Barlow really know their stuff. It may surprise you, however, that author Thomas has unveiled an enticing new
The Winter 2011 issue of Foresight is now available. Here is Editor Len Tashman's preview: This issue of Foresight—our 20th since the journal’s genesis in 2005—begins with a new feature, Joe and Simon Sez. Joe is Joe Smith of Dean Foods and author of three valuable Foresight articles on forecast
In a previous blog post, I described the rules for a tic-tac-toe scratch-off lottery game and showed that it is a bad idea to generate the game tickets by using a scheme that uses equal probabilities. Instead, cells that yield large cash awards must be assigned a small probability of
Because of this week's story about a geostatistician, Mohan Srivastava, who figured out how predict winning tickets in a scratch-off lottery, I've been thinking about scratch-off games. He discovered how to predict winners when he began to "wonder how they make these [games]." Each ticket has a set of "lucky
I enjoyed the Dataists' data-driven blog on the best numbers to choose in a Super Bowl betting pool. It reminded me of my recent investigation of which initials are most common. Because the Dataists' blog featured an R function that converts Arabic numerals into Roman numerals, the blog post also
The other day, someone asked me how to compute a matrix of pairwise differences for a vector of values. The person asking the question was using SQL to do the computation for 2,000 data points, and it was taking many hours to compute the pairwise differences. He asked if SAS/IML
I'm not supposed to be working on this blog post right now. I've stayed late at the office under the pretense of working on "the book." It's the book about creating custom tasks for SAS Enterprise Guide, and I've been working on it for quite a while. I enjoy writing
On Friday, I posted an article about using spatial statistics to detect whether a pattern of points is truly random. That day, one of my colleagues asked me whether there are any practical applications of detecting spatial randomness or non-randomness. "Oh, sure," I replied, and rattled off a list of
When you pass a matrix as an parameter (argument) to a SAS/IML module, the SAS/IML language does not create a copy of the matrix. That approach, known as "calling by value," is inefficient. It is well-known that languages that implement call-by-value semantics suffer performance penalties. In the SAS/IML language, matrices
Millions of Americans will be gathering around the television this Sunday to watch Super Bowl XLV. They'll gather in bars and private homes, prepare billions of calories worth of snacks, and root for their favorite teams. But if you're looking for an alternate form of entertainment, why not watch "New