TEAE Summary Table in SAS and R: Subjects vs Events by SOC and PT
In a TEAE summary table, each cell counts subjects , not events. A subject with three headaches counts once for Headache and once for its system organ…
In a TEAE summary table, each cell counts subjects , not events. A subject with three headaches counts once for Headache and once for its system organ…
SAS ROUND() and SAS formats round an exact half away from zero: 6.25 becomes 6.3. R's round() rounds an exact half to the even digit: 6.25 become…
As of 17 November 2026, the latest published CDISC versions are SDTMIG v3.4 , SDTM v2.1 , ADaMIG v1.3 , Controlled Terminology P62 (25 September 2026), …
The Clinical Study Data Reviewer's Guide (cSDRG) is the SDTM half of the reviewer's guide pair. It sits next to your SDTM datasets and define…
The define.xml tells a reviewer what is in your ADaM datasets. The Analysis Data Reviewer's Guide (ADRG) tells them why it looks that way: how yo…
An ADaM program runs fine for months, then a new data cut arrives and the log shows Variable AETOXGR is uninitialized , or in R, object 'AETOXGR…
Every programming team has a story about the dataset that got overwritten. Someone ran a test program against the production library, or a copied pro…
Clinical tables are full of characters that aren't on the keyboard: "Mean ± SD", "≥ Grade 3", "µmol/L", footnote ma…
A macro that calls another macro that calls a third one is normal in a clinical programming library. When the output is wrong, the log is often no he…
In SAS, sort both datasets by the key and use MERGE with IN= flags to choose which records to keep; PROC SQL joins do the same without sorting. In R,…
Most test data is too clean. Five subjects, every date complete, every visit on schedule. The program passes, and the first real data transfer breaks…
FIRST. and LAST. are simple to learn and easy to get wrong. The syntax is never the problem. The problem is that the flag is only as correct as the s…
Most clinical programs start with a %include of a setup file: library paths, options, formats, study macros. By default SAS runs that code without wr…
Articles about "trends in clinical data" tend to list AI, cloud and big data, and leave you with nothing to do on Monday. This post sticks …
Study day looks like the easiest derivation in SDTM. Subtract two dates, done. Yet --DY is one of the variables that most often gets flagged in valid…
Most introductions to CDISC list the standards and their acronyms. That helps for an exam, but not when someone asks you why a number in a table look…
If you have programmed clinical trials in SAS for years, the R question usually arrives as a request: "Can you QC this in R?" or "This…
The SAS vs R debate often turns into a debate about which is "better". For clinical programming that is the wrong question. Both can produc…
Clinical SAS programming courses teach the language. The job itself is mostly about reading documents carefully, turning specifications into code, an…
Define.xml is the machine-readable metadata file that ships with SDTM and ADaM datasets. It describes every dataset, variable, codelist, value-level …