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

Size: px
Start display at page:

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

Transcription

1 SAS Programs SAS Lecture 4 Procedures Aidan McDermott, April 18, 2006 A SAS program is in an imperative language consisting of statements. Each statement ends in a semi-colon. Programs consist of (at least) four types of statement grouped together in blocks: global statements data step statements procedures statements macro statements Outline SAS Formats: proc format Procedures for descriptive data analysis: the freq, means, and univariate procedures Procedures for statistical analysis: the ttest and reg procedures What will the output from this program look like? How many variables will be in the dataset example, and what will be the length and type of each variable? What will the variable package look like? SAS Formats It is sometimes useful to store data in one way and display it in another. For example, dates can be stored as integers but displayed in human readable format. A SAS format changes the way the data stored in a variable is displayed. There are two types of format: Internal formats (SAS already knows about these) User defined formats (you define these yourself). Internal SAS formats A format statement tells SAS to use a format with one or more variables 1

2 Permanent formats User defined formats A format statement added to a datastep permanently connects the name of a format to a variable. The format name is stored in the dataset header. A format statement begins with the format keyword and ends with a semicolon (it is a SAS statement after all). You can define your own format using the format procedure. Like all procedures it begins with the key word proc and ends with the run statement. proc format syntax: User defined formats proc format <options>; value formatname range1 = formatted value1.. rangen = formatted valuen ; proc format defines the format yesno. the format statement applies the format to the variable death. Used to define a format. User defined formats Define the format using proc format Tell SAS to use the format with a specific variable by using the format statement as before. User defined formats: Example proc format; value gen 1 = male 2 = female ; value age = = = = ; value $dpt A = Dept A. B = Dept B. ; Defines three formats, gen, age and dpt. Format dpt is a character format suitable for character variables. 2

3 format ranges You can specify a range of values to be formatted in a given way proc format; value age = = = = ; inclusive ranges you can use formats as look-up tables to categorize a variable. specifying format ranges low high other lowest value (excludes missing) highest value all other values not listed (including missing values) value1 - value2 means [value1,value2] value1 -< value2 means [value1,value2) value1 <- value2 means (value1,value2] the put function allows you to capture the formatted value in another variable. format names: must be 8 or fewer characters long cannot end with a number character formats begin with a $ can not use a SAS internal format name refer to format in format statement by using the name followed by a period Descriptive statistics exploratory data analysis is very important from many perspectives in SAS there are three procedures used routinely proc freq produces frequency counts and crosstabulation tables computes tests and measures of association Procedure freq univariate means tables for categorical data descriptive statistics for numeric data descriptive statistics for numeric data Syntax: proc freq <options>; tables requests / <options>; 3

4 proc freq data=mydata is an option Example The dataset sample has a variable gender. We would like to know what proportion of the sample data are male and what proportion are female. proc freq data=mydata; tables gender race chd ; tables gender * chd / chisq relrisk; proc freq data=sample; tables gender; chisq and relrisk are requests for statistics Example data: NMES The national medical expenditure survey (1987). Examine smoking and gender. Libname mylib c:\sas2006\lecture4 ; proc format; value smoke 0 = never 1 = current 2 = former ; value gen 0 = female 1 = male ; make two formats smoke and gen for the smoking and gender variables Example data: NMES proc freq data=mylib.nmes; tables male*smoke / chisq; format male gen. smoke smoke.; mylib is a libname (folder), nmes is the data 4

5 Output: Output: proc univariate produces simple descriptive statistics use PLOT options on PROC statement stem-and-leaf plot box plot normal probability plot (QQ plot) side by side box plots for by variable groups Syntax: proc univariate proc univariate data=mylib.nmes plot; title Univariate Output for Age ; var lastage; proc univariate <options>; var varlist / <options>; Output: Output: 5

6 Output: proc means similar to univariate no plots nicer output, particularly for more that one variable Syntax: proc means <options>; class varlist; var varlist / <options>; by varlist; output out=outdata <options>; proc means options data=dataset statistic default is: n mean std min max Others are: nmiss range median clm noprint suppress printing of output statements class statistics produced for each combination of class variable by statistics produced by each combination of by variables output produce an output dataset which contains the statistics proc means proc means data=mylib.nmes noprint n mean std stderr range nmiss; class male; var lastage; output out=results n=nage mean=mage std=sage; format male gen.; proc print data=results; Output: In a number of previous Phase I and II studies of male, non-insulin-dependent diabetic (NIDD) patients conducted by a drug company the mean body mass index (BMI) was found to be An investigator has 17 male NIDD patients enrolled in a new study and wants to know if the BMI from this sample is consistent with previous findings. Patient Number Height (CM) Weight (Kg)

7 proc ttest Syntax: proc ttest <options>; var varlist; paired pairlist; by varlist; class varlist; Two-sample paired t-test. A new compound, ABC-123, is being developed for long-term treatment of patients with chronic asthma. Asthmatic patients were enrolled in a double-blind study and randomized to receive daily oral doses of ABC-123 or a placebo for 6 weeks. The primary measurement of interest is the resting FEV1 (forced expiratory volume during the first second of expiration), which is measured before and at the end of the 6-week treatment period. Does administration of ABC-123 appear to have any effect on FEV1? Patient Number ABC-123 Yes Yes Yes Yes Yes Baseline FEV1 (Liters) Week 6 FEV1 (Liters) N/A

