Using SAS to Analyze CYP-C Data: Introduction to Procedures. Overview

Similar documents
22S:166. Checking Values of Numeric Variables

EXAMPLE 2: INTRODUCTION TO SAS AND SOME NOTES ON HOUSEKEEPING PART II - MATCHING DATA FROM RESPONDENTS AT 2 WAVES INTO WIDE FORMAT

SAS Programs SAS Lecture 4 Procedures. Aidan McDermott, April 18, Outline. Internal SAS formats. SAS Formats

Basic Concepts #6: Introduction to Report Writing

A SAS Macro for Producing Benchmarks for Interpreting School Effect Sizes

STAT:5400 Computing in Statistics

DSCI 325: Handout 10 Summarizing Numerical and Categorical Data in SAS Spring 2017

STAT 503 Fall Introduction to SAS

EXST SAS Lab Lab #6: More DATA STEP tasks

SAS Example A10. Output Delivery System (ODS) Sample Data Set sales.txt. Examples of currently available ODS destinations: Mervyn Marasinghe

SAS is the most widely installed analytical tool on mainframes. I don t know the situation for midrange and PCs. My Focus for SAS Tools Here

Reading data in SAS and Descriptive Statistics

Statements with the Same Function in Multiple Procedures

An Introduction to SAS University Edition

/********************************************/ /* Evaluating the PS distribution!!! */ /********************************************/

5b. Descriptive Statistics - Part II

Processing SAS Data Sets

Paper DB2 table. For a simple read of a table, SQL and DATA step operate with similar efficiency.

Introduction to SAS Procedures SAS Basics III. Susan J. Slaughter, Avocet Solutions

Level I: Getting comfortable with my data in SAS. Descriptive Statistics

A Side of Hash for You To Dig Into

Introduction to SAS Procedures SAS Basics III. Susan J. Slaughter, Avocet Solutions

BY S NOTSORTED OPTION Karuna Samudral, Octagon Research Solutions, Inc., Wayne, PA Gregory M. Giddings, Centocor R&D Inc.

SAS Training Spring 2006

Exam Questions A00-281

The Essential Meaning of PROC MEANS: A Beginner's Guide to Summarizing Data Using SAS Software

SAS seminar. The little SAS book Chapters 3 & 4. April 15, Åsa Klint. By LD Delwiche and SJ Slaughter. 3.1 Creating and Redefining variables

Learning SAS by Example

Introducing a Colorful Proc Tabulate Ben Cochran, The Bedford Group, Raleigh, NC

Centering and Interactions: The Training Data

Writing Reports with the

Applied Regression Modeling: A Business Approach

It s Proc Tabulate Jim, but not as we know it!

THE UNIVERSITY OF BRITISH COLUMBIA FORESTRY 430 and 533. Time: 50 minutes 40 Marks FRST Marks FRST 533 (extra questions)

ssh tap sas913 sas

Base and Advance SAS

Reading a Column into a Row to Count N-levels, Calculate Cardinality Ratio and Create Frequency and Summary Output In One Step

Chapters 18, 19, 20 Solutions. Page 1 of 14. Demographics from COLLEGE Data Set

STAT 7000: Experimental Statistics I

1. Basic Steps for Data Analysis Data Editor. 2.4.To create a new SPSS file

BUSINESS ANALYTICS. 96 HOURS Practical Learning. DexLab Certified. Training Module. Gurgaon (Head Office)

CSC 328/428 Summer Session I 2002 Data Analysis for the Experimenter FINAL EXAM

Ditch the Data Memo: Using Macro Variables and Outer Union Corresponding in PROC SQL to Create Data Set Summary Tables Andrea Shane MDRC, Oakland, CA

Contents of SAS Programming Techniques

STA 570 Spring Lecture 5 Tuesday, Feb 1

Epidemiology Principles of Biostatistics Chapter 3. Introduction to SAS. John Koval

Laboratory Topics 1 & 2

Please login. Take a seat Login with your HawkID Locate SAS 9.3. Raise your hand if you need assistance. Start / All Programs / SAS / SAS 9.

PROC MEANS for Disaggregating Statistics in SAS : One Input Data Set and One Output Data Set with Everything You Need

Creating Macro Calls using Proc Freq

EXST3201 Mousefeed01 Page 1

Outline. Topic 16 - Other Remedies. Ridge Regression. Ridge Regression. Ridge Regression. Robust Regression. Regression Trees. Piecewise Linear Model

Christopher Toppe, Ph.D. Computer Sciences Corporation

SAS Online Training: Course contents: Agenda:

22S:172. Duplicates. may need to check for either duplicate ID codes or duplicate observations duplicate observations should just be eliminated

Introductory SAS example

