One of of my favorite reviewer quotes about Michele Burlew's book SAS Macro Programming Made Easy, Second Edition is" [ It ] helps eliminate the 'fear factor' often associated with using macros, while offering valuable insight to programmers with a broad range of experience." --Suson vonLehmden, RTI International I've worked with Michele Burlew
Uncategorized
Over my 32 year career in local government as a city and county manager I was faced with many difficult decisions during budget deliberations. Setting tax and utility rates, adding head count, determining compensation and benefits, calculating the appropriate mix of debt and cash for funding capital projects…these were all
In my previous post, I blogged about how to sample from a finite mixture distribution. I showed how to simulate variables from populations that are composed of two or more subpopulations. Modeling a response variable as a mixture distribution is an active area of statistics, as judged by many talks
SAS programming is taught in schools all over the world, including in high schools. Occasionally, I receive questions via my blog such as this one: Can somebody help me on this? Write a short DATA _NULL_ step to determine the largest integer you can store on your computer in 3,
Sometimes a population of individuals is modeled as a combination of subpopulations. For example, if you want to model the heights of individuals, you might first model the heights of males and females separately. The height of the population can then be modeled as a combination of the male and
We continue my colleague Udo Sglavo's example with the SAS code for incorporating R models into SAS Forecast Server: Code for Including R Model Results in SAS As a first step I’m exporting a data set containing one time series from SAS to R (actually I will use the same
In 2009, SAFETEA-LU—the legislation that outlines federal transportation funding for the states—expired. Since then, members of Congress have been kicking the can down the road, passing funding extensions instead of passing legislation. The major impact of this failure to act is that the U.S. continues to slip further and further
My colleague Udo Sglavo is back, responding to comments on his guest blog from two weeks ago. For fans of SAS and R, he shows how to incorporate results from Hyndman's R model into SAS. Do the Evolution After publishing my blog on replicating Rob J Hyndman’s cross validation idea
Like millions of other Americans, I recently was asked to make a decision of tremendous importance to my household -- a decision that would affect the welfare of everyone in my family. That decision, of course, was whether to continue to receive Netflix movies by mail, or opt for the
The other day I encountered a SAS Knowledge Base article that shows how to count the number of missing and nonmissing values for each variable in a data set. However, the code is a complicated macro that is difficult for a beginning SAS programmer to understand. (Well, it was hard
When trying to write out graphics to a specific filename location, the gsfname option is only honored when ODS LISTING is turned on and ODS HTML is turned off. This is especially important in 9.3 Base SAS as the ODS HTML option is the default output destination. Enterprise Guide users
Last week I showed a graph of the number of US births for each day in 2002, which shows a strong day-of-the-week effect. The graph also shows that the number of births on a given day is affected by US holidays. This blog post looks closer at the holiday effect.
As schools across the country delve into a new year, I want to bring my readers back to teaching basics with Part 2 of my Three R’s series on Rigor, Relevance, and Relationships. Here's Part 1. As students flood our halls and classrooms, are they eager and excited for the challenging year ahead? Do
As I mentioned in my introductory post about Windows PowerShell, you can use PowerShell commands as a simple and concise method to collect data from your Windows systems -- information that is ripe for analysis within SAS. In this example, I'll show a technique for using a SAS program to
Look at the following graphs showing one weekly time series. The left hand shows the actual time series plot. To the less statistically inclined this plot might indicate that the data is seasonal due to the troughs during summer and the peaks during winter. However, if you were to use
Polynomials are used often in data analysis. Low-order polynomials are used in regression to model the relationship between variables. Polynomials are used in numerical analysis for numerical integration and Taylor series approximations. It is therefore important to be able to evaluate polynomials in an efficient manner. My favorite evaluation technique
In this guest blog, my colleague Snurre Jensen (Analytic Solutions Manager, SAS EMEA Technology Practice) discusses a fine point regarding the word “seasonality” in time series forecasting. When we see general ups and downs in the data that tend to repeat year after year, we commonly refer to this as
Rick Wicklin and I are engaged in an arms race of birthday-related blog posts. To recap: Rick analyzed national data about births in the USA and what time of year they are most likely to occur. I responded by analyzing the birthdays of my Facebook friends. Rick responded by analyzing
My friend Chris posted an analysis of the distribution of birthdays for 236 of his Facebook friends. He noted that more of his friends have birthdays in April than in September. The numbers were 28 for April, but only 25 for September. As I reported in my post on "the
The downturn in the economy beginning in 2008 and continuing even to now has put tremendous pressure on local governments to do “less with less”. In the past when economic downturns caused service level cut backs the cry was to do “more with less”. The idea was to identify ways
Windows PowerShell is one of my favorite tools to use for gathering information from my PC and network, and also for automating processes. If you are familiar with UNIX shells (such as Korn shell or its variants), you will probably be very comfortable with Windows PowerShell. Just like its UNIX
You can extend the capability of the SAS/IML language by writing modules. A module is a user-defined function. You can define a module by using the START and FINISH statements. Many people, including myself, define modules at the top of the SAS/IML program in which they are used. You can
Earlier today, Rick posted interesting information about which time of year the most babies are born, at least in the USA. I don't have data nearly as extensive as what's available at the NCHS, but I do have a sample of birthday records to compare against Rick's findings. My sample
Do you know someone who has a birthday in mid-September? Odds are that you do: the middle of September is when most US babies are born, according to data obtained from the National Center for Health Statistics (NCHS) Web site (see Table 1-16). There's an easy way to remember this
For years mathematicians have been pondering the Monty Hall Problem – you know, the old TV show where you have 3 doors and behind one door is a car (or some nice prize) and behind the other two doors are goats (or some undesirable prize). You pick door #1. But
I use Google Reader to keep up with SAS-related conversations on the blogosphere. I thought it would be nice to share the lists of blogs that I follow as "shared bundles". If you also use Google Reader, it will be very easy for you to add these bundles to
‘Context’ defined (as cited from the Merriam-Webster Online Dictionary): 1: the parts of a discourse that surround a word or passage and can throw light on its meaning; and, 2: the interrelated conditions in which something exists or occurs: environment, setting. While context is clearly important, today it is consistently
Looping is essential to statistical programming. Whether you need to iterate over parameters in an algorithm or indices in an array, a loop is often one of the first programming constructs that a beginning programmer learns. Today is the first anniversary of this blog, which is named The DO Loop,
In Part 1, Udo provided SAS code to replicate the example in Hyndman's blog. Below, he shows the results of out-of-sample testing, and draws some conclusions on the computational efficiency of this approach. Out-of-sample Testing In addition to the example shared by Hyndman, out-of-sample data was used to illustrate the final performance
We ship many sample data sets with SAS products. By using well-understood sample data sets, we can teach concepts or show off product features without distracting the audience/students with data collection or prep. At least, that's the way it's supposed to work. But occasionally the sample data can cause a