Tag: SAS macro

Time to trade in your jalopy macro?

Suppose you have an old jalopy that’s perfectly reliable.  Your jalopy gets you where you wanna go: no frills; no drama. Do you trade your old wheels in for a racecar that accelerates like crazy and corners like it’s on rails? Or stick with what’s old…

Don’t let your macros crash and burn

Your macro just crashed and burned.  So, what’s the problem?  Let’s take a look: The text OR in the code above was misinterpreted as a logical operator.  To correct this issue, use the %STR function to protect (disable the normal meaning of) speci…

Example 9.35: Discrete randomization and formatted output

A colleague asked for help with randomly choosing a kid within a family. This is for a trial in which families are recruited at well-child visits, but in each family only one of the children having a well-child visit that day can be in the study. The…

Example 9.34: Bland-Altman type plot

The Bland-Altman plot is a visual aid for assessing differences between two ways of measuring something. For example, one might compare two scales this way, or two devices for measuring particulate matter. The plot simply displays the difference betw…

Example 9.32: Multiple testing simulation

In examples 9.30 and 9.31 we explored corrections for multiple testing and then extracting p-values adjusted by the Benjamini and Hochberg (or FDR) procedure. In this post we’ll develop a simulation to explore the impact of “strong” and “weak” control…

A time-saving coding tip: leverage the SAS macro facility

Hi!  My name is Jim.  I’m a SAS instructor based in Irvine, CA.  I spend a lot of time each year teaching students in CA and across the United States how to program in SAS and how to master the SAS macro facility. In case you haven’t taken one…

Example 9.16: Small multiples

Small multiples are one of the great ideas of graphics visionary Edward Tufte (e.g., in Envisioning Information). Briefly, the idea is that if many variations on a theme are presented, differences quickly become apparent. Today we offer general guida…

Example 9.16: Small multiples

Small multiples are one of the great ideas of graphics visionary Edward Tufte (e.g., in Envisioning Information). Briefly, the idea is that if many variations on a theme are presented, differences quickly become apparent. Today we offer general guida…