Strengthen your programming skills with tips and techniques from the experts
When making a new piece of code, I like to use the smallest font I can read. This lets me fit more text on the screen at once. When presenting code to others, especially in a classroom setting, I like to make the font large enough to see from the back of the room. Here’s how I change font size in SAS in our three programming interfaces.
Ever since the Moneyball book & movie came out, athletes have been scrambling to use data and analytics to gain a competitive advantage. One of my favorite sports is boat racing - the ones you paddle. Follow along as I lead you through some maps and graphs I created for
I recently read an interesting article that claims "a single cremation emits as much carbon dioxide as a 1,000-mile car trip." This got me wondering about cremation data, and I ended up on the Wikipedia page about cremation rates. They had a map of the US cremation rates by state ... but the more
My 2018 SAS Global Forum paper was about "how to use the random-number generators (RNGs) in SAS." You can read the paper for details, but I recently recorded a short video that summarizes the main ideas in the paper. In particular, the video gives an overview of the new RNGs
In SAS, the reserved keyword _NULL_ specifies a SAS data set that has no observations and no variables. When you specify _NULL_ as the name of an output data set, the output is not written. The _NULL_ data set is often used when you want to execute DATA step code
SAS Studio is the latest way you can access SAS. This newer interface allows users to reach SAS through a web browser, offering a number of unique ways that SAS can be optimized. At SAS Global Forum 2018, Lora Delwiche and Susan J Slaughter gave the presentation, “SAS Studio: A New Way to Program in SAS.” This post reviews the paper, offering you insights of how to enhance your SAS Studio programming performance.
I recently recorded a short video about the new syntax for specifying and manipulating lists in SAS/IML 14.3. This is a video of my Super Demo at SAS Global Forum 2018. The new syntax supports dynamic arrays, associative arrays ("named lists"), and hierarchical data structures such as lists of lists.
The SURVEYSELECT procedure in SAS 9.4M5 supports the OUTRANDOM option, which causes the selected items in a simple random sample to be randomly permuted after they are selected. This article describes several statistical tasks that benefit from this option, including simulating card games, randomly permuting observations in a DATA step,
Everything's big in Texas - at least that's what they say! Therefore let's have a bit of graphical fun, and use Texas as a unit of measure (let's call it a 'tex'). More on that later - but first, here's a picture of my friend Jennifer posing beside a rather
Years ago, I wrote an article about how to create a Top 10 table and bar chart. The program can be trivially modified to create a "Top N" table and plot, such as Top 5, Top 20, or even Top 100. Not long after the article was written, the developer
With talk of tariffs in the news lately, I'm sure everyone is curious about possible ways to bypass them. One possible loophole is using the foreign-trade zones (FTZs) in the US. What are FTZs, and where are they located? Read along and find out!... The Foreign-Trade Zone act was passed in
Interactive reports with SAS Visual Analytics allow you to access the interface and product instantly. Simply choose a report to navigate and explore in our SAS Visual Analytics 8.2 viewer. There are reports for warranty analysis, retail insights, water consumption and quality, banking and risk and network performance.
It is imperative for developers, whether hardware or software engineers, to foresee unintended (probable or improbable) system usages and implement features that will make their creations foolproof, that is protected from misuse. Learn more about developing foolproof solutions with this old Russian anecdote.
The SAS language provides syntax that enables you to quickly specify a list of variables. SAS statements that accept variable lists include the KEEP and DROP statements, the ARRAY statement, and the OF operator for comma-separated arguments to some functions. You can also use variable lists on the VAR statements
Have you ever tried to plot data on a map of Antarctica ... and been thoroughly frustrated or confused? If you're that person, or even a seasoned map maker wanting to hone your skills, then this blog post is for you! But first, here is a picture to get you
Learn how to change your working directory for SAS. Beginning with SAS® 9.4 TS1M4, you can use a new DATA step function, DLGCDIR, to change the location of your working directory.
The PharmaSUG 2018 conference was held two weeks ago, with great enthusiasm and a record attendance. The highlight for me was the large spread on visual presentation of data, from papers to poster presentations. I will provide a more detailed report on all the exciting graphical presentations. One topic of
In a previous blog post, I discussed ways to produce statistically independent samples from a random number generator (RNG). The best way is to generate all samples from one stream. However, if your program uses two or more SAS DATA steps to simulate the data, you cannot use the same
WARNING: This blog post references Avengers: Infinity War and contains story spoilers. But it also contains useful information about random number generators (RNGs) -- tempting! If you haven't yet seen the movie, you should make peace with this inner conflict before reading on. Throughout the movie, Thanos makes it clear
The European Union’s General Data Protection Regulation (GDPR) taking effect on 25 May 2018 pertains not only to organizations located within the EU; it applies to all companies processing and holding the personal data of data subjects residing in the European Union, regardless of the company’s location. Here are four selected SAS tools for GDPR that allow you to protect personal data in SAS reports by suppressing counts in small demographic group reports.
Datasets can present themselves in different ways. Identical data can bet arranged differently, often as wide or tall datasets. Generally, the tall dataset is better. Learn how to convert wide data into tall data with PROC TRANSPOSE.
Do you periodically delete unneeded global macro variables? You should! Deleting macro variables releases memory and keeps your symbol table clean. Learn how the macro language statement that deletes global macro variables and about the %DELETEALL statement that can be a life saver for macro programmers.
Simulation studies require both randomness and reproducibility, two qualities that are sometimes at odds with each other. A Monte Carlo simulation might need to generate millions of random samples, where each sample contains dozens of continuous variables and many thousands of observations. In simulation studies, the researcher wants each sample
It looks like we've finally recovered from the Great Recession, and there are even claims of record-low unemployment in several U.S. states. Of course claims like that make my data-radar go off, and I wanted to see the numbers for myself. And it's a great excuse for me to create
Have you ever lied about your age? When you were younger, perhaps you exaggerated your age to watch an R-rated movie, buy cigarettes, get into a night club, or drink alcohol? And when people reach their 30s or 40s, they might subtract a few years when people ask their age.
The title of this blog says what you really need to know: SAS Enterprise Guide does have a future, and it's a bright one. Ever since SAS Studio debuted in 2014, onlookers have speculated about its impact on the development of SAS Enterprise Guide. I think that we have been
How old was the oldest person in your family, or the oldest person you personally know? And how do they compare to the oldest people in the world? ... Perhaps you can easily make the comparison, with this cool graph! But before we get started, here's a picture of my