Creating BDS DERIVED Parameters for a Subject-level Frequency Summary Table? Then this macro can be useful.

Slides:



Advertisements
Similar presentations
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification.
Advertisements

Axio Research E-Compare A Tool for Data Review Bill Coar.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 10 – Designing.
Loops (Part 1) Computer Science Erwin High School Fall 2014.
CHAPTER 2 ANALYSIS OF ALGORITHMS Part 2. 2 Running time of Basic operations Basic operations do not depend on the size of input, their running time is.
1 Introduction to Biostatistics (PUBHLTH 540) Estimating Parameters Which estimator is best? Study possible samples, determine Expected values, bias, variance,
Introduction to SQL Session 1 Retrieving Data From a Single Table.
Concepts of Database Management Sixth Edition
Data Preparation for Analytics Using SAS Gerhard Svolba, Ph.D. Reviewed by Madera Ebby, Ph.D.
A Taste of ADaM Presented by: Peng/Zik Liu MSD (Shanghai) Pharma Co.
SAS SQL Part 2 Alan Elliott. Dealing with Missing Values Title "Dealing with Missing Values in SQL"; PROC SQL; select INC_KEY,GENDER, RACE, INJTYPE, case.
How to go from an SDTM Finding Domain to an ADaM-Compliant Basic Data Structure Analysis Dataset: An Example Qian Wang, MSD, Brussels, Belgium Carl Herremans,
Multiple Uses for a Simple SQL Procedure Rebecca Larsen University of South Florida.
PROC SQL Phil Vecchione. SQL Structured Query Language Developed by IBM in the early 1970’s From the 70’s to the late 80’s there were different types.
Access Class Outline Data Organization Tables Import and Export of Data Queries Select Calculate Values Aggregation (Count, Sum) Create Append Delete Crosstab.
Concepts of Database Management Seventh Edition
 Agenda 2/20/13 o Review quiz, answer questions o Review database design exercises from 2/13 o Create relationships through “Lookup tables” o Discuss.
Grant Brown.  AIDS patients – compliance with treatment  Binary response – complied or no  Attempt to find factors associated with better compliance.
1 Efficient SAS Coding with Proc SQL When Proc SQL is Easier than Traditional SAS Approaches Mike Atkinson, May 4, 2005.
27/05/ Iteration Loops Nested Loops & The Step Parameter.
Research based, people driven CDISC ADaM Datasets - from SDTM to submission CDISC Experience Exchange and ADaM Workshop 15 Dec 2008 Zoë Williams, LEO Pharma.
Define your Own SAS® Command Line Commands Duong Tran – Independent Contractor, London, UK Define your Own SAS® Command Line Commands Duong Tran – Independent.
Intro to SQL Management Studio. Please Be Sure!! Make sure that your access is read only. If it isn’t, you have the potential to change data within your.
1 Using the Magical Keyword “INTO” in PROC SQL Thiru Satchi Blue Cross and Blue Shield of Massachusetts Boston Area SAS Users Group April 5, 1999.
Creating and Using Custom Formats for Data Manipulation and Summarization Presented by John Schmitz, Ph.D. Schmitz Analytic Solutions, LLC Certified Advanced.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 5A Repetition (Concepts)
Practical Uses of the DOW Loop Richard Allen Peak Stat April 8, 2009.
PeopleSoft Financials Advanced Query Training Financial Information Systems and Reporting Controller’s Division
1 Much ADaM about Nothing – a PROC Away in a Day EndriPhUSE Conference Rowland HaleBrighton (UK), 9th - 12th October 2011.
A leading global CRO 1 Effective Use of the RETAIN Statement in Programming Clinical Trial Mingxia Chen Biostatistician Beijing, China.
Robert Gordon FDA/QSPI Biostatistics, Statistical Programming and Data Management Summit Washington D.C. March 2012.
Distribution A: Approved for public release; distribution is unlimited. Case Number: 88ABW , 31 Mar 2015 A Tool that Uses the SAS PRX Functions.
Based on Learning SAS by Example: A Programmer’s Guide Chapters 1 & 2
Concepts of Database Management, Fifth Edition Chapter 3: The Relational Model 2: SQL.
More SQL: Complex Queries, Triggers, Views, and Schema Modification
Session 1 Retrieving Data From a Single Table
Greg Steffens Noumena Solutions
Loops BIS1523 – Lecture 10.
Chapter 6: Modifying and Combining Data Sets
T-SQL: Simple Changes That Go a Long Way
3rd prep. – 2nd Term MOE Book Questions.
Conditional Processing
Introduction to pseudocode
SQL – Entire Select.
To change this title, go to Notes Master
Chapter 4 Summary Query.
More SQL: Complex Queries, Triggers, Views, and Schema Modification
3 Iterative Processing.
Bring the Vampire out of the Shadows: Understanding the RETAIN and COUNT functions in SAS® Steve Black.
Topics Introduction to Repetition Structures
Hunter Glanz & Josh Horstman
Lisa Mendez, PhD & Andrew Kuligowski
Becoming A Master Manipulator
Nested Loops & The Step Parameter
Visualizing Subject Level Data in Clinical Trial Data
Lab 3 and HRP259 Lab and Combining (with SQL)
Let’s all Repeat Together
Never Cut and Paste Again
Contents Preface I Introduction Lesson Objectives I-2
Automate Repetitive Programming Tasks: Effective SAS® Code Generators
Automating SAS through the Power of VB Script
Passing Simple and Complex Parameters In and Out of Macros
Python Basics with Jupyter Notebook
Chapter 4: Repetition Structures: Looping
Janet J. Li, Aakar Shah Pfizer Inc.
The Step Parameter & Nested For … To … Next loops
Analysis Data Model (ADaM)
PhilaSUG Spring Meeting June 05, 2019
Predicting Student Enrollment Using Markov Chain Modeling in SAS
Writing Robust SAS Macros
Presentation transcript:

Creating BDS DERIVED Parameters for a Subject-level Frequency Summary Table? Then this macro can be useful

Pre-Programming Processes: a) Can we define all these parameters in ADLB? –Yes! b) From this mockup, Baseline flag needs to be defined prior to these parameters – Yes, we need to know baseline flag status. c) All the subjects in Safety Population must have records of ALT/AST/TBL in the original input dataset – Yes! (for accurate percentage calculation) d) Can we define all of these parameters in simple macro? – Yes! Use of Macro makes it possible to automate this type of parameter creation. The Macro runs a SQL statement inside a loop to create each derived parameter. 1) Use of PROC SQL 2) SUM function using GROUP BY to summarize records per each qualifying subject. 3) Conditions that go into SUM function along with PARAMCD/PRAMN/PARAM are appended in each macro key parameter by user-defined delimiter. Table 1 : This is a mockup table for “Liver Function Test Table” so that SAS programmers get ideas of the table requirement and ADLB Dataset requirement.

[ALT or AST ≥ 3xULN and TBL ≥ 2xULN] What conditions do we need to input? At any post baseline visit (i.e., they don’t need to be the same visits), did a subject experience an AST (Aspartate Aminotransferase) and/or ALT (Alanine Aminotransferase) chemistry panel larger than or equal to three times its upper limit AND was the TBL (Total Bilirubin) chemistry panel larger than or equal to two times its upper limit? Notice there are two conditions: Condition 1 AND Condition 2 CASE WHEN SUM (Condition 1)>0 AND SUM(Condition 2)>0 then ‘Y’ ELSE ‘N’ END AS AVALC ~ GROUP BY USUBJID [SUM functions will summarize the conditions per USUBJID] Let’s input conditions along with other parameters like PARAMCD/PARA M/PARAMN into the macro

† The macro runs each PROC SQL statement in an implicit %do loop defined by 1 to the number obtained from counting function, countw in the sysfunc macro function which turns into the macro variable. For each individual iteration a unique set of values are called in from the macro parameters. The values from iterative parameters are distinguished by a delimiter (&delim), which is carefully selected by users so as to avoid conflict with any macro text strings. An example Call using the two highlights (Yellow & Green) in the mockup shell: % [NAME OF THE MACRO] ( Indta = [NAME OF YOUR INPUT DATA] ,outdta = [NAME OF YOUR OUTPUT DATA] ,condlist= %str (sum (paramcd I n (‘AST’ ‘ALT’) and ablfl=’Y’ and . <aval>=3*input (anrhi, best.)) > 0 &delim. sum (paramcd in (‘AST’ ‘ALT’) and trtelbfl=’Y’ and . <aval>=3*input (anrhi, best.)) > 0 and sum (paramcd=’BILI’ and trtelbfl=’Y’ and . <aval>2*input (anrhi, best.)) > 0 ) ,cdlist = ALSGE3BL&delim.AT3BL2PB ,cdnlist= 111&delim.112 ,nlist = %str (Elevated Total Bilirubin at baseline &delim.Elevated ALT or AST and BILI at pbl records)

Conclusion This paper outlines the use of a reusable macro to streamline programming and improve efficiency The macro is used to create new needed parameters derived for subject-level event summary table within BDS ADaM dataset As more analysis needed, the macro input can be adjusted by concatenating a set of information repeatedly This approach is not limited to only the SUM function, other aggregate functions within the GROUP BY clause such as MEAN, COUNT, MIN and MAX can easily be used. The macro is not applicable in the cases where multiple events of interests need to be compared within the same subject by visits or dates.

Contact Information Name: Masaki Mihaila Company: Pfizer, Inc. City/State: SF/ CA Email: masaki.mihaila@pfizer.com