Browsed by
Category: Programming

Significant Figures in SAS

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)

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 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 to mimic the NSA example above. I eventually settled on a 169 character key (mapped as a 13 x 13 grid) as I struggled to…

Read More Read More

Searching for a string in an entire SAS library

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 the data on your behalf to save time. We can do this by making use of PROC CONTENTS and SAS macro loops with the forward…

Read More Read More

NONMEM ADDL Calculation and Compression in SAS

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 the number of additional implicit doses that should follow at a regular interval II. In the case where explicit doses exist, ADDL supports compacting them…

Read More Read More