Kriss Harris, SAS Programmer, SAS Specialists Limited

Slides:



Advertisements
Similar presentations
Progress Monitoring with Curriculum Based Measurement Tracey Hall CAST Oral Reading Fluency.
Advertisements

Taking the Leap - Using ODS Statistical Graphics for Data Visualization Wei Cheng, Isis Pharmaceuticals, Inc.
Using ODS Regions to Create Custom Reports Kate Morrow, M.S. Statistician Vermont Oxford Network, Burlington, VT.
STA305 week 31 Assessing Model Adequacy A number of assumptions were made about the model, and these need to be verified in order to use the model for.
Introduction to Excel 2007 Part 2: Bar Graphs and Histograms February 5, 2008.
1 Doing Statistics for Business Doing Statistics for Business Data, Inference, and Decision Making Marilyn K. Pelosi Theresa M. Sandifer Chapter 5 Analyzing.
Spreadsheets in Finance and Forecasting Introduction to Charts, Summary Values and Pivot Tables.
Spreadsheets in Finance and Forecasting Presentation 8 Buttons, Boxes and Bars.
Graphing With Excel 2010 University of Michigan – Dearborn Science Learning Center Based on a presentation by James Golen Revised by Annette Sieg…
Bay Area SUG June SAS ® 9.2 Implications for Biotech SAS ® 9.2 Implications for Biotech Bay Area SAS User’s Group June 7 th 2010 Sarmad Pirzada,
1 Experimental Statistics - week 4 Chapter 8: 1-factor ANOVA models Using SAS.
TS02 SAS GTL - Injecting New Life into Graphs
Copyright © 2008 SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks.
ODS Statistical Graphics in SAS 9.2 January 17, 2010.
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
Introduction to SAS/Graph 9.2 Ken Barz Colorado Prevention Center 22Oct2009 Ken Barz Colorado Prevention Center.
Lecture 3 Topic - Descriptive Procedures Programs 3-4 LSB 4:1-4.4; 4:9:4:11; 8:1-8:5; 5:1-5.2.
PROC GPLOT GPLOT is used to make two dimensional scatter-plots. General Syntax: proc gplot data=data-set options; plot y-variable*x-variable/options; run;
Kaitlyn McConville, Rho ®, Inc. Kristen Much, Rho ®, Inc. PharmaSUG 2015 Paper #DV02.
#pharmasug About OMICS Group OMICS Group is an amalgamation of Open Access Publications and worldwide international science conferences and events. Established.
SAS ® is a very powerful tool when producing Graphics. A single graphical data step can easily create a Kaplan Meier Plot, but there is no single graphical.
A leading global CRO 1 Effective Use of the RETAIN Statement in Programming Clinical Trial Mingxia Chen Biostatistician Beijing, China.
Introduction to SAS ODS Graphics September 16, 2015 Rocio Lopez.
Copyright © 2009 Pearson Education, Inc. Slide 4- 1 Practice – Ch4 #26: A meteorologist preparing a talk about global warming compiled a list of weekly.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 14 & 19 By Tasha Chapman, Oregon Health Authority.
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
Template Package  Presented by G.Nagaraju.  What is Template Package?  Why we use Template Package?  Where we use Template Package?  How we create.
A MORE COMPLETE ODS REPORT. What we’re going to talk about…  Creating a title page  Creating an introduction page  Creating long-form text descriptions.
BIT116: Scripting Lecture 05
Session 1 Retrieving Data From a Single Table
AP CSP: Cleaning Data & Creating Summary Tables
WORKSHOP 1 introduction
Using Excel to Construct Basic Tools for Understanding Variation
How to Select the Right Chart for Your Data
By Dr. Madhukar H. Dalvi Nagindas Khandwala college
1 Functions and Applications
Incorporating Databases with ADO.NET
Chapter 8: ODS Graphics ODS graphics were not available prior to SAS 9.2 They have been implemented across a wide range of procedures Functionality isn’t.
SCIENCE FAIR Mini-Lesson #5
Accumulation AP Calculus AB Days 7-8
Incorporating Databases with ADO.NET
Do now: Write down 3 things that you think involves biology
Lesson 8 - Topics Creating SAS datasets from procedures
Lab 2 Data Manipulation and Descriptive Stats in R
Visual Solution to Room Usage Reporting
Presentations are a powerful communication medium.
Welcome to E-Prime E-Prime refers to the Experimenter’s Prime (best) development studio for the creation of computerized behavioral research. E-Prime is.
Using Charts in a Presentation
Lesson Comparing Two Means.
MatLab – 2D Plots 2 MATLAB has many built-in functions and commands to create various types of plots. Instructor notes: We start with an example of some.
Template for Digital Display (Title)
Bring the Vampire out of the Shadows: Understanding the RETAIN and COUNT functions in SAS® Steve Black.
Use of SAS® Graph Template Language and HIGHLOWPLOT to Create a Next-Generation Sequencing Multi-Gene Panel Grid John Bennett Statistical Programmer Genomic.
Visualizing Subject Level Data in Clinical Trial Data
Click Headings Above to View Content
Richann Watson, DataRich Consulting; Lynn Mullins, PPD Abstract
Lab 3 and HRP259 Lab and Combining (with SQL)
Analyzing Bivariate Data
Lab 2 HRP223 – 2010 October 18, 2010 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This presentation is protected.
Measures of Position Section 3.3.
Introduction to SAS Essentials Mastering SAS for Data Analytics
Scatter Plot 3 Notes 2/6/19.
Data Management & Graphing
Chapter 8: Estimating with Confidence
Graphing data.
Charts A chart is a graphic or visual representation of data
Chapter 1: Exploring Data
Introduction to Excel 2007 Part 3: Bar Graphs and Histograms
Introduction to SAS Essentials Mastering SAS for Data Analytics
ADME Study PK SDTM/ADAM And Graph
Presentation transcript:

