sas healthcare workshop 18 nov 2011
DESCRIPTION
SAS Healthcare workshop shares some of the best practises in the use of business analytics in the healthcare industryTRANSCRIPT
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 201118 November 2011
2
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Agenda
2.00 - 4.00pm : Statistical Analysis in Healthcare Industry showcasing SAS Enterprise Guide and SAS STAT capabilities in HealthCare analytics - Giuseppe Manai , SAS Senior Pre-sales Consultant- Jun Yao, SAS Pre-sales Consultant
4.00 - 4.15pm : Tea Break
4.15 - 5.15pm : Powerful Features of SAS: Reporting and Presenting Relevant Statistical Summary of Clinical Data - Dr Pryseley N. Assam, Adjunct Assistant Professor for Centre for Quantitative Medicine, Duke-NUS Graduate Medical School & Biostatistician at Singapore Clinical Research Institute
5.15 - 5.45pm : Application of PROC Frequency in Clinical Analysis - Mr Gabriel Jiang, Senior Statistician-Computation, Lilly-NUS Centre for Clinical Pharmacology Pte. Ltd.
5.45 - 6.00pm : Q&A and Closing
Copyright © 2011, SAS Institute Inc. All rights reserved.Copyright © 2011, SAS Institute Inc. All rights reserved.
Statistical Analysis inHealthcare IndustryGiuseppe Manai, SAS Senior Pre-sales Consultant
Jun Yao, SAS Pre-sales Consultant
4
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Outline
SAS Business Analytics Framework Giuseppe
Introduction to SAS Enterprise Guide SAS Enterprise Guide Workspace
Tasks and Wizards: Easy in Enterprise Guide
Examples + Hands-on Activity
Statistical techniques
Scheduling Jun Yao
What’s New in SAS Enterprise Guide 5.1
5
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
6
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
How do we do it?
7
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
BUSINESS SOLUTIONS
How do we do it?
8
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
INFORMATION MANAGEMENT
BUSINESS SOLUTIONS
How do we do it?
9
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
BUSINESS SOLUTIONS INFORMATION MANAGEMENT
ANALYTICS
How do we do it?
10
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
REPORTING
BUSINESS SOLUTIONS INFORMATION MANAGEMENT ANALYTICS
How do we do it?
11
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Healthcare Providers Using SAS
Business IssuesFacing problem in data integration and data analysis. Different software was being used in each department making consolidation of the data difficult to achieve or even visualise.
SolutionIntegration of the clinical and medical management data analysis.
ResultsPatient response times are much quicker and effective.
12
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Healthcare Providers Using SAS
Business Issues Large data analysis was slow and difficult. Separate software was being used in different departments causing problems with data integration and resulting in analytical limitations.
SolutionIntegrates the different departments under a single repository of information enabling access to all in a standardised single version of the truth.
Results standardized records and reports
13
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Introduction to SAS Enterprise Guide
14
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Introduction to Enterprise Guide
Quick access and manipulation of data
Carry out basic and complex analysis
Easy to use basic reporting
Easy to use Quick
Intuitive
15
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Introduction to Enterprise Guide
What does SAS EG do? Point-and-click GUI
Menu- and wizard- driven
Enables fast data analysis and results publishing
Fast-track learning data analysis
Generates code in background for productivity
Deploys analyses and forecasts in real time.
Who is SAS EG designed for? Business analysts with no SAS programming experience
SAS programmers
Statisticians
16
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Introduction to SAS Enterprise GuidePoint-and-click interface for managing data and generating reports.
17
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Introduction to SAS Enterprise Guide
18
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Introduction to Enterprise GuideProgramming Interface
19
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
SAS Enterprise Guide Interface
Data sources
SAS programs and logs
Tasks and Queries
Results
Informational Notes for Documentation
You can control contents, sequencing, and updating of a project.
A PROJECT is a single file that serves as a collection of:
20
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
SAS Enterprise Guide Interface
21
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Behind the ScenesAs you build tasks, Enterprise Guide generates SAS code.
22
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Tasks and Wizards: Easy in EG
Data Management Quickly Visualize, Open or Import Data
Join Datasets efficiently
Create Frequency Reports
Program Editor
Visualization Graphs (Histogram/ Bar-Chart/Pie Chart)
Statistical techniques t-test
ANOVA
23
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Examples
24
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Building a SAS Enterprise Guide Project
1. Add Datasets (can also import from Excel)
2. Perform a task
3. One-way frequencies and statistical tests
4. Automate a Process
5. Graphing
6. Create Reports (List Data)
7. Summary Statistics
8. Simple Linear Regression
9. t-Test and ANOVA
25
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Common Data Formats
SAS datasets
Microsoft Excel and Access
DBMS tables
Text files
JMP
HTML
SPSS
26
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
One-Way Frequency Report
The One-Way Frequencies task can be used to generate: Frequency counts Percentages Graphs Statistical tests to analyze the distribution of your data
27
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Types of Graphs
The Graph menu
includes all of the
advanced graph tasks
as well as the wizards.
28
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Graphs Using SAS Enterprise Guide
29
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Characterize Data
The Characterize Data task is an exploratory
task that produces automatically statistics and
graphs for all variables, grouping by type of
variable (i.e. categorical, interval, etc.)
30
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summary Statistics Report
Calculate summary statistics based on groups within the data.
Can produce reports, graphs and data sets as output.
31
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Automate a Process
To automate a process flow you simply name it
Autoexec
This will run the process flow when opening the project
32
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Hands-on activity (10-15 min)
Try to: Import a dataset
Create a task
Graph the results
Automate the process
33
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Simple Linear Regression Analysis
34
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Simple Linear Regression Analysis
The objectives of simple linear regression are to:
Assess the significance of the predictor variable
in explaining the variability or behavior of the response
variable
35
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Simple Linear Regression Model
b0
1 unit
b1 units
b 0 + b 1
X
36
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Simple Linear Regression Model
37
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Performing Simple Linear Regression
Example ……
38
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
t-Test and ANOVA
39
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Performing t-Test (Paired Sample)
Analyze differences between two population means using the t-Test task.
Perform a paired-sample t-test to determine
whether a medication was successful in reducing
blood pressure.
40
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Scenario 1
DatasetTo observe the effectiveness of a medication in reducing blood pressure, an experiment was conducted in which researchers collected data from a random sample of individuals who were considered to have high blood pressure. The diastolic blood pressure of these individuals was recorded, after which they were placed on the medication. One month later, their diastolic pressure was recorded again.
ObjectiveDetermine if the data gives good evidence that the medication was effective in reducing blood pressure by carrying out a test of significance (at level α = 0.05), pairing the two blood pressure recordings for each subject.
41
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Performing Simple Linear Regression
Example ……
42
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Analysis of Variance (One-Way ANOVA)
Perform a one-way ANOVA to determine whether
there are significant differences between four drugs
in mean increase in systolic blood pressure.
43
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Scenario 2
DatasetConsider a pharmaceutical company that has recently focused on the effect of its potential products on blood pressure. Researchers conducted a study in which the subjects were 72 individuals with one of three diseases. Eighteen individuals were randomly assigned to each of the four drugs. The treatments were administered over time and the increase in systolic blood pressure was recorded.
ObjectiveDetermine whether there are significant differences between the mean increases in systolic blood pressure for the four drugs. If there are, evaluate which drugs differ and how greatly they differ.
44
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
One-Way ANOVA
Example…….
45
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Hands-on activity (10-15 min)
Explore Enterprise Guide’s tasks
Use data sets provided
Modify variables
Use different tasks
Create graphs and reports
46
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Task Scheduling via Enterprise Guide
Copyright © 2011, SAS Institute Inc. All rights reserved.Copyright © 2011, SAS Institute Inc. All rights reserved.
What’s New in SAS Enterprise Guide 4.3
48
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
SAS® Enterprise Guide 4.3
Release Objectives User productivity Integration Performance
Key Features New program editor with auto complete and integrated syntax help Enhanced OLAP Analysis capabilities for enriched user experience Tighter integration with SAS WRS Reports and JMP Rapid Predictive Modeling (RPM) Enterprise Miner integration New performance enhancement capabilities with Explicit SQL pass-
through option, In-database optimized syntax generation and Integration for Grid enablement
49
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Enhancements for SAS Programmers
50
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Enhanced Program Editor
Mouse over Tooltip with details for SAS PROCS, SAS Functions
51
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Enhanced Program Editor - Autocomplete
Connects to data library listing accessible data tables
Provides list of SAS PROCS, SAS Functions and Macro variables, assisting user while coding
52
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Enhanced Program Editor
Converts code into Indented Format
53
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Enhanced Program Editor – Analyze Program
Coverts lines of Code into Process Flow for visual representation and ease understanding of the program flow
54
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Adhoc Analysis Enhancements
55
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
OLAP Analyzer – Enhanced Filtering options
Enhanced filter options with Example support
56
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
OLAP Analyzer - Enhanced MDX Editor
• Drag-n-Drop support to add measures/dimensions to the MDX
• Show Line numbers for MDX
57
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
OLAP Analyzer - Enhanced MDX Editor
New options for Search
58
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
OLAP Analyzer - New Chart Types
New Chart Types• Scatter Plot• Tile Chart
• Automatic Charting (creates a chart based on Dimensions and Measures selected in crosstab)
59
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
OLAP Analyzer – Enhanced Explorer View
Apply Path to Siblings option for a smoother data exploration
experience.
60
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Integration with JMPData opened in EG 4.3
Data opened in JMP
61
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Integration with Rapid Predictive Modeler
Self service analysis and report generation using wizard driven RPM task
Copyright © 2011, SAS Institute Inc. All rights reserved.Copyright © 2011, SAS Institute Inc. All rights reserved.
What’s New in SAS Enterprise Guide 5.1
63
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
SAS® Enterprise Guide 5.1
Release Objectives Leverage the capabilities of SAS 9.3 platform Enriched User Experience Increased productivity
Key Features Enhanced program editor with auto complete for dataset
variables Improved tooltip support for SAS keywords with help
documents Enhanced OLAP Analysis capabilities for enriched user
experience Reusable queries (Query Templates and Sub Queries) Enriched interface for creating Stored Process
64
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Enhanced Program EditorEnriched user experience and increased productivity
Provides the ability to view the list of variables from the selected data set.
65
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Enhanced Program EditorEnriched user experience and increased productivity
Enhanced tool tip support with web link to Product Documentation and Samples.
66
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Enhanced Program EditorEnriched user experience and increased productivity
Ability to split and stack the programming window – side by side or tiled
• Work with different parts of same program in single view
67
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Adhoc OLAP AnalysisEnriched user experience
Predefined Calculation Functions for time-series data analysis
68
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Adhoc OLAP AnalysisEnriched user experience
Refined Contextual Menu for defining Totals and % of Totals
69
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Reusable Queries
1 Define queries and save them as Templates
2 Use existing queries as Sub-Queries to filter data
70
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Options for Code Submissions
Ability to define the Code Submission options and gain
increased performance in a grid enabled environment
71
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Any Questions?
72
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Tea-Break
Copyright © 2011, SAS Institute Inc. All rights reserved.Copyright © 2011, SAS Institute Inc. All rights reserved.
Powerful SAS Features: Reporting & Presenting Statistical Summary of Clinical DataPryseley Assam (PhD)Biostatistician, Singapore Clinical Research InstituteAssistant Professor, Duke-NUS Graduate Medical School
SAS Healthcare Workshop
74
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Outline
Introduction
A case study – retrospective study
Some useful SAS features (summaries, reports)
Remarks
75
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Introduction
Mandatory Clinical Trial Registration
» The International Committee of Medical Journal Editors
» Pharmaceutical Research & Manufacturers of America
New England Journal of Medicine (Sept 16 issue 2004)
… patients have a right to trust that investigators will not
only minimize risks to the participants but also will
conduct research ethically and report it completely and
honestly.
76
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Introduction
Obligation to report/publish research findings
» Participants (patients)
» Scientific committee
» Sponsors
Guidelines for reporting
» Randomized controlled trials: CONSORT
» Systematic reviews and meta-analysis: PRISMA
» Observations studies: STROBE
» Diagnostic studies: STARD
77
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Introduction
Complete and honest reporting is facilitated by appropriate study design, conduct and analysis, in accordance with the study objectives
Increasing demand for statistical input in
healthcare studies
78
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Introduction
Statistical report
» Design, size, and outcomes of the study
» Patient selection flow chart
» Summary statistics
» Graphs
» Analysis
Automated summaries and report attributes
Statistical data review
79
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Case Study - DUMIN
Motivation
» RCTs are not representative of practice
» Strict measurement based-care approach
» Higher doses than found in typical clinical care
Data description
» All outpatients with clinical depression (and anxiety)
» On one antidepressant medication for at least 1week
» At least two assessment within the 9 weeks of treatment
» Study period: January 2000 to December 2010
80
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Case Study - DUMIN
Objectives
Describe overall response rates
» CGI-I
» CGI-S change from baseline
Is outcome related to
» Baseline severity
» Duration of treatment
Identify clinical features associated with outcomes
Copyright © 2011, SAS Institute Inc. All rights reserved.Copyright © 2011, SAS Institute Inc. All rights reserved.
Some useful SAS Features
Summarizing Data
82
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summarizing Data
Listings
» Useful for providing detail reports; a detail report gives you at least one row of information in your report for selected observations (patients/events) in the data set.
» Reporting severe adverse events in RCT
» DATA Steps, PROC TRANSPOSE, PROC SQL
» PROC PRINT, PROC REPORT
83
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summarizing Data
Listings
Enhancements
» Labels of variables (DATA steps, PROC SQL)
» Formats for values of variables (PROC FORMAT)
» Styles and templates
84
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summarizing Data
Listings
» Suicidal patients – PROC PRINT (WHERE clause)
85
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summarizing Data
Listings
PROC FORMAT;VALUE $ SexF "M" = "Male"
"F" = "Female";
RUN;
PROC PRINT DATA=LOC.Dumin (FIRSTOBS=1 OBS=25) NOOBS LABEL BLANKLINE=5 N;
FORMAT Gender $SexF.;WHERE Suicide = "Yes";VAR BackgroundID Gender Race2 Age_Bin Diagnosed
Suicide Mono Med_Class Substance Subst;
RUN;
86
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summarizing Data
Listings
87
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summarizing Data
Listings
» Suicidal patients with ≥ 2 assessments – PROC SQL
PROC SQL;CREATE TABLE Suic_2 ASSELECT DISTINCT BackgroundID, Gender, Race2, Age_Bin,
Diagnosed, Suicide, Mono, Med_Class, Substance, Subst, Suicide
FROM LOC.DuminWHERE BackgroundID IN
(SELECT DISTINCT BackgroundID FROM LOC.Visits GROUP BY BackgroundID HAVING COUNT(ENum) > 2 )
;QUIT;
88
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summarizing Data
Listings
» Suicidal patients with ≥ 2 assessments – PROC SQL
89
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summarizing Data
Listings
» Safety analysis in RCTs
ID/Grp
First dose date/Last dose
date
VisitNo.
Onset date/Resolution
dateSystem Organ Class
Preferred
Term
Investigator
Term
Relationto study
drug
Trt givento AE
1356 / A 02JUL2011 / 12AUG2011 V2 01JUL2011 /
01JUL2011 Nervous system disorders Dizziness GIDDINESS FOR 3 HOURS Unknown No
1356 / A02JUL2011 / 12AUG2011 V2 01JUL2011 /
05JUL2011 Psychiatric disorders Somnolence DAY-TIME DROWSINESS Unknown No
1356 / A02JUL2011 / 12AUG2011 V6 30JUL2011 /
03AUG2011 Psychiatric disorders Somnolence DAY-TIME DROWSINESS Likely No
1463 / B 23SEP2011 / 16NOV2011 V3 07OCT2011 /
07OCT2011
General disorders and administration site conditions
Feeling hot WARM SENSATION Not related No
1463 / B23SEP2011 / 16NOV2011 V4 19OCT2011 / . Musculoskeletal and
connective tissue disorders Arthralgia LEFT ANKLE PAIN Not related No
90
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summarizing Data
Summary report
» A summary report generally does some form of collapsing of observations so that each row in the report represents information from more than one observation
» Demographic and baseline clinical characteristics
» Efficacy and safety outcomes
» PROC SQL, MEANS, SUMMARY, FREQ, UNIVARIATE
» PROC TABULATE, REPORT, TRANSPOSE
91
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Basic Summary
Outcomes – PROC MEANS
PROC MEANS DATA=LOC.Dumin MISSING N NMISS MEAN STD MIN MAXNONOBS MAXDEC=3;
CLASS Suicide;VAR CGI_Entry CGI_1 CGI_2;
RUN;
92
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Basic Summary
Demographics – PROC FREQ
PROC FREQ DATA=LOC.Dumin; TABLE Gender Age_Bin
Race2 Diagnosed ;RUN;
93
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Basic Summary
Demographics – PROC FREQ
PROC FREQ DATA=LOC.Dumin; TABLE Gender Age_Bin Race2 Diagnosed / MISSING ;RUN;
94
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Basic Summary
Demographics – PROC FREQ
PROC FREQ DATA=LOC.Dumin ORDER=INTERNAL; TABLE CGI_1 / MISSING OUT=CGI OUTCUM;
TABLE Suicide*CGI_1 / MISSING OUT=CGIS OUTPCT;
TABLE Diagnosed*CGI_2 / MISSING OUT=CGIS OUTPCT;
RUN;
95
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summary Tables
PROC TABULATE
» Very useful descriptive statistics
» Simple but powerful methods to create tabular reports
» Establishing hierarchical relationships between the variables
» Mechanisms for labeling and formatting variables and procedure- generated statistics.
96
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summary Tables
Tables of summary statistics - TABULATE
PROC TABULATE DATA=LOC.Dumin ORDER=FREQ;
CLASS Gender Age_Bin Subst Race2 Med_Class Mono
;VAR CGI_1;TABLE ALL="All Patients"
Gender Age_Bin Med_Class*Mono Subst Race2, ALL="All Patients"*(N REPPCTN="%") CGI_1*(MEAN STD LCLM UCLM);
RUN;
97
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summary Tables
Continuous outcome - TABULATE
98
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summary Tables
Continuous outcome - TABULATE
DATA LOC.Dumin;SET LOC.Dumin;Sex = "Gender";Races = "Race";AgeGrp = "Age Groups";SuicP = "Suicidality";
RUN;
PROC TABULATE DATA=LOC.Dumin MISSING ORDER=FREQ;FORMAT Suicide $Sui.;
CLASS Gender Age_Bin Race2 Suicide Sex Races AgeGrp SuicP ;
VAR CGI_1;TABLE ALL="All Patients"
Sex*Gender AgeGrp*Age_Bin Races*Race2 SuicP*Suicide , ALL="All Patients"*(N REPPCTN="%")
CGI_1*(MEAN STD LCLM UCLM) /RTS=25 INDENT=4 ;RUN;
99
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summary Tables
Continuous outcome - TABULATE
100
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summary Tables
Binary outcome - TABULATE
PROC FORMAT;VALUE CGIIB 1 - 3 = "Improvement"
4 - 7 = "No Improvement"Other = " "
;RUN;
PROC TABULATE DATA=LOC.Dumin MISSING ORDER=FREQ;FORMAT CGI_1 CGIIB.;CLASS CGI_1 Gender Race2 Age_Bin Subst
Sex Races AgeGrp ASubs;TABLE ALL="All Patients"
Sex*Gender AgeGrp*Age_Bin Races*Race2 ASubs*Subst, ALL="All Patients"*(N REPPCTN="%") CGI_1*(N REPPCTN="%") /RTS=25 INDENT=4 ;
RUN;
101
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summary Tables
Cell Percentages - TABULATE
102
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summary Tables
Row Percentages - TABULATE
» Useful for comparison
PROC TABULATE DATA=LOC.Dumin MISSING ORDER=FREQ;FORMAT CGI_1 CGIIB.;CLASS CGI_1 Gender Race2 Age_Bin Subst
Sex Races AgeGrp ASubs;TABLE ALL="All Patients"
Sex*Gender AgeGrp*Age_Bin Races*Race2 ASubs*Subst, ALL="All Patients"*(N REPPCTN="%") CGI_1*(N ROWPCTN="%") /RTS=25 INDENT=4 ;
RUN;
103
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summary Tables
Row Percentages - TABULATE
104
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summary Tables
Proportions of Covariates - TABULATE
Direct cost
What are the respective contributions of the components
of direct cost and the type of cases to the total direct cost?
105
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summary Tables
Proportions of Covariates - TABULATE
PROC TABULATE DATA=LOC.H_Expend FORMAT=8.2; WHERE Cost = "Direct"; CLASS CT Cost CC; VAR Value; TABLE CC* (Sum='Cost per Case' PCTSUM<CC>='% by Direct Cost' PCTSUM<CT>='% by Case Type' PCTSUM='Overall %') , Value*CT /RTS=35 INDENT=4;RUN;
PROC TRANSPOSE
106
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summary Tables
Proportions of Covariates - TABULATE
107
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Saving Outputs
ODS RTF (Rich text format)
» Editable reports (manuscripts)
ODS PDF
» Non-editable reports
» Validation results, Safety and protocol deviations
ODS HTML
» Websites
108
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Saving Outputs
BasicsX “CD C:\SAS HealthCare Workshop\Figures”;
ODS RTF File=“File Name.rtf";
SAS PROCEDURES
ODS RTF CLOSE;
OPTIONS ORIENTATION=LANDSCAPEODS RTF File=“File Name.rtf“ STYLE=myStyle; TITLE ; TITLE2 ; ODS TEXT=“Include Text”;
SAS PROCEDURES
ODS RTF CLOSE;
109
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Outputs for Reports
Stored RFT Files (Templates)
110
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Outputs for Reports
Style = Journal
+ FORMAT
112
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Summary Reports
Employing multiple procedures, styles and format
» PROC MEANS, UNIVARIATE, FREQ, …
» PROC TABULATE, PROC REPORT
» ODS RTF
» OPTIONS Statement
» MACROS
» …
113
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Automated Summary Reports
114
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Automated Summary Reports
Copyright © 2011, SAS Institute Inc. All rights reserved.Copyright © 2011, SAS Institute Inc. All rights reserved.
Some useful SAS Features
Depicting Data
116
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Depicting Data
SAS GRAPH - Procedures
» SGPLOT, SGPANEL, SGSCATTER, …
» GREPLAY
ODS Graphics (over 60 procedures)
» SAS/Base
» SAS/STAT, SAS/ETS, SAS/QC
Graphical representations of data are often more
easily understood and remembered than tabular
forms
117
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Depicting Data
ODS Graphics ONProcedure optionsDefault plot createdPLOTS=syntax [non-default plots]
ODS Graphics OFF
118
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Depicting Results
Regression diagnostics - Example
119
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Depicting Data
Basic things to note for ODS Graphics
Formats (IMAGEFMT=)
» PNG, PS, TIFF
» JPEG, GIF, PDF, WMF
X "CD C:\SAS HealthCare Workshop\Figures";
ODS GRAPHICS ON / IMAGENAME="MyFigure" IMAGEFMT=;
GRAPH/STAT PROCEDURE DATA= ;PROCEDURE OPTIONS
RUN;
ODS GRAPHICS OFF;
120
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Depicting Data - DUMIN
Patient selection
18475 patients
1722 (9%) Eligible patients
121
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Depicting Data - DUMIN
Primary outcome (CGI-I)
» INSET and FORMAT statements
Requested plotFinal plot
122
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Primary outcome (CGI-I)
Depicting Data - DUMIN
SGPANEL
PROC FREQ + SGPANEL
123
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Primary outcome (CGI-I)
Depicting Data - DUMIN
124
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Depicting Data
Multiple graphs in a figure
» PROC GREPLAY
125
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
CGI outcomes
» IMAGEFMT=PS and LaTeX
Depicting Data - DUMIN
126
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Absolute and cumulative percentages
Depicting Data
FREQ+
SGPLOT
127
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Remarks
Reporting results of clinical studies is mandatory
Results need to be represented concisely and precisely
SAS provides extensive tools for summarizing data and preparing results for reporting, especially when used in conjunction with other software
» Use the SAS thoughtfully
Having the right tools is important!
128
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Any Questions?
Copyright © 2011, SAS Institute Inc. All rights reserved.Copyright © 2011, SAS Institute Inc. All rights reserved.
Application of PROC Frequency in Clinical AnalysisGabriel Jiang Senior Statistician-Computation, Lilly-NUS Centre for Clinical Pharmacology Pte. Ltd.
SAS Healthcare Workshop 2011
130
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
What else can we do other than counting observations and putting them in cross tabulation or n x n ways?
Common syntaxPROC FREQ <options> ;
BY variables ;
EXACT statistic-options </ computation-options> ;
OUTPUT <OUT=SAS-data-set> options ;
TABLES requests </ options> ;
TEST options ;
WEIGHT variable </ option> ;
run;
131
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
Agenda
- Filling in zeroes with Sparse Option
- Complement with ODS Graphics
- Controlling displayed output
132
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ (1)
Scenario: I need to have lots of ‘0’ values in my tables, to show that there were no event occurrences
133
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
ExampleLots of zeroes
PROC FREQ (1)
134
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
Solution?
You can create zeroes in a dummy dataset, and proceed to merge with the original ‘incomplete’ dataset
Another question:
It’s troublesome to create the dummy dataset, I don’t even know which combinations are missing
135
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
Solution:
If you are using PROC FREQ, then there is an easy solution
Use the SPARSE Option!
136
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
Sample code
Original code:
proc freq data=heart1;
table sex*chol_status*weight_status/ out=all noprint;
run;
New addition:
proc freq data=heart1;
table sex*chol_status*weight_status/ out=all sparse noprint;
run;
#Using data from SASHELP.HEART
137
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
Observations with missing Cholesterol Status
Previously missing combinations of Sex, Cholesterol Status and
Weight Status
138
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
Missing zero
Combinations incomplete
Output without the Sparse option
139
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
Cholesterol Status is missing
Previously, combination of categories that
were not available
Final Output
140
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ (2)
Scenario: I don’t want to have to write a whole set of GPLOT statements to get plots from PROC FREQ outputs, what should I do?
141
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
SAS/Graph? Maybe by using PROC GPLOT?
PROC GPLOT <DATA=input-data-set> <ANNOTATE=Annotate-data-set> <GOUT=<libref.>output-catalog> <IMAGEMAP=output-data-set > <UNIFORM>;
BUBBLE plot-request(s) </option(s)>;
BUBBLE2 plot-request(s) </option(s)>;
PLOT plot-request(s) </option(s)>;
PLOT2 plot-request(s) </option(s)>;
142
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Combining with ODS Graphics
ODS GRAPHICS ON;
PROC FREQ <options> ;
BY variables ;
EXACT statistic-options </ computation-options> ;
OUTPUT <OUT=SAS-data-set> options ;
TABLES requests / PLOTS < ( global-plot-options ) > < = plot-request < ( plot-options ) > > ;
TEST options ;
WEIGHT variable </ option> ;
run;
ODS GRAPHICS OFF;
143
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Combining with ODS Graphics
Plots
144
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
Sample Code
ods graphics on;
proc freq data=heart;
table sex*chol_status*weight_status/ plots(only)=freqplot;
run;
ods graphics off;
145
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
Sample Output
table sex*chol_status*weight_status/ plots(only)=freqplot(orient=vertical);
146
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
Sample Output
table sex*chol_status*weight_status/ plots(only)=freqplot(orient=horizontal);
147
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
table sex*chol_status*weight_status/ plots(only)=freqplot(orient=horizontal scale=freq|log|percent|sqrt type=barchart);
148
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
table sex*chol_status*weight_status/ plots(only)=freqplot(orient=vertical scale=freq type=dotplot);
149
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
table sex/ plots(only)=cumfreqplot(orient=horizontal scale=freq);
table sex/ chisq plots(only)=deviationplot(orient=horizontal);
Cumulative Frequency Plot Deviation Plot
150
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Frequency plots for multi-way tables
plots(only)=freqplot(orient=horizontal twoway=groupvertical); plots(only)=freqplot(orient=horizontal twoway=grouphorizontal);
plots(only)=freqplot(orient=horizontal twoway=stacked type=dotplot);plots(only)=freqplot(orient=horizontal twoway=stacked type=barchart);
151
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Kappa plots
plots(only)=kappaplot (npanelpos=0);c plots(only)=kappaplot (npanelpos=0 stats);
plots(only)=kappaplot (npanelpos=1);
152
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Kappa plots
plots(only)=kappaplot(npanelpos=0 order=descending stats); plots(only)=kappaplot(npanelpos=0 order=ascending stats);
plots(only)=kappaplot(npanelpos=0 order=ascending stats range=clip); plots(only)=kappaplot(npanelpos=0 order=ascending stats range=(-0.1,0.0));
153
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
Kappa plot Weighted Kappa plot
plots(only)=kappaplot(npanelpos=0); plots(only)=wtkappaplot(npanelpos=0);
154
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Odds Ratio Plot
plots(only)=oddsratioplot(npanelpos=0 stats); plots(only)=oddsratioplot(npanelpos=0 logbase=10 stats);
plots(only)=oddsratioplot(npanelpos=0 logbase=2 stats); plots(only)=oddsratioplot(npanelpos=0 logbase=e stats);
155
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ (3)
Scenario: I have generated some outputs using PROC FREQ… how can I change the format of the values?
156
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
Using the FORMAT= option
Note: The FORMAT= option applies only to cross-tabulation tables displayed in the default format. It does not apply to cross-tabulation tables produced with the LIST or CROSSLIST option.
For one way tables, you have to use PROC TEMPLATE
157
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
Default (BEST6./BEST7.)
proc freq data=heart;
table sex*chol_status*weight_status / nopercent norow nocol ;
run;
158
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
Using Format= option
proc freq data=heart;
table sex*chol_status*weight_status / nopercent norow nocol format=12.3;
run;
159
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
Question: If I want the layout as a list?
160
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
PROC FREQ
Using LIST option
proc freq data=heart;
table sex*chol_status*weight_status / nopercent norow nocol list;
run;
161
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
162
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
References
Base SAS® 9.2 Procedures Guide Statistical Procedures 3rd Edition
http://bit.ly/bcT6Yt
SAS 9.2 Online Documentation
http://support.sas.com/documentation/cdl_main/index.html
Chris Moriak (2002) , The Sparse Option in PROC FREQ: Little Known, Yet Powerful, NESUG15
Mike Rhoads (2009), Changing the Numeric Format of PROC FREQ Output
http://support.sas.com/kb/24/822.html
163
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Any Questions?
164
Copyright © 2011, SAS Institute Inc. All rights reserved.
SAS Healthcare Workshop 2011
Thank you for your participation in SAS Healthcare Workshop
2011!
Have A Great Day!
If you have any further questions, you may email to
Valeria Tan, Account Manager for Healthcare Sector at [email protected]
Customer Success Team at [email protected]