EXAMPLE 3: MATCHING DATA FROM RESPONDENTS AT 2 OR MORE WAVES (LONG FORMAT)

Analysis of variance and regression. November 13, 2007

Analysis of variance and regression. November 13, 2007

ABSTRACT INTRODUCTION PROBLEM: TOO MUCH INFORMATION? math nrt scr. ID School Grade Gender Ethnicity read nrt scr

Understanding and Applying Multilabel Formats

Ten tips for efficient SAS code

Bar Charts and Frequency Distributions

Seminar Series: CTSI Presents

Introductory Guide to SAS:

PLS205 Lab 1 January 9, Laboratory Topics 1 & 2

SAS 9 Programming Enhancements Marje Fecht, Prowerk Consulting Ltd Mississauga, Ontario, Canada

Intermediate SAS: Statistics

Introduction to Stata Toy Program #1 Basic Descriptives

Stat 302 Statistical Software and Its Applications SAS: Data I/O

Data Quality Review for Missing Values and Outliers

Paper S Data Presentation 101: An Analyst s Perspective

Want to Do a Better Job? - Select Appropriate Statistical Analysis in Healthcare Research

From An Introduction to SAS University Edition. Full book available for purchase here.

Introduction to PROC SQL

WHERE YOUR MIND REALLY IS

Format-o-matic: Using Formats To Merge Data From Multiple Sources

SAS Instructions Entering the data and plotting survival curves

CH5: CORR & SIMPLE LINEAR REFRESSION =======================================

Christopher Louden University of Texas Health Science Center at San Antonio

Cleaning Duplicate Observations on a Chessboard of Missing Values Mayrita Vitvitska, ClinOps, LLC, San Francisco, CA

A Brief Tour of SAS. The SAS Desktop

Lab 1: Introduction to Data

Correcting for natural time lag bias in non-participants in pre-post intervention evaluation studies

Introduction to SAS. I. Understanding the basics In this section, we introduce a few basic but very helpful commands.

Data Management - 50%

Lab 3 (80 pts.) - Assessing the Normality of Data Objectives: Creating and Interpreting Normal Quantile Plots

options nofmterr; ods html close; *STOPS WRITING TO THE CURRENT RESULTS VIEWER;

STA9750 Lecture I OUTLINE 1. WELCOME TO 9750!

Compute Blocks in Report

SAS CURRICULUM. BASE SAS Introduction

The MEANS/SUMMARY Procedure: Getting Started and Doing More

Topic (3) SUMMARIZING DATA - TABLES AND GRAPHICS

Introduction to Stata - Session 2

Stat 302 Statistical Software and Its Applications SAS: Data I/O & Descriptive Statistics

WEB MATERIAL. eappendix 1: SAS code for simulation

Going Beyond Proc Tabulate Jim Edgington, LabOne, Inc., Lenexa, KS Carole Lindblade, LabOne, Inc., Lenexa, KS

The Essential Meaning of PROC MEANS: A Beginner's Guide to Summ~rizing Data Using SAS Software

I Launching and Exiting Stata. Stata will ask you if you would like to check for updates. Update now or later, your choice.

Chapter 6: Modifying and Combining Data Sets

Transcription:

Using SAS to Analyze CYP-C Data: Introduction to Procedures CYP-C Research Champion Webinar July 14, 2017 Jason D. Pole, PhD Overview SAS overview revisited Introduction to SAS Procedures PROC FREQ PROC PRINT PROC MEANS PROC UNIVARIATE PROC SORT PROC CONTENTS 1

SAS Overview - Revisited For our purposes only two major things you can do in SAS DATA step - Manipulate the data in some way Reading in Data Creating and Redefining Variables Sub-Setting Data Working with Dates Working with Formats Procedure step Analyze the data Produce frequency tables Estimate a regression model PROC FREQ 2

SAS PROC FREQ Allows you to get a n-way cross-tabulation of data Basic statistical tests are available PROC FREQ <options>; BY <variable list>; TABLES <requests> / <options>; PROC FREQ DATA = T7; TABLES QAIPPE GENDER; 3

PROC FREQ DATA = T7; TABLES QAIPPE / MISSING; PROC FREQ DATA = T7; BY GENDER; TABLES QAIPPE / MISSING; 4

PROC FREQ DATA = T7; TABLES QAIPPE * GENDER / MISSING; PROC FREQ DATA = T7; TABLES QAIPPE * GENDER / LIST MISSING; 5

PROC FREQ DATA = T7; TABLES QAIPPE * GENDER / CHISQ; PROC FREQ DATA = T7; TABLES DUMALL * GENDER / CMH; 6

PROC FREQ DATA = T7; TABLES DUMALL * GENDER * QAIPPE / LIST MISSING; PROC PRINT 7