Kriss Harris, SAS Programmer, SAS Specialists Limited Animate your Data! 1/12/2019 Kriss Harris, SAS Programmer, SAS Specialists Limited Kriss Harris worked at GlaxoSmithKline for almost 6 years from 2005 to 2011 as a Statistician supporting drug discovery. Whilst at GSK he developed an increasing passion for teaching and taught SAS Graphics to SAS Programmers, Statisticians and Scientists. Since then Kriss has moved on to become an independent Statistical Programmer and has consulted at Eli Lilly and Eisai. Currently Kriss is consulting at Eli Lilly supporting early phase Oncology. https://twitter.com/krissharris

Animate your Data! 1/12/2019 Richann Watson, Statistical Programmer and CDISC Consultant, DataRich Consulting Richann Watson is an independent statistical programmer and CDISC consultant. She has been using SAS since 1996. She has worked on various therapeutic areas including Oncology and Diabetes. She is also a member of the CDISC ADaM team and various sub-teams. In addition, she is the chairperson for the local SAS user group in her area and is actively involved with SAS Global Forum, PharmaSUG, MWSUG and other SAS User Groups. https://twitter.com/RichannWatson https://twitter.com/SAS_DataRich

1/12/2019 Animate your Data! Kriss Harris and Richann Watson

Agenda 1/12/2019 Show you how to produce animations

Agenda 1/12/2019 Show you how to produce smooth animations

Why use Animation? You can understand and interpret your data. 1/12/2019 You can understand and interpret your data. You can quickly get an idea of the number of subjects that had abnormal laboratory results at each visit. You are also able to easily determine the adverse events each subject had and the duration of the adverse event. You can monitor blood pressure over time by treatment. You can easily discern a dip or a spike in someone’s heart rate. Basic / general code needed to produce an animated graph