8 Modeling with SAS examine relationships between variables estimate parameters and their standard errors calculate predicted values evaluate the fit or lack of fit of a model test hypotheses design outcome The linear model y = x k k β + β x + β x + K + β + ε 2 ε ~ N(0, σ ) Weight = β 0 + β1height + β 2 Age + ε Note: outcome variable must be continuous and normal given independent variables 8

9 the linear model with proc reg estimates parameters by least squares produces diagnostics to test model fit (e.g. scatter plots) tests hypotheses proc reg data=mydata; model weight = height age; proc reg Syntax: proc reg <options>; model response = effects </options>; plot yvariable*xvariable = symbol ; by varlist; output <OUT=SAS data set> <output statistic list>; proc reg proc reg statement syntax: data = SAS data set name input data set outest = SAS data set name creates data set with parameter estimates simple prints simple statistics proc reg the model statement model response=<effects></options>; required variables must be numeric many options can specify more than one model statement model weight = height age; model weight = height age / p clm cli; proc reg the plot statement plot yvariable*xvariable <=symbol> </options>; produces scatter plots - yvariable on the vertical axis and xvariable on the horizontal axis can specify several plots optional symbol to mark points yvariable and xvariable can be variables specified in model statements or statistics available in output statement plot weight * age / pred; plot r. * p. / vref = 0; proc reg some statistics available for plotting: P. predicted values R. residuals L95. lower 95% CI bound for individual prediction U95. upper 95% CI bound for individual prediction L95M. lower 95% CI bound for mean of dependent variable U95M. upper 95% CI bound for mean of dependent variable plot weight * age / pred; plot r. * p. / vref = 0; plot (weight p. l95. U95.) * age / overlay; 9

10 proc reg the output statement output <OUT=SAS data set> keywords=names; creates SAS data set all original variables included keyword=names specifies the statistics to include output out=pvals p=pred r=resid; NMES variables of interest: totalexp total medical expenditure ($) chd5 indicator of CHD lastage age at last interview male sex of participant proc reg example here: 1. model estimate parameters etc 2. plot make three plots 3. output make an output dataset regout The run statement Many people assume that the run statement ends a procedure such as proc reg. This is because when SAS encounters a run statement it executes any outstanding instructions in the program buffer. But it may or may not end the procedure. proc reg data=lecture4.nmes; model totalexp = chd5 lastage male; model totalexp = chd5 lastage; plot r.*chd5; quit; /* ends the procedure */ 10

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

Using SAS to Analyze CYP-C Data: Introduction to Procedures. Overview 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

More information

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

Level I: Getting comfortable with my data in SAS. Descriptive Statistics Level I: Getting comfortable with my data in SAS. Descriptive Statistics Quick Review of reading Data into SAS Preparing Data 1. Variable names in the first row make sure they are appropriate for the statistical

More information

INTRODUCTION to SAS STATISTICAL PACKAGE LAB 3

INTRODUCTION to SAS STATISTICAL PACKAGE LAB 3 Topics: Data step Subsetting Concatenation and Merging Reference: Little SAS Book - Chapter 5, Section 3.6 and 2.2 Online documentation Exercise I LAB EXERCISE The following is a lab exercise to give you

More information

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

Introduction to SAS. I. Understanding the basics In this section, we introduce a few basic but very helpful commands. Center for Teaching, Research and Learning Research Support Group American University, Washington, D.C. Hurst Hall 203 rsg@american.edu (202) 885-3862 Introduction to SAS Workshop Objective This workshop

More information

Introductory Guide to SAS:

Introductory Guide to SAS: Introductory Guide to SAS: For UVM Statistics Students By Richard Single Contents 1 Introduction and Preliminaries 2 2 Reading in Data: The DATA Step 2 2.1 The DATA Statement............................................

More information

Applied Regression Modeling: A Business Approach

Applied Regression Modeling: A Business Approach i Applied Regression Modeling: A Business Approach Computer software help: SAS code SAS (originally Statistical Analysis Software) is a commercial statistical software package based on a powerful programming

More information

186 Statistics, Data Analysis and Modeling. Proceedings of MWSUG '95

186 Statistics, Data Analysis and Modeling. Proceedings of MWSUG '95 A Statistical Analysis Macro Library in SAS Carl R. Haske, Ph.D., STATPROBE, nc., Ann Arbor, M Vivienne Ward, M.S., STATPROBE, nc., Ann Arbor, M ABSTRACT Statistical analysis plays a major role in pharmaceutical

More information

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

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 SAS seminar April 15, 2003 Åsa Klint The little SAS book Chapters 3 & 4 By LD Delwiche and SJ Slaughter Data step - read and modify data - create a new dataset - performs actions on rows Proc step - use

More information

SAS Training Spring 2006

SAS Training Spring 2006 SAS Training Spring 2006 Coxe/Maner/Aiken Introduction to SAS: This is what SAS looks like when you first open it: There is a Log window on top; this will let you know what SAS is doing and if SAS encountered

More information

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

Epidemiology Principles of Biostatistics Chapter 3. Introduction to SAS. John Koval Epidemiology 9509 Principles of Biostatistics Chapter 3 John Koval Department of Epidemiology and Biostatistics University of Western Ontario What we will do today We will learn to use use SAS to 1. read

More information

TYPES OF VARIABLES, STRUCTURE OF DATASETS, AND BASIC STATA LAYOUT

TYPES OF VARIABLES, STRUCTURE OF DATASETS, AND BASIC STATA LAYOUT PRIMER FOR ACS OUTCOMES RESEARCH COURSE: TYPES OF VARIABLES, STRUCTURE OF DATASETS, AND BASIC STATA LAYOUT STEP 1: Install STATA statistical software. STEP 2: Read through this primer and complete the

More information

Applied Regression Modeling: A Business Approach

Applied Regression Modeling: A Business Approach i Applied Regression Modeling: A Business Approach Computer software help: SAS SAS (originally Statistical Analysis Software ) is a commercial statistical software package based on a powerful programming

More information

22S:166. Checking Values of Numeric Variables

22S:166. Checking Values of Numeric Variables 22S:1 Computing in Statistics Lecture 24 Nov. 2, 2016 1 Checking Values of Numeric Variables range checks when you know what the range of possible values is for a given quantitative variable internal consistency

More information

Lab 1: Introduction to Data

Lab 1: Introduction to Data 1 Lab 1: Introduction to Data Some define Statistics as the field that focuses on turning information into knowledge. The first step in that process is to summarize and describe the raw information the

More information

Lab #1: Introduction to Basic SAS Operations

Lab #1: Introduction to Basic SAS Operations Lab #1: Introduction to Basic SAS Operations Getting Started: OVERVIEW OF SAS (access lab pages at http://www.stat.lsu.edu/exstlab/) There are several ways to open the SAS program. You may have a SAS icon

More information

A SAS Macro for Producing Benchmarks for Interpreting School Effect Sizes

A SAS Macro for Producing Benchmarks for Interpreting School Effect Sizes A SAS Macro for Producing Benchmarks for Interpreting School Effect Sizes Brian E. Lawton Curriculum Research & Development Group University of Hawaii at Manoa Honolulu, HI December 2012 Copyright 2012

More information

SAS: Proc GPLOT. Computing for Research I. 01/26/2011 N. Baker

SAS: Proc GPLOT. Computing for Research I. 01/26/2011 N. Baker SAS: Proc GPLOT Computing for Research I 01/26/2011 N. Baker Introduction to SAS/GRAPH Graphics component of SAS system. Includes charts, plots, and maps in both 2 and 3 dimensions. Procedures included

More information

%MAKE_IT_COUNT: An Example Macro for Dynamic Table Programming Britney Gilbert, Juniper Tree Consulting, Porter, Oklahoma

%MAKE_IT_COUNT: An Example Macro for Dynamic Table Programming Britney Gilbert, Juniper Tree Consulting, Porter, Oklahoma Britney Gilbert, Juniper Tree Consulting, Porter, Oklahoma ABSTRACT Today there is more pressure on programmers to deliver summary outputs faster without sacrificing quality. By using just a few programming

More information

EXST SAS Lab Lab #8: More data step and t-tests

EXST SAS Lab Lab #8: More data step and t-tests EXST SAS Lab Lab #8: More data step and t-tests Objectives 1. Input a text file in column input 2. Output two data files from a single input 3. Modify datasets with a KEEP statement or option 4. Prepare

More information

Intermediate SAS: Working with Data

Intermediate SAS: Working with Data Intermediate SAS: Working with Data OIT Technical Support Services 293-4444 oithelp@mail.wvu.edu oit.wvu.edu/training/classmat/sas/ Table of Contents Getting set up for the Intermediate SAS workshop:...

More information

Paper S Data Presentation 101: An Analyst s Perspective

Paper S Data Presentation 101: An Analyst s Perspective Paper S1-12-2013 Data Presentation 101: An Analyst s Perspective Deanna Chyn, University of Michigan, Ann Arbor, MI Anca Tilea, University of Michigan, Ann Arbor, MI ABSTRACT You are done with the tedious

More information

ST Lab 1 - The basics of SAS

ST Lab 1 - The basics of SAS ST 512 - Lab 1 - The basics of SAS What is SAS? SAS is a programming language based in C. For the most part SAS works in procedures called proc s. For instance, to do a correlation analysis there is proc

More information

EXST SAS Lab Lab #6: More DATA STEP tasks

EXST SAS Lab Lab #6: More DATA STEP tasks EXST SAS Lab Lab #6: More DATA STEP tasks Objectives 1. Working from an current folder 2. Naming the HTML output data file 3. Dealing with multiple observations on an input line 4. Creating two SAS work

More information

Creating Forest Plots Using SAS/GRAPH and the Annotate Facility

Creating Forest Plots Using SAS/GRAPH and the Annotate Facility PharmaSUG2011 Paper TT12 Creating Forest Plots Using SAS/GRAPH and the Annotate Facility Amanda Tweed, Millennium: The Takeda Oncology Company, Cambridge, MA ABSTRACT Forest plots have become common in

More information

Some Basics of CQUEST

Some Basics of CQUEST Some Basics of CQUEST The operating system in RW labs (107/109 and 211) is Windows XP. There are a few terminals in RW 213 running Linux. SAS is run from a Linux Server. Your account is the same and files

More information

Programming Gems that are worth learning SQL for! Pamela L. Reading, Rho, Inc., Chapel Hill, NC

Programming Gems that are worth learning SQL for! Pamela L. Reading, Rho, Inc., Chapel Hill, NC Paper CC-05 Programming Gems that are worth learning SQL for! Pamela L. Reading, Rho, Inc., Chapel Hill, NC ABSTRACT For many SAS users, learning SQL syntax appears to be a significant effort with a low

More information

Create a SAS Program to create the following files from the PREC2 sas data set created in LAB2.

Create a SAS Program to create the following files from the PREC2 sas data set created in LAB2. Topics: Data step Subsetting Concatenation and Merging Reference: Little SAS Book - Chapter 5, Section 3.6 and 2.2 Online documentation Exercise I LAB EXERCISE The following is a lab exercise to give you

More information

SAS CLINICAL SYLLABUS. DURATION: - 60 Hours

SAS CLINICAL SYLLABUS. DURATION: - 60 Hours SAS CLINICAL SYLLABUS DURATION: - 60 Hours BASE SAS PART - I Introduction To Sas System & Architecture History And Various Modules Features Variables & Sas Syntax Rules Sas Data Sets Data Set Options Operators

More information

SD10 A SAS MACRO FOR PERFORMING BACKWARD SELECTION IN PROC SURVEYREG

SD10 A SAS MACRO FOR PERFORMING BACKWARD SELECTION IN PROC SURVEYREG Paper SD10 A SAS MACRO FOR PERFORMING BACKWARD SELECTION IN PROC SURVEYREG Qixuan Chen, University of Michigan, Ann Arbor, MI Brenda Gillespie, University of Michigan, Ann Arbor, MI ABSTRACT This paper

More information

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

Stat 302 Statistical Software and Its Applications SAS: Data I/O & Descriptive Statistics Stat 302 Statistical Software and Its Applications SAS: Data I/O & Descriptive Statistics Fritz Scholz Department of Statistics, University of Washington Winter Quarter 2015 February 19, 2015 2 Getting

More information

Week 2: Frequency distributions

Week 2: Frequency distributions Types of data Health Sciences M.Sc. Programme Applied Biostatistics Week 2: distributions Data can be summarised to help to reveal information they contain. We do this by calculating numbers from the data

More information

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

CH5: CORR & SIMPLE LINEAR REFRESSION ======================================= STAT 430 SAS Examples SAS5 ===================== ssh xyz@glue.umd.edu, tap sas913 (old sas82), sas https://www.statlab.umd.edu/sasdoc/sashtml/onldoc.htm CH5: CORR & SIMPLE LINEAR REFRESSION =======================================

More information

3. Almost always use system options options compress =yes nocenter; /* mostly use */ options ps=9999 ls=200;

3. Almost always use system options options compress =yes nocenter; /* mostly use */ options ps=9999 ls=200; Randy s SAS hints, updated Feb 6, 2014 1. Always begin your programs with internal documentation. * ***************** * Program =test1, Randy Ellis, first version: March 8, 2013 ***************; 2. Don

More information

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

Stat 302 Statistical Software and Its Applications SAS: Data I/O Stat 302 Statistical Software and Its Applications SAS: Data I/O Yen-Chi Chen Department of Statistics, University of Washington Autumn 2016 1 / 33 Getting Data Files Get the following data sets from the

More information

Final Stat 302, March 17, 2014

Final Stat 302, March 17, 2014 First Name Last Name Student ID Final Stat 302, March 17, 2014 Fritz Scholz Questions 1-15 count as 4 points each, the rest as 6 points each (180 total). 1. Could Y and y refer to different objects within

More information

SPSS. (Statistical Packages for the Social Sciences)

SPSS. (Statistical Packages for the Social Sciences) Inger Persson SPSS (Statistical Packages for the Social Sciences) SHORT INSTRUCTIONS This presentation contains only relatively short instructions on how to perform basic statistical calculations in SPSS.

More information

Introduction to SAS. Cristina Murray-Krezan Research Assistant Professor of Internal Medicine Biostatistician, CTSC

Introduction to SAS. Cristina Murray-Krezan Research Assistant Professor of Internal Medicine Biostatistician, CTSC Introduction to SAS Cristina Murray-Krezan Research Assistant Professor of Internal Medicine Biostatistician, CTSC cmurray-krezan@salud.unm.edu 20 August 2018 What is SAS? Statistical Analysis System,

More information

Get into the Groove with %SYSFUNC: Generalizing SAS Macros with Conditionally Executed Code

Get into the Groove with %SYSFUNC: Generalizing SAS Macros with Conditionally Executed Code Get into the Groove with %SYSFUNC: Generalizing SAS Macros with Conditionally Executed Code Kathy Hardis Fraeman, United BioSource Corporation, Bethesda, MD ABSTRACT %SYSFUNC was originally developed in

More information

Using the Health Indicators database to help students research Canadian health issues

Using the Health Indicators database to help students research Canadian health issues Assignment Using the Health Indicators database to help students research Canadian health issues Joel Yan, Statistics Canada, joel.yan@statcan.ca, 1-800-465-1222 With input from Brenda Wannell, Health

More information

An Introduction to SAS University Edition

An Introduction to SAS University Edition An Introduction to SAS University Edition Ron Cody From An Introduction to SAS University Edition. Full book available for purchase here. Contents List of Programs... xi About This Book... xvii About the

More information

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

Want to Do a Better Job? - Select Appropriate Statistical Analysis in Healthcare Research Want to Do a Better Job? - Select Appropriate Statistical Analysis in Healthcare Research Liping Huang, Center for Home Care Policy and Research, Visiting Nurse Service of New York, NY, NY ABSTRACT The

More information

8. MINITAB COMMANDS WEEK-BY-WEEK

8. MINITAB COMMANDS WEEK-BY-WEEK 8. MINITAB COMMANDS WEEK-BY-WEEK In this section of the Study Guide, we give brief information about the Minitab commands that are needed to apply the statistical methods in each week s study. They are

More information

An Introduction to R- Programming

An Introduction to R- Programming An Introduction to R- Programming Hadeel Alkofide, Msc, PhD NOT a biostatistician or R expert just simply an R user Some slides were adapted from lectures by Angie Mae Rodday MSc, PhD at Tufts University

More information

CFB: A Programming Pattern for Creating Change from Baseline Datasets Lei Zhang, Celgene Corporation, Summit, NJ

CFB: A Programming Pattern for Creating Change from Baseline Datasets Lei Zhang, Celgene Corporation, Summit, NJ Paper TT13 CFB: A Programming Pattern for Creating Change from Baseline Datasets Lei Zhang, Celgene Corporation, Summit, NJ ABSTRACT In many clinical studies, Change from Baseline analysis is frequently

More information

WHO STEPS Surveillance Support Materials. STEPS Epi Info Training Guide

WHO STEPS Surveillance Support Materials. STEPS Epi Info Training Guide STEPS Epi Info Training Guide Department of Chronic Diseases and Health Promotion World Health Organization 20 Avenue Appia, 1211 Geneva 27, Switzerland For further information: www.who.int/chp/steps WHO

More information

Dr. Barbara Morgan Quantitative Methods

Dr. Barbara Morgan Quantitative Methods Dr. Barbara Morgan Quantitative Methods 195.650 Basic Stata This is a brief guide to using the most basic operations in Stata. Stata also has an on-line tutorial. At the initial prompt type tutorial. In

More information

IPUMS Training and Development: Requesting Data

IPUMS Training and Development: Requesting Data IPUMS Training and Development: Requesting Data IPUMS PMA Exercise 2 OBJECTIVE: Gain an understanding of how IPUMS PMA service delivery point datasets are structured and how it can be leveraged to explore

More information

Know Thy Data : Techniques for Data Exploration

Know Thy Data : Techniques for Data Exploration Know Thy Data : Techniques for Data Exploration Montreal SAS Users Group Wednesday, 29 May 2018 13:50-14:30 PM Andrew T. Kuligowski, Charu Shankar AGENDA Part 1- Easy Ways to know your data Part 2 - Powerful

More information

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

It s Proc Tabulate Jim, but not as we know it! Paper SS02 It s Proc Tabulate Jim, but not as we know it! Robert Walls, PPD, Bellshill, UK ABSTRACT PROC TABULATE has received a very bad press in the last few years. Most SAS Users have come to look on

More information

STAT:5400 Computing in Statistics

STAT:5400 Computing in Statistics STAT:5400 Computing in Statistics Introduction to SAS Lecture 18 Oct 12, 2015 Kate Cowles 374 SH, 335-0727 kate-cowles@uiowaedu SAS SAS is the statistical software package most commonly used in business,

More information

An introduction to SPSS

An introduction to SPSS An introduction to SPSS To open the SPSS software using U of Iowa Virtual Desktop... Go to https://virtualdesktop.uiowa.edu and choose SPSS 24. Contents NOTE: Save data files in a drive that is accessible

More information

Stat 5100 Handout #11.a SAS: Variations on Ordinary Least Squares

Stat 5100 Handout #11.a SAS: Variations on Ordinary Least Squares Stat 5100 Handout #11.a SAS: Variations on Ordinary Least Squares Example 1: (Weighted Least Squares) A health researcher is interested in studying the relationship between diastolic blood pressure (bp)

More information

Chapter Two: Descriptive Methods 1/50

Chapter Two: Descriptive Methods 1/50 Chapter Two: Descriptive Methods 1/50 2.1 Introduction 2/50 2.1 Introduction We previously said that descriptive statistics is made up of various techniques used to summarize the information contained

More information

Paper SDA-11. Logistic regression will be used for estimation of net error for the 2010 Census as outlined in Griffin (2005).

Paper SDA-11. Logistic regression will be used for estimation of net error for the 2010 Census as outlined in Griffin (2005). Paper SDA-11 Developing a Model for Person Estimation in Puerto Rico for the 2010 Census Coverage Measurement Program Colt S. Viehdorfer, U.S. Census Bureau, Washington, DC This report is released to inform

More information

PHPM 672/677 Lab #2: Variables & Conditionals Due date: Submit by 11:59pm Monday 2/5 with Assignment 2

PHPM 672/677 Lab #2: Variables & Conditionals Due date: Submit by 11:59pm Monday 2/5 with Assignment 2 PHPM 672/677 Lab #2: Variables & Conditionals Due date: Submit by 11:59pm Monday 2/5 with Assignment 2 Overview Most assignments will have a companion lab to help you learn the task and should cover similar

More information

There s No Such Thing as Normal Clinical Trials Data, or Is There? Daphne Ewing, Octagon Research Solutions, Inc., Wayne, PA

There s No Such Thing as Normal Clinical Trials Data, or Is There? Daphne Ewing, Octagon Research Solutions, Inc., Wayne, PA Paper HW04 There s No Such Thing as Normal Clinical Trials Data, or Is There? Daphne Ewing, Octagon Research Solutions, Inc., Wayne, PA ABSTRACT Clinical Trials data comes in all shapes and sizes depending

More information

Package mangotraining

Package mangotraining Type Package Title Mango Solutions Training Datasets Version 1.0-7 Date 2017-01-17 Package mangotraining January 17, 2017 Author Mango Solutions Maintainer Aimee Gott

More information

Intermediate SAS: Statistics

Intermediate SAS: Statistics Intermediate SAS: Statistics OIT TSS 293-4444 oithelp@mail.wvu.edu oit.wvu.edu/training/classmat/sas/ Table of Contents Procedures... 2 Two-sample t-test:... 2 Paired differences t-test:... 2 Chi Square

More information

Using PROC SQL to Generate Shift Tables More Efficiently

Using PROC SQL to Generate Shift Tables More Efficiently ABSTRACT SESUG Paper 218-2018 Using PROC SQL to Generate Shift Tables More Efficiently Jenna Cody, IQVIA Shift tables display the change in the frequency of subjects across specified categories from baseline

More information

Basic Medical Statistics Course

Basic Medical Statistics Course Basic Medical Statistics Course S0 SPSS Intro December 2014 Wilma Heemsbergen w.heemsbergen@nki.nl This Afternoon 13.00 ~ 15.00 SPSS lecture Short break Exercise 2 Database Example 3 Types of data Type

More information

Introduction. About this Document. What is SPSS. ohow to get SPSS. oopening Data

Introduction. About this Document. What is SPSS. ohow to get SPSS. oopening Data Introduction About this Document This manual was written by members of the Statistical Consulting Program as an introduction to SPSS 12.0. It is designed to assist new users in familiarizing themselves

More information

How to Go From SAS Data Sets to DATA NULL or WordPerfect Tables Anne Horney, Cooperative Studies Program Coordinating Center, Perry Point, Maryland

How to Go From SAS Data Sets to DATA NULL or WordPerfect Tables Anne Horney, Cooperative Studies Program Coordinating Center, Perry Point, Maryland How to Go From SAS Data Sets to DATA NULL or WordPerfect Tables Anne Horney, Cooperative Studies Program Coordinating Center, Perry Point, Maryland ABSTRACT Clinical trials data reports often contain many

More information

%ANYTL: A Versatile Table/Listing Macro

%ANYTL: A Versatile Table/Listing Macro Paper AD09-2009 %ANYTL: A Versatile Table/Listing Macro Yang Chen, Forest Research Institute, Jersey City, NJ ABSTRACT Unlike traditional table macros, %ANTL has only 3 macro parameters which correspond

More information

Analysis of variance and regression. November 13, 2007

Analysis of variance and regression. November 13, 2007 Analysis of variance and regression November 13, 2007 SAS language The SAS environments Reading in, data-step Summary statistics Subsetting data More on reading in, missing values Combination of data sets

More information

Analysis of variance and regression. November 13, 2007

Analysis of variance and regression. November 13, 2007 Analysis of variance and regression November 13, 2007 SAS language The SAS environments Reading in, data-step Summary statistics Subsetting data More on reading in, missing values Combination of data sets

More information

10/5/2017 MIST.6060 Business Intelligence and Data Mining 1. Nearest Neighbors. In a p-dimensional space, the Euclidean distance between two records,

10/5/2017 MIST.6060 Business Intelligence and Data Mining 1. Nearest Neighbors. In a p-dimensional space, the Euclidean distance between two records, 10/5/2017 MIST.6060 Business Intelligence and Data Mining 1 Distance Measures Nearest Neighbors In a p-dimensional space, the Euclidean distance between two records, a = a, a,..., a ) and b = b, b,...,

More information

Reading data in SAS and Descriptive Statistics

Reading data in SAS and Descriptive Statistics P8130 Recitation 1: Reading data in SAS and Descriptive Statistics Zilan Chai Sep. 18 th /20 th 2017 Outline Intro to SAS (windows, basic rules) Getting Data into SAS Descriptive Statistics SAS Windows

More information

AP Statistics Summer Assignment:

AP Statistics Summer Assignment: AP Statistics Summer Assignment: Read the following and use the information to help answer your summer assignment questions. You will be responsible for knowing all of the information contained in this

More information

Basic Medical Statistics Course

Basic Medical Statistics Course Basic Medical Statistics Course S0 SPSS Intro November 2013 Wilma Heemsbergen w.heemsbergen@nki.nl 1 13.00 ~ 15.30 Database (20 min) SPSS (40 min) Short break Exercise (60 min) This Afternoon During the

More information

PART I: USING SAS FOR THE PC AN OVERVIEW 1.0 INTRODUCTION

PART I: USING SAS FOR THE PC AN OVERVIEW 1.0 INTRODUCTION PART I: USING SAS FOR THE PC AN OVERVIEW 1.0 INTRODUCTION The statistical package SAS (Statistical Analysis System) is a large computer program specifically designed to do statistical analyses. It is very

More information

Data organization. So what kind of data did we collect?

Data organization. So what kind of data did we collect? Data organization Suppose we go out and collect some data. What do we do with it? First we need to figure out what kind of data we have. To illustrate, let s do a simple experiment and collect the height

More information

Telephone Survey Response: Effects of Cell Phones in Landline Households

Telephone Survey Response: Effects of Cell Phones in Landline Households Telephone Survey Response: Effects of Cell Phones in Landline Households Dennis Lambries* ¹, Michael Link², Robert Oldendick 1 ¹University of South Carolina, ²Centers for Disease Control and Prevention

More information

April 4, SAS General Introduction

April 4, SAS General Introduction PP 105 Spring 01-02 April 4, 2002 SAS General Introduction TA: Kanda Naknoi kanda@stanford.edu Stanford University provides UNIX computing resources for its academic community on the Leland Systems, which

More information

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

EXAMPLE 2: INTRODUCTION TO SAS AND SOME NOTES ON HOUSEKEEPING PART II - MATCHING DATA FROM RESPONDENTS AT 2 WAVES INTO WIDE FORMAT EXAMPLE 2: PART I - INTRODUCTION TO SAS AND SOME NOTES ON HOUSEKEEPING PART II - MATCHING DATA FROM RESPONDENTS AT 2 WAVES INTO WIDE FORMAT USING THESE WORKSHEETS For each of the worksheets you have a

More information

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

THE UNIVERSITY OF BRITISH COLUMBIA FORESTRY 430 and 533. Time: 50 minutes 40 Marks FRST Marks FRST 533 (extra questions) THE UNIVERSITY OF BRITISH COLUMBIA FORESTRY 430 and 533 MIDTERM EXAMINATION: October 14, 2005 Instructor: Val LeMay Time: 50 minutes 40 Marks FRST 430 50 Marks FRST 533 (extra questions) This examination

More information

Lab #3. Viewing Data in SAS. Tables in SAS. 171:161: Introduction to Biostatistics Breheny

Lab #3. Viewing Data in SAS. Tables in SAS. 171:161: Introduction to Biostatistics Breheny 171:161: Introduction to Biostatistics Breheny Lab #3 The focus of this lab will be on using SAS and R to provide you with summary statistics of different variables with a data set. We will look at both

More information

Basic Concepts #6: Introduction to Report Writing

Basic Concepts #6: Introduction to Report Writing Basic Concepts #6: Introduction to Report Writing Using By-line, PROC Report, PROC Means, PROC Freq JC Wang By-Group Processing By-group processing in a procedure step, a BY line identifies each group

More information

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

DSCI 325: Handout 10 Summarizing Numerical and Categorical Data in SAS Spring 2017 DSCI 325: Handout 10 Summarizing Numerical and Categorical Data in SAS Spring 2017 USING PROC MEANS The routine PROC MEANS can be used to obtain limited summaries for numerical variables (e.g., the mean,

More information

2.1 Objectives. Math Chapter 2. Chapter 2. Variable. Categorical Variable EXPLORING DATA WITH GRAPHS AND NUMERICAL SUMMARIES

2.1 Objectives. Math Chapter 2. Chapter 2. Variable. Categorical Variable EXPLORING DATA WITH GRAPHS AND NUMERICAL SUMMARIES EXPLORING DATA WITH GRAPHS AND NUMERICAL SUMMARIES Chapter 2 2.1 Objectives 2.1 What Are the Types of Data? www.managementscientist.org 1. Know the definitions of a. Variable b. Categorical versus quantitative

More information

Introduction to STATA

Introduction to STATA Introduction to STATA Duah Dwomoh, MPhil School of Public Health, University of Ghana, Accra July 2016 International Workshop on Impact Evaluation of Population, Health and Nutrition Programs Learning

More information

(on CQUEST) A.L. Gibbs

(on CQUEST) A.L. Gibbs STA 302 / 1001 Introduction to SAS for Regression (on CQUEST) A.L. Gibbs September 2007 1 Some Basics of CQUEST The operating system in the ESC lab (1046) is Linux. The operating system in the RW labs

More information

Tabulating Patients, Admissions and Length-of-Stay By Dx Category, Fiscal Year, County and Age Group

Tabulating Patients, Admissions and Length-of-Stay By Dx Category, Fiscal Year, County and Age Group Tabulating Patients, Admissions and Length-of-Stay By Dx Category, Fiscal Year, County and Age Group Step One: Extracting Data Use an array in a data step to search all the Dx Codes in one pass. The array

More information

SAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Module 2

SAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Module 2 SAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Department of MathemaGcs and StaGsGcs Phone: 4-3620 Office: Parker 364- A E- mail: carpedm@auburn.edu Web: hup://www.auburn.edu/~carpedm/stat6110

More information

Advanced Data Visualization using TIBCO Spotfire and SAS using SDTM. Ajay Gupta, PPD

Advanced Data Visualization using TIBCO Spotfire and SAS using SDTM. Ajay Gupta, PPD Advanced Data Visualization using TIBCO Spotfire and SAS using SDTM Ajay Gupta, PPD INTRODUCTION + TIBCO Spotfire is an analytics and business intelligence platform, which enables data visualization in

More information

Tabular & Graphical Presentation of data

Tabular & Graphical Presentation of data Tabular & Graphical Presentation of data bjectives: To know how to make frequency distributions and its importance To know different terminology in frequency distribution table To learn different graphs/diagrams

More information

Brief Guide on Using SPSS 10.0

Brief Guide on Using SPSS 10.0 Brief Guide on Using SPSS 10.0 (Use student data, 22 cases, studentp.dat in Dr. Chang s Data Directory Page) (Page address: http://www.cis.ysu.edu/~chang/stat/) I. Processing File and Data To open a new

More information

2. Don t forget semicolons and RUN statements The two most common programming errors.

2. Don t forget semicolons and RUN statements The two most common programming errors. Randy s SAS hints March 7, 2013 1. Always begin your programs with internal documentation. * ***************** * Program =test1, Randy Ellis, March 8, 2013 ***************; 2. Don t forget semicolons and

More information

Introduction to SAS: General

Introduction to SAS: General Spring 2019 CJ Anderson Introduction to SAS: General Go to course web-site and click on hsb-datasas There are 5 main working environments (windows) in SAS: Explorer window: Lets you view data in SAS data

More information

STAT 7000: Experimental Statistics I

STAT 7000: Experimental Statistics I STAT 7000: Experimental Statistics I 2. A Short SAS Tutorial Peng Zeng Department of Mathematics and Statistics Auburn University Fall 2009 Peng Zeng (Auburn University) STAT 7000 Lecture Notes Fall 2009

More information

Preparing for Data Analysis

Preparing for Data Analysis Preparing for Data Analysis Prof. Andrew Stokes March 21, 2017 Managing your data Entering the data into a database Reading the data into a statistical computing package Checking the data for errors and

More information

STAT 503 Fall Introduction to SAS

STAT 503 Fall Introduction to SAS Getting Started Introduction to SAS 1) Download all of the files, sas programs (.sas) and data files (.dat) into one of your directories. I would suggest using your H: drive if you are using a computer

More information

STA 570 Spring Lecture 5 Tuesday, Feb 1

STA 570 Spring Lecture 5 Tuesday, Feb 1 STA 570 Spring 2011 Lecture 5 Tuesday, Feb 1 Descriptive Statistics Summarizing Univariate Data o Standard Deviation, Empirical Rule, IQR o Boxplots Summarizing Bivariate Data o Contingency Tables o Row

More information

A SAS Macro for Covariate Specification in Linear, Logistic, or Survival Regression

A SAS Macro for Covariate Specification in Linear, Logistic, or Survival Regression Paper 1223-2017 A SAS Macro for Covariate Specification in Linear, Logistic, or Survival Regression Sai Liu and Margaret R. Stedman, Stanford University; ABSTRACT Specifying the functional form of a covariate

More information

STATA 13 INTRODUCTION

STATA 13 INTRODUCTION STATA 13 INTRODUCTION Catherine McGowan & Elaine Williamson LONDON SCHOOL OF HYGIENE & TROPICAL MEDICINE DECEMBER 2013 0 CONTENTS INTRODUCTION... 1 Versions of STATA... 1 OPENING STATA... 1 THE STATA

More information

Tools to Facilitate the Creation of Pooled Clinical Trials Databases

Tools to Facilitate the Creation of Pooled Clinical Trials Databases Paper AD10 Tools to Facilitate the Creation of Pooled Clinical Trials Databases Patricia Majcher, Johnson & Johnson Pharmaceutical Research & Development, L.L.C., Raritan, NJ ABSTRACT Data collected from

More information

Methods for Estimating Change from NSCAW I and NSCAW II

Methods for Estimating Change from NSCAW I and NSCAW II Methods for Estimating Change from NSCAW I and NSCAW II Paul Biemer Sara Wheeless Keith Smith RTI International is a trade name of Research Triangle Institute 1 Course Outline Review of NSCAW I and NSCAW

More information

Experimental epidemiology analyses with R and R commander. Lars T. Fadnes Centre for International Health University of Bergen

Experimental epidemiology analyses with R and R commander. Lars T. Fadnes Centre for International Health University of Bergen Experimental epidemiology analyses with R and R commander Lars T. Fadnes Centre for International Health University of Bergen 1 Click to add an outline 2 How to install R commander? - install.packages("rcmdr",

More information

Exam Questions A00-281

Exam Questions A00-281 Exam Questions A00-281 SAS Certified Clinical Trials Programmer Using SAS 9 Accelerated Version https://www.2passeasy.com/dumps/a00-281/ 1.Given the following data at WORK DEMO: Which SAS program prints

More information

(on CQUEST) A.L. Gibbs

(on CQUEST) A.L. Gibbs STA 302 / 1001 Introduction to SAS for Regression (on CQUEST) A.L. Gibbs September 2009 1 Some Basics of CQUEST The operating system in the RW labs (107/109 and 211) is Windows XP. There are a few terminals

More information

AND NUMERICAL SUMMARIES. Chapter 2

AND NUMERICAL SUMMARIES. Chapter 2 EXPLORING DATA WITH GRAPHS AND NUMERICAL SUMMARIES Chapter 2 2.1 What Are the Types of Data? 2.1 Objectives www.managementscientist.org 1. Know the definitions of a. Variable b. Categorical versus quantitative

More information