Christopher Toppe, Ph.D. Computer Sciences Corporation

Size: px
Start display at page:

Download "Christopher Toppe, Ph.D. Computer Sciences Corporation"

Transcription

1 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 report generation tools available to SAS programmers I analysts. Its power and its difficulty arise from the same fact: PROC TABULATE allows you to exercise nearly total control over both the contents and the appearance of its output. But the inherent complexity of this procedure should not stop you from becoming skilled at its use. As a matter of fact, an hour or two of structured ""1"'rience with PROC TABULA IE is enough to teach you how to control its major features and options, and to give you the tools you need to use this procedure with confidence in the future. 1ms workshop provides such an experience. It tackles PROC TABUlATE in a step-by-step fashion, building and enhancing a single table. 1ms paper is meant to accompany the workshop and presents the topics covered. However, only the final PROC TABULATE program, not each of the intermediate steps, has been included for reasons of space. 1ms workshop has been adapted from the esc course Getting Ihe Mosl OUI of PROC TABULATE, developed and taught by esc to its staff and clients. PROCTABULATE: Two Steps to Success I recommend that you envision the Tabulate Procedure as a two-step process, one to create the table and the other to enhance it. I further recommend that you approach PROC TABULATE as a series of minor steps that cascade into a fmal table. That is, build your table one step or enhancement at a time. Examine the impact of each change, making sure it did what you intended. Then move to the next enhancement. I recommend you follow this process because it is usually impossible to determine which part of a PROC TABULA IE is causing a problem when you are trying to build a finished table from scratch in one step. The Workshop Dataset The examples used in the workshop use a SAS dataset generated from the following code. The dataset contains 1,000 observations with four class variables, VARI - VAR4, and one analysis varoable, NUMVAR LIBNAME CSC "C:\CSC\TABULATE": OPTIONS PS=30 LS=70 NOCENTER: DATA CSC.TABDATA: RETAIN NUMVAR 0: DO H = 1 TO 125: DO I = 1 TO 2: DO J = 3 TO 4: DO K = 5 TO 6: DO L = 7 TO 8: VAR1=I: VAR2=J: VAR3=K: VAR4=L; NUMVAR+1: RANDOM=RANUNI(6): DROP I J K L; OUTPUT: END: END; END; END: END; PROC SORT; BY RANDOM: RUN: DATA FINAL: SET TEMP (OB5=1000) (DROP=RANDOM): RUN; Basic Syntax of PROC TABULATE PROC TABULATE DATA=SAS-data-set < options >: CLASS class-variables ; VAR analysis-variables ; TABLE table-specification < / 355

2 options> ; KEY LABEL keyword RUN;, label'... The TABLE statement must be present. By default, PROC TABULATE computes the frequency count (N) of class variables and the sum of analysis variables that are listed in the TABLE statement. If class variables are used in the TABLE statement, a CLASS statement is required. If analysis variables are used in the TABLE statement, a V AR statement is required. PROC TABULATE uses any variable labels that exist within the SAS data set. The CLASS Statement The CLASS statement identifies variables used to categorize, 0< classify, the data. Class variables are usually character variables or numeric variables with a small number of discrete values. The rows, columns, and pages of tables generated by PROC TABULATE are typically defined by class variables. In the workshop dataset, HOMETYPE and ST are class variables. The V AR statement TIle V AR statement identifies variables for which statistics are to be calculated and displayed in the PROC TABULATE output Analysis variables must be numeric variables. These variables are usually continuous; that is, they can possess many distinct values. In the workshop dataset, AMOUNT is the analysis variable. The TABLE statement TIle TABLE statement defines the table layout. Multiple TABLE statements can appear in a single PROC TABULATE step, each specifying a separate table. There are two key elements in formulating a table specification: Dimensions Variable combinations Table Dimensions Table dimensions are defmed by commas. Wherever you use a comma, you define another dimension of the table. If there are no conunas within the table specification, the output contains only columns -- no rows. If there is a single comma, then the table has two dimensions: rows and columns. Everything before the comma defines the rows, everything after the comma defines columns. A second comma defines the pages of the table. Everything before the first comma defines the pages, everything between the two commas defines the rows, everything after the second comma defines columns. Variable Combinations Variables in the table specification can be combined in two ways: Concatenation: variables separated by blanks Crossing: variables separated by asterisks In a concatenation, the variables appear independently within the same dimension. In a crossing, the variables appear ~ within the same dimension. Universal Class Variable ALL PROC TABULATE has a universal class variable called ALL. As you might e""peet, this variable provides an additional column or row to a table representing the total of the individual columns or rows. You add this special row/column to the table by including the keyword ALL in the TABLE statement. Be careful when adding ALL to tables with concatenation or crossing. You may have to add parentheses '0' to produce the desired results. Specifying Formals in PROC TABULATE Formatting Class Variables When displaying headings for values of class variables, PROC TABULATE uses any format assigued during creation of the input SAS data set If no format has 356