How to Animate 1/12/2019 ods printer file="C:\animation.gif"; options printerpath=gif animation=start animduration=0.5 animloop=yes noanimoverlay; proc sgrender data=<data-set-name> template=<template-name>; <other optional statements>; run; options printerpath=gif animation=stop; ods printer close; How to animate. To animate, there are essentially 5 sections that you need to bring together. The first and last section opens and closes the Printer Output Delivery System and this is where you specify the location of your animation. This works quite similar to ODS RTF file and ODS PDF file. The second and fourth section specify the animation to start and stop. And this is where you would include the animation options such as the duration of the each frame, or the output type. The third section is where you specify the code to create your plots, which will end up being animated. In this example we are using SGRENDER but we could use the other SG Procedures such as SGPLOT, SGSCATTER or SGPANEL. Because we are using SGRENDER that means that we have also created a template for the graph using GTL.

How to Animate proc template; define statgraph <template-name>; 1/12/2019 /* define template here */ ods printer file="C:\animation.gif"; options printerpath=gif animation=start animduration=0.5 animloop=yes noanimoverlay; /* or could define the template here */ proc sgrender data=<data-set-name> template=<template-name>; <other optional statements>; run; options printerpath=gif animation=stop; ods printer close; /* define template here */ ods printer file="C:\animation.gif"; options printerpath=gif animation=start animduration=0.5 animloop=yes noanimoverlay; /* or could define the template here */ proc sgrender data=<data-set-name> template=<template-name>; <other optional statements>; run; options printerpath=gif animation=stop; ods printer close; /* define template here */ ods printer file="C:\animation.gif"; options printerpath=gif animation=start animduration=0.5 animloop=yes noanimoverlay; /* or could define the template here */ proc sgrender data=<data-set-name> template=<template-name>; <other optional statements>; run; options printerpath=gif animation=stop; ods printer close; /* define template here */ ods printer file="C:\animation.gif"; options printerpath=gif animation=start animduration=0.5 animloop=yes noanimoverlay; /* or could define the template here */ proc sgrender data=<data-set-name> template=<template-name>; <other optional statements>; run; options printerpath=gif animation=stop; ods printer close; proc template; define statgraph <template-name>; begingraph / <options>; <GTL statements>; endgraph; end; run; Previous slide we showed the basic code. Here we show that some where prior to PROC SGRENDER we need to define the template. This can be done before or after the options statements as long as it is done prior to PROC SGRENDER. So let’s step through the process ANIMA1: Need to define the location where the graph will reside and the necessary options. ANIMA2: The following options need to be specified in order to produce an animated graph. Even need to specifying options after the rendering of the graph to stop the production of the animated graph. ANIMA3: Prior to render the graph the template needs to be defined. ANIMA4: Render the graph. Be sure to specify the correct data set and the correct template.

Animating Boxplot of Laboratory Results

Example 1 – Animated Boxplot of Lab Results 1/12/2019 Creatinine was selected The data here shows the laboratory results. One laboratory parameter has been selected and that is Creatinine (umol/L) There are three treatments in this data Placebo, Xanomeline High Dose and the Low Dose. In the data lab measurements were done approximately every two weeks. The standard normal lower and higher reference ranges for each gender for the Creatinine parameter is also shown. The Data

Example 1 – Animated Boxplot of Lab Results 1/12/2019 Number of subjects calculated at each visit for each treatment * Adding on n numbers; proc sql; create table lab_data_with_n as select *, count(distinct usubjid) as nobs_subject_visit from lab_data group by trtan, avisitn, sex; quit; The data was also modified to add on the Number of subjects for each lab parameter, treatment group and visit. This is because we want to display this information on the bottom of the graphs. So we used Proc SQL to count the number of patients for us. We could have used proc univariate or proc means if we wanted to also. Data Manipulations

