Category: SAS

SAS Proc Format: transition between format and informat

Background Story: The clinical study datasets usually have paired values for Character and Number, such as Sex and Sexn. However, sometimes the dataset only show the formatted values. If we don’t have the original code, we need to apply Proc Format procedure to transform format values to the original values and make appropriate selections for analysis purposes .

ADLB avisitn

Background Story: In ADLB avisitn means analysis visit number sequence, most of the time it is a standard variable, such that each Visit or Visname maps to a corresponding number. However we had a study with convoluted raw data, in which multiple visits were recorded on the same day or many additional visit.  Today we will go over a basic…

AESI: Adverse Event of Special Interest Mapping

Background Story: One day, I validated an AESI(adverse event of Special Interest) data, I found a discrepancy between two output datasets. After I notified my boss, she suggested checking the AESI excel sheet, and it turns out both versions are partially correct. Because the Prefered term Hepatic Failure belongs to both Hepatic Disorder and Hepatic Failure EOI in a particular…

SAS INTNX Function for Missing Date

Background Story: Missing dates are something the pharmaceutical industry deals with on a daily basis.  There are some common methods. Completely missing year, month, and day then no imputation. Set a certain number( ex.Jan01) for missing month and day Compare with treatment start date, and manipulate accordingly. If the AE start date and the treatment start date have the same…

SAS ANYALPHA Function

SAS day 56: ANYALPHA  Background Story: Once we had an excel sheet with an extreme variety of date formats that don’t make sense. Is there a method to clean the data so they will be meaningful dates? Raw Data: Solutions Ideas: After observing the data structure, we notice it either starts with a letter or number. Therefore, we will apply…

Proc Export +Proc Report to Fancy Excel Output

SAS day 55 Background Story: Once we need to generate an Adverse Event listing for the medical team to review in excel, I was amazed by my colleague’s colorful output from SAS. I was just simply happy to look at the output! Example: I will use SAS.cars to generate the output   SAS Code:   *—————————–*; * To generate excel…

SAS Proc Format

SAS day 54 We know Format is a common function to convert date in SAS, such as, format aestdt date9. . What about Proc Format? When and how should we use it?   Case 1: Numeric to Character Presentation When data are coded in numerical, we would like to display it in characters in Frequency tables.   Syntax: Proc Format;…

Confidence Interval for Adverse Event

sas day 53: A classical AE table is by  SOC (body system class) and  Preferred term( AEDECOD). The overall AE table could last for over 100 pages long. What if we’d like to see the count and confidence Interval for some Special Interested Adverse Event (SIAE) within the whole safety population. Challenge: How to generate an AE table with confidence…

SAS rename

SAS Day 52 Once I use SAS proc import  a Special Adverse Event dataset, everything looks good, except the variable name was directly from excel and has space and special characters like “/” (EOI/ Search)  Little Challenge: How to Rename a variable with space or special characters? Basic Rename Syntax: *1. within dataset data a; set a; rename old_name=new_name; run;…

ADaM.ADDV

ADaM day 7 ADDV protocol deviation dataset identifies occurrences of sponsor-defined deviations, which is a list specified for every study.  For example, the description of deviation can be Positive Drug Screen, PK labs not drawn in the proper window. A Sample ADDV Dataset key variables:subjid, dvstdt, dvcatcd, dvdeter, dvdesc , dvdact, dvact1, dvtype, dvstype. Key variable indications: dvcatcd=”DV Category Code”…

Social media & sharing icons powered by UltimatelySocial