MULTI-WAY TABLES IN REPORT

Size: px
Start display at page:

Download "MULTI-WAY TABLES IN REPORT"

Transcription

1 MULTI-WAY TABLES IN REPORT

2 Consider The following PROC REPORT: proc format; value smk 0='Never Smoked' 1='Currently Smoke' 2='Stopped at Pregnancy' 3='Stopped Before Current Pregnancy' 9='Unknown' ; value gest low-<259='premature' 259-<999='Normal' 999='Unknown' ; options nodate nonumber; Title 'Birthweight Summaries'; proc report data=mysas.birthweight nowd headline headskip; where smoke ne 9 and gestation lt 999; column smoke gestation birth_wt; define smoke/format=smk. 'Smoking Status' group order=internal; define gestation/format=gest. 'Delivery' group; define birth_wt/ n width=15 'Number'; break after smoke/summarize skip suppress ol;

3 Continued Produces:

4 Two-Way Table Suppose I wanted to display the birth status across two columns I can achieve this by specifying that the birth_wt variable be nested under gestation (using the comma as an operator) which is displayed using the across option in its define statement: proc report data=mysas.birthweight nowd headline headskip; where smoke ne 9 and gestation lt 999; column smoke gestation,birth_wt; define smoke/format=smk. 'Smoking Status' group order=internal; define gestation/format=gest. '_Delivery_/ ' across; define birth_wt/ n width=15 ' ';

5 Two-Way Table Suppose I wanted to display the birth status across two columns I can achieve this by specifying that the birth_wt variable be nested under gestation (using the comma as an operator) which is displayed using the across option in its define statement: proc report data=mysas.birthweight nowd headline headskip; where smoke ne 9 and gestation lt 999; column smoke gestation,birth_wt; define smoke/format=smk. 'Smoking Status' group order=internal; define gestation/format=gest. '_Delivery_/ ' across; define birth_wt/ n width=15 ' '; The / operator in a label forces a line break. The _ at either end inserts a spanning line

6 Result

7 Additions Suppose I want a column summary for each as a final row in the table. RBREAK will still give a full report summary, so add: rbreak after/summarize ol; To get:

8 Result

9 More Additions Suppose I want row totals as an extra column in the table. Consider these modifications: proc report data=mysas.birthweight nowd headline; where smoke ne 9 and gestation lt 999; column smoke gestation,birth_wt birth_wt=num; define smoke/format=smk. 'Smoking Status' group order=internal; define gestation/format=gest. '_Delivery_/' across; define birth_wt/ n width=15 ' '; define num/n 'Total'; rbreak after/summarize ol;

10 More Additions Suppose I want row totals as an extra column in the table. Consider these modifications: proc report data=mysas.birthweight nowd headline; where smoke ne 9 and gestation lt 999; column smoke gestation,birth_wt birth_wt=num; define smoke/format=smk. 'Smoking Status' group order=internal; define gestation/format=gest. '_Delivery_/' across; define birth_wt/ n width=15 ' '; define num/n 'Total'; rbreak after/summarize ol; Add a column and give it an appropriate definition.

11 Result This is not directly totaling in each row, it is an independent column definition that happens to do what we want...

12 Multiple Statistic Columns It is possible to display multiple statistics in the across format. Consider: options nodate nonumber ls=140; Title 'Birthweight Summaries'; proc report data=mysas.birthweight nowd headline; where smoke ne 9 and gestation lt 999; column smoke gestation,(birth_wt=num birth_wt=avg birth_wt=med birth_wt=sd); define smoke/format=smk. 'Smoking Status' group order=internal; define gestation/format=gest. '_Delivery Status_/ ' across; define num/ n 'N'; define avg/ mean 'Mean' format=10.1; define med/ median 'Median' format=10.1; define sd/ std 'Std. Deviation' format=10.1;

13 Multiple Statistic Columns It is possible to display multiple statistics in the across format. Consider: options nodate nonumber ls=140; Title 'Birthweight Summaries'; proc report data=mysas.birthweight nowd headline; where smoke ne 9 and gestation lt 999; column smoke gestation,(birth_wt=num birth_wt=avg birth_wt=med birth_wt=sd); define smoke/format=smk. 'Smoking Status' group order=internal; define gestation/format=gest. '_Delivery Status_/ ' across; define num/ n 'N'; define avg/ mean 'Mean' format=10.1; define med/ median 'Median' format=10.1; define sd/ std 'Std. Deviation' format=10.1; Nest the statistics you want (note aliasing) with parentheses and the comma operator.

14 Multiple Statistic Columns It is possible to display multiple statistics in the across format. Consider: options nodate nonumber ls=140; Title 'Birthweight Summaries'; proc report data=mysas.birthweight nowd headline; where smoke ne 9 and gestation lt 999; column smoke gestation,(birth_wt=num birth_wt=avg birth_wt=med birth_wt=sd); define smoke/format=smk. 'Smoking Status' group order=internal; define gestation/format=gest. '_Delivery Status_/ ' across; define num/ n 'N'; define avg/ mean 'Mean' format=10.1; define med/ median 'Median' format=10.1; define sd/ std 'Std. Deviation' format=10.1; Put in proper definitions for the stats you want.

15 Result

16 Larger Tables Consider the following report: proc format; value lake 1='Oligotrophic' 2='Eutrophic' 3='Mesotrophic' ; value dam 0='No' 1='Yes' ; value merc low-<.5='acceptable'.5-1='dangerous' 1<-high='Toxic' ; options ls=120 nonumber nodate; Title 'Median Elevations'; proc report data=mysas.fish nowd headline; column lt hg dam elv; define lt/ format=lake. group; define dam/format=dam. group width=8; define hg/ format=merc. group 'Mercury Level'; define elv/ median 'Median Elevation' format=9.1; break after lt/summarize skip suppress ol; break after hg/skip ;

17 Result

18 Convert a Group Variable to Columns Let s put the dam variable across the columns: proc report data=mysas.fish nowd headline; column lt hg dam,elv; define lt/ format=lake. group; define dam/format=dam. across width=8 '_Dam_/ ' ; define hg/ format=merc. group 'Mercury Level'; define elv/ median '' format=9.1; break after lt/summarize skip suppress ol;

19 Convert a Group Variable to Columns Let s put the dam variable across the columns: proc report data=mysas.fish nowd headline; column lt hg dam,elv; define lt/ format=lake. group; define dam/format=dam. across width=8 '_Dam_/ ' ; define hg/ format=merc. group 'Mercury Level'; define elv/ median '' format=9.1; break after lt/summarize skip suppress ol;

20 Result

21 Putting in Overall Summaries Consider: proc report data=mysas.fish nowd headline; column lt hg dam,elv elv=med; define lt/ format=lake. group; define dam/format=dam. across width=8 '_Dam_/ ' ; define hg/ format=merc. group 'Mercury Level'; define elv/ median '' format=9.1; define med/median 'Overall Median' format=9.1; break after lt/summarize skip suppress ol; rbreak after/summarize dol;

22 Putting in Overall Summaries Consider: proc report data=mysas.fish nowd headline; column lt hg dam,elv elv=med; define lt/ format=lake. group; define dam/format=dam. across width=8 '_Dam_/ ' ; define hg/ format=merc. group 'Mercury Level'; define elv/ median '' format=9.1; define med/median 'Overall Median' format=9.1; break after lt/summarize skip suppress ol; rbreak after/summarize dol; Add a summary column Add a summary row

23 Result

24 Multiple Statistics Consider proc report data=mysas.fish nowd headline; column lt hg dam,(elv=lowelv elv=midelv elv=highelv); define lt/ format=lake. group; define dam/format=dam. across width=8 '_Dam_/ '; define hg/ format=merc. group 'Mercury Level'; define lowelv/ min ' /Min.' format=9.1; define midelv/ median ' /Median' format=9.1; define highelv/max ' /Max.' format=9.1; break after lt/summarize skip suppress ol;

25 Multiple Statistics Consider proc report data=mysas.fish nowd headline; column lt hg dam,(elv=lowelv elv=midelv elv=highelv); define lt/ format=lake. group; define dam/format=dam. across width=8 '_Dam_/ '; define hg/ format=merc. group 'Mercury Level'; define lowelv/ min ' /Min.' format=9.1; define midelv/ median ' /Median' format=9.1; define highelv/max ' /Max.' format=9.1; break after lt/summarize skip suppress ol; Note use of / operator in labels for statistic columns

26 Result

27 Multiple Column Variables Consider: options ls=120 nonumber nodate; Title 'Median Elevations'; proc report data=mysas.fish nowd headline; column lt hg,dam,elv; define lt/ format=lake. group; define dam/format=dam. across width=8 ' /_Dam_/ '; define hg/ format=merc. across '=Mercury Level=/ '; define elv/ median '' format=9.1;

28 Result

29 Exercise 1 From the projects data set, create:

30 Exercise 2 (Also from Projects)

Compute Blocks in Report

Compute Blocks in Report Compute Blocks in Report Compute Blocks Though it is always possible to compute new variables inside a data step, PROC REPORT allows for similar computations to be done internally as well. Computations

More information

SAS Programming Basics

SAS Programming Basics SAS Programming Basics SAS Programs SAS Programs consist of three major components: Global statements Procedures Data steps SAS Programs Global Statements Procedures Data Step Notes Data steps and procedures

More information

Formats and the Format Procedure

Formats and the Format Procedure Formats and the Format Procedure Assigning Formats for Display While labels are used to change how a variable name is displayed, formats are used to change how data values are displayed. Formats are assigned

More information

More with SQL Queries. Advanced SAS Programming

More with SQL Queries. Advanced SAS Programming More with SQL Queries Advanced SAS Programming Some PROC SQL Options Options available in the PROC SQL statement FEEDBACK(NOFEEDBACK): provides more detailed information in the SAS log. FLOW(noflow):

More information

PROC REPORT Basics: Getting Started with the Primary Statements

PROC REPORT Basics: Getting Started with the Primary Statements Paper HOW07 PROC REPORT Basics: Getting Started with the Primary Statements Arthur L. Carpenter California Occidental Consultants, Oceanside, California ABSTRACT The presentation of data is an essential

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

PROC REPORT AN INTRODUCTION

PROC REPORT AN INTRODUCTION Table Generation Using the PROC REPORT Feature Edward R. Smith, Senior Scientific Programmer Covance Periapproval Services Inc, Radnor, PA ABSTRACT The PROC REPORT procedure is a powerful report generation

More information

Compute; Your Future with Proc Report

Compute; Your Future with Proc Report Paper PO10 Compute; Your Future with Proc Report Ian J Dixon, GlaxoSmithKline, Harlow, UK Suzanne E Johnes, GlaxoSmithKline, Harlow, UK ABSTRACT PROC REPORT is widely used within the pharmaceutical industry

More information

The REPORT Procedure CHAPTER 32

The REPORT Procedure CHAPTER 32 859 CHAPTER 32 The REPORT Procedure Overview 861 Types of Reports 861 A Sampling of Reports 861 Concepts 866 Laying Out a Report 866 Usage of Variables in a Report 867 Display Variables 867 Order Variables

More information

Introduction to the SAS Macro Facility

Introduction to the SAS Macro Facility Introduction to the SAS Macro Facility Uses for SAS Macros The macro language allows for programs that are dynamic capable of selfmodification. The major components of the macro language include: Macro

More information

Remove this where. statement to produce the. report on the right with all 4 regions. Retain this where. statement to produce the

Remove this where. statement to produce the. report on the right with all 4 regions. Retain this where. statement to produce the Problem 4, Chapter 14, Ex. 2. Using the SAS sales data set, create the report shown in the text. Note: The report shown in the text for this question, contains only East & West region data. However, the

More information

Package distdichor. R topics documented: September 24, Type Package

Package distdichor. R topics documented: September 24, Type Package Type Package Package distdichor September 24, 2018 Title Distributional Method for the Dichotomisation of Continuous Outcomes Version 0.1-1 Author Odile Sauzet Maintainer Odile Sauzet

More information

EXAMPLES OF DATA LISTINGS AND CLINICAL SUMMARY TABLES USING PROC REPORT'S BATCH LANGUAGE

EXAMPLES OF DATA LISTINGS AND CLINICAL SUMMARY TABLES USING PROC REPORT'S BATCH LANGUAGE EXAMPLES OF DATA LISTINGS AND CLINICAL SUMMARY TABLES USING PROC REPORT'S BATCH LANGUAGE Rob Hoffman Hoffmann-La Roche, Inc. Abstract PROC REPORT Is a powerful report writing tool which can easily create

More information

Advanced PROC REPORT: Doing More in the Compute Block

Advanced PROC REPORT: Doing More in the Compute Block Paper TU02 Advanced PROC REPORT: Doing More in the Compute Block Arthur L. Carpenter California Occidental Consultants ABSTRACT One of the unique features of the REPORT procedure is the Compute Block.

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

So You're Still Not Using PROC REPORT. Why Not?

So You're Still Not Using PROC REPORT. Why Not? Paper 149-26 So You're Still Not Using PROC REPORT. Why Not? Ray Pass, Ray Pass Consulting Daphne Ewing, Synteract, Inc. ABSTRACT Everyone who can spell SAS knows how to use PROC PRINT. Its primary use

More information

Formatting Highly Detailed Reports: Eye-Friendly, Insight-Facilitating

Formatting Highly Detailed Reports: Eye-Friendly, Insight-Facilitating L.Fine Formatting Highly Detailed Reports 1 Formatting Highly Detailed Reports: Eye-Friendly, Insight-Facilitating Lisa Fine, United BioSource Corporation Introduction Consider a highly detailed report

More information

Introductory SAS example

Introductory SAS example Introductory SAS example STAT:5201 1 Introduction SAS is a command-driven statistical package; you enter statements in SAS s language, submit them to SAS, and get output. A fairly friendly user interface

More information

10 The First Steps 4 Chapter 2

10 The First Steps 4 Chapter 2 9 CHAPTER 2 Examples The First Steps 10 Invoking the Query Window 11 Changing Your Profile 11 ing a Table 13 ing Columns 14 Alias Names and Labels 14 Column Format 16 Creating a WHERE Expression 17 Available

More information

Automated Macros to Extract Data from the National (Nationwide) Inpatient Sample (NIS)

Automated Macros to Extract Data from the National (Nationwide) Inpatient Sample (NIS) Paper 3327-2015 Automated Macros to Extract Data from the National (Nationwide) Inpatient Sample (NIS) Ravi Gaddameedi, California State University, Eastbay, CA; Usha Kreaden, Intuitive Surgical, Sunnyvale,

More information

Doing Math: Scientific Notation Scientific notation is a way to show (and do math with) very small or very large numbers b 10 c

Doing Math: Scientific Notation Scientific notation is a way to show (and do math with) very small or very large numbers b 10 c Doing Math: Scientific Notation Scientific notation is a way to show (and do math with) very small or very large numbers b 10 c b = a decimal number between 1.0 and 9.99... c =anexponentof10 Example: 1.53

More information

Practically Perfect Presentations Cynthia L. Zender, SAS Institute, Inc., Cary, NC

Practically Perfect Presentations Cynthia L. Zender, SAS Institute, Inc., Cary, NC SCSUG2011-S07 Practically Perfect Presentations Cynthia L. Zender, SAS Institute, Inc., Cary, NC ABSTRACT PROC REPORT is a powerful reporting procedure, whose output can be "practically perfect" when you

More information

Introduction to Software Testing Chapter 2.3 Graph Coverage for Source Code. Paul Ammann & Jeff Offutt

Introduction to Software Testing Chapter 2.3 Graph Coverage for Source Code. Paul Ammann & Jeff Offutt Introduction to Software Testing Chapter 2.3 Graph Coverage for Source Code Paul Ammann & Jeff Offutt Overview The most common application of graph criteria is to program source Graph : Usually the control

More information

Let s go through some examples of applying the normal distribution in practice.

Let s go through some examples of applying the normal distribution in practice. Let s go through some examples of applying the normal distribution in practice. 1 We will work with gestation period of domestic cats. Suppose that the length of pregnancy in cats (which we will denote

More information

Enhancements to Basic Patient Profiles Scott Burroughs, GlaxoSmithKline, Research Triangle Park, NC

Enhancements to Basic Patient Profiles Scott Burroughs, GlaxoSmithKline, Research Triangle Park, NC ABSTRACT PharmaSUG2013 Paper BB04 Enhancements to Basic Patient Profiles Scott Burroughs, GlaxoSmithKline, Research Triangle Park, NC Patient Data Viewers are becoming more prevalent in the pharmaceutical

More information

Final Exam. STT 305 Summer 2017

Final Exam. STT 305 Summer 2017 Final Exam STT 305 Summer 2017 Question 1 For the text file and code given at the right, which is the correct data set? Answer A Here Answer B Here Figure Answer C Here No data set is produced, the input

More information

Using PROC REPORT to Cross-Tabulate Multiple Response Items Patrick Thornton, SRI International, Menlo Park, CA

Using PROC REPORT to Cross-Tabulate Multiple Response Items Patrick Thornton, SRI International, Menlo Park, CA Using PROC REPORT to Cross-Tabulate Multiple Response Items Patrick Thornton, SRI International, Menlo Park, CA ABSTRACT This paper describes for an intermediate SAS user the use of PROC REPORT to create

More information

SAS Macros for Grouping Count and Its Application to Enhance Your Reports

SAS Macros for Grouping Count and Its Application to Enhance Your Reports SAS Macros for Grouping Count and Its Application to Enhance Your Reports Shi-Tao Yeh, EDP Contract Services, Bala Cynwyd, PA ABSTRACT This paper provides two SAS macros, one for one grouping variable,

More information

Justina M. Flavin, Synteract, Inc.

Justina M. Flavin, Synteract, Inc. Using PROC REPORT to Summarize Clinical Safety Data Justina M. Flavin, Synteract, Inc. ABSTRACT By using the summary and display features available In PROC REPORT, the amount of code needed to generate

More information

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

BY S NOTSORTED OPTION Karuna Samudral, Octagon Research Solutions, Inc., Wayne, PA Gregory M. Giddings, Centocor R&D Inc. ABSTRACT BY S NOTSORTED OPTION Karuna Samudral, Octagon Research Solutions, Inc., Wayne, PA Gregory M. Giddings, Centocor R&D Inc., Malvern, PA What if the usual sort and usual group processing would eliminate

More information

USING DATA TO SET MACRO PARAMETERS

USING DATA TO SET MACRO PARAMETERS USING DATA TO SET MACRO PARAMETERS UPDATE A PREVIOUS EXAMPLE %macro report(regs=); %let r=1; %let region=%scan(&regs,&r); %do %until(&region eq ); options nodate pageno=1; ods pdf file="&region..pdf";

More information

Paper DM07. An Animated Guide: Comparing Files without Proc Compare Alejandro Jaramillo (Data Means Corp) and Russ Lavery contractor

Paper DM07. An Animated Guide: Comparing Files without Proc Compare Alejandro Jaramillo (Data Means Corp) and Russ Lavery contractor Paper DM07 An Animated Guide: Comparing Files without Proc Compare Alejandro Jaramillo (Data Means Corp) and Russ Lavery contractor ABSTRACT This paper provides an easy to understand SAS-based programmed

More information

EGR 111 Loops. This lab is an introduction to loops, which allow MATLAB to repeat commands a certain number of times.

EGR 111 Loops. This lab is an introduction to loops, which allow MATLAB to repeat commands a certain number of times. EGR 111 Loops This lab is an introduction to loops, which allow MATLAB to repeat commands a certain number of times. New MATLAB commands: for, while,, length 1. The For Loop Suppose we want print a statement

More information

Boxplots. Lecture 17 Section Robb T. Koether. Hampden-Sydney College. Wed, Feb 10, 2010

Boxplots. Lecture 17 Section Robb T. Koether. Hampden-Sydney College. Wed, Feb 10, 2010 Boxplots Lecture 17 Section 5.3.3 Robb T. Koether Hampden-Sydney College Wed, Feb 10, 2010 Robb T. Koether (Hampden-Sydney College) Boxplots Wed, Feb 10, 2010 1 / 34 Outline 1 Boxplots TI-83 Boxplots 2

More information

Christopher Toppe, Ph.D. Computer Sciences Corporation

Christopher Toppe, Ph.D. Computer Sciences Corporation An Introduction to PROC TABULATE: A Hands-On Workshop Christopher Toppe, Ph.D. Computer Sciences Corporation Abstract The Tabulate procedure is, along with PROC REPORT, one of the most powerful and difficult

More information

BEYOND FORMAT BASICS 1

BEYOND FORMAT BASICS 1 BEYOND FORMAT BASICS 1 CNTLIN DATA SETS...LABELING VALUES OF VARIABLE One common use of a format in SAS is to assign labels to values of a variable. The rules for creating a format with PROC FORMAT are

More information

Simulating Multivariate Normal Data

Simulating Multivariate Normal Data Simulating Multivariate Normal Data You have a population correlation matrix and wish to simulate a set of data randomly sampled from a population with that structure. I shall present here code and examples

More information

Using V9 ODS LAYOUT to Simplify Generation of Individual Case Summaries Ling Y. Chen, Rho, Inc., Newton, MA

Using V9 ODS LAYOUT to Simplify Generation of Individual Case Summaries Ling Y. Chen, Rho, Inc., Newton, MA Paper PO02 Using V9 ODS LAYOUT to Simplify Generation of Individual Case Summaries Ling Y. Chen, Rho, Inc., Newton, MA ABSTRACT Up until now, individual case summaries involve complicated data _null_ coding

More information

Tips and Tricks to Create In-text Tables in Clinical Trial Repor6ng Using SAS

Tips and Tricks to Create In-text Tables in Clinical Trial Repor6ng Using SAS Tips and Tricks to Create In-text Tables in Clinical Trial Repor6ng Using SAS By Rafi Rahi - by Murshed Siddick 1 Overview In-text tables in CTR Produc

More information

Minitab Notes for Activity 1

Minitab Notes for Activity 1 Minitab Notes for Activity 1 Creating the Worksheet 1. Label the columns as team, heat, and time. 2. Have Minitab automatically enter the team data for you. a. Choose Calc / Make Patterned Data / Simple

More information

n Group of statements that are executed repeatedly while some condition remains true

n Group of statements that are executed repeatedly while some condition remains true Looping 1 Loops n Group of statements that are executed repeatedly while some condition remains true n Each execution of the group of statements is called an iteration of the loop 2 Example counter 1,

More information

Go Ahead and _BREAK_-down: Advanced COMPUTE Block Examples

Go Ahead and _BREAK_-down: Advanced COMPUTE Block Examples Paper SAS431-2017 Go Ahead and _BREAK_-down: Advanced COMPUTE Block Examples Cynthia Zender, SAS Institute Inc. ABSTRACT When you look at examples of the REPORT procedure, you see code that tests _BREAK_

More information

Any Integer Can Be Written as a Fraction

Any Integer Can Be Written as a Fraction All fractions have three parts: a numerator, a denominator, and a division symbol. In the simple fraction, the numerator and the denominator are integers. Eample 1: Find the numerator, denominator, and

More information

Data Analysis and Hypothesis Testing Using the Python ecosystem

Data Analysis and Hypothesis Testing Using the Python ecosystem ARISTOTLE UNIVERSITY OF THESSALONIKI Data Analysis and Hypothesis Testing Using the Python ecosystem t-test & ANOVAs Stavros Demetriadis Assc. Prof., School of Informatics, Aristotle University of Thessaloniki

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

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

Introduction to SAS Procedures SAS Basics III. Susan J. Slaughter, Avocet Solutions Introduction to SAS Procedures SAS Basics III Susan J. Slaughter, Avocet Solutions DATA versus PROC steps Two basic parts of SAS programs DATA step PROC step Begin with DATA statement Begin with PROC statement

More information

CS 105 Lecture 5 Logical Operators; Switch Statement. Wed, Feb 16, 2011, 5:11 pm

CS 105 Lecture 5 Logical Operators; Switch Statement. Wed, Feb 16, 2011, 5:11 pm CS 105 Lecture 5 Logical Operators; Switch Statement Wed, Feb 16, 2011, 5:11 pm 1 16 quizzes taken Average: 37.9 Median: 40.5 Quiz 1 Results 16 Scores: 45 45 44 43 43 42 41 41 40 36 36 36 34 31 28 21 Avg

More information

Databases II: Microsoft Access

Databases II: Microsoft Access Recapitulation Databases II: Microsoft Access CS111, 2016 A database is a collection of data that is systematically organized, so as to allow efficient addition, modification, removal and retrieval. A

More information

MATH NATION SECTION 9 H.M.H. RESOURCES

MATH NATION SECTION 9 H.M.H. RESOURCES MATH NATION SECTION 9 H.M.H. RESOURCES SPECIAL NOTE: These resources were assembled to assist in student readiness for their upcoming Algebra 1 EOC. Although these resources have been compiled for your

More information

The Beauty of OUT2HTM with Proc Report David Steves, Suntrust Banks Inc., Atlanta, Georgia U.S.A.

The Beauty of OUT2HTM with Proc Report David Steves, Suntrust Banks Inc., Atlanta, Georgia U.S.A. Paper P316 The Beauty of OUT2HTM with Proc Report David Steves, Suntrust Banks Inc., Atlanta, Georgia U.S.A. ABSTRACT Using Proc Reports to Create HTML pages via % OUT2HTM is very easy. This paper describes

More information

Writing Reports with the

Writing Reports with the Writing Reports with the SAS System s TABULATE Procedure or Big Money Proc Tabulate Ben Cochran The Bedford Group bencochran@nc.rr.com Writing Reports with the SAS System s TABULATE Procedure Copyright

More information

An Introduction to PROC REPORT

An Introduction to PROC REPORT Paper BB-276 An Introduction to PROC REPORT Kirk Paul Lafler, Software Intelligence Corporation, Spring Valley, California Abstract SAS users often need to create and deliver quality custom reports and

More information

EXST3201 Mousefeed01 Page 1

EXST3201 Mousefeed01 Page 1 EXST3201 Mousefeed01 Page 1 3 /* 4 Examine differences among the following 6 treatments 5 N/N85 fed normally before weaning and 85 kcal/wk after 6 N/R40 fed normally before weaning and 40 kcal/wk after

More information

Validation Summary using SYSINFO

Validation Summary using SYSINFO Validation Summary using SYSINFO Srinivas Vanam Mahipal Vanam Shravani Vanam Percept Pharma Services, Bridgewater, NJ ABSTRACT This paper presents a macro that produces a Validation Summary using SYSINFO

More information

Lab 1 - Worksheet Spring 2013

Lab 1 - Worksheet Spring 2013 Math 300 UMKC Lab 1 - Worksheet Spring 2013 Learning Objectives: 1. How to use Matlab as a calculator 2. Learn about Matlab built in functions 3. Matrix and Vector arithmetics 4. MATLAB rref command 5.

More information

Configuring Active Latency Monitoring

Configuring Active Latency Monitoring This chapter contains the following sections: Active Latency Monitoring Overview, page 1 Active Latency Monitoring Guidelines and Limitations, page 1, page 2 Show Examples for Active Latency Monitoring,

More information

Phase-III Macro System

Phase-III Macro System Paper AD09 Phase-III Macro System Wolf-Dieter Batz, Phenix-MTK, Kelkheim, Germany ABSTRACT The Phase-III Macro System is a flexible, data independent and parameter controlled set of SAS macros. Module

More information

FORM 1 (Please put your name and form # on the scantron!!!!) CS 161 Exam I: True (A)/False(B) (2 pts each):

FORM 1 (Please put your name and form # on the scantron!!!!) CS 161 Exam I: True (A)/False(B) (2 pts each): FORM 1 (Please put your name and form # on the scantron!!!!) CS 161 Exam I: True (A)/False(B) (2 pts each): 1. The basic commands that a computer performs are input (get data), output (display result),

More information

5. Assuming gooddata is a Boolean variable, the following two tests are logically equivalent. if (gooddata == false) if (!

5. Assuming gooddata is a Boolean variable, the following two tests are logically equivalent. if (gooddata == false) if (! FORM 2 (Please put your name and form # on the scantron!!!!) CS 161 Exam I: True (A)/False(B) (2 pts each): 1. Assume that all variables are properly declared. The following for loop executes 20 times.

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

Name Geometry Intro to Stats. Find the mean, median, and mode of the data set. 1. 1,6,3,9,6,8,4,4,4. Mean = Median = Mode = 2.

Name Geometry Intro to Stats. Find the mean, median, and mode of the data set. 1. 1,6,3,9,6,8,4,4,4. Mean = Median = Mode = 2. Name Geometry Intro to Stats Statistics are numerical values used to summarize and compare sets of data. Two important types of statistics are measures of central tendency and measures of dispersion. A

More information

Microsoft Excel PivotTables & PivotCharts

Microsoft Excel PivotTables & PivotCharts PivotTables PivotTables can be a powerful way to analyze data in Excel. As with all data functions in Excel, it is key that you have your data set up properly. Don't skip rows (just to make it look nice)

More information

EGR 111 Loops. This lab is an introduction to loops, which allow MATLAB to repeat commands a certain number of times.

EGR 111 Loops. This lab is an introduction to loops, which allow MATLAB to repeat commands a certain number of times. EGR 111 Loops This lab is an introduction to loops, which allow MATLAB to repeat commands a certain number of times. New MATLAB commands: for, while,, length 1. The For Loop Suppose we want print a statement

More information

Econ 3790: Business and Economics Statistics. Instructor: Yogesh Uppal

Econ 3790: Business and Economics Statistics. Instructor: Yogesh Uppal Econ 3790: Business and Economics Statistics Instructor: Yogesh Uppal Email: yuppal@ysu.edu Chapter 8: Interval Estimation Population Mean: Known Population Mean: Unknown Margin of Error and the Interval

More information

Name Section: M/W or T/TH. True or False (14 Points)

Name Section: M/W or T/TH. True or False (14 Points) Name Section: M/W or T/TH True or False (14 Points) 1. (14 pts) Circle T for true and F for false: T F a) In C++, a function definition should not be nested within another function definition. T F b) Static

More information

International Graduate School of Genetic and Molecular Epidemiology (GAME) Computing Notes and Introduction to Stata

International Graduate School of Genetic and Molecular Epidemiology (GAME) Computing Notes and Introduction to Stata International Graduate School of Genetic and Molecular Epidemiology (GAME) Computing Notes and Introduction to Stata Paul Dickman September 2003 1 A brief introduction to Stata Starting the Stata program

More information

Christopher Louden University of Texas Health Science Center at San Antonio

Christopher Louden University of Texas Health Science Center at San Antonio Christopher Louden University of Texas Health Science Center at San Antonio Overview of Macro Language Report Writing The REPORT procedure The Output Delivery System (ODS) Macro Examples Utility Macros

More information

Statistical Tests for Variable Discrimination

Statistical Tests for Variable Discrimination Statistical Tests for Variable Discrimination University of Trento - FBK 26 February, 2015 (UNITN-FBK) Statistical Tests for Variable Discrimination 26 February, 2015 1 / 31 General statistics Descriptional:

More information

ZERO MY HERO! Getting those zeroes on your PROC REPORT or PROC TABULATE tables!!

ZERO MY HERO! Getting those zeroes on your PROC REPORT or PROC TABULATE tables!! ZERO MY HERO! Getting those zeroes on your PROC REPORT or PROC TABULATE tables!! Anna Vincent Research Specialist Data Management Center for Health Statistics Texas Dept. of State Health Services Here

More information

Dept. of CSE, IIT KGP

Dept. of CSE, IIT KGP Control Flow: Looping CS10001: Programming & Data Structures Pallab Dasgupta Professor, Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur Types of Repeated Execution Loop: Group of

More information

Summarizing Organization Performance Metrics Tania Skinner Intel Corporation

Summarizing Organization Performance Metrics Tania Skinner Intel Corporation Summarizing Organization Performance Metrics Tania Skinner Intel Corporation Tania.skinner@intel.com Intel Corporation 5200 NE Elam Young Parkway Hillsboro, OR 97124 MS: EG3-319 Objectives Teach a novel

More information

Stata v 12 Illustration. First Session

Stata v 12 Illustration. First Session Launch Stata PC Users Stata v 12 Illustration Mac Users START > ALL PROGRAMS > Stata; or Double click on the Stata icon on your desktop APPLICATIONS > STATA folder > Stata; or Double click on the Stata

More information

Manipulating Statistical and Other Procedure Output to Get the Results That You Need

Manipulating Statistical and Other Procedure Output to Get the Results That You Need Paper SAS1798-2018 Manipulating Statistical and Other Procedure Output to Get the Results That You Need Vincent DelGobbo, SAS Institute Inc. ABSTRACT Many scientific and academic journals require that

More information

SAS Macro Language: Reference

SAS Macro Language: Reference SAS Macro Language: Reference INTRODUCTION Getting Started with the Macro Facility This is the macro facility language reference for the SAS System. It is a reference for the SAS macro language processor

More information

Regression Analysis and Linear Regression Models

Regression Analysis and Linear Regression Models Regression Analysis and Linear Regression Models University of Trento - FBK 2 March, 2015 (UNITN-FBK) Regression Analysis and Linear Regression Models 2 March, 2015 1 / 33 Relationship between numerical

More information

TIPS FROM THE TRENCHES

TIPS FROM THE TRENCHES TIPS FROM THE TRENCHES Christopher Bost MDRC SAS Users Group October 1, 2008 Recent user questions 2 How can I print long character values? How can I EXPORT formatted values to Excel? How can I check for

More information

DECISION STRUCTURES: USING IF STATEMENTS IN JAVA

DECISION STRUCTURES: USING IF STATEMENTS IN JAVA DECISION STRUCTURES: USING IF STATEMENTS IN JAVA S o far all the programs we have created run straight through from start to finish, without making any decisions along the way. Many times, however, you

More information

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

Introduction to SAS Procedures SAS Basics III. Susan J. Slaughter, Avocet Solutions Introduction to SAS Procedures SAS Basics III Susan J. Slaughter, Avocet Solutions SAS Essentials Section for people new to SAS Core presentations 1. How SAS Thinks 2. Introduction to DATA Step Programming

More information

Cluster Randomization Create Cluster Means Dataset

Cluster Randomization Create Cluster Means Dataset Chapter 270 Cluster Randomization Create Cluster Means Dataset Introduction A cluster randomization trial occurs when whole groups or clusters of individuals are treated together. Examples of such clusters

More information

Writing Programs in SAS Data I/O in SAS

Writing Programs in SAS Data I/O in SAS Writing Programs in SAS Data I/O in SAS Statistics 135 Autumn 2005 Copyright c 2005 by Mark E. Irwin Writing SAS Programs Your SAS programs can be written in any text editor, though you will often want

More information

12. MS Access Tables, Relationships, and Queries

12. MS Access Tables, Relationships, and Queries 12. MS Access Tables, Relationships, and Queries 12.1 Creating Tables and Relationships Suppose we want to build a database to hold the information for computers (also refer to parts in the text) and suppliers

More information

Square Peg, Square Hole Getting Tables to Fit on Slides in the ODS Destination for PowerPoint

Square Peg, Square Hole Getting Tables to Fit on Slides in the ODS Destination for PowerPoint PharmaSUG 2018 - Paper DV-01 Square Peg, Square Hole Getting Tables to Fit on Slides in the ODS Destination for PowerPoint Jane Eslinger, SAS Institute Inc. ABSTRACT An output table is a square. A slide

More information

Data Quality Review for Missing Values and Outliers

Data Quality Review for Missing Values and Outliers Paper number: PH03 Data Quality Review for Missing Values and Outliers Ying Guo, i3, Indianapolis, IN Bradford J. Danner, i3, Lincoln, NE ABSTRACT Before performing any analysis on a dataset, it is often

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

Ch 1 : Descriptive Statistics

Ch 1 : Descriptive Statistics Summer 2017 UAkron Dept. of Stats [3470 : 461/561] Applied Statistics Ch 1 : Descriptive Statistics Contents 1 Preliminaries 2 1.1 Course Web Page................................................................

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

Chapter 1 The DATA Step

Chapter 1 The DATA Step Chapter 1 The DATA Step 1.1 Structure of SAS Programs...1-3 1.2 SAS Data Sets... 1-12 1.3 Creating a Permanent SAS Data Set... 1-18 1.4 Writing a SAS DATA Step... 1-24 1.5 Creating a DATA Step View...

More information

Stata version 13. First Session. January I- Launching and Exiting Stata Launching Stata Exiting Stata..

Stata version 13. First Session. January I- Launching and Exiting Stata Launching Stata Exiting Stata.. Stata version 13 January 2015 I- Launching and Exiting Stata... 1. Launching Stata... 2. Exiting Stata.. II - Toolbar, Menu bar and Windows.. 1. Toolbar Key.. 2. Menu bar Key..... 3. Windows..... III -...

More information

SIDM3: Combining and restructuring datasets; creating summary data across repeated measures or across groups

SIDM3: Combining and restructuring datasets; creating summary data across repeated measures or across groups SIDM3: Combining and restructuring datasets; creating summary data across repeated measures or across groups You might find that your data is in a very different structure to that needed for analysis.

More information

STENO Introductory R-Workshop: Loading a Data Set Tommi Suvitaival, Steno Diabetes Center June 11, 2015

STENO Introductory R-Workshop: Loading a Data Set Tommi Suvitaival, Steno Diabetes Center June 11, 2015 STENO Introductory R-Workshop: Loading a Data Set Tommi Suvitaival, tsvv@steno.dk, Steno Diabetes Center June 11, 2015 Contents 1 Introduction 1 2 Recap: Variables 2 3 Data Containers 2 3.1 Vectors................................................

More information

Error-Bar Charts from Summary Data

Error-Bar Charts from Summary Data Chapter 156 Error-Bar Charts from Summary Data Introduction Error-Bar Charts graphically display tables of means (or medians) and variability. Following are examples of the types of charts produced by

More information

#a- a vector of 100 random number from a normal distribution a<-rnorm(100, mean= 32, sd=6)

#a- a vector of 100 random number from a normal distribution a<-rnorm(100, mean= 32, sd=6) 1 Transition to R Class 3: Basic functions for descriptive statistics and summarizing data Use simple functions and Xapply functions for summarizing and describing data Goals: (1) Summarizing continuous

More information

Overview Graph Coverage Criteria

Overview Graph Coverage Criteria Overview Graph Coverage Criteria Graph Coverage Four Structures for Modeling Software Graphs Logic Input Space Syntax Applied to Applied to Source FSMs Applied to Specs DNF Source Specs Source Models Design

More information

1. In C++, reserved words are the same as predefined identifiers. a. True

1. In C++, reserved words are the same as predefined identifiers. a. True C++ Programming From Problem Analysis to Program Design 8th Edition Malik TEST BANK Full clear download (no formatting errors) at: https://testbankreal.com/download/c-programming-problem-analysis-program-design-8thedition-malik-test-bank/

More information

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

I Launching and Exiting Stata. Stata will ask you if you would like to check for updates. Update now or later, your choice. I Launching and Exiting Stata 1. Launching Stata Stata can be launched in either of two ways: 1) in the stata program, click on the stata application; or 2) double click on the short cut that you have

More information

An Introduction to Minitab Statistics 529

An Introduction to Minitab Statistics 529 An Introduction to Minitab Statistics 529 1 Introduction MINITAB is a computing package for performing simple statistical analyses. The current version on the PC is 15. MINITAB is no longer made for the

More information

The steps to create Table1 using Microsoft Excel are illustrated on the following pages.

The steps to create Table1 using Microsoft Excel are illustrated on the following pages. Tables can be created in Microsoft Excel in three ways: (1) Simply by typing in the data in the columns and rows of the spread sheet. Then add the appropriate table headings and applying boarders were

More information

Why Is Repetition Needed?

Why Is Repetition Needed? Why Is Repetition Needed? Repetition allows efficient use of variables. It lets you process many values using a small number of variables. For example, to add five numbers: Inefficient way: Declare a variable

More information

In Minitab interface has two windows named Session window and Worksheet window.

In Minitab interface has two windows named Session window and Worksheet window. Minitab Minitab is a statistics package. It was developed at the Pennsylvania State University by researchers Barbara F. Ryan, Thomas A. Ryan, Jr., and Brian L. Joiner in 1972. Minitab began as a light

More information

STATISTICAL TECHNIQUES. Interpreting Basic Statistical Values

STATISTICAL TECHNIQUES. Interpreting Basic Statistical Values STATISTICAL TECHNIQUES Interpreting Basic Statistical Values INTERPRETING BASIC STATISTICAL VALUES Sample representative How would one represent the average or typical piece of information from a given

More information