Example 1 – Animated Boxplot of Lab Results 1/12/2019 proc template; define statgraph boxplot_template_sex; dynamic _byval_ _byval2_ _byval4_ upperlim lowerlim; begingraph; entrytitle halign = center _byval_ ":" " Sex = " _byval2_ " and Visit = " _byval4_; layout overlay / yaxisopts=(linearopts=(viewmin=60 viewmax=180 tickvaluesequence=(start=60 end=180 increment=30))); boxplot x = trtan y = aval / group = trtan groupdisplay=cluster; referenceline y=lowerlim / lineattrs=(pattern=2); referenceline y=upperlim / lineattrs=(pattern=2); innermargin; axistable x = trtan value = nobs_subject_visit / stat=mean label= "n" valueattrs=(size=9); endinnermargin; endlayout ; endgraph; end; run; Using GTL we created the template that will be used to produce our graph. There are 5 dynamic variables in this template. The first three _byval_ _byval2_ and _byval4_ will store the values of the variables which are used in the by statement. The variables used are Parameter, Gender and Visit. The other two dynamic variables upperlim and lowerlin are used to specify the standard normal lower and upper ranges. The entrytitle statement lets us identify the plot. For example it is used to display the lab parameter, gender and visit. The overlay layout was used as we only wanted “one graph per page” or we can say “one graph per frame”. The boxplot statement is used to produce the boxplot. The group = trtan option is used to display the boxplot of the three treatment groups. The referenceline statements produce the lower and upper standard normal reference ranges. The axistable is used to display the number of subjects that are in each parameter, gender and treatment. First Create the Template with Graph Template Language (GTL)

Example 1 – Animated Boxplot of Lab Results 1/12/2019 begingraph; entrytitle halign = center _byval_ ":" " Sex = " _byval2_ " and Visit = " _byval4_; layout overlay / yaxisopts=(linearopts=(viewmin=60 viewmax=180 tickvaluesequence=(start=60 end=180 increment=30))); boxplot x = trtan y = aval / group = trtan groupdisplay=cluster; referenceline y=lowerlim / lineattrs=(pattern=2); referenceline y=upperlim / lineattrs=(pattern=2); innermargin; axistable x = trtan value = nobs_subject_visit / stat=mean label= "n" valueattrs=(size=9); endinnermargin; endlayout; endgraph; First Create the Template with Graph Template Language (GTL)

Example 1 – Animated Boxplot of Lab Results 1/12/2019 options nobyline; options papersize=('8 in', '4.8 in') printerpath=gif animation=start animduration=0.5 animloop=yes noanimoverlay; ods printer file="&outpath\boxplotM1.gif"; ods graphics / width=8in height=4.8in imagefmt=gif; proc sgrender data = adlbc_all_n_gen template = boxplot_template_sex; where avisitn ne . and sex = "M"; by param sex avisitn avisit; dynamic upperlim = "a1hi" lowerlim = "a1lo"; format trtan trtfmt.; run; options printerpath=gif animation=stop; ods printer close; Here is the code and options that we used to produce the animation. First lets concentrate on the code before Proc SGRENDER. Animation Options and SGRENDER

Example 1 – Animated Boxplot of Lab Results 1/12/2019 options nobyline; options papersize=('8 in', '4.8 in') printerpath=gif animation=start animduration=0.5 animloop=yes noanimoverlay; ods printer file="&outpath\boxplotM1.gif"; ods graphics / width=8in height=4.8in imagefmt=gif; Options nobyline was used to remove the byline from the graph. This is because on the grapy we are using the Entrytitle statement to effectively produce are own byline. The paper size we used was 8 inches wide and 4.8 inches in height. The printerpath=gif produces the gif animation for us. Animation Options Before SGRENDER

Example 1 – Animated Boxplot of Lab Results 1/12/2019 proc sgrender data =adlbc_all_n_gen template = boxplot_template_sex; where avisitn ne . and sex = "M"; by param sex avisitn avisit; dynamic upperlim = "a1hi" lowerlim = "a1lo"; format trtan trtfmt.; run; SGRENDER

Example 1 – Animated Boxplot of Lab Results 1/12/2019 options printerpath=gif animation=stop; ods printer close; Animation Options After SGRENDER

Example 1 – Animated Boxplot of Lab Results 1/12/2019 Output

Example 1 – Animated Boxplot of Lab Results 1/12/2019 Open Program - Exercise 1 - Box Plot Animation Run all of the program and examine the output Modify the program so that the animation displays each visit for a longer duration.

Animating Scatterplot of Laboratory Results

Example 2 – Animated Scatterplot of Laboratory Results 1/12/2019 The Data Same data as in Example 1 But… Number of subjects with abnormal results were calculated at each visit for each treatment

