Arrays in SAS are incredibly useful things. For example, if you’re dealing with a concomitant medications dataset and want to check for certain medicines across multiple columns, you’d be hard-pressed to find a faster method than using arrays! Within the SDTM.CM domain, medication names are spread across several columns, usually: CMTRT (Reported Name of Drug, […]
Jan’s Golden Curry Chicken Ramen
Regular readers (hah!) of this blog will know that my topics have always been programming and photography focused. However, I’ve recently come up with a ramen recipe of my own that I want to write down, not only to share but also to preserve it for my own fragile and failing memory. It is far […]
Loughcrew Cairns
Loughcrew or Lough Crew (Irish: Loch Craobh, meaning ‘lake of the tree’) is an area of historical importance near Oldcastle, County Meath, Ireland. It is home to a group of ancient tombs from the 4th millennium BC, some decorated with rare megalithic art, which sit on top of a range of hills. https://en.wikipedia.org/wiki/Loughcrew During my […]
Significant Figures in SAS
For three significant figures, the SAS Institute provides the following code snippet to accomplish the task. However, it is often useful to round to more or less than 3 significant figures. I’ve developed a macro to do so for my own use and am sharing the code below.
NONMEM Dataset Example (free, with R code)
I’m making available here a basic NONMEM dataset example, along with the R code used to create it. Hopefully it will be helpful to someone in future! CSV download: http://jvdl.me/downloads/nonmem/dummy_nonmem.csv XPT download: http://jvdl.me/downloads/nonmem/dummy_nonmem.xpt
One-time-pad encryption with R and basic JavaScript
One-time-pad encryption offers unbreakable* security if you can guarantee truly random number generation and security of the generated pad. Implementing it from the perspective of a cryptographic layman is a fun way to learn more about it and could add an extra layer of security to your most sensitive communications. I started off by trying […]
Searching for a string in an entire SAS library
For the most part, experienced SAS programmers know where to look for the source data they need. In the pharmaceutical industry, we are familiar with CDISC standards and data structures. However, should the data standard be unfamiliar or the source datasets include new or unusual parameters, it may be prudent to have SAS look through […]
NONMEM ADDL Calculation and Compression in SAS
ADDL represents the number of additional doses that are copies of the current row, with the time since first dose (RTFD) increased at the regular dosing interval (II). This allows for the compression of dose records in the NONMEM dataset. To put it more eloquently: The NONMEM data item ADDL on a dose record expresses […]
SAS and the Forward Re-scan Rule
The “Forward Re-scan Rule” (FRR) is used by SAS to resolve macro variables over several passes. This is especially useful when having one macro variable point to another macro variable, or when trying to resolve numbered macro variables. The SAS Advanced Prep Guide summarises the FRR as follows: Example: numbered list of macro variables To […]