A colleague related the following story: He was taking notes at a meeting that was attended by a fairly large group of people (about 20). As each person made a comment or presented information, he recorded the two-letter initials of the person who spoke. After the meeting was over, he
Uncategorized
SAS/IML software is often used for sampling and simulation studies. For simulating data from univariate distributions, the RANDSEED and RANDGEN subroutines suffice to sample from a wide range of distributions. (I use the terms "sampling from a distribution" and "simulating data from a distribution" interchangeably.) For multivariate simulations, the IMLMLIB
AUTOEXEC.SAS wasn't enough for you. Yes, it's a sure-fire way to run SAS statements (such as LIBNAME assignments or macro definitions) whenever you start your SAS session, but you found it has limitations when used in configurations with lots of users who connect with SAS Enterprise Guide. Limitations such as:
It is often useful to create a vector with elements that follow an arithmetic sequence. For example, {1, 2, 3, 4} and {10, 30, 50, 70} are vectors with evenly spaced values. This post describes several ways to create vectors such as these. The SAS/IML language has two ways to
Computing probabilities can be tricky. And if you are a statistician and you get them wrong, you feel pretty foolish. That's why I like to run a quick simulation just to make sure that the numbers that I think are correct are, in fact, correct. My last post of 2010
I'm pleased to announce that I'll be presenting another SAS Talks session on January 27th, 2011 (this month!). This talk will focus on the cool stuff in SAS Enterprise Guide 4.3, especially for the SAS programmer. Here's some of what you'll learn about: Syntax suggestion and autocomplete for the SAS
The Junk Chart blog discusses problems with a chart which (poorly) presents statistics on the prevalence of shark attacks by different species. Here is the same data presented by overlaying two bar charts by using the SGPLOT procedure. I think this approach works well because the number of deaths is
Over at the SAS/IML Discussion Forum, someone posted an interesting question about how to create a special matrix that contains all combinations of zeros and ones for a given size. Specifically, the problem is as follows. Given an integer n ≥ 1, produce a matrix with 2n rows and n
Most people don’t think about government when they hear the word “innovation”, but it’s happening, and has been since long before “The Great Recession.” However, the current economic conditions have certainly moved things along. Government responds very similarly to private industry when faced with challenges. SAS manages to do relatively
It's a New Year and I'm ready to make some resolutions. Last year I launched this blog with my Hello, World post in which I said: In this blog I intend to discuss, describe, and disseminate ideas related to statistical programming with the SAS/IML language.... I will present tips and
In many families, siblings draw names so that each family member and spouse gives and receives exactly one present. This year there was a little bit of controversy when a family member noticed that once again she was assigned to give presents to me. This post includes my response to
If outliers could scream, would we be so cavalier about removing them from our history, and excluding them from our statistical forecasting models? Well, maybe we would – if they screamed all the time, and for no good reason. (This sentiment is adapted from my favorite of the many Deep
It's almost 2011, so let's reflect on the top 11 posts (by number of visits in 2010) on this blog. Not all of these posts were written in 2010; in fact, some of these date back to 2007. But apparently they are oldies and goodies. 1. SAS 9.2 and SAS
Many years ago I served as the program manager for the NC Alternative Fuel Vehicles program. The goal of the program was to promote the usage of various vehicle types that were alternatives to gasoline powered vehicles. One of the main programs in this set of grants was the Clean
A customer phoned up SAS Technical Support the other day with a problem. (Yes, that happens occasionally...) When he ran a certain program through SAS Enterprise Guide, the program didn't seem to complete and no results were returned. Here is a snippet of the program (modified a bit to make
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
You might be too young to remember Clara Peller. She was the star of a series of fast-food burger commercials in the 1980s, in which she demanded meatier meals by shouting "Where's the beef?" at the pickup counter or drive-through window. Alas, the competitor restaurant meals were afflicted with "Fluffy
When I joined SAS Institute I had no knowledge of SAS. I studied, researched and practiced. The questions I asked would make even the most seasoned programmer blush a beetroot red! Those were an intense nine months—I’ll tell you more in a later post about the learning system at SAS
When I finished writing my book, Statistical Programming with SAS/IML Software, I was elated. However, one small task still remained. I had to write the index. How Long Should an Index Be? My editor told me that SAS Press would send the manuscript to a professional editor who would index
Paula Joshi wrote last month about how what we learn from the commercial world can be applied in government. She also promised to post a few examples. I’ll get that ball rolling. This week SAS announced the availability of SAS Enterprise Case Management. While the announcement focuses more on the
Recently, I needed to detect whether a matrix consists entirely of missing values. I wrote the following module: proc iml; /** Module to detect whether all elements of a matrix are missing values. Works for both numeric and character matrices. Version 1 (not optimal) **/ start isMissing(x); if type(x)='C' then
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++,
Here is my published Google Reader bundle that contains all of the SAS- or analytics-related blogs that are maintained by customers or others in the SAS community (excepting those by SAS employees, for which I have a different bundle). Blogs by SAS Customers AFHood Analytics Group - Blogs AnnMaria's Blog
These are the blogs that I follow that happen to be written by SAS employees. I've assembled them into a Google Reader bundle, which I have shared. I have another bundle for SAS-related blogs written by others in the community. Blogs by SAS Employees A Shot in the Arm Blog-Normal
I helped to write a quiz for the Computer Science Education Week promotions that were featured on our company intranet. Do you fancy yourself as a Comp-Sci aficionado? Let's see how you do with these. 1. Which achievement is Charles Babbage most famous for? A. Establishing software retail shops in
While insufficiently endowed to be called a "get rich quick" scheme, here is a good way to pocket an extra $5,000 for your holiday shopping budget, and contribute to the body of forecasting knowledge. For the ninth straight year, SAS announces funding of two $5,000 research grants to be awarded
Imagine you are attending the BCS National Championship game next month. You have invested top dollar in your seats and you have been anticipating the game for weeks. You settle in to your seat with your hot dog, soft pretzel, and your favorite beverage a few minutes before kick-off because
Both covariance matrices and correlation matrices are used frequently in multivariate statistics. You can easily compute covariance and correlation matrices from data by using SAS software. However, sometimes you are given a covariance matrix, but your numerical technique requires a correlation matrix. Other times you are given a correlation matrix,
I connect to more SAS server environments than your average SAS user. In a given week, I probably run SAS Enterprise Guide connecting to at least five different Windows-based servers, a few Unix-based servers, and maybe even a z/OS machine as well. With that many SAS environments, I'm bound to
Sample covariance matrices and correlation matrices are used frequently in multivariate statistics. This post shows how to compute these matrices in SAS and use them in a SAS/IML program. There are two ways to compute these matrices: Compute the covariance and correlation with PROC CORR and read the results into