Example 2 – Animated Scatterplot of Laboratory Results 1/12/2019 GTL layout overlay / yaxisopts=(linearopts=(viewmin=60 viewmax=180 tickvaluesequence=(start=60 end=180 increment=30))) xaxisopts=(type=discrete); scatterplot x = trtan y = aval / group = trtan groupdisplay = cluster jitter=auto jitteropts=(axis=x); referenceline y=lowerlim / lineattrs=(pattern=2); referenceline y=upperlim / lineattrs=(pattern=2); innermargin; axistable x=trtan value=nobs_abn_subject_visit /stat=mean label= "n" valueattrs=(size=9); endinnermargin; endlayout;

Example 2 – Animated Scatterplot of Laboratory Results 1/12/2019 Animation Options (the same as the Boxplot options) ods printer file="&outpath\scatterplotM1.gif"; ods graphics / width=8in height=4.8in imagefmt=gif; proc sgrender data = adlbc_all_abnormal_n_gen template=scatterplot_template_sex; where avisitn ne . and sex = "M"; by param sex avisitn avisit; dynamic upperlim = "a1hi" lowerlim = "a1lo"; format trtan trtfmt.; run; ods printer close;

Example 2 – Animated Scatterplot of Laboratory Results 1/12/2019 Output

Exercise 2 – Animated Scatterplot of Laboratory Results 1/12/2019 Open Program - Exercise 2 - Scatterplot Animation Run all of the program and examine the output Modify the program using the following instructions: Use ANIMLOOP=NO and output the animation REVERT TO ANIMLOOP = YES and change all instances of GIF to SVG, and then output the animation. Instead of displaying the number of subjects with abnormal visits, display the number of subjects at each visit for each treatment. Similar to the output in Example 1.

Exercise 2 – Animated Scatterplot of Laboratory Results 1/12/2019 Output of the Solution for Part 3 .GIF instead of .MOV is used here because it is sufficient to show that now the numbers of subjects at each visit is being displayed

Animating Blood Pressure Change Across Treatments

Example 3 – Change in Blood Pressure Across Treatments 1/12/2019 Animation is Not Time Dependent Sometimes what we want is not based only on time but based on a category as well We want to see how each treatment compares across time for both systolic and diastolic blood pressure. To include that information on the same graph would require a different set of line segments and / or different colors to distinguish between systolic and diastolic for each treatment. This could be hard to decipher. We could create individual pages and we just page through the individual pages, which is fine. But creating an animated graph will “page” through each treatment and allow us to see the differences.

Example 3 – Change in Blood Pressure Across Treatments 1/12/2019 The Data Using CDSIC Pilot Study, we use ADVS data set and take the determine the mean change from baseline (CHG) for each post baseline assessment regardless of the time point. This is what is used to as our input data set.

Comparison of Change in Blood Pressure 1/12/2019 Across Treatments begingraph; entrytitle halign=center _byval_; layout overlay / xaxisopts=(type=discrete discreteopts (tickvaluelist=('0' '2' '4' '6' '8' '12' '16' '20' '24' '26' '99'))) yaxisopts=(linearopts=(viewmin=-20 viewmax=2)); seriesplot x=AVISITN y=mean / display=all group=PARAMCD datalabel=n name="prm"; scatterplot x=AVISITN y=mean / group=PARAMCD yerrorupper=eval(mean+se) yerrorlower=eval(mean-se); discretelegend "prm" / across=2 location=outside; endlayout; endgraph; Note that options and SGRENDER are not shown since similar to other examples ANIMA1: Only display specific values on the x-axis ANIMA2: Series plot produces a plot of the mean change from baseline for each visit connected by a line. The group option groups the mean change by parameter so that both systolic and diastolic can be displayed on the same plot. The datalabel option allows us to place the subject count for each visit. The name option will be used for creating the legend so that we can tell what is systolic and what is diastolic. ANIMA3: Scatterplot utilizes the yerrorupper and yerrorlower to draw the whisker plots. It is going to draw the whisker plots based on the formula that is provided this allows it to be a dynamic value that is based on the data rather than hardcoded. ANIMA4: By providing a name to the seriesplot we are able to reference it later within the procedure to produce a legend that will help us to distinguish between systolic and diastolic. Prior to rendering the figure, the means and SE at each visit for each parameter needs to be determined.

