A well-formed WHERE statement or subsetting IF can narrow down the output of your SAS DATA step. The SAS log does a good job of telling you how many records were processed by the action. For example, let's look at this simple DATA step with my "poor man's random sample",
Uncategorized

A few weeks ago, in Northern Virginia, a 30 foot highway sign fell onto I-66 and landed on a passing pickup truck. Fortunately, no one was hurt, but it drew media attention and caused motorists in the area to wonder about the safety of other signs and the transportation network

There is something that 90% of us admit to doing, and the other 10% will lie about. That, of course, is Googling yourself. As an avid follower of myself, and everything I do, I look forward to a weekly Google Alert that tells me all about what I've been up to.

After unwittingly getting involved recently in a code vs GUI discussion another pro GUI vote came in yesterday when presenting to a customer's internal user group. When creating and using prompts in SAS Enterprise Guide, it is a no-brainer to recommend leveraging the %_eg_WhereParam as it handles all the special

Most statistical programmers have seen a graph of a normal distribution that approximates a binomial distribution. The figure is often accompanied by a statement that gives guidelines for when the approximation is valid. For example, if the binomial distribution describes an experiment with n trials and the probability of success

Did you oversleep this morning? If you live in the United States of America, Monday morning seems to have arrived just a bit earlier, accompanied by a bit more "dark" than usual. That's because as good time-fearing citizens, we have all set our clocks ahead by one hour so as

SAS provides several ways to compute sample quantiles of data. The UNIVARIATE procedure can compute quantiles (also called percentiles), but you can also compute them in the SAS/IML language. Prior to SAS/IML 9.22 (released in 2010) statistical programmers could call a SAS/IML module that computes sample quantiles. With the release

In the United States, this upcoming weekend is when we turn our clocks forward one hour as we adopt daylight saving time. (Some people will also flip their mattresses this weekend!) Daylight saving time (DST) in the US begins on the second Sunday in March and ends on the first

Apparently the prolonged use of OxyContin will give you a pompous and surley demeanor, and make you say a lot of really ignorant things. So I implore you, dear readers, to withhold your use of such a substance, preserve your good attitude and brain cells, and participate in a research study
A few years ago I had the privilege of presenting the last technical paper at SAS Global Forum. This year, conference chair Andy Kuligowski asked me to go one better than that, and present a talk at the official Closing Session. What will I talk about? That's a mystery (maybe

During IFSUG yesterday, Sunil Gupta gave attendees to his presentation a special homework assignment. Look into the SAS Enterprise Guide task 'Characterize Data'. Sunil suggested that this was a simple approach to quickly getting a summary of all the variables within your data table. Of course, some programmers will use

I work with continuous distributions more often than with discrete distributions. Consequently, I am used to thinking of the quantile function as being an inverse cumulative distribution function (CDF). (These functions are described in my article, "Four essential functions for statistical programmers.") For discrete distributions, they are not. To quote

Today at IFSUG, Chuck Patridge presented a wonderful talk about how to complete fuzzy matching using BASE SAS tools. Chuck has been programming SAS since 1979 and has been tasked multiple times with coming up with in-house solutions to address business needs without the software costs that are typically associated
The next time you write a DATA step, try to express it in iambic pentameter. Or instead of a SAS macro function, how about a SAS macro sonnet? (Or, for the more base among you, a limerick?) That's the spirit behind the code {poems} project. You write a poem in

As a SAS developer, I am always looking ahead to the next release of SAS. However, many SAS customer sites migrate to new releases slowly and are just now adopting versions of SAS that were released in 2010 or 2011. Consequently, I want to write a few articles that discuss

I've blogged several times about multivariate normality, including how to generate random values from a multivariate normal distribution. But given a set of multivariate data, how can you determine if it is likely to have come from a multivariate normal distribution? The answer, of course, is to run a goodness-of-fit

About once a month, a customer approaches SAS and asks a question of significance. By "significance", I don't necessarily mean "of great importance", but instead I mean "of how SAS handles large numbers, or floating-point values with many significant digits". In response, we always first ask why they asked. This
In the previous post, “Roses are red, violets are blue…”, I discussed the general problem of getting style attributes to line up with specific group values and some ways to overcome the problem. In this installment, I want to elaborate on the attribute map functionality in the Graph Template Language

Sometimes in matrix computations you need to obtain the values of certain submatrices such as the diagonal elements or the super- or subdiagonal elements. About a year ago, I showed one way to do that: convert subscripts to indices and vice-versa. However, a tip from @RLangTip on Twitter got me

Neil Constable is a Principal Education Consultant at SAS in the United Kingdom, where he applies his extensive knowledge of Base SAS, SAS Enterprise Guide, and the SAS business intelligence tools. He's also the author of SAS Programming for Enterprise Guide Users, Second Edition--and this week's featured tip. You can get to know Neil

This question came up while helping my presales colleague with a client’s question: “Is Microsoft Excel in direct competition with SAS?” Not really. I like to think of SAS as partnering with Excel. Because of the following Excel benefits and its synergy with SAS. Excel has been around for years.

I recently saw a SAS Knowledge Base article called "How to stop processing your code if a certain condition is met." The article discusses the use of the %RETURN macro statement to abort the execution of a SAS program if some condition occurs. The "condition" is usually an error that

Do you want your report to look good on the web, or to look good when you print it? Pick one. Before the SAS Report file format, that was the choice that you faced. HTML is perfect for the web browser. It's easy to scroll through tables, to apply an

Citing online job postings reviewed by talent data firm Wanted Analytics, and a Software Advice blog by Michael Koploy, APICS e-News reports that "Demand planning analysts" are hot -- one of the five hottest careers in logistics. (Free subscription to APICS e-News) Clearly, APICS means there are a lot of good jobs

Unlike BASE SAS tables, OLAP cubes must exist in within the metadata in order to access from any of the OLAP Viewers. In addition to having some metadata OLAP cubes have a physical file structure presence (at least for MOLAP/HOLAP because it's a different story for ROLAP). When you refresh

I recently blogged about Mahalanobis distance and what it means geometrically. I also previously showed how Mahalanobis distance can be used to compute outliers in multivariate data. But how do you compute Mahalanobis distance in SAS? Computing Mahalanobis distance with built-in SAS procedures and functions There are several ways to

Recently I complained about the stock art used on The BFD blog header. So I was foaming with excitement when Alison Bolen (who oversees the SAS blogging platform) kindly took notice, and enlisted Mr. Blackwell to come up with something more pleasing and appropriate. OMG Mr. Blackwell!!! As a huge fan of

Teachers have more than enough to juggle each day, lacking the time to search for, and find, high-quality curricular resources online. When I would search for lesson plan supplements, I would often get lost in Google's abyss of results, spending far too much precious time sifting through mediocre materials. Until

The SAS DATA step supports a special syntax for determining whether a value is contained in an interval: y = (-2 < x < 2); This expression creates an indicator variable with the value 1 if x is in the interval (-2,2) and 0 otherwise. There is not a standard

I have previously blogged about how to convert a covariance matrix into a correlation matrix in SAS (and the other way around). However, I still get questions about it, perhaps because my previous post demonstrated more than one way to accomplish each transformation. To eliminate all confusion, the following SAS/IML