3 been assigned to a class variable or the format assigned must be overridden, a FORMAT statement can be used within the TABULATE procedure to assign a temporary fonnat for that step only. Formatting Cell Values By default, PROC TABULATE uses the BESTl2.2 format to display computed cell values. This results in a default cell width of 12 characters. To override the default format used for every table cell, add the FORMAT= option to the PROC TABULATE statement. The new default format also adjusts the cell widths in the table. Format Modifiers in the TABLE Statement Format modifiers can be used in the TABLE statement to alter the display format of a selected pages, rows or columns. To specify a format modifier, cross (*) the variable with F= followed by the desired fonnat name. Since the format modifier only modifies a single occurrence of a variable in a TABLE statement, it allows the use of different formats for a variable that appears multiple times in the TABULATE procedure output A format modifier may be applied to an analysis variable, a class variable, or the universal class variable ALL Specifying Labels in PROC TABUlATE Specifying Variable Labels When displaying headings for class and analysis variables, PROC TABULATE uses any label assigned during creation of the input SAS data set. If no label has been assigned to a variable or the label assigned must be overridden, a LABEL statement can be used within the TABULATE procedure to assign a temporary label for that step only. Using Label Modifiers in the TABLE Statement Label modifiers can be used in the TABLE statement to alter the label displayed for a given variable. To specii}' a label modifier, follow the variable name in the table specification with an equal sign (=) and a string enclosed in quotes. Since the label modifier only modifies a single occurrence of a variable in a TABLE statement, it allows the use of different labels for a variable that appears multiple times in the TABULATE procedure output, such as the universal class variable ALL A label modifier may be applied to an analysis variable, a class variable, or the universal class variable ALL. Labels for Key Words The KEYLABEL statement provides a way to override the default labels for key words such as ALL, N, and SUM. The label assigned with the KEYLABEL statement can be overridden by a label modifier in the TABLE statement. Suppressing Variable Labels Defining a blank label for a variable will suppress the printing of the corresponding table heading. Blank labels are most commonly used when a single statistic is generated for an analysis variable and the keyword heading is superfluous. PROC TABULATE Options Some of the other options which can specified on the PROC TABULATE statement include: FORMCHAR MISSING NOSEPS ORDER= The FORMCHAR Option defmes the characters used to construct the borders and separators of the table causes the display and inclusion of ntissing values for class variables generates output without separator lines between rows of the table specifies the ordering of class variable values FORMCHAR is used to define the II characters TABULATE uses to construct the outlines and dividers of the output table: the vertical and horizontal bar characters and the corner characters (upper left, upper ntiddle, upper right, middle left, ntiddle middle, middle right, lower left, lower ntiddle, lower right). The default value is ' '.!fthe string ' ab' were used to define the FORMCHAR, the resulting table boundaries would 357

4 look like: a222222b When specifying the FORMCHAR option, you must define all I I characters. The MISSING Option By default, missing values for class variables are suppressed by PROC TABULATE. By specifying the MISSING option in the PROC TABULATE statement, the procedure includes missing values (if any) in the output table. The NOSEPS Option When NOSEPS is specified in the PROC TABULATE statement, lines that are normally placed between rows of the output tables are eliminated. The separator lines are completely removed, not just replaced with blanks. The ORDER= Option When the TABULATE procedure generates the output table, the values of the class variables appear in sorted order according to the actual value stored in the input data set. By using the ORDER= option in the PROC TABULATE statement, the sequence in which values appear can be changed. There are four possible orders: ORDER=INTERNAL values are sequenced based on the actual stored value (the default) ORDER=FORMATIEDvalues are sequenced based on the fonnatted result ORDER=FREQ values are sequenced based on frequency in the input data set with the most common values appearing first ORDER=DATA OptWns on the TABLE Statement values are sequenced based on the order in which the values are encountered in the input data set Among the options which can be specified on the TABLE statement are: RTS= Row Title Spacing (also RTSPACE) defmes the number of spaces allotted to row titles CONDENSE MlSSTEXT= BOX= Requests that multiple logical pages be printed on a single physical page when possible Specifies up to 20 characters for PROC TABULATE to print in table cells that contain missing values Specifies the text to be placed in the empty area at the upper left corner above the row titles These options are specified after the table specification and are separated from the table specification by a single slash (I) character. Combinations of these options are allowed. The RTS= Option Specifying a value for RTS in the TABLE statement is the only way to control the width of the row titles. The default for RTS is one-fourth of the LINESIZE value. When specifying a value for RTS, that value must include space for the left and right vertical outline bars. The MISSTEXT= Option Specifying a text string (enclosed in quotes) with the MISSTEXToptioncausesPROC TABULATE to display the string within any cell that has a missing value The MISSTEXT string is limited to 20 characters. 358

