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
English
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
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
We're just under two months away from SAS Global Forum 2011, and I'm feeling pretty good. Oops, I shouldn't have said that. That's going to come back to bite me, I'll bet. But I've already checked off so much on my to-do list! First, I got myself invited to attend.
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
Last week I generated two kinds of random point patterns: one from the uniform distribution on a two-dimensional rectangle, the other by jittering a regular grid by a small amount. My show choir director liked the second method (jittering) better because of the way it looks on stage: there are
One of my New Year's resolutions is to learn a new area of statistics. I'm off to a good start, because I recently investigated an issue which started me thinking about spatial statistics—a branch of statistics that I have never formally studied. During the investigation, I asked myself: Given an
Last week I presented a SAS Talks session for SAS programmers using SAS Enterprise Guide 4.3. It was well attended, which pleased me. You never know how it's going to go with a webinar. People register and sign in, but they are at their desks in their offices/cubicles/homes where distractions
SAS Global Forum, with its long standing history, continues to be the hub and melting pot of brain-stimulating concoctions and eureka moments for SAS users across the globe! This year the magic continues in Las Vegas, at Caesars Palace from April 4 – 7. This series, Snapshot of the Best
I've never met Sy Truong face-to-face. (That will be one of the top items on my SAS Global Forum 2011 to-dos.) I’ve talked with him on Twitter and enjoyed his blog so much that I listed it in an edition of the SAS Tech Report. I’ve even talked with him
As Cat Truxillo points out in her recent blog post, some SAS procedures require data to be in a "long" (as opposed to "wide") format. Cat uses a DATA step to convert the data from wide to long format. Although there is nothing wrong with this approach, I prefer to
I sing in the SAS-sponsored VocalMotion show choir. It's like an adult version of Glee, except we have more pregnancies and fewer slushie attacks. For many musical numbers, the choreographer arranges the 20 performers on stage in an orderly manner, such as four rows of five singers. But every once
I have recently had the great opportunity to be a part of a very special project called the North Carolina Bio-Preparedness Collaborative (NCB-Prepared) It is a public-private partnership that includes the University of North Carolina at Chapel Hill (UNC), North Carolina State University, and SAS, with support from the US
Last week I talked about how I volunteered to serve as a judge for a middle-school science fair. As I expected, I enjoyed the experience quite a bit, and I hope the students got something positive from me as well. I evaluated several really impressive projects at the 7th grade
A histogram displays the number of points that fall into a specified set of bins. This blog post shows how to efficiently compute a SAS/IML vector that contains those counts. I stress the word "efficiently" because, as is often the case, a SAS/IML programmer has a variety of ways to
Have you ever wanted to compute the exact value of a really big number such as 200! = 200*199*...*2*1? You can do it—if you're willing to put forth some programming effort. This blog post shows you how. Jiangtang Hu's recent blog discusses his quest to compute large factorials in many programming languages.
For all our SAS Global Forum connoisseurs, welcome to this series - Snapshot of the Best Papers of 2010. Despite running for more than three decades, there’s always something new and exciting cooking at SAS Global Forum. Through this series, I will be sharing some of those vibrant flavors from
Who doesn’t like bargains? I’m sure you will all agree that good quality at a next-to-nothing cost is irresistible. My recent Dollarama run had me ecstatic about the gloves that come in all colours, styles and sizes for just over a dollar. (Fact: big retail stores charge over 10 times
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)
It has become routine. For the 14th straight time – which is every year since its first publication in 1998 – SAS has made the Fortune “100 Best Companies to Work For” list. This includes eight appearances in the top ten, and in 2011, for the second year in a
There are over 400 hundred presentations to choose from at SAS Global Forum 2011. With all of these options, it pays to plan ahead. Why not start building your agenda now? The Personal Agenda Builder tool allows you to plan your conference schedule with point and click ease. It has
In a previous post, I described ways to create SAS/IML vectors that contain uniformly spaced values. The methods did not involve writing any loops. This post describes how to perform a similar operation: creating evenly spaced values on a two-dimensional grid. The DATA step solution is simple, but an efficient