SAS PROC PRINT Allows you to print out data from a dataset while controlling various aspects like sub-groups Prints observations based on order in current dataset (modify this by using PROC SORT procedure before the PROC PRINT) PROC PRINT <options>; BY <variable list>; VAR <requests> / <options>; PROC PRINT DATA = T7; VAR GENDER QAIPPE DX_DATE; 8

PROC PRINT DATA = T7; WHERE DUMALL = 1; VAR GENDER QAIPPE DX_DATE; PROC PRINT DATA = T7; WHERE DUMALL = 1; BY GENDER; VAR QAIPPE DX_DATE; 9

PROC MEANS SAS PROC MEANS Allows you to summarize data and compute descriptive statistics across variables and within groups Can calculate mean, measures of variation, median, ranges, extreme values and perform t-tests PROC MEANS <options> <statistic-keywords>; BY <variable list>; CLASS <variable list> / <options>; FREQ <variable>; ID <variable list>; OUTPUT < options> ; VAR <variable list>; 10

PROC MEANS DATA = T7; VAR TIMEDEATH; PROC MEANS DATA = T7; BY GENDER; VAR TIMEDEATH; 11

PROC MEANS DATA = T7; CLASS GENDER; VAR TIMEDEATH; PROC MEANS DATA = T7 NMISS N MEAN STD STDERR CLM MIN MAX MAXDEC=2; CLASS GENDER; VAR TIMEDEATH; 12

PROC MEANS DATA = T7 NMISS N MEAN STD STDERR CLM MIN MAX MAXDEC=2 MISSING; CLASS GENDER; VAR TIMEDEATH; PROC MEANS DATA = T7 NMISS N MEAN STD STDERR CLM MIN MAX MAXDEC=2 MISSING NOPRINT; CLASS GENDER; VAR TIMEDEATH; OUTPUT OUT=T7_TTD_MEAN NMISS=NMISS_TTD N=N_TTD MEAN=MEAN_TTD; PROC PRINT DATA = T7_TTD_MEAN; 13

PROC UNIVARIATE SAS PROC UNIVARIATE Allows you to examine the distribution of data and assess normality and identify outliers Can create many plots and run various statistical tests PROC UNIVARIATE <options> ; BY <variable list> ; CLASS <variable list> / <options> ; ID <variable list> ; VAR <variable list> ; 14

PROC UNIVARIATE DATA = T7; VAR DX_AGE; 15

PROC UNIVARIATE DATA = T7; ID CYPCID; VAR DX_AGE; 16

PROC UNIVARIATE DATA = T7 PLOT; ID CYPCID; VAR DX_AGE; PROC UNIVARIATE DATA = T7 PLOT; CLASS GENDER; ID CYPCID; VAR DX_AGE; 17

PROC SORT SAS PROC SORT Allows you to rearrange or sort the observations in a dataset by character or numeric variables A sorted dataset is required for any BY group processing You can make many modifications to a dataset using this procedure which can often speed up your code PROC SORT <options> ; BY <variable list> ; KEY <variable list> / <options> ; 18

PROC PRINT DATA = T7 (OBS=15); VAR CYPCID DX_DATE; PROC SORT DATA = T7; BY CYPCID; PROC PRINT DATA = T7 (OBS=15); VAR CYPCID DX_DATE; PROC SORT DATA = T7; BY GENDER CYPCID DX_DATE; PROC PRINT DATA = T7 (OBS=15); VAR GENDER CYPCID DX_DATE; 19

PROC SORT DATA = T7; BY CYPCID GENDER DX_DATE; PROC PRINT DATA = T7 (OBS=15); VAR GENDER CYPCID DX_DATE; PROC SORT DATA = T7; BY DESCENDING GENDER CYPCID DESCENDING DX_DATE; PROC PRINT DATA = T7 (OBS=15); VAR GENDER CYPCID DX_DATE; 20

PROC SORT DATA = T7 OUT = T8 (KEEP=CYPCID DX_DATE); BY DESCENDING GENDER CYPCID DESCENDING DX_DATE; PROC SORT DATA = T7 OUT = T8 (RENAME=(CYPCID=ID)); BY DESCENDING GENDER CYPCID DESCENDING DX_DATE; PROC CONTENTS 21

SAS PROC CONTENTS Allows you to obtain information about datasets in your library PROC CONTENTS <options> ; PROC CONTENTS DATA = T7; 22

PROC CONTENTS DATA = T7 ORDER = VARNUM; Topics Covered SAS overview revisited SAS Procedures PROC FREQ PROC PRINT PROC MEANS PROC UNIVARIATE PROC SORT PROC CONTENTS 23

24