Example 3 – Change in Blood Pressure Across Treatments 1/12/2019 Output

Exercise 3 – Animated Series Plot of Change in Blood Pressure 1/12/2019 Open Program - Exercise 3 - Series Animation - CHG Run all of the program and examine the output Modify the program using the following instructions: Calculate the mean and standard error by treatment and sex Display the figure by treatment and sex. Graph label should be in the following format

Creating Smooth Animations - Scatterplot Example Interpolation Creating Smooth Animations - Scatterplot Example

Why Interpolate? 1/12/2019

Add visits in between the original visits How to Interpolate? 1/12/2019 First step is determine variable that will drive animation (e.g., AVISITN) There are 10 visits Add visits in between the original visits

How to Interpolate? 1/12/2019 Merge the data together so that the new visit records are between the existing visit records proc expand data=proc_expand_data out=LinInterp_scatter; by usubjid param sex trtan; convert aval=linear / method=join; id id; run; Proc EXPAND will interpolate these values It’s not possible to use Proc EXPAND with SAS UE

This will be filled down by using data step How to Interpolate? 1/12/2019 Interpolated Data set This will be filled down by using data step

Example 4 - Scatterplot Animation with Linear Interpolation 1/12/2019 GTL This example uses GTL code similar to Example 2 layout overlay / yaxisopts=(linearopts=(viewmin=60 viewmax=180 tickvaluesequence=(start=60 end=180 increment=30))) xaxisopts=(type=discrete); scatterplot x = trtan y = aval / group = trtan groupdisplay = cluster jitter=auto jitteropts=(axis=x); referenceline y=lowerlim / lineattrs=(pattern=2); referenceline y=upperlim / lineattrs=(pattern=2); endlayout;

Example 4 - Scatterplot Animation with Linear Interpolation 1/12/2019 Animation options options papersize=('8 in', '4.8 in')printerpath=gif animation=start animduration=0.16 animloop=yes noanimoverlay nonumber; Animation duration has been decreased compared to Example 2, because now there are a lot more frames, and we want to have a smooth animation.

Exercise 4 - Scatterplot Animation with Linear Interpolation 1/12/2019 Open Program - Exercise 4 - Scatterplot Animation Linear Interpolation Run all of the program and examine the output Modify the program so that there are 9 visits between each of the original visits. i.e. 2 – 4, should now be 2, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8 and 4. Will show the solutions to the Exercise in SAS

Creating Smooth Animations – Adverse Events (AEs) over time Example Interpolation Creating Smooth Animations – Adverse Events (AEs) over time Example

Example 5 - AEs over time by Baseline Laboratory Results 1/12/2019 A great way to assess the AE counts and visualize the relationship

Example 5 - AEs over time by Baseline Laboratory Results 1/12/2019 Data sets Week AE started was calculated ADAE dataset TRTEMFL = “Y” No. of AEs for each week were calculated Then Cumulative Counts were calculated Cumulative Counts ranged from Week 0 to Week 28

Example 5 - AEs over time by Baseline Laboratory Results 1/12/2019 Final Data set 4 visits were added in-between “original visits” Interpolated Counts

Example 5 - AEs over time by Baseline Laboratory Results 1/12/2019 GTL begingraph / designwidth = 1200px designheight = 960px; entrytitle textattrs = (size = 18pt) halign = center "Week = "_byval_; layout datapanel classvars= (trtan) / headerlabeldisplay=value headerlabelattrs=(size = 15pt) columns = 3 rows = 1 rowaxisopts=(label = "TEAE counts" labelattrs=(size = 18pt) tickvalueattrs=(size = 16pt) linearopts=(viewmin=0 viewmax=25 tickvaluesequence=(start=0 end=25 increment=5))) columnaxisopts = (label = "Baseline Creatinine (umol/L)" labelattrs=(size = 18pt) tickvalueattrs=(size = 16pt)); layout prototype; scatterplot x = baseline_creatinine y = aval / group = trtan markerattrs = (size = 15px symbol=circlefilled); endlayout; endgraph; Mention about DATAPANEL layout

Example 5 - AEs over time by Baseline Laboratory Results 1/12/2019 Animation Options ods printer file="&outpath\ae_anim1_scat.gif"; options papersize=('8 in', '6.4 in') printerpath=gif animation=start animduration=0.13 animloop=yes noanimoverlay nonumber; ods graphics / reset = all width=8in height=6.4in imagefmt=png; proc sgrender data = final_dataset template= aedecod_anim_scat; by avisitn; format trtan trtfmt.; run; ods graphics / reset = all; options printerpath=gif animation=stop; ods printer close;

Exercise 5 - AEs over time by Baseline Laboratory Results 1/12/2019 Open Program - Exercise 5 - TEAE Animation Linear Interpolation Run all of the program and examine the output Modify the program: to use a different variable of your choice on the x-axis. to use the animoverlay option instead of noanimoverlay Will show the solutions to the Exercise in SAS

Electrocardiogram (ECG) Heart Rate over Time Expansion Electrocardiogram (ECG) Heart Rate over Time

Example 6 – ECG Heart Rate over Time 1/12/2019 On TV and in real life, we’ve all seen a heart rate monitor that display’s how someone heart is beating over time. How is this heart rate monitor display achieved with SAS?

Example 6 – ECG Heart Rate over Time 1/12/2019 Data sets A drawing effect was achieved by keeping records from previous animation and adding the heart rate information of the current visit. This was achieved by grouping the animations every 3 seconds. There is 15 minutes of data and so we thought to speed the animation up 6 times faster. Each row represents 0.5 seconds Animation Series 2 Animation Series 1

Exercise 6 – ECG Heart Rate over Time 1/12/2019 Open Program - Exercise 6 -ECG Animation v2 Fill in the missing variables, wherever you see the text <xxxx?>, so that you can produce the plot below

Conclusions 1/12/2019 Animations can be done quite easily with SAS 9.4. All that is needed is to wrap the appropriate OPTIONS and the ODS PRINTER statements around the plots. Smoother animations can be created by using Proc EXPAND to interpolate results in between the visits (if there are not enough visits for smooth animation), and then producing the animation on the data set which contains interpolated results. A drawing effect can be achieved by grouping data into series and retaining a duplicate of set of records for each subsequent series.

Contact Information 1/12/2019 Kriss Harris SAS Specialists Limited Italjet125@yahoo.com http://www.krissharris.co.uk Richann Watson DataRich Consulting richann.watson@datarichconsulting.com http://www.datarichconsulting.com

Your Feedback Counts! 1/12/2019 Don't forget to complete the feedback form please. Your feedback is valuable!

References 1/12/2019 CDISC. (2013). CDISC. Retrieved from SDTM/ADaM Pilot Project: http://www.cdisc.org/system/files/members/article/application/zip/updated_pilot_submission_package.zip Harris, K. (2016). Animate Your Safety Data. PharmaSUG China. Beijing: PharmaSUG. Harris, K. (2017). Hands-On Graph Template Language (GTL): Part A. SAS Global Forum. Denver: SAS Global Forum. Harris, K., & Watson, R. (2018). Great Time to Learn GTL. PharmaSUG. Seattle: PharmaSUG. Matange, S. (n.d.). Animation using SGPLOT. Retrieved from Graphically Speaking: https://blogs.sas.com/content/graphicallyspeaking/2013/05/23/animation-using-sgplot/ McCarthy, A. (2017). Using Animated Graphics to Show PKPD Relationships in SAS 9.4. PharmaSUG (pp. 4-6). Baltimore: PharmaSUG.

Acknowledgements 1/12/2019 We will like to acknowledge Tao Shu, Lixiang Larry Liu, and Jianfei Jiang for introducing us to the Cumulative TEAE plot.

Questions? 1/12/2019