5 The CONDENSE Option SpecifYing the CONDENSE option instructs PROC TABULATE to attempt to combine multiple logical pages into a single page whenever possible. The BOX= Option By default, the TABULATE procedure does not put any data in the upper left comer of the table. Using the BOX= option,proc TABUlATE can be instructed to place one of three items in the upper left comer of the table: BOX=]AGE_ Displays the pagedimension information in the box. If the page-dimension tex1 does not fit, it is placed in its normal position above the table and the box is left empty. BOX=variable Displays the name (or label) of a variable and its value in the box. BOX='string' Displays the quoted string in the box. Displaying Statistics and Percentages in PROC TABUlATE Specifying Statistics In addition to the default statistics (N for class variables and SUM for analysis variables), other statistics can be requested: MEAN STD MIN MAX NMISS The average value of the variable The standard deviation of the variable The minimum value of the variable The maximum value of the variable The number of missing values for the variable Statistics are calculated and displayed by following a class or analysis variable with an asterisk (*) and the statistic keyword in the TABLE statement. Class variables can only use the N and NMISS statistics. Analysis variables can use any of the available statistics. Multiple statistics can be generated for a variable by grouping the statistic keywords in parentheses. Displaying Percentages Two special statistics which can be displayed are PCTN (the percentage that one frequency represents of another frequency) and PCTSUM (the percentage that one sum represents of another sum). The most common use of this feature is to generate percentages that total to 100 either across a row or down a column. When using the default form of the percentage statistics, you may interpret the percentages in the following manner: Pretend that the corresponding N or SUM statistic is being generated. Accumulate the N or SUM values generated for.all values of the class variable(s) included in the dimension. Divide each N or SUM value by the accumulated total. SpecifYing Percentage Denominators When specifying PCTN or PCTSUM, PROC TABULATE can be instructed to use any class variable(s) as the denominator. This is accomplished by following the keyword PCTN or PCTSUM with the name(s) of the class variable(s) enclosed between the < and> symbols. To produce row-relative percentages, specify the column expression as the denominator. To produce column-relative percentages, specify the row expression as the denominator. Conclusion:!ftaken step by step, the TABULATE procedure can be a powerful new report writing tool. Attached are the workshop exercises. Notice we will be asking the class to build from simple to more complex. That is the way you should start to learn the TABULATE procedure. Please contact the author if you have any ftn1her questions, would like the finished code from the workshop or would like more information on CSC SAS programming or training services.. CSC Professional Services Group 130 I Piccard Drive, 2nd Floor Rockville, MD (301)

6 Workshop Exercises Build a table using PROC TABULA IE by following these instructions: I. Create a table with VAR3 as the colwnns and VARI as the rows. 2. Change that table to show V AR4 within V AR3 and V AR2 within V AR I. 3. Add the follo,",ing labels to the CLASS variables: VARI = 'OFFICE" V AR2 = "AGENT' V AR3 = "TYPE OF BUSINESS' V AR4 = "TYPE OF CUSTOMER'. NUMVAR = "ANNUAL PREMIUM" 4. Format each the the CLASS variables such that: V ARI, 1 ="Miami" and 2="Orlando' VAR2, 3="Jones" and 4="Johnson" V AR3, 5='Home Liability" and 6="Personal Auto" V AR4, 7="Repeat Client" and 8="New Client" 5. Add the universal variable ALL to each table dimension, making it the first variable listed. 6. Make the table show the total for the analysis variable NUMV AR in each cell. 7. Give the table the default format of DOLLAR1O. 8. Format the ALL variables into DOLLARI2. format. 9. Change the labels for ALL to 'TOTAL' for the rows and to "SUM" for the cohnns Remove the labels for the column variables. II. Make the table show two statistics, SUM and MEAN for the analysis variable. 12. Format SUM as DOLLAR I 2. and MEAN as DOLLAR Remove the separator lines. 14. Remove all separator characters. 15. Reduce the Row Title Space to Put the variable label for V ARI in the upper left box. 16. Make the table show the following percentages, one at a time: Percentage of each Office Percentage of each Type of Customer Percentage of Agent 360

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

I AlB 1 C 1 D ~~~ I I ; -j-----; ;--i--;--j- ;- j--; AlB

I AlB 1 C 1 D ~~~ I I ; -j-----; ;--i--;--j- ;- j--; AlB PROC TABULATE: CONTROLLNG TABLE APPEARANCE August V. Treff Baltimore City Public Schools Office of Research and Evaluation ABSTRACT Proc Tabulate provides one, two, and three dimensional tables. Tables

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

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

Introducing a Colorful Proc Tabulate Ben Cochran, The Bedford Group, Raleigh, NC Paper S1-09-2013 Introducing a Colorful Proc Tabulate Ben Cochran, The Bedford Group, Raleigh, NC ABSTRACT Several years ago, one of my clients was in the business of selling reports to hospitals. He used

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

Using PROC TABULATE and ODS Style Options to Make Really Great Tables Wendi L. Wright, CTB / McGraw-Hill, Harrisburg, PA

Using PROC TABULATE and ODS Style Options to Make Really Great Tables Wendi L. Wright, CTB / McGraw-Hill, Harrisburg, PA Using PROC TABULATE and ODS Style Options to Make Really Great Tables Wendi L. Wright, CTB / McGraw-Hill, Harrisburg, PA ABSTRACT We start with an introduction to PROC TABULATE, looking at the basic syntax,

More information

Setting the Percentage in PROC TABULATE

Setting the Percentage in PROC TABULATE SESUG Paper 193-2017 Setting the Percentage in PROC TABULATE David Franklin, QuintilesIMS, Cambridge, MA ABSTRACT PROC TABULATE is a very powerful procedure which can do statistics and frequency counts

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

Print the Proc Report and Have It on My Desktop in the Morning! James T. Kardasis, J.T.K. & Associates, Skokie, IL

Print the Proc Report and Have It on My Desktop in the Morning! James T. Kardasis, J.T.K. & Associates, Skokie, IL Print the Proc Report and Have It on My Desktop in the Morning! James T. Kardasis, J.T.K. & Associates, Skokie, IL ABSTRACT The user will learn how to produce detail and summary reports as well as frequency

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

Lecture 1 Getting Started with SAS

Lecture 1 Getting Started with SAS SAS for Data Management, Analysis, and Reporting Lecture 1 Getting Started with SAS Portions reproduced with permission of SAS Institute Inc., Cary, NC, USA Goals of the course To provide skills required

More information

Microsoft Excel 2010 Handout

Microsoft Excel 2010 Handout Microsoft Excel 2010 Handout Excel is an electronic spreadsheet program you can use to enter and organize data, and perform a wide variety of number crunching tasks. Excel helps you organize and track

More information

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development INFS 2150 Introduction to Web Development 3. Page Layout Design Objectives Create a reset style sheet Explore page layout designs Center a block element Create a floating element Clear a floating layout

More information

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development Objectives INFS 2150 Introduction to Web Development 3. Page Layout Design Create a reset style sheet Explore page layout designs Center a block element Create a floating element Clear a floating layout

More information

Excel 2016: Part 2 Functions/Formulas/Charts

Excel 2016: Part 2 Functions/Formulas/Charts Excel 2016: Part 2 Functions/Formulas/Charts Updated: March 2018 Copy cost: $1.30 Getting Started This class requires a basic understanding of Microsoft Excel skills. Please take our introductory class,

More information

I OFFICE TAB... 1 RIBBONS & GROUPS... 2 OTHER SCREEN PARTS... 4 APPLICATION SPECIFICATIONS... 5 THE BASICS...

I OFFICE TAB... 1 RIBBONS & GROUPS... 2 OTHER SCREEN PARTS... 4 APPLICATION SPECIFICATIONS... 5 THE BASICS... EXCEL 2010 BASICS Microsoft Excel I OFFICE TAB... 1 RIBBONS & GROUPS... 2 OTHER SCREEN PARTS... 4 APPLICATION SPECIFICATIONS... 5 THE BASICS... 6 The Mouse... 6 What Are Worksheets?... 6 What is a Workbook?...

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

Lecture- 5. Introduction to Microsoft Excel

Lecture- 5. Introduction to Microsoft Excel Lecture- 5 Introduction to Microsoft Excel The Microsoft Excel Window Microsoft Excel is an electronic spreadsheet. You can use it to organize your data into rows and columns. You can also use it to perform

More information

Tables for Two: An Introduction to the TABULATE Procedure

Tables for Two: An Introduction to the TABULATE Procedure Tables for Two: An Introduction to the TABULATE Procedure Kathy McLeod. Computer Science Corporation ABSTRACT The SASe System includes many powerful tools for summarizing and displaying data. PROe TABULATE

More information

Tweaking your tables: Suppressing superfluous subtotals in PROC TABULATE

Tweaking your tables: Suppressing superfluous subtotals in PROC TABULATE ABSTRACT Tweaking your tables: Suppressing superfluous subtotals in PROC TABULATE Steve Cavill, NSW Bureau of Crime Statistics and Research, Sydney, Australia PROC TABULATE is a great tool for generating

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

proc print data=account; <insert statement here> run;

proc print data=account; <insert statement here> run; Statistics 6250 Name: Fall 2012 (print: first last ) Prof. Fan NetID #: Midterm Three Instructions: This is an in-class and open book midterm. You must write your answers on the provide spaces. Give concise

More information

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

Excel Select a template category in the Office.com Templates section. 5. Click the Download button.

Excel Select a template category in the Office.com Templates section. 5. Click the Download button. Microsoft QUICK Excel 2010 Source Getting Started The Excel Window u v w z Creating a New Blank Workbook 2. Select New in the left pane. 3. Select the Blank workbook template in the Available Templates

More information

QUERIES BY ODS BEGINNERS. Varsha C. Shah, Dept. of Biostatistics, UNC-CH, Chapel Hill, NC

QUERIES BY ODS BEGINNERS. Varsha C. Shah, Dept. of Biostatistics, UNC-CH, Chapel Hill, NC QUERIES BY ODS BEGINNERS Varsha C. Shah, Dept. of Biostatistics, UNC-CH, Chapel Hill, NC ABSTRACT This paper presents a list of questions often asked by those initially experimenting with ODS output. Why

More information

Microsoft Excel 2007

Microsoft Excel 2007 Microsoft Excel 2007 1 Excel is Microsoft s Spreadsheet program. Spreadsheets are often used as a method of displaying and manipulating groups of data in an effective manner. It was originally created

More information

Name: Class: Date: Access Module 2

Name: Class: Date: Access Module 2 1. To create a new query in Design view, click CREATE on the ribbon to display the CREATE tab and then click the button to create a new query. a. Query b. Design View c. Query Design d. Select Query ANSWER:

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

The TIMEPLOT Procedure

The TIMEPLOT Procedure 1247 CHAPTER 38 The TIMEPLOT Procedure Overview 1247 Procedure Syntax 1249 PROC TIMEPLOT Statement 1250 BY Statement 1250 CLASS Statement 1251 ID Statement 1252 PLOT Statement 1252 Results 1257 Data Considerations

More information

Formulas in Microsoft Excel

Formulas in Microsoft Excel Formulas in Microsoft Excel Formulas are the main reason for wanting to learn to use Excel. This monograph is intended as a quick reference to the basic concepts underlying the use of formulas. It is prepared

More information

Getting it Done with PROC TABULATE

Getting it Done with PROC TABULATE ABSTRACT Getting it Done with PROC TABULATE Michael J. Williams, ICON Clinical Research, San Francisco, CA The task of displaying statistical summaries of different types of variables in a single table

More information

Linda Culp Senior Transportation Planner ph. (619)

Linda Culp Senior Transportation Planner ph. (619) Tables will be the major focus of this intermediate class creating and positioning tables on a page; adding, deleting and resizing rows and columns; and the sort and formula features. Participants will

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

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

Quick Start Guide. Version R94. English

Quick Start Guide. Version R94. English Custom Reports Quick Start Guide Version R94 English December 12, 2016 Copyright Agreement The purchase and use of all Software and Services is subject to the Agreement as defined in Kaseya s Click-Accept

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

CSC Web Programming. Introduction to SQL

CSC Web Programming. Introduction to SQL CSC 242 - Web Programming Introduction to SQL SQL Statements Data Definition Language CREATE ALTER DROP Data Manipulation Language INSERT UPDATE DELETE Data Query Language SELECT SQL statements end with

More information

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

Going Beyond Proc Tabulate Jim Edgington, LabOne, Inc., Lenexa, KS Carole Lindblade, LabOne, Inc., Lenexa, KS Going Beyond Proc Tabulate Jim Edgington, LabOne, Inc., Lenexa, KS Carole Lindblade, LabOne, Inc., Lenexa, KS ABSTRACT PROC Tabulate is one of the most powerful and versatile of the SAS reporting tools.

More information

PROC FORMAT; VALUE RESTF

PROC FORMAT; VALUE RESTF TABULATE Tutorial Alan Eaton and Ken Howell SAS Institute PROC TABULATE displays descriptive statistics arranged in hierarchical tables. This overview illustrates many features by using them in examples.

More information

EDUCATION IN PROC TABULATE I EDUCATION IN PROC TABULATE II

EDUCATION IN PROC TABULATE I EDUCATION IN PROC TABULATE II EDUCTON N PROC TBULTE Georg Morsing - SS nstitute EDUCTON N PROC TBULTE 258 Education in PROC TBULTE ntroduction NECESSRY STTEMENTS CONTENTS PROC TBULTE DT= SSdataset l. ntroduction 2. The TBLE statement

More information

Anyone Can Learn PROC TABULATE, v2.0

Anyone Can Learn PROC TABULATE, v2.0 Paper 63-25 Anyone Can Learn PROC TABULATE, v2.0 Lauren Haworth Ischemia Research & Education Foundation San Francisco ABSTRACT SAS Software provides hundreds of ways you can analyze your data. You can

More information

Shelly Cashman Series Microsoft Office 365 and Access 2016 Introductory 1st Edition Pratt TEST BANK

Shelly Cashman Series Microsoft Office 365 and Access 2016 Introductory 1st Edition Pratt TEST BANK Shelly Cashman Series Microsoft Office 365 and Access 2016 Introductory 1st Edition Pratt TEST BANK Full clear download (no formatting errors) at: https://testbankreal.com/download/shelly-cashman-series-microsoft-office-365-access-

More information

VISI ON CALC QuickStart Course

VISI ON CALC QuickStart Course VISI ON CALC QuickStart Course VISICORP Copyright 1983 VisiCorp All Rights Reserved. Printed in U.S.A. Visi On Calc Program Copyright 1983 VisiCorp All Rights Reserved. Visi OnTM, Visi On CalcTM, Visi

More information

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

Chapters 18, 19, 20 Solutions. Page 1 of 14. Demographics from COLLEGE Data Set 18.2 proc tabulate data=learn.college format=7.; class schoolsize gender scholarship; table schoolsize ALL, gender scholarship ALL; n = ' '; Demographics from COLLEGE Data Set ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ

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

Chapter 2: Getting Data Into SAS

Chapter 2: Getting Data Into SAS Chapter 2: Getting Data Into SAS Data stored in many different forms/formats. Four categories of ways to read in data. 1. Entering data directly through keyboard 2. Creating SAS data sets from raw data

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

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

David Beam, Systems Seminar Consultants, Inc., Madison, WI

David Beam, Systems Seminar Consultants, Inc., Madison, WI Paper 150-26 INTRODUCTION TO PROC SQL David Beam, Systems Seminar Consultants, Inc., Madison, WI ABSTRACT PROC SQL is a powerful Base SAS Procedure that combines the functionality of DATA and PROC steps

More information

Lesson 1: Writing Your First JavaScript

Lesson 1: Writing Your First JavaScript JavaScript 101 1-1 Lesson 1: Writing Your First JavaScript OBJECTIVES: In this lesson you will be taught how to Use the tag Insert JavaScript code in a Web page Hide your JavaScript

More information

FSEDIT Procedure Windows

FSEDIT Procedure Windows 25 CHAPTER 4 FSEDIT Procedure Windows Overview 26 Viewing and Editing Observations 26 How the Control Level Affects Editing 27 Scrolling 28 Adding Observations 28 Entering and Editing Variable Values 28

More information

2 Spreadsheet Considerations 3 Zip Code and... Tax ID Issues 4 Using The Format... Cells Dialog 5 Creating The Source... File

2 Spreadsheet Considerations 3 Zip Code and... Tax ID Issues 4 Using The Format... Cells Dialog 5 Creating The Source... File Contents I Table of Contents Part 1 Introduction 1 Part 2 Importing from Microsoft Excel 1 1 Overview... 1 2 Spreadsheet Considerations... 1 3 Zip Code and... Tax ID Issues 2 4 Using The Format... Cells

More information

Opening a Data File in SPSS. Defining Variables in SPSS

Opening a Data File in SPSS. Defining Variables in SPSS Opening a Data File in SPSS To open an existing SPSS file: 1. Click File Open Data. Go to the appropriate directory and find the name of the appropriate file. SPSS defaults to opening SPSS data files with

More information

CHAPTER 4: MICROSOFT OFFICE: EXCEL 2010

CHAPTER 4: MICROSOFT OFFICE: EXCEL 2010 CHAPTER 4: MICROSOFT OFFICE: EXCEL 2010 Quick Summary A workbook an Excel document that stores data contains one or more pages called a worksheet. A worksheet or spreadsheet is stored in a workbook, and

More information

Table of Contents. 1. Creating a Microsoft Excel Workbook...1 EVALUATION COPY

Table of Contents. 1. Creating a Microsoft Excel Workbook...1 EVALUATION COPY Table of Contents Table of Contents 1. Creating a Microsoft Excel Workbook...1 Starting Microsoft Excel...1 Creating a Workbook...2 Saving a Workbook...3 The Status Bar...5 Adding and Deleting Worksheets...6

More information

Input Space Partitioning

Input Space Partitioning CMPT 473 Software Quality Assurance Input Space Partitioning Nick Sumner Recall Testing involves running software and comparing observed behavior against expected behavior Select an input, look at the

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

EXCEL 2002 (XP) FOCUS ON: DESIGNING SPREADSHEETS AND WORKBOOKS

EXCEL 2002 (XP) FOCUS ON: DESIGNING SPREADSHEETS AND WORKBOOKS EXCEL 2002 (XP) FOCUS ON: DESIGNING SPREADSHEETS AND WORKBOOKS ABOUT GLOBAL KNOWLEDGE, INC. Global Knowledge, Inc., the world s largest independent provider of integrated IT education solutions, is dedicated

More information

Kaseya 2. User Guide. Version 7.0. English

Kaseya 2. User Guide. Version 7.0. English Kaseya 2 Custom Reports User Guide Version 7.0 English September 3, 2014 Agreement The purchase and use of all Software and Services is subject to the Agreement as defined in Kaseya s Click-Accept EULATOS

More information

Customizing Your SAS Session

Customizing Your SAS Session 13 CHAPTER 2 Customizing Your SAS Session Introduction 13 Specifying System Options in the SAS Command 14 Configuration Files 15 Creating a User Configuration File 15 Specifying a User Configuration File

More information

PowerPoint Spring 2002

PowerPoint Spring 2002 PowerPoint 2000 Spring 2002 Table of Contents I. INTRODUCTION... 1 II. GETTING STARTED... 1 A. Opening PowerPoint... 1 B. The Mouse Pointer... 1 C. Working with Text... 2 1. Windows Control Buttons...

More information

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

SAS Example A10. Output Delivery System (ODS) Sample Data Set sales.txt. Examples of currently available ODS destinations: Mervyn Marasinghe SAS Example A10 data sales infile U:\Documents\...\sales.txt input Region : $8. State $2. +1 Month monyy5. Headcnt Revenue Expenses format Month monyy5. Revenue dollar12.2 proc sort by Region State Month

More information

Processing SAS Data Sets

Processing SAS Data Sets Statistical Data Analysis 1 Processing SAS Data Sets Namhyoung Kim Dept. of Applied Statistics Gachon University nhkim@gachon.ac.kr 1 Using OUT Dataset OUTPUT Statement OUTPUT

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

Contents Microsoft Excel Lesson 1: Entering Text and Numbers...4 The Microsoft Excel Window...4 The Microsoft Office Button...

Contents Microsoft Excel Lesson 1: Entering Text and Numbers...4 The Microsoft Excel Window...4 The Microsoft Office Button... Contents Microsoft Excel 2007...4 Lesson 1: Entering Text and Numbers...4 The Microsoft Excel Window...4 The Microsoft Office Button...5 The Quick Access Toolbar...5 The Title Bar...5 The Ribbon...5 Worksheets...6

More information

PowerPoint Presentation to Accompany GO! All In One. Chapter 13

PowerPoint Presentation to Accompany GO! All In One. Chapter 13 PowerPoint Presentation to Accompany GO! Chapter 13 Create, Query, and Sort an Access Database; Create Forms and Reports 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Objectives Identify Good

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

Art Carpenter California Occidental Consultants

Art Carpenter California Occidental Consultants PharmaSUG 2010 - Paper HW03 PROC TABULATE: Getting Started and Doing More Art Carpenter California Occidental Consultants ABSTRACT Although PROC TABULATE has been a part of Base SAS since early version

More information

Are You Missing Out? Working with Missing Values to Make the Most of What is not There

Are You Missing Out? Working with Missing Values to Make the Most of What is not There Are You Missing Out? Working with Missing Values to Make the Most of What is not There Arthur L. Carpenter, California Occidental Consultants ABSTRACT Everyone uses and works with missing values, however

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

CMISS the SAS Function You May Have Been MISSING Mira Shapiro, Analytic Designers LLC, Bethesda, MD

CMISS the SAS Function You May Have Been MISSING Mira Shapiro, Analytic Designers LLC, Bethesda, MD ABSTRACT SESUG 2016 - RV-201 CMISS the SAS Function You May Have Been MISSING Mira Shapiro, Analytic Designers LLC, Bethesda, MD Those of us who have been using SAS for more than a few years often rely

More information

Adding records Pasting records Deleting records Sorting records Filtering records Inserting and deleting columns Calculated columns Working with the

Adding records Pasting records Deleting records Sorting records Filtering records Inserting and deleting columns Calculated columns Working with the Show All About spreadsheets You can use a spreadsheet to enter and calculate data. A spreadsheet consists of columns and rows of cells. You can enter data directly into the cells of the spreadsheet and

More information

BaSICS OF excel By: Steven 10.1

BaSICS OF excel By: Steven 10.1 BaSICS OF excel By: Steven 10.1 Workbook 1 workbook is made out of spreadsheet files. You can add it by going to (File > New Workbook). Cell Each & every rectangular box in a spreadsheet is referred as

More information

Excel 2007/2010. Don t be afraid of PivotTables. Prepared by: Tina Purtee Information Technology (818)

Excel 2007/2010. Don t be afraid of PivotTables. Prepared by: Tina Purtee Information Technology (818) Information Technology MS Office 2007/10 Users Guide Excel 2007/2010 Don t be afraid of PivotTables Prepared by: Tina Purtee Information Technology (818) 677-2090 tpurtee@csun.edu [ DON T BE AFRAID OF

More information

MATLAB Basics. Configure a MATLAB Package 6/7/2017. Stanley Liang, PhD York University. Get a MATLAB Student License on Matworks

MATLAB Basics. Configure a MATLAB Package 6/7/2017. Stanley Liang, PhD York University. Get a MATLAB Student License on Matworks MATLAB Basics Stanley Liang, PhD York University Configure a MATLAB Package Get a MATLAB Student License on Matworks Visit MathWorks at https://www.mathworks.com/ It is recommended signing up with a student

More information

Chapter 6: Modifying and Combining Data Sets

Chapter 6: Modifying and Combining Data Sets Chapter 6: Modifying and Combining Data Sets The SET statement is a powerful statement in the DATA step. Its main use is to read in a previously created SAS data set which can be modified and saved as

More information

Microsoft Excel Level 1

Microsoft Excel Level 1 Microsoft Excel 2010 Level 1 Copyright 2010 KSU Department of Information Technology Services This document may be downloaded, printed, or copied for educational use without further permission of the Information

More information

Contents. Overview How SAS processes programs Compilation phase Execution phase Debugging a DATA step Testing your programs

Contents. Overview How SAS processes programs Compilation phase Execution phase Debugging a DATA step Testing your programs SAS Data Step Contents Overview How SAS processes programs Compilation phase Execution phase Debugging a DATA step Testing your programs 2 Overview Introduction This section teaches you what happens "behind

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

Excel Level 1

Excel Level 1 Excel 2016 - Level 1 Tell Me Assistant The Tell Me Assistant, which is new to all Office 2016 applications, allows users to search words, or phrases, about what they want to do in Excel. The Tell Me Assistant

More information

Chapter 2 SYSTEM OVERVIEW. SYS-ED/ Computer Education Techniques, Inc.

Chapter 2 SYSTEM OVERVIEW. SYS-ED/ Computer Education Techniques, Inc. Chapter 2 SYSTEM OVERVIEW SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: Structure of a program. Easytrieve Plus job processing logic. Easytrieve Plus syntax rules. How to use listing

More information

Math 227 EXCEL / MEGASTAT Guide

Math 227 EXCEL / MEGASTAT Guide Math 227 EXCEL / MEGASTAT Guide Introduction Introduction: Ch2: Frequency Distributions and Graphs Construct Frequency Distributions and various types of graphs: Histograms, Polygons, Pie Charts, Stem-and-Leaf

More information

VII. Data Management Essentials

VII. Data Management Essentials VII. Sort Excel recognizes a list or data set if the data in the list is contiguous, bordered by blank cells or an edge of the worksheet, and has labels that are differentiated in some way from the data.

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

A Simple Guide to Using SPSS (Statistical Package for the. Introduction. Steps for Analyzing Data. Social Sciences) for Windows

A Simple Guide to Using SPSS (Statistical Package for the. Introduction. Steps for Analyzing Data. Social Sciences) for Windows A Simple Guide to Using SPSS (Statistical Package for the Social Sciences) for Windows Introduction ٢ Steps for Analyzing Data Enter the data Select the procedure and options Select the variables Run the

More information

INSERT SUBTOTALS Database Exercise Sort the Data Department Department Data Tab Sort and Filter Group

INSERT SUBTOTALS Database Exercise Sort the Data Department Department Data Tab Sort and Filter Group INSERT SUBTOTALS Subtotals are used to summarize data in a range of data. This command offers many kinds of summary information, including counts, sums, averages, minimums, and maximums. When this feature

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

Concepts of Database Management Eighth Edition. Chapter 2 The Relational Model 1: Introduction, QBE, and Relational Algebra

Concepts of Database Management Eighth Edition. Chapter 2 The Relational Model 1: Introduction, QBE, and Relational Algebra Concepts of Database Management Eighth Edition Chapter 2 The Relational Model 1: Introduction, QBE, and Relational Algebra Relational Databases A relational database is a collection of tables Each entity

More information

Merge Processing and Alternate Table Lookup Techniques Prepared by

Merge Processing and Alternate Table Lookup Techniques Prepared by Merge Processing and Alternate Table Lookup Techniques Prepared by The syntax for data step merging is as follows: International SAS Training and Consulting This assumes that the incoming data sets are

More information

Chapter 1. Introduction. 1.1 More about SQL More about This Book 5

Chapter 1. Introduction. 1.1 More about SQL More about This Book 5 Chapter 1 Introduction 1.1 More about SQL 2 1.2 More about This Book 5 SAS defines Structured Query Language (SQL) as a standardized, widely used language that retrieves data from and updates data in tables

More information

Formulas and Functions

Formulas and Functions Conventions used in this document: Keyboard keys that must be pressed will be shown as Enter or Ctrl. Controls to be activated with the mouse will be shown as Start button > Settings > System > About.

More information

(Refer Slide Time 01:41 min)

(Refer Slide Time 01:41 min) Programming and Data Structure Dr. P.P.Chakraborty Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture # 03 C Programming - II We shall continue our study of

More information

How to Incorporate Old SAS Data into a New DATA Step, or What is S-M-U?

How to Incorporate Old SAS Data into a New DATA Step, or What is S-M-U? Paper 54-25 How to Incorporate Old SAS Data into a New DATA Step, or What is S-M-U? Andrew T. Kuligowski Nielsen Media Research Abstract / Introduction S-M-U. Some people will see these three letters and

More information

Input Space Partitioning

Input Space Partitioning CMPT 473 Software Quality Assurance Input Space Partitioning Nick Sumner - Fall 2014 With material from Patrick Lam, Jeff Offutt Recall Testing involves running software and comparing observed behavior

More information

Reports in AST2210. Introduction: The Why Why are we doing this exercise, what are our assumptions, what do we want to accomplish?

Reports in AST2210. Introduction: The Why Why are we doing this exercise, what are our assumptions, what do we want to accomplish? Reports in AST2210 1 Basic layout In scientific journals research is usually presented in the form of an article. Most commonly (though there will be variations) this means following a format consisting

More information

Stat 302 Statistical Software and Its Applications SAS: Interactive Matrix Language (IML)

Stat 302 Statistical Software and Its Applications SAS: Interactive Matrix Language (IML) Stat 302 Statistical Software and Its Applications SAS: Interactive Matrix Language (IML) Fritz Scholz Department of Statistics, University of Washington Winter Quarter 2015 March 4, 2015 2 SAS IML: Links

More information

Applications Development

Applications Development Two Steps to LIBNAME-Free Coding: Use of Macro Parameters and AUTOEXEC.SAS Zhengyi Fang, Social & Scientific Systems, Inc., Silver Spring, MD Paul Gorrell, IMPAQ International, LLC, Columbia, MD ABSTRACT

More information

UNIT - I. Introduction to C Programming. BY A. Vijay Bharath

UNIT - I. Introduction to C Programming. BY A. Vijay Bharath UNIT - I Introduction to C Programming Introduction to C C was originally developed in the year 1970s by Dennis Ritchie at Bell Laboratories, Inc. C is a general-purpose programming language. It has been

More information

Building and Updating MDDBs

Building and Updating MDDBs 11 CHAPTER 3 Building and Updating MDDBs Analyzing Your Data 11 Using a Spiral Diagram to Order the Classification Variables 12 MDDB Memory Optimization 15 Stored and Derived Statistics 15 Building an

More information

PROC SUMMARY AND PROC FORMAT: A WINNING COMBINATION

PROC SUMMARY AND PROC FORMAT: A WINNING COMBINATION PROC SUMMARY AND PROC FORMAT: A WINNING COMBINATION Alan Dickson - Consultant Introduction: Is this scenario at all familiar to you? Your users want a report with multiple levels of subtotals and grand

More information