HOME QUICK SEARCH AUTHORS KEYWORDS HELP BUGS

NESUG 2006 Papers - Index

143 papers. Source: NESUG (Northeast SAS Users Group) conference proceedings.

# Title
×
Authors
×
Abstract
×
Keywords
×
Extras Pages
1 "Best-in-Class" Comparison Group (BCCG) Methodology for Process of Care Performance Indicators William F. McCarthy,
Nan Guo
This paper presents a methodology for making a meaningful comparison of facilities when assessing performance indicators in health care. A SAS Program with a SAS Macro is presented that reflects the methodology discussed. Key Words: Performance Indicator Assessment; Best Practice of Care; Outcomes and Effectiveness Research; SAS Program; SAS Macro raw data, proc gplot 10
2 %IFN - A Macro Function Chang Y. Chung,
H. Ian Whitlock
We implement SAS Release 9 DATA STEP IFN() function as a DATA STEP function-style macro, %IFN(), so that both the release 8 and 9 users can obtain the benefit of utilizing succinct conditional expressions in their code. In doing so, we present a general technique of using PUT() and INPUT() functions in order to detect and properly handle missing values in the input expression without generating unwanted messages in log missing value, macro function, proc sql 6
3 %LOG2SAS: A SAS Macro for Retrieving the SAS Program Code from the Log File Jay Garacani Often we move, delete or modify SAS programs, but SAS log files modification will happen after execution of SAS programs. SAS log files always contains the original SAS codes executed up to first endsas statement with option source in the SAS code (option source is the default). This paper takes advantage of this fact and by series of refinements, it filters all extra information which are generated by the log file and finally reconstitutes a copy of the original SAS code. This paper explains how to remove extra information in SAS log step by step in a macro named LOG2SAS. The macro tested in SAS 8.2 in SunOS 5.9 platforms macro variable, proc step 7
4 %MISSING: A Macro to Report Missing Value Percentages for a Multi-Year Multi-File Information System Rushi Patel It is common to find missing values in datasets. An analyst deals with missing values in a variety of ways that range from simply ignoring these records to robust imputations. The decisi on to choose a strategy to tackle missing values depends upon their magnitude and relevance of the corresponding variable. This paper presents a macro that outputs the missing value percentages for all variables in all files (or for selected variables in selected files) in a multi-year information system. The focus is on using SAS Macro Language to dynamically write pi eces of code, MISSING and NMI SS functions, iterative macro execution and ODS to export the final report. The intended au dience is beginner to intermediate programmers interested in automating tasks through utility macros missing value, proc step, proc transpose, macro variable, proc sql 6
5 &Degrees. of Separation: Social Network Analysis Using The SAS System Shane L. Hornibrook Social Network Analysis, also known as Link Analysis, is a mathematical and graphical analysis highlighting the linkages between "persons of interest". This analytic approach has immense practical importance in fields such as epidemiology and fraud analysis. Social Network Analysis (SNA) tools provide spider web-like graphs indicating the strength and type of connections between entities. The SAS System combines the data extraction, manipulation, analytic, and visualization tools needed to distill massive databases into a visual representation of the most unusual set of linkages. This paper presents a brief overview of the SAS tools and methods the author has found useful in changing a sea of data into a graphical Social Network Analysis. SAS's parallel-processing methods (MP Connect) can greatly speed up elapsed time when extracting linkage data from large Database Management Systems, especially when data are pulled from separate databases social network analysis, link analysis, mp connect, data mining, proc step, proc sql 8
6 A Hash Alternative to the PROC SQL Left Join Kenneth W. Borowiak Prior to the introduction of SAS Version 9, access to a pre-packaged hash routine was only available through PROC SQL. This fast table look-up technique is used when performing an inner join between two tables and one of the tables will fit into memory. Unfortunately, PROC SQL does not use hashing when an outer join is requested. With the introduction of th e Hash Object in SAS V9, hashing-made-easy methods are now available in the DATA STEP. This paper demonstrates how a slight augmentation to some established hash table look-up code can be used as an efficient alternative to the PROC SQL left join hash table, proc sql, proc step, left join, cpu time, inner join, numeric variable, big data 9
7 A Method for Cleaning Clinical Trial Analysis Datasets Carol Vaughn This paper presents a method for using SAS software to search SAS programs in selected directories for references to variables existing in clinical trial analysis data sets slated to be submitted to the FDA. The end product is a list of variables not used in any of the programs searched. A common reason for unused derived variables is due to analyses which were planned but later eliminated or significantly altered. Dropping these unused variables is highly desirable since they require unnecessary validation and serve only as clutter with dubious value. The method involves searching selected directories and rendering programs in those directories into a searchable working SAS data set. This working data set is then searched for the occurrence of a reference to each analysis data set variable macro variable, dataset 9
8 A Perfect Recipe to Maintain SAS Programs Shiva Srinivasan,
Shailaja Ramesh
The goal of this paper is to identify the esse ntial ingredients in wr iting, maintaining and debugging SAS code. The standards and guidelines presented herein will assist software developers and prog rammers to develop clear, effici ent and easily maintainable SAS code regardless of the environments proc step, permanent dataset, proc sql, options statement 14
9 An Annotated Guide: The New 9.1, Free & Fast SPDE Data Engine Russell M. Lavery SAS has been working hard to decrease "clock time to solution" and provide faster response to users of SAS software. SAS is not relying on computer manufacturers producing faster chips to reduce run times, since faster chips will not give the performance gains you can get with parallel operations, especially for I/O. In V9.1, SAS modified the Scalable Performance Data Server (a "For-Fee" product) and created a "free-with-base V9.1 SAS" product called the Scalable Performance Data Engine (the SPDE is often referred to as the speedy engine). With proper equipment, setup, and data, the SPDE engine can cut the I/O time of a SAS job significantly. The amount of the time decrease depends on equipment, the task performed and the data. SAS found that making major reductions in process time required making major changes to the structure of SAS data files. This free data engine has a new file structure, is multithreaded and is accessed through a SAS LIBNAME statement libname statement, where statement, dataset, index creation, parallel processing, options statement, proc step, by group processing 7
10 An Application of PROC NLP to Survey Sample Weighting Talbot M. Katz The classic weighting formula for survey respondents compensates for differences between each cell's proportion of respondents, and its proportion of the target population. Such weighting also can be applied to "cells" based on variables of interest (beyond the experimental design). If even one cell has no responses, the entire weighting has to be reconsidered. An optimal reapportionment that attempts to preserve row / column marginals is pro- posed, with a PROC NLP implementation. Keywords: PROC NLP, nonlinear programming, weight adjustment, nonresponse sample, proc step, macro loop, macro definition, %if-%then-%else 9
11 An Asset Liability Management (ALM) and Value-at-Risk (VaR) System in SAS/AF George Rezek Market Risk management at the enterprise level at GMAC includes data collection, stress analysis and fixed income analytics in Asset Liability management (ALM) system and Value-at-Risk in another. The different systems are rewritten in a single SAS/AF application to overcome the shortcomings of the ALM system, written in MS-Access, (capacity, robustness, complexity) and the VaR system, written in SAS, (lack of interactive functionality), while expanding the functionality of both processes excel, proc sql, interest rate, proc step, confidence interval, market risk, enterprise risk 5
12 An Introduction to Reshaping (TRANSPOSE) and Combining (MATCH-MERGE) SAS Data Sets Michael S. Zdeb SAS offers many ways to analyze and present data. However, since data may not be stored in a format required for a particular analysis and/or mode of presentation, another set of SAS tools that reorganize data must be used first --- those that reshape (turn variables into observations and vice-versa) and those that combine data sets. Just as one can select among a number of ways to analyze and present data, reshaping and combining of data sets may be done in several different ways. This paper focuses on the use of PROC TRANSPOSE to reshape data sets and DATA STEP match-merge to combine data sets. The effects of using various PROC TRANSPOSE options and statements are illustrated as are various types of match- merge situations (one-to-one, one-to-many, many-to-many) and how to control the results of match-merge using the IN= data set option. Alternative methods are briefly discussed: using arrays to reshape data; using PROC SQL to combine data sets proc step, proc transpose, proc sql, data step, merge statement, by group processing, set statement, numeric variable, if-then-else, subsetting if, proc append 15
13 An Introduction to SAS Character Functions Ronald P. Cody character variable, substr function, compress function, length statement, character functions, input statement, verify 17
14 Any WAY you Want it: Getting the Right TYPEs of Observations Out of PROC SUMMARY or MEANS Christianna S. Williams Have you used PROC MEANS or PROC SUMMARY and wished there was something intermediate between the NWAY option (which produces output only at the highest value of _TYPE_ -- the lowest level of summarization) and the default of getting all existing levels of combinations of the CLASS variables? Well, somebody at SAS thought of this too, and brought us the TYPES and WAYS statements. This paper will explain how to use these two statements to customize what goes into your OUT= data set more efficiently than another PROC MEANS (or SUMMARY), a DATA STEP or even using a WHERE clause on the OUTPUT statement. Using these statements alone or together you can get exactly the combinations you need for further processing or reporting class variable, proc step, proc means, output, where statement 7
15 Approaches For Using SAS for Conversion of Pharmaceutical Safety Laboratory Values to Standard Units Randall Carlson if-then-else, cards 7
16 Approaches to Data Transfer from Microsoft Excel to SAS V9 Hong Qi,
Liping Zhang,
Jiannan Kang
SAS V9 offers some new and flexible ways to transfer data from EXCEL to SAS. It has improved upon the many limitations in previous SAS versions. This paper summarizes several practical approaches including their undocumented features to data transfer from EXCEL to SAS V9 and suggests some optimal approaches under different scenarios from the user's point of view. Examples are given with the LIBNAME statement, PROC SQL Pass-Through Facility, IMPORT Procedure, PROC ACCESS, %XLXP2SAS - a SAS V9 macro developed by SAS Institute, and %EXDDE - a macro using the DDE approach developed at Merck & Co., Inc excel, proc step 15
17 ARMing SAS to Answer Your Questions Fabian Robinson With the advent of more complex and distributed systems, businesses and enterprises have not been able to truly characterize system and/or network consumption on a detailed scale such as a specific application or workload. Businesses were not able to answer the following questions easily (if at all): - Are transactions completing successfully? - Where are the bottlenecks? - What are my response times? - What are the applications doing with the information? - What servers are being used? - How is the application component performance? Several vendors (Tivoli, HP, SAS etc) united to create a vendor neutral open API called Application Response Measurement (ARM). ARM allowed capacity planners, business people and system administrators to answer the questions asked globally, but also at the application level by business need data step, variable, macro variable, sysrc, macro definition 7
18 Automatically Process a Varying Number of New Data Files from a "Data Directory" Michael A. Raithel Imagine a situation in which you are sent dozens of new data files, by a varying number of users, which must be processed on a daily basis. Perhaps the users are at other locations and are FTP-ing the data files to a designated "data directory." Perhaps the users are within your organization and are writing the data files from other operating systems to a data directory allocated via a Samba share drive. Perhaps the users are all on a shared server within your organization and are writing new data files to a data directory on the same system. Whatever the case, this scenario usually generates a lot of maintenance to the SAS program that processes the data files. When new u sers are added, you must modify your program to allocate and process their specific files. When user s are removed, you must modify your program so that it does not attempt to allocate and process their data files dataset, filename statement, macro definition, flat file, production run 11
19 Beginning Macro Design Issues Toby Dunn,
H. Ian Whitlock
Macro!!! Why does this word strike fear into even the most battle hardened SAS programmers? The word macro conjures up visions of complex and convoluted programming which leads to hours of confusing debugging and mind-twisting logical problem solving. Does macro programming have to be this hard? No, it does not. With a little forethought and some careful planning, practically anyone can follow a few simple design principles and turn a complex and seemingly confusing macro problem into a simple, easy-to-follow macro. Although this paper is not a comprehensive discussion of macro design issues, the instructions provided will give the reader a basic foundation on which to start writing clear and concise macros. While programmers of all levels can learn something from this paper, the beginner and intermediate skilled SAS programmers are the intended audience macro variable, macro parameter, %macro parameters, in=, keyword parameter, macro call, macro loop, create table, macro definition, sas programmer, proc step, proc sql 19
20 By's Notsorted Option Karuna Samudral,
Gregory Giddings
What if the usual sort and usual group processing w ould eliminate the existing logical order and grouping of the data that must be maintained to ens ure the needed analysis is correct. This paper presents, to intermediate SAS programmers, some use s of the NOTSORTED option of the BY statement when working with group processing in dat a steps and procedure steps by group processing, proc step, proc sort, proc compare, data step, proc print, proc means, set statement, update statement, error message, sorted data, sample, proc sql 11
21 Calculating Geographic Distance: Concepts and Methods Frank J. Ivis Calculating the distance between point locations is often an important component of many forms of spat ial analy- sis in business and research. Although specialized software is available to perform this function, the power and flexibility of Base SAS makes it easy to compute a variety of distance measures. An added advantage i s that these measures can be customized according to specific user requirements and seamlessly incorporated w ith other SAS code. This paper outlines the basic concepts and methods involved in calculating geographic distance. Topics include distance calculations in two dimensions, considerations when dealing with latitude and longitude, measuring spherical distance, and map projections. In addition, several queries and calculations based on dis- tances are also demonstrated output delivery system, proc sql, proc step, distance measure, order by, euclidean distance, proc means, macro definition 10
22 Combining, Combining, Combining, Splitting, Splitting, Splitting Emmy V Pahmer Combining and Splitting data sets are among the most commonly performed data management tasks and as with everything in SAS there are many ways to go about it. This paper is for new SAS users and will show a progression of examples using the DATA STEP and PROC SQL, discussing the way each of them functions. Some of the advantages and disadvantages of each will be presented proc sql, proc step, create table, right join, inner join, quality control 9
23 Create a Report Showing Monthly, Quarter-To-Date and Year-To-Date Information Rodger Zhang Tracking sales force's performance is a common task in an organizatio n. It's easy to create a report showing monthly data only. However, you may also be asked to create a report to track the monthly, quarter -to-date (QTD) and year-to-date (YTD) performance. As different organizations' fiscal year vary, how would you do this without changing the date parameters every month when you run the report? SAS offers many ways to accomplish this task. This paper will focus on how to automatically define the 12 months and their corresponding 4 quarters. SAS functions, the Call Symput statement, DO Loop and a few tricky programming tips and techniques are illustrated. The code demonstrated in this paper can be used as the template to define any fiscal year's 12 months and corresponding 4 quarters. Base SAS is used and the examples shown are sample data only. The paper is for beginner or intermediate SAS programmers datepart, proc sql 6
24 Creating a Customized Table of Contents in ODS RTF Documents Electra Small With the advent of the ODS (Output Delivery System) RTF destination, SAS users are utilizing SAS's many output- producing procedures and statements to build tables that can be opened directly in MS Word and other word- processing packages. A natural next step is to automate the creation of tables of contents and indexes for documents. The table of contents (TOC), traditionally at the beginning of a document, and the index, traditionally at the end of a document, provide readers with road maps to find the tables of greatest interest to them. This paper reviews the new, version 9 methods for creating RTF (Rich Text Format) destination tables of contents. In addition, this paper offers two less-documented methods for creating customized tables of contents. One method utilizes ODS bookmarks and URL hyperlinks; the other uses the ODS text statement to pass RTF commands directly to the word processor proc step, proc template, proc freq, put statement, macro variable, proc tabulate, macro quoting function 11
25 Creating ActiveX Graphs for Presentations using SAS Enterprise Guide ... And Drill-Down Graphs Too Terek J. Peterson,
Robert Gordon
This paper i ntroduces th e S AS user to t he basics of using SAS E nterprise G uide (EG) to create gra phs. T he example project will show how to pull data from ClinTrace Oracle tables to make data sets, how to subset and merge the data sets with the point and click EG interface, how to produce a 3D ActiveX HTML Graph, and how to insert the graph into a PowerPoint presentation. Using the ActiveX graph toolbar, it will be demonstrated how to pivot, size, and zoom the graph using PowerPoint or EXCEL. A discussion and illustration will explain some of the limitations of the EG graphing capabilities. Exporting the code generated from the example project in EG allows enhancements with SAS using the TEMPLATE procedure and SAS/GRAPH code to produce publication quality output. Lastly, the authors will show how to take advantage of the ODS HTML output destination to create a drill-down series of graphs of increasing detail, which end in an EXCEL spreadsheet of the data proc step, sas enterprise guide, ods html, proc template, output delivery system, adverse events, excel 13
26 Creating AND Importing Multi-Sheet Excel Workbooks the Easy Way with SAS Vincent DelGobbo output delivery system, excel 20
27 Creating AND Importing Multi-Sheet Excel Workbooks the Easy Way with SAS Vincent DelGobbo output delivery system, excel 20
28 Custom Reports with Proc SQL: A Real-Life Example Electra Small Customized tables or reports produced entirely by SAS? When this topic comes up, most SAS users think immediately of PROC TABULATE or PROC REPORT. This paper highlights the powerful report- and table-generating capacities of PROC SQL. Using a real-world project as an example, PROC SQL is used to generate a custom EXCEL table for project managers to monitor the progress of a large survey being fielded in multiple states across the country. The key to PROC SQL's report-generating power is its ability to use character and numeric operators and functions, logical statements, and arithmetic computations -- all within the report-generating select statement. All these capabilities are employed to generate the desired survey-tracking report. To allow comparison, the paper also displays the coding and resulting tables of PROC TABULATE and PROC REPORT sample, proc sql, proc step, sample size, binary variable, proc report, group by, proc tabulate, order by, select, excel, ods html, by group processing 11
29 Customizing PROC FREQ's Output for One- and Two-Way Tables Nan Liu,
Marcelo Coca-Perraillon
The PROC FREQ is commonly used to display one- and two-way frequency tables. By default, frequencies are displayed without commas and percentages have two decimal places and no percent sign. One-way tables can be customized by modifying the default Ou tput Delivery System (ODS) template. Unfortunately, there is little cus- tomization possible for two-way tables not displayed as a list. In this paper we describe how to customize the PROC FREQ's output by combining the ODS system with PROC FORMAT and PROC TEMPLATE. The final outputs are one- and two-way tables that can display bot h the frequencies and the percents with any type of for- mat, including special characters and percent signs proc freq, proc step, proc template, sas output, relative frequency, proc format 8
30 Customizing Survival Plots by Example Nan Liu,
Marcelo Coca-Perraillon
SAS offers several ways to customize the display of survival curves and many SAS users have also provided macros to improve upon the default display. In this paper we show how to customize survival curves using PROC GPLOT. Our emphasis is on simple examples that ma ke small changes one at a time and not on hard-to-follow macros. We offer ways to modify scales, display conf idence intervals, display the number at risk, p-values, change the location of the legend and many other modifications that are often needed to display survival curves in peer-reviewed journals proc step, proc gplot, confidence interval, proc greplay 9
31 Data Analysis: Beyond the Basics Ian Stockwell SAS has many tools that can be used for data analysis. From Freqs and Means to Tabulates and Univariates, SAS can present a synopsis of data values relatively easily. However, there is a difference between what the data are, and what the data mean. In order to take this next step, I would like to go beyond the basics and introduce correlation and hypothesis testing using regression models. A brief statistical background will be included, along with coding examples for correlation and linear regression correlation, regression analysis, numeric variable, response variable, predictor variable, null hypothesis, estimate, anova, proc step, pearson correlation, proc corr, proc reg, standard deviation 9
32 DATA Step Hash Objects and How to Use Them Paul M. Dorfman,
Lessia S. Shajenko
In SAS Version 9.1, the hash table - the very first object introduced via the DATA STEP Component Interface in Version 9.0 - has finally become robust and syntactically stable. The philosophy and application style of the hash objects is quite different from any other structure ever used in the DATA STEP before. The most notable departure from the tradition is their run-time nature. The hash objects are instantiated, deleted, given memory, and updated - all at the run-time. It is intuitively clear that such traits should make for very inventive and flexible programming not ever seen in the DATA STEP code of yore. Both hash propaedeutics and material intended for SAS programmers already somewhat familiar with the basic hashigana. Live code examples are used to invite participants to explore a number of programming techniques, which would be utterly unthinkable before the advent of the canned hash objects in SAS. In other words, you are in for some intriguing SAS tunes from Hashville hash table, hash iterator, composite key, length statement 21
33 DBCompare: A Powerful Tool to Compare Data Definitions of Datasets Across Multiple Databases Balakrishna Dandamudi SAS programmers often end up working on data from different databases, refe rring to SAS data only. In this scenario a programmer's primary task would be analyzing t he inconsistencies in defining the datasets and variables within the database and across databases. DBCompare generates an extensive analysis report about the databases that are being compared: What datasets are in common across databases What datasets are in one da tabase and not in the other Whether matching datasets have different labels, different variables Whether matching variables have di fferent formats, labels , or types DBCompare is a tool written in Base SAS for the com parison of data definitions of SAS datasets across databases call execute, macro variable 8
34 Designing an Application with Business Intelligence Brian Deitch Business intelligence (BI) broadly refers to Information Technolog y (IT) that is tailored to help staff make better business decisions. At the Federal Deposit Insurance Corporation (FDIC), SAS/AF and Base SAS Release 8.2 are combined in a single application to allow users to query and report information that would otherwise require considerable IT skills to produce. This paper will illustrate how the application integrates these products to provide staff with BI capabilities proc sql, where statement, macro variable, order by, out=, business intelligence, create table, macro call, macro definition, temporary dataset 19
35 Designing and Building an Administrative Model for the SAS Drug Development Tool Meg Coughlin Regulated industries such as pharmaceuticals require specif ic functionalities of comput er systems such as audit trials, version control and restricted access for users. The SAS Drug Development (SDD) repository provides these required functionalities in a manner which allows t he SDD licensee to customize them to their work PROC- esses. Thus, the design and implementation of an administr ative model for SDD is an im portant consideration for potential licensees of the product. In this paper, one administrative model is proposed to help manage and or- ganize clinical trials analysis and reporting within the SDD tool clinical trial, clinical research, interim analysis 6
36 Developing and Managing a SAS Macro Library Carolyn Maass,
Margaret James,
Ginger Redner
A SAS macro library developed in-house is a valuable resource for providing standard tools to support statistical planning, analysis, and presentation of results for work in the pharmaceutical industry. The library ensures quality, minimizes rework and validation efforts, and facilitates preparation of regulatory submissions and responses to agency questions. The maintenance and continued growth of the library requires dedicated efforts from many developers and users. This paper will describe the organization and maintenance of a SAS macro library that has evolved over the last seven years for use by statisticians and statistical programmers in support of development of drug and vaccine products. The distributed structure of subcommittees designed to handle the communication and processing for continued growth of the library will be described. The roles of each subcommittee and the challenges faced in the management of the macro library will be discussed data cleaning, statistical programmer, regulatory submission 8
37 Developing Applications Using BASE SAS And UNIX Joe Novotny How many times have you written simple SAS programs to view the contents of SAS a dataset, determine a fre- quency count of a variable or create SAS transport files? What if you could perform these tasks with a few simple keystrokes from the UNIX command line? This paper highlights several simple BASE SAS techniques that allow you to take advantage of SAS's ability to interface with UNIX. The paper demonstrates practical applications of: 1) reading the UNIX command line into a SAS program, 2) printing SAS output directly to the UNIX terminal screen and 3) techniques that allow you to utilize UNIX information and commands from within SAS programs. These techniques will help you automate many everyday tasks, increase your programming productivity and pro- vide the basis for developing powerful applications proc step, macro variable, dataset, macro definition, call symput, filename statement, proc freq, sas base, proc printto, proc contents 10
38 Drawing Board to Real World Using ODS Graphical and Tabular Outputs on One Page Sanjaya Kumar bar chart, sas output 8
39 E-Mail z/OS SAS/MXG Tape Management Reports with ODS Traffic Lighting Neal Musitano Jr. This paper displays an e-mailed tape management report with "Tra ffic Lighting" using the BASE SAS Output Delivery System (ODS). The report is cre ated and e-mailed via a z/OS batch job using the BASE SAS JCL procedure. E-mail report s with ODS traffic lighting can be generated from your choice of input data. The input dat a for this example is from the daily SAS/MXG Performance Database PDB.TAPES, The e-mail report with ODS Traffic Lighting in red, yellow and green colors is generated as an HTML file using the BASE SAS Output Delivery System (O DS) and PROC PRINT. Reports can also be generated via other procedures such as PROC REPORT proc step, proc print, sas base, management reporting, output delivery system, proc format 6
40 Efficient Processing of Long Lists of Variable Names Paulette W. Staum Many programmers use SAS macro language to manipulate lists of variable names. They add prefixes or suffixes, insert delimiters, sort lists, identify matching words, etc. When these tools are used for lists with hundreds of entries, they can be surprisingly slow, taking minutes for simple string manipulation. Other methods of implementing list manipulations can significantly speed the processing of long lists. This paper will use DATA STEP techniques (including hash tables) and PROC SQL to dramatically reduce the time required for processing long lists macro variable, proc sql, proc step, hash table, variable list, sample, proc sort, macro loop, macro put, character functions, symbol table, macro definition, macro quoting function 9
41 Excellent Dating in SAS James Zeitler Both SAS and EXCEL determine dates as a number of days since an initial date, so each stores dates as integers. And, most of the time, when data are transferred betw een EXCEL and SAS, through the SAS IMPORT and EXPORT wizards, for example, t he conversion between S AS dates and EXCEL dates is seamless. But sometimes something untoward happens. CONVERSION BETWEEN SAS AND EXCEL DATES IN PROC IMPORT/PROC EXPORT Suppose you have an EXCEL spreadsheet in which one of the columns contains dates. Something like this: X Y Date 1 37165 10/1/2001 2 35048 12/15/1995 3 34730 1/31/1995 4 38046 2/29/2004 5 21916 1/1/1960 6 1 1/1/1900 7 367 1/1/1901 If I import this into SAS, using the IMPORT wizard or PROC IMPORT, like this: PROC IMPORT OUT= WORK.EDates DATAFILE= "C:\ExcellentDates.xls" excel, sysdate9, proc step, proc import 3
42 Exporting & Importing Datasets & Catalogs: Utility Macros Adel Fahmy Since different companies use different SAS versions installed on different platforms, exporting and importing both SAS datasets and catalogs become important issues. Also, Contract Research Organizations (CROs) have to deliver to their clients files that are either readable or easily imported on client' s platform. Before delivering to a client, those files have to be validated. On the other hand, the clients may perform their own quality control. We are presenting a set of very short and simplified utility macros that do each step of the whole process: exporting, importing, and validating. The macros cover datasets and catalogs and how to handle them on different platforms and for different software versions proc step, proc copy, proc cport, proc cimport, proc format, select, proc compare, set statement, stored macro, data cleaning, sample, macro definition 12
43 Finding Your Mistakes Before They Find You: A Quality Approach For SAS Programmers Richard M. Mitchell High quality work is critical to the success of a SAS programmer. While we are all human and undoubtedly may make a r are slip from time to time, one minor programming discrepancy can be devastating to a SAS programmer's credibility if it is discovered by the client rather than through internal review. A strong quality approach to SAS programming will help earn a deep trust over time from one's coworkers and clients as one routinely strives toward sound research and accurate reporting of data. This paper will discuss a quality approach that can benefit SAS programmers a t a l l l e v e l s. By implementing this quality approach th at includes a QA checklist, a peer review, and a team approval process, a SAS programmer can strive for that prestigious 100% success rate that will help ensure that you find your mistakes before they find you! sas programmer, sas programming 8
44 Formats to the Rescue Gary M. McQuown Formats are seldom utilized to their full potential. In addition to making a date comprehendible, they can resolve a number of data related issues and improve efficiency. This is especially true as the increasing quantity of data makes sorting, indexing, joining and merging more challenging. This presentation focuses on when, where, how and why formats may be used to expand and improve upon typical and atypical ETL processes. Two examples will be provided. Anyone familiar with the DATA STEP may use these techniques in a variety of ways character variable, numeric variable, proc step, proc sql 6
45 Generate Non-overlapping Equivalent Samples to Match an Existing Distribution in SAS Ying Feng,
Lei Yu
This paper presents a complex sampling design used to generate multiple non-overlapping and randomly equivalent samples for analysis. In our research, we use a known score distribution of a group of examinees serving as the focal group. To control for overall performance, we need to create three reference groups with distributions that are matched to that of the focal group and randomly selected from a larger pool of data. For example, the number of students in the reference groups at any given score level should be id entical to that in the focal group at that particular score level. One reference group includes students fr om a special sub-group and the other two groups come from the general population without overlap. Thes e randomly equivalent groups will be selected using a stratified random sampling procedure without replacement. Two different approaches will be demonstrated. The firs t approach utilizes SAS macros ; the second approach involves PROC SURVEYSELECT sample, proc surveyselect, random sampling, proc step 6
46 Getting to Know Your Customers by Clustering on Product Purchase Patterns James P. Shields Often in a corporation customers are classified based on gut feel or simple sales rankings. However, clustering can assign the customers to groups based on their behavior and purchase patterns and take some of the guess work out. This enables of the customizing of treatments, such as promotion frequency, to optimize sales within clusters or it also can identify unexpected influences on sales strategies. This presentation covers some of the basics of clustering using SAS by illustrating several examples useful in business proc step, cluster analysis 7
47 Handling Dates in the Macro Facility Toby Dunn Ah, shimmering SAS date and time values. They brighten our code everywhere, from input, through processing, to output. For the most part these values pose no ambiguity, they are simply formatted integers vividly manipulated with arithmetic, formats, and interval based functions. Alas, when we try to use date and time values in SAS Macro, things start looking dark. The clarity we know and love becomes murky and unclear. Should they be this dim and shadowy? I say no! With the light of knowledge and a few dazzling Macro functions this darkness can be illuminated like the shining sun rising after a moonless night. This paper's intended audience is beginner and intermediate SAS programmers macro function, macro facility, sysdate9, macro variable, macro put 4
48 How Do I Love Hash Tables? Let Me Count The Ways! Judy Loren I love hash tables. You will, too, after you see what they can do. This paper will start with the classic 2 table join. Nothing new, you say? But this version does it in one step without sorting. And, it's the fastest method around. Next, you will see the use of hash tables to join multiple datasets on different keys in one pass, again with no sorting. How about unlimited recursive chained lookups (like when you need to update an ID through as many incarnations as it may have had)? Hash tables solve that one, too. And before you catch your breath, you'll see how to create n datasets from one (or more), where n is determined (at runtime) by the number of values encountered in a variable. No muss, no fuss. One step (well, OK, this one does require a prior sort) and you're done. We'll wind up with an outer join, just to show that hash tables can do that, too. Take a look at what they can deliver, and you'll be counting the ways you love hash tables before the year is out hash table, conditional do loop, hash iterator, pdv, do loop, dataset, proc means, key, out= 14
49 How is your I/O Logic? A primer on understanding program dependencies in large SAS implementations Jim Fang,
Anuj Sharma,
Vinod Narayanan,
Patrick Dunleavy
Maintenance of a large scale SAS Reporting Sy stem (SRS) comprised of hundreds of SAS programs, SAS datasets and thousands of reports is a challenging task. One of the key challenges is frequent change requests from the end users in the business community demanding quick turnaround time. T his paper demonstr ates the usefulness of determining the input-output (I/O) logic of all the SAS programs in the SRS. Such a document greatly helps meet the challenge of quick turnaround time underlying these change requests. The I/O logic of each SAS program is recorded in the form of a spreadsheet containing columns for inputs and outputs for all the programs in the right sequence. This spreadsheet helps find dependencies between SAS programs thus identify ing efficiently and accura tely the programs that need to be m odified to satisfy change requests dataset, macro definition, proc sql, create table, txt, proc step 8
50 How Many Keystrokes are Needed to Build this Dataset? Roger S. Cohen,
Kenneth Gold
One cost component of many data projects is the cost of keying data off of paper and into the computer. Sometimes similar or prior year datasets may be used as a guide, particularly if there is a simple method for calculating the keystrokes that would be needed to repr oduce that file. This was a problem for the New York State Tax Department which needed a way to provide keystroke estimates to prospective vendors bidding to turn tax returns into da ta for the Department. With Base SAS and some high school math, we solved the problem sample, excel 5
51 How To Get Around the SAS Customer Support Web Site Marianne L. Whitlock Need more SAS help than you can find in the manuals and user books? Then it is time to turn to the web, where one of the biggest and best sources is the SAS user-oriented site developed by the SAS Institute, http://Support.SAS.com . However, this site is so big, that you might need help getting around to locate the answer to your problem. The answer might be found in a FAQ (frequently asked question), a SAS Note, sample code, or in a feature, reported there, but too new to have worked its way into the documentation. You may submit a question and have a knowledgeable expert reply. You may want to get involved in one of the new forums where you will find ongoing discussions in areas of special interest. This paper can be your guide to getting help at this site sas base, sample, dataset, proc freq, sas enterprise guide, ods html 6
52 How To Produce Almost Perfect RTF Output Suzanne M. Dorinski The Census Bureau performs an annual data collection for the National Center for Education Statistics. As part of the file documentation, the Census Bureau produces output that shows the imputation flag distribution for more than 140 variables. Census also produces a summary table that shows the minimum, maximum, and mean value for each continuous variable, along with the number of records that have a value greater than or equal to zero, the number of records with missing values, and the number of records with "not applicable" values. The output can be easily produced as RTF (Rich Text Format), but we need to use many little tricks to produce beautiful Microsoft Word output proc freq, proc step, proc print, imputation, label statement, cumulative frequency, ods rtf, footnote statement, missing value, title statement, interval variable 20
53 How to Reduce the Disk Space Required by a SAS Dataset Selvaratnam Sridharma SAS datasets can be large and disk space can often be at a premium. In this paper, SAS options like COMPRESS, SAS statements like LENGTH and ATTRIB statements, SAS View, and Macros are discussed as to how to reduce the size of a SAS dataset. An already developed %SQUEEZE macro can find the minimum lengths required for both numeric and character variables in a SAS dataset, and use these minimum lengths for the variables to reduce the size of the SAS dataset. Another macro %DROPMISS that is developed here can automatically identify and drop SAS variables that have only missing or null values dataset, numeric variable, character variable, view, missing value, proc sql, proc step, macro loop, macro conditional, attrib statement, cpu time, options statement, if-then-else 16
54 How to Think Through the SAS DATA Step H. Ian Whitlock You are relatively new to SAS and interested in writing SAS code. You have probably written DATA STEP code; some works, some doesn't, sometimes you know why, and sometimes you don't. If this describes you, then this talk is for you. You are a programmer, new to SAS. The DATA STEP language looks similar to PL1 and has some characteristics that look like languages you are familiar with. However, after learning the syntax your code feels awkward and you feel like you are fighting the system. The DATA STEP has been very well designed, but it is different, and it is worth learning how it works, if you want elegant code, this talk is for you. Even people who have been SAS programmers who have been working with SAS for years should find, an "Ah ha, so that's why", in this talk. SAS is Step Oriented Before looking at the DATA STEP in detail, it would be good to take an overall look at SAS. SAS is a step oriented language rather than a routine oriented language put statement, by group processing 20
55 Identifying Duplicate Values Christopher J. Bost This paper describes techniques for identifying duplicat e values across observations, including PROC SORT, PROC FREQ, PROC SQL, and FIRST./LAST. variables. Pros and cons of each technique are noted proc step, proc sql, proc freq, dataset, proc sort, create table, group by 8
56 Implementing SAS and Enterprise Guide to Enhance a Graduate Biostatistics Curriculum Albert Crawford,
Howard Chapman
In 2005 Thomas Jefferson University implemented SAS/ENTERPRISE Guide (EG) to upgrade the biostatistics curricula of its Public Health and Pharmacology Master's degree programs. Prior to 2005, all biostatistics instruction had employed only manual methods. The Biostatistics Working Group (BWG) was convened early in 2004, comprised of all faculty teaching graduate biostatistics courses. The BWG evaluated 3 statistical packages and selected SAS/EG, and evaluated facilities on campus and selected the Library's electronic classroom. The two presenters expanded the site license from 50 workstations to 100, collaborated with Jefferson Academic Information Services and Research (ASIR) staff to revise the image and deploy SAS/EG on all 30 workstations in the library's electronic classroom, and collaborated with SAS and ASIR staff to develop a student home use agreement. Thus far, 3 instructors, assisted by 1 Teaching Assistant (TA), have taught 7 courses, including more than 125 students sas enterprise guide, statistical software, data science, anova 9
57 Improve Your Dating: The INTNX Function Alignment Value SAMEDAY Bruce F. Gilsen date variable, sysdate9 2
58 Imputation of Missing Date Information for Injuries and Poisonings Reported in the National Health Interview Survey Richard Coles,
Patricia Barnes,
Lois Fingerhut,
Jane Gentleman,
Nathaniel Schenker,
Margaret Warner
The National Health Interview Survey (NHIS), which is fielded by the National Center for Health Statistics (NCHS), contains questions about medically-att ended injury and poisoning episodes experienced by family members during the three months prior to th e survey interview date. If the respondent cannot provide complete episode date information (day, month, and year) then the respondent is asked to narrow down the date by identifying the mont h of injury/poisoning, and, if possible, by stating whether the episode occurred in the beginning, middle, or end of a known month; or by stating how many days, weeks, or months ago the episode occurred. For confidentiality reasons, the date of the interview and the day of the episode cannot be released to the public. Users of the NHIS public use microdata files are therefore provided with only the month and year of the episode, as well as the elapsed time (in days) between the episode and the interview elapsed time, imputation, uniform distribution, sysdate9, data wrangling, date variable, sample, macro variable 7
59 Including All Variables in the Original Data Set If There Are Empty Fields Wei Xu Have you ever checked the number of observations in a data set prior to PROC REPORT step? If it is zer o, you will output shell listings/tables with text indication "No observations" per shell listings/tables requests. This paper will describe a simple, straightforward way to return the number of observations in a data set or an empty data set with the words "No observations" in the specified v ariable using PROC SQL, and a small MACRO. The text "No observations" will appear for each display, rather than having empty outputs for the display after using PROC REPORT proc step, proc report, proc sql, macro variable, alter table, macro call 2
60 Introduction to PROC TABULATE Wendi L. Wright This introduction to PROC TABULATE first looks at the basic syntax of PROC TABULATE and then, using a series of examples, shows how to produce one, two and three dimensional tables. The paper also illustrates how to use the TABLE statement a nd the difference between the CLASS an d VAR statements. Also discussed are adding statistics for the table (including percents), labeling variabl es and statistics, adding totals and subtotals, and how PROC TABULATE handles missing data. Finally several examples are shown for how to clean up the tables using both standard PROC TABULATE options as well as several style options within ODS proc tabulate, proc step, class variable, missing value, proc format 23
61 ISO 8601 - An International Standard for Date and Time Formats Shi-Tao Yeh ISO 8601 is an International Standard for date and time representations referenced by W3C HTML recommendation and adopted by CDISC as the standard for date and time interchange formats. This paper discusses the elements of the ISO 8601 Standard that are supported by SAS . Some sample code and output are included in the paper to illustrate how to implement the Standard. The SAS products used in this paper are SAS BASE /g1639.1.3 on a PC Windows platform sample, time., cdisc 5
62 It's About Time! A Primer on Time-Slotting of Data Using SAS Maria Y. Reiss crf, clinical trial, treatment period, adverse events, trial design model, pharmaceutical industry, dataset, proc step, baseline, proc sql, sample, out=, proc gplot, cdisc 13
63 Journeymen's Tools: Data Review Macro FreqAll: Using Proc SQL List Processing with Dictionary.Columns to Eliminate Macro Do Loops Ronald J. Fehd The SAS R⃝ macro language is simple, yet powerful. List Processing with PROC SQL is also simple, yet powerful. This paper provides a data review macro FreqAll which illustrates using PROC SQL reading Dictionary .Columns to replace macro %do loops. Expected audience is advanced users, and macro programmers proc step, proc sql, macro variable, macro loop, proc freq, do loop, proc append, select, proc print, macro call, macro definition, macro put, %if-%then-%else 9
64 Know Your AREA! Creating Professional SAS Graphics in Clinical Safety Data, Using the AREAS Option in PROC GPLOT Rita Tsang In monitoring safety data in clinical trials, visual displays of individual patient data over time (i.e. vitals and lab data) are indispensable. This paper will introduce examples of these displays for a Data Safety Monitoring Committee, using the GPLOT procedure in SAS/GRAPH. Specifically, the AREAS option in GPLOT will be used to show how SAS/GRAPH can be employed to produce complex and professional graphics. Examples from safety monitoring data in the clinical trial environment will be drawn data visualization, proc gplot, proc step, clinical trial, sample 21
65 LAG - the Very Powerful and Easily Misused SAS Function Yunchao (Susan) Tian There are times when SAS programmers need to relate the value of a variable in the current observation to the value of the same or another variable in the previous observation. The LAG func tion is a very useful tool for this purpose. Unfortunately, it is frequent ly misused and produces unexpected result s. This is because it often appears that the LAG function returns the value of the variable from the previous observation, which is true if it is called in non- conditional code. However, when it is executed conditionally, the LAG function only retrieves values from observations for which the condition is satisfied. This paper discusses how the LAG function should be used in di fferent situations to avoid unexpected results. The intended audience is beginner to intermediate SAS users with good knowledge of Base SAS lag function, missing value, dataset 5
66 Let's Sudoku with SAS! Vatsala Karwe,
Patricia Seunarine,
Carol Razafindrakoto
This paper discusses three SAS programs that can be used to solve sudoku puzzles. All three pieces of code are different -- beginning with the way the sudoku puzzle problem is set up, to the way that it is solved. We have named these programs symsudoku (because this program uses call symput as a primary tool), vkalg (an algo- rithm for SAS), and SAS4SAS (sudoku analyzer-solver for SAS). In this paper, we first present details of vkalg, digressing occasionally to compare certain features of our three programs; we then discuss symsudoku and SAS4SAS in the final sections. We conclude with a note on our experiences while working on this paper macro variable, proc step, proc sort, if-then-else, call symput, proc tabulate, macro definition 24
67 Linking SAS Analytics, U.S. Census Gazetteer Data and ArcView Geocoding Software for Medicare Fraud Screening Laurie Hamilton This paper describes a proof-of-concept study undertaken to determine the usefulness of provider-beneficiary mean geographic distances as a screening tool in Medicare fraud, waste and abuse detection activities. Tech- niques included geocoding provider and beneficiary addresses, calculating geographic distances between pro- vider-beneficiary pairs, and creating summary statistics and automated screening procedures. We used ESRI's ArcView Desktop GIS software for street-level geocoding, Gazetteer files publicly available from the U.S. Census Bureau for zip code-level geocoding, and Base SAS for all data transfer activities, distance calculations, summary statistics and screening. SAS procedures included PROC DBF, PROC MEANS and PROC SUMMARY. The DATA STEP was also used for calculations and screening standard deviation, sas base, proc step, insurance claims, data mining, sample, proc means 10
68 Logistic Regression Basics Joseph J. Guido,
Paul Winters,
Adam Rains
What is regression? What's the difference between linear and logistic regression? When and how should I use them? While these are common questions when students first encounter modeling procedures, there are very few sources which succinctly summarize the process for the SAS system. After several years of teaching courses in the use of SAS/STAT for public health data analysis, we developed a primer to quickly impart a working knowl- edge of logistic regression to our students. While logistic regression analyses may be performed using a variety of SAS procedures (CATMOD, GENMOD, PROBIT, LOGISTIC and PHREG), this paper focuses on the LO- GISTIC procedure as it is particularly well-suited to the needs of our students regression analysis, logistic distribution, predictor variable, logistic regression, proc logistic, proc step, odds ratio, proc reg, estimate, response variable, chi-square test, likelihood function, proc freq 7
69 Managing Macro Variables Using the SASHELP VMACRO View Weifeng Xu,
Junjie Lu
SASHELP views, also known as DICTIO NARY tables, provide a number of SAS data views. SAS users can get very useful information about their SAS session from these dat a views. VMACRO is one of these data views. This paper will disc uss how to get and utilize information fr om VMACRO views when working on SAS macro procedures. KEYWORDS: SAS Macro, SASHELP, VMACRO macro variable, data step, proc print, macro definition, proc step, sample 5
70 Matching with Propensity Scores to Reduce Bias in Observational Studies Marcelo Coca-Perraillon,
Nan Liu
In observational studies subjects are not randomly assigned to treat ment and control groups. Ther efore, both groups can be significantly different from each other and their differences after applying a treatm ent cannot be attribut ed to the treatment ef- fect. Propensity scores methods offer a way to balance groups by matching treatment and contro l units based on a set of co- variates. This paper explains how to use SAS to match samples employing the most commonly used matching methods, such as nearest available neighbor, calipers and radius with- and without replacement. This paper also serves as an introduc- tion to propensity score matching methods and illustrates both t he relevance and the inherent pr oblems of any method that attempts to select a valid comparison group propensity score, propensity score matching, set statement, sample, treatment effect, logistic distribution 10
71 MIMO: Multiple Inputs Multiple Outputs - Multiplying the Fun while doing the Data Step John Fahey Every SAS programmer has done the DATA STEP, one foot at a time: Data Dance; Infile Do_Si_Do; Input OneFoot &TheOther; Run; / back to your partner / Or Data GetUp; Set BackDown; Run; / off at the mouth / Sometimes the best way to arrange your dance card is with multiple partners infile statement, out=, flag variable, output 9
72 Modifying the LogParse PassInfo Macro Ronald J. Fehd This paper examines the issues of building a SAS usage database by modifying macros used to read the job and rtrace logs to provide a common key in each log for joining the job times with the products used. Expected audience is advanced users, macro programmers, site and server administrators. Readers are expected to be familiar with issues of configuration and running programs as a batch process. Keywords: altlog log logparse passinfo rtrace rtraceloc . Contents Database Theory 2 The LogParse Suite 2 The Rtrace Suite 2 Accuracy of DATETIME 3 Modifying SASv?.cfg 4 Modifying Autoexec.sas 5 Modifying PassInfo 5 Modifying LogParse 6 Modifying RTRACERD 7 A Demonstration Suite 7 Merging Time and Product Usage 10 proc step, macro put, proc print, proc sql, macro variable, cpu time, proc options, %if-%then-%else 11
73 Multi-Threaded Reads in SAS/Access for Relational Databases Sarah Whittier,
Panayiotis Manolakos
Multi-threading was implemented in SAS 9. This new feature affects the performance of certain SAS procedures and SAS/ACCESS for Relational D atabases. However, it can be challenging to figure out how best to use multi - threading in order to improve the performance of relational databases queries. Contributing to this confusion are the several parameters that affect how threading works. This pape r has three objectives. First, we define and discuss multi -threading in general. Second, we show how to use the DBSLICEPARM option and present significant performance improvements at our site that resulted from simply using the default DBSLICEPARM option. Third, we present results of our testing of the impact of multi-threaded reads on our Oracle databases oracle, proc sql, libname statement, cpu time, proc step, sql pass-through, relational database, sas base 7
74 Need a Speedy Index? RAM It! Lessia S. Shajenko,
Paul M. Dorfman
A SAS index is a search file associated with a data file. Given a key, the file is searched and, if the key is found, its record ID is returned and used to retrieve the data file record. For many practical tasks, this works sufficiently fast. But fast is never fast enough - SAS indexes are disk-resident and so leave much room for acceleration. SAS auto- maintains its indexes, which is splendid. But oftentimes the trade-off is programmatic rigidity. When either overweighs the pain to program, the indexing scheme suddenly appears to virtually lend itself to custom crafting. Being no longer tied to a particular search algorithm or storage medium, you can let your programming fancy fly, the power of the SAS language being at your disposal. The pain disappears. The disk-resident index file yields to a memory-based look-up returning a file pointer. B-trees are defenestrated in favor of search algorithms chosen for speed and/or to fit a particular key structure index, cpu time, lookup, hash table, dataset, memory usage, point= option, composite key, key, surrogate key, temporary array, unique key, proc sql 14
75 ODS LAYOUT is Like an Onion Rich Mays ODS LAYOUT is like an onion. They both make you cry? No! They both have layers! In version 9.1, the ODS LAYOUT feature is one of the best inventions since the Caramel Frappuccino. SAS now gives you a straightforward approach to placing graphs and tables on a page while eliminating the need for PROC GREPLAY and TEMPLATES. This paper demonstrates a method of using ODS LAYOUT capabilities to create PDF documents by creating a series of page "layers." It also demonstrates the use of macros to enhance the capabilities of ODS LAYOUT. A macro controlled system to determine available space on a page, and the subsequent placement of graphs/tables will be discussed. A good understanding of how to use macros is essential to understanding this paper. An understanding of ODS LAYOUT and PROC GREPLAY is helpful but not necessary. This paper will include actual code and examples proc greplay, proc step, ods pdf, output delivery system 9
76 Performance Boosters: Streamlining Report Production from Days to Hours Jim Fang,
Patrick Dunleavy,
Vinod Narayanan,
Anuj Sharma
This paper show cases real life ex amples in making enter prise SAS sy stems run faster for organizations creating thousands of reports. By diligently testing a series of advanced SAS progra mming techniques such as macros, and indexing against gigaby te level datasets, programs were optimized to run thousands of times faster. In the era of information explosion, the examples presented in this paper w ill help business users gain quicker access to processed data and reports needed for analytical decision making proc sql, dataset, cpu time, proc step, macro definition, data validation rules, index, where statement, %if-%then-%else 9
77 Perl Regular Expressions 102 Kenneth W. Borowiak Perl regular expressions were made available in SAS in Version 9 through the PRX family of functions and call routines. The SAS community has already generated some literature on getting started with these often-cryptic, but very powerful character functions. The goal of this paper is to build upon the existing literature by exposing some of the pitfalls and subtleties of writing regular expressions. Using a fictitious clinical trial adverse event data set, concepts such as zero-width assertions, anchors, non-capturing buffers and greedy quantifiers are explored. This paper is targeted at those who already have a basic knowledge of regular expressions. Keywords: word boundary, negative lookaheads, positive lookbehinds, zero-width assertions, anchors, non-capturing buffers, greedy quantifiers adverse events, clinical trial, prxmatch, character variable, character functions, proc sql 11
78 Personal Experiences of Implementing & Using SAS 9 Philip A. Mason SAS 9 is great and very powerful - truly an e nterprise product. You can still use it in a rather "small" way though, much like you would SAS 8, however you really get value when you use some of the Business Intelligence parts of SAS 9. This paper describes my personal experiences of installing and using SAS 9 over the last 2.5 years sas enterprise guide, sas 9 6
79 Predicting Child Support Payment Delinquency Using SAS Enterprise Miner 5.1 Jodi Blomberg,
Jacqueline K. Long
To ensure the health and welfare of children and to reduce welfare costs, child support agencies around the country are tasked with successfully collecting child support payments for the children in their respective states. This paper describes two case studies that illustrate how a data mining approach has helped agencies collect more support payments and use their collection resources more effectively. Using data mining to identify payers who are likely to become delinquent helps child support agencies build effective intervention strategies for collecting payments. Predictive modeling is also used to determine which intervention strategies are effective for various types of payers. Sequence analysis and binary response modeling are emphasized in this approach, using SAS Enterprise Miner 5.1 as the modeling environment response variable, data mining, proc hpsplit, predictor variable, sample, regression analysis, unsupervised learning, class variable, model deployment 12
80 Presentation Quality Graphs with SAS/GRAPH Michael G. Eberhart This paper will describe several examples of creating presentation quality graphs using SAS/GRAPH and the annotate facility. SAS/GRAPH options will be used to set axis parameters, customize graph output, create and enhance legends and combine multiple graphs into one output graph. The first example creates a combination GPLOT/GCHART graph. The GREPLAY procedure is used to overlay two graphs and enhance the resolution of the output graph using the XPIXELS and YPIXELS options. A second example creates a reverse double bar graph, containing two HBAR graphs side-by-side, facing in opposite directions, for visual comparison of data. The third example creates a VBAR graph using event-level data. This graph includes using GROUP and SUBGROUP options, RAXIS, MAXIS and GAXIS statements, and options for adding and clipping reference lines proc step, proc greplay 19
81 PROC REPORT's Temporary Variable: What is it and Why Do I Care? Mike Molter PROC REPORT can do it all. That was my reaction after I learned about all the tasks that I co uld perform with this procedure. Not only can I display and summarize data as I can with other procedures, but I c an also customize how the output looks. Even better than that, I can perform certain DATA STEP-like tasks such as creating data or defining attributes with DATA STEP-like processing such as conditional or iterative looping logic. However, as I began playing with some of these features, I soon discovered that the underlying file on which the report is based is not what I had expected, mak ing c onditional executi on of statements ba sed o n t heir v alues un predictable. L uckily, my co untless journeys through SAS OnlineDoc had ex posed me to temporary variables. Perhaps an under-documented feature, temporary variables give us the opportunity to, in effect, make the file on which the report is based more like the more familiar data s et proc report, proc step, class variable, do loop 5
82 Proc SQL versus The DATA Step JoAnn R. Matthews Most data within organizations is stored in relational databases. Structured Query Language (SQL) has evolved as the standard for accessing, updating, and modifying data stored in relational databases. PROC SQL is a powerful procedure available in SAS that can minimize keystrokes and maximize CPU resources. PROC SQL syntax looks very similar to SQL and can be used in place of traditional SAS data steps. In this Hands-On Workshop, PROC SQL will be compared to the traditional DATA STEP. First, PROC SQL will be compared to a simple DATA STEP. SELECT co upled with FROM, WHERE, GROUP BY and ORDER BY statements will be demonstrated. CA SE statements will be compared to IF THEN ELSE logic. Summary functions using SUM, MIN, AVG, MAX and COUNT will be demonstrated. The true power of PROC SQL will be demonstrated with UNION ALL, UNION DISTINCT and JOINS proc sql, proc step, sas output, data step, group by, union all, select, proc contents, run, inner join, order by, by group processing, proc print, where statement, relational database 35
83 PROC SQL: When and How to Use It? Ying Feng As a data analyst who did Oracle and SQL Server Database programming before diving into the SAS world, I'm thrilled to find SAS also provides its own version of Structured Query Language (SQL). Sure, the DATA STEP can do a lot of work, but sometimes PROC SQL can accomplish the same work more efficiently and with fewer steps. At the very least, it provides a nice alternate to the DATA STEP. In this paper, some scenarios will be identified and PROC SQL will be used to demonstrate them proc sql, proc step, sas base, macro variable, create table, relational database 5
84 Producing Summary Tables in SAS Enterprise Guide Lora D. Delwiche,
Susan J. Slaughter
This paper shows, step-by-step, how to use the Summary Tables task in Enterprise Guide to produce polished reports. Summary Tables is based on the TABLULATE procedure, but you don't need to know how to use PROC TABULATE or even how to write SAS programs to use this feature. Whether you are a seasoned SAS programmer or new to SAS, Summary Tables can make creating summary reports easier sas enterprise guide, proc tabulate, proc step 11
85 Programmatically Comparing Data Libraries Stephen Hamburg When two data libraries that are expected to be similar in structure contain a large number of data sets, or the data sets contain a large number of variables, a manual comparison can prove to be a difficult and tedious task. This paper demonstrates how SAS can be used to automate the compare process by programmatically examining all of the data sets and variables that exist within two data libraries and provide a precise, summarized report of discrepancies, as well as similarities, between them libname statement, proc compare, proc step, sample 3
86 Receiver Operating Characteristic (ROC) Curves Mithat Gonen Assessment of predictive accuracy is a critical aspect of evaluating and comparing models, algorithms or technologies that produce the predictions. In the field of medical diagnosis, receiver operating characteristic (ROC) curves have become the standard tool for this purpose and its use is becoming increasingly common in other fields such as finance, atmospheric science and machine learning. There are surprisingly few built-in options in SAS for ROC curves, but several procedures in SAS/STAT can be tailored with little effort to produce a wide variety of ROC analyses. This talk will focus on the use of SAS/STAT procedures FREQ, LOGISTIC, MIXED and NLMIXED to perform ROC analyses, including estimation of sensitivity and specificity, estimation of an ROC curve and computing the area under the ROC curve. In addition, several macros will be introduced to facilitate graphical presentation and complement existing statistical capabilities of SAS with regard to ROC curves roc curve, proc step, proc calis, type i error, auc, logistic distribution, confidence interval, proc freq, binomial distribution, type ii error, proc logistic, sample, histogram, regression analysis, normal distribution, null hypothesis, credit scoring, logistic regression 18
87 Release 2.1 of SAS Add-In for Microsoft Office - Adding Microsoft PowerPoint to the Mix Bill J. Gibson,
Jennifer Bradshaw Clegg,
Eric Hill
Release 2.1 of SAS Add-In for Microsoft Office builds on t he functionality introduced in release 1.3 of SAS Add-In for Microsoft Office. With release 2.1, Microsoft PowerPoint users can access the power of SAS and create presentations with refreshable SAS content. SAS data acce ss support in Microsoft EXCEL is greatly expanded in release 2.1; users can open SAS data sources of any size, eit her directly into worksheets or into Microsoft EXCEL PivotTables, and users can easily create a SAS data set from Microsoft EXCEL data. For reporting, release 2.1 facilitates formatting SAS reports using the Microsoft Office application, and intermixing SAS content with other content in Microsoft EXCEL excel, dataset, sas enterprise guide, xls, sas programming, proc sql 20
88 Renaming Variables for Source Data Residing Outside of a SAS Data Set Barbara Morse What do y ou do w hen the tabl e column names of y our non-SAS source data change and y ou don't have the time or desire to change y our library of existing SAS code? T his paper will suggest two possible solutions for handling the renaming w ithout making large changes to existing code macro variable, variable list, proc step, proc sql, dataset, proc transpose, macro put 3
89 SAS Data Views Simply Stated James C. Stokes What is a SAS Data View? How does it differ from a SAS Da ta File? What is a SAS data set? These are common questions often asked by novice and experienced SAS users alike. Many of us are faced with the daunting task of processing large volumes of data stored as non SAS dat a sets (e.g. flat files, e tc.). By using SAS Data Views, we can dramatically reduce the amount of computer resources needed to process large volumes of data and simplify the way we process the non SAS dat asets. Given the scarcity of computer resources and associated costs, it is critical to our success that we utilize SAS Data Views. For example, when processing large non SAS data sets, securing work space often proves to be a major stumbling block to the successful execution of a given job stream. By utilizing SAS data views, one no longer needs to secure large amounts of work space to ensure successful completion of the job dataset, proc step, sample, proc sql 3
90 SAS Interview or "How to Get a Second Date" Gary M. McQuown Job interviews and first dates have a lot in common. Each pits one party against the other in an effort to determine if they are a good match. Although each party should have a good understanding of what they and the other will do and say, this is seldom the case and critical mistakes are often made. This presentation examines the interview from both sides with a focus on "rational" expectations and questioning techniques (with examples). Hopefully anyone participating in a future interview (or date) will find it useful missing value, proc step 7
91 SAS Macros and the Power of Design Dalia C. Kahane This paper demonstrates how you can use SAS macros to design a complex system that is yet efficient and flexible. It shows how you may utilize macros to perform tasks that need to be repeated, with variations across tasks and across different datasets. A careful design allows you to take charge of and respond to changes and variations in requirements. The system of macros described here includes a %DRIVER and supporting macros. Together, they declare needed macro variables, prepare required SAS dataset s, perform varying tasks based on current needs, and report t he results of the processes. Two important design features are put forward. First, SAS macros facilitate the use of metadata t ables that provide relevant values for the current run. Second, modularized design allo ws each macro to be separately programmed and tested. The macros can then serve as building blocks, with various combinations of macros being used to complete different tasks data validation rules, macro variable, macro definition, call symputx, dataset, proc sql, proc step 12
92 SAS-L - Superb (& Free) SAS Support/Learning Tool H. Ian Whitlock SAS-L is an electronic discussion group of SAS users and programming experts from around the world. I will present a number of examples to support the assertion made in the title. For example, it took one SAS user less than an hour to go from Dear Listers, I am wondering how xml is working with SAS tables. If I use LIBNAME xxx xml "..", I can only write 1 SAS table into the xml file. Do I miss something? to Thank you so much! Want the answer? Come to the talk, or look it up on SAS-L 1 create table, proc step 15
93 SAS/AF and Internet Explorer: Capturing Web Forms Data Entry in Thick Client Applications Richard A. DeVenezia This paper presents a new twist in data entry. The Microsoft Web Browser component is used to display a hypertext markup language (HTML) file containing a FORM element. Data submitted from the browser is accessed directly in SAS/AF without needing web servers or other middleware applications. HTML with a small amount of CSS is a great way to renovate tired looking input screens. You can add a touch of Javascript for dynamic adjustments prior to submittal sample, http 10
94 SAS/GRAPH 101 Michael S. Zdeb,
Robert E. Allison
SAS/GRAPH shares a trait with other parts of the SAS system. Upon first glance, the sheer volume of documentation makes it seem as if the learning curve might require a significant investment of time. In reality, very little knowledge of the 'bells and whistles' of SAS/GRAPH is needed before you can produce presentation-quality graphics. The following instructions start with very simple SAS code - where SAS makes the decisions as to the look of your graphics - and work their way gradually toward more customized output by adding more user control. PROC GPLOT is used throughout, though the same approach can be taken with any of the other SAS/GRAPH procedures. Hopefully, the knowledge you gain here can be used in experimenting with other procedures proc gplot, proc step, line chart, ods pdf 20
95 Segmentation For Insurance Payments Michael Sherlock An online insurance agency has built a base of names that responded to different offers from various carriers, some of whom have purchased one or more insurance products. The goal of this project is to analyze response and sales data to understand relationship among products, offers, and payments for a single carrier to deploy predictive models and segmentation schemes to target best prospects for acquisition or cross-sell through a multi-channel communication strategy. Individual information was overlaid with demographic and psychographic data. A logistic regression model was developed to score individuals based on their propensity to convert (i.e. pay for the issued policy). These records were then segmented using a clustering technique, and distinct, descriptive groups were produced to alter marketing language. Also, a cross-sell matrix was developed to identify products that the same carrier may offer to existing customers credit card, logistic regression, logistic distribution, regression analysis, likelihood function, sample 10
96 Simple Techniques to Help Trace Problems in Your Application Robert L. Russell When debugging a problem, one of the first things you need to figure out is where to look to find the source of the problem. This paper presents a couple of quick tips that will make it easier for you to chain backwards from problem data sets or mapping formats to their source programs. Also included is a tip, independent of the file creation date, for identifying when a data set was created proc step, dataset, proc catalog, format statement, proc format, options statement, proc sort, proc sql 9
97 Standard SAS Macros for Standard Date/Time Processing Qin Lin,
Timothy D. Kelly
Processing partial or invalid date/time values to meet certain needs imposes challenges for all SAS programmers. The CDISC Study Data Tabulation Model (SDTM) standard has been added as a draft FDA guidance. It specifies the sta ndard for p resenting full/pa rtial date/time v alues. To fol low the sta ndards of CDI SC SDT M v3.1, we developed several dynamic macros to process dates and times. 1. %CDISCDTM: read s in most date/ti me value s (com plete, pa rtial or invali d), ch ecks its validity an d converts date/time to standard ISO8601 format; 2. %YEAR4: converts two-digits year to four-digits year; 3. %DURATION: calculates the duration between two dates; 4. %STUDYDAY: calculates the study day; 5. %TEAE: defines treatment emergent adverse events based on AE start date and reference date, as well as lag time; 6. %MINLEVEL: identifies the lowest common date part that exi sts be tween two dates; it is called by time variable, study day, sample, trial elements, sdtmig, adverse events, cdisc 18
98 Statistical analysis of clustered data using SAS Gui-Shuang Ying,
Chengcheng Liu
Clustered data is very common, such as the data from paired eyes of the same patient, from multiple teeth of the same mouth, from animals of the same litter, from siblings in the same family. The key feature of clustered data is that outcomes from the same cluster are likely to be positively correlated. The proper analysis of clustered data requires taking this correlation into consideration. The ignorance of such correlation can bias the statistical infer- ence. This paper provides an overview on the availability of built-in SAS procedures and user-developed SAS macros for the analysis of clustered data from Ophthalmology studies proc step, proc genmod, sas output, proc mixed, correlation, proc glimmix, frailty model, estimate, poisson distribution, macro definition, proc calis, poisson regression, logistic distribution, proc freq, proc phreg, proc univariate, regression analysis, proc ttest, likelihood function, maximum likelihood estimation, rank test, wilcoxon signed-rank, logistic regression, proc logistic 13
99 Submiting Mainframe Batch Jobs from PC SAS Richard Andrews The SAS System offers a host of mechanisms to interact wi th remote platforms. This paper discuss' an application to submit IBM Mainframe batch jobs from a Microsoft Windows operating system us ing SAS/AF, SAS/CONNECT, and the Internal Reader. These tools can create applications that keep track of each jo b, log, and output and send email when all is complete. This provides avenues for individuals without experience on the "Big Iron" (mainframe) to submit programs with little to no knowledge of IBM's Jo b Control Language (JCL) or Computer Associate's (CA) Interactive System Productivity Facility (ISPF). The code shown below was created using version 8.2 of SAS batch job, catalog, sas batch 9
100 Subsetting Observations from Large SAS Data Sets Christopher J. Bost This paper reviews four techniques to subset observations from large SAS data sets: MERGE, PROC SQL, user-defined format, and DATA STEP hash object. Pros and cons of each technique are noted. Test results on a SAS data set with 100 million observations are summarized proc step, hash table, proc sort, proc format, cpu time, proc sql, dataset, set statement, where statement, sample 6
101 Supporting a Global SAS Programming Environment? Real World Applications in an Outsourcing Model Mark Penniston,
Karen Curran
Talented individuals knowing SAS in the Pharmaceutical Industry are sought-after gems. One advantage to glob- alization is to tap into those markets where superior SAS programmers and statisticians can be trained to bolster the size of the group. Our experiences in providing worldwide, 24-hour support in 6 geographic regions have led to some interesting solutions both from a systems ar chitecture basis and an implementation model. Integration Technologies, Enterprise Guide, and a CDISC platform have helped in creating an agreed-upon vocabulary among the various sites, but without other skills and t ools there would not be a truly standardized programming environment. As early adapters for all three technologies, this paper presents our experience with implementing, supporting, communicating and upgrading a worldwide SAS programming environment and set of processes sas enterprise guide, sas programming, cdisc 6
102 Supporting SAS In a Research Organization Michael A. Raithel Westat utilizes SAS software as a core capability for providing government and private industry clients with analysis and characterization of survey data. Staff programmers, analysts, and statisticians use SAS to manage, store and analyze client data; as well as to produce tabulations, reports, graphs and summary statistics. Because SAS is so widely used at Westat, the organization has built a comprehensive infrastructure to support its deployment and use. This paper provides an overview of Westat's SAS support infrastructure, which supplies resources that are aimed at educating staff, strengthening their SAS skills, providing SAS technical support, and keeping the staff on the cutting edge of SAS programming techniques macro definition, sas programming 9
103 Survey Logistic Regression: Some SAS-SUDAAN Comparisons Xiuhua Chen This paper compares logistic regression parameters generated by SAS SURVEYLOGISTIC and SUDAAN LOGISTIC. The parameters primarily include standard errors for beta coefficients, Wald Chi- Square test or T-test, and P-values. The paper illust rates the basic syntax and important SAS options in order to allow SAS and SUDAAN to output the same ty pes of parameters for t he comparison, evaluates variance adjustment methods, and explores standard methods used to fix data related problems sample, logistic regression, sample size, logistic distribution, regression analysis, binary variable, degrees of freedom, odds ratio, response variable, predictor variable, proc freq 7
104 Taking Out the Garbage Adam LaManna This is a discussion on what items may be left behind when a user is running multiple SAS programs and how, using a macro that I have devised, the user can clean up the "garbage" so that some possible errors can be avoided. These errors could be as simple as incorrect titles and footnotes up to the wrong data being accessed proc step, work library 3
105 Tales from the Help Desk 3: More Solutions for Simple SAS Mistakes Bruce F. Gilsen date variable, sysdate9, proc step, proc import, proc sort, proc sql, by group processing, character variable 10
106 Taming the World Bank Data Using SAS Michael S. Zdeb The World Bank web site is a wonderful source of country-specific demographic and economic data. A user can download data (in the form of an EXCEL spreadsheet) from multiple countries over multiple year for a variety of variables. Unfortunately, the downloaded data are not arranged in a format that allows easy use and analysis. A combination of SAS data steps and SAS PROCs are used to rearrange the data into a SAS data set that is much easier to use than data in the original format. The SAS code is written in such a way that it makes use of the downloaded data to write a portion of the data steps used in the job, making the code flexible enough to handle any combination of countries, years, and variables with minimal user intervention. The SAS code is meant to illustrate the use of various SAS tools for data manipulation and organization done prior to data use and analysis proc step, dataset, macro variable, label statement, data step, proc freq, proc sql, excel, proc format, delimited file 6
107 Teaching a New Dog Old Tricks - Using the EXCEPT Operator in PROC SQL and Generation Data Sets to Produce a Comparison Report Stanley E. Fogleman It is possible to produce a comparison report on rather s hort notice using the EXCEPT operator in PROC SQL to list only those rows that have changed since the last time the report was run. The generation data set represents the data today versus whenever the report was last run proc sql, proc step, create table 3
108 Temporal and Spatial Visualization of Epidemiological Data Sanjaya Kumar sas output, data visualization 10
109 The Beginners Guide to ODS Markup: Don't Panic! Eric A. Gebhart The MARKUP destination is the most powerful Output Delivery System (ODS) destination. The ODS MARKUP statement can create a multitude of output file types fr om Comma Separated Values (CSV) to Compact HyperText Markup Language (cHTML), HTML 4.0, Extensible HyperText Markup Language (XHTML), LaTeX, and an endless variety of Extensible Markup Language (XML) flavors. It can also create Microsoft EXCEL output. Learn how easy it is to use this destination, and learn how it works. Get the most out of this versatile ODS destination with minimum effort excel, ods html, output delivery system, sas output, proc template, proc step 20
110 The Invisible Character ALT+255 - Hidden Dragon: Hiding and Aligning Text in SAS Output Eugene Tsykalov,
Shi-Tao Yeh
Use of a special Invisible Character in SAS code is described to remove sometimes unnecessary text and help in text aligning and positioning in SAS output. The m agic sequence of keys Alt-255 typed at numeric keyp ad places an Invisible Character symbol into text. This chara cter looks like a blank space in the program code a nd SAS output but is processed and printed by many programs as a valid text character. Practical applications of Invisible Character Alt-2 55 - the Hidden Dragon which eats out undesirable t ext and guards SAS output text aligning are presented: remo ving unnecessary column names from PROC REPORT outp ut, suppressing the name of a Pageby variable in page h eaders, aligning text in titles, footnotes and colu mns, preserving the original text layout in SAS ODS output in PDF format. Also discussed are differences in displaying of the Invisible Character in Windows and UNIX based programs proc report, proc step, sas output, character variable 8
111 The Most Useful New Parts of SAS 9 Philip A. Mason SAS 9 has many new features, as well as all the old ones. This paper will try to outline some of the best new features that I have found over the last 3 years that I have been using SAS 9 cpu time, sample, excel, proc step 22
112 The National Occupational Respiratory Mortality System: Deployment of SAS/IntrNet Application Dispatcher Queries Using SAS Component Language (SCL) Macros John Wood The National Institute for Occupational Safety and Health (NIOSH) has developed the interactive, Web-based, Na- tional Occupational Respiratory Mortality System (http://webappa.cdc.gov/ords/norms.html), a warehouse of national mortality data obtained annually since 1968 from the National Center for Health Statistics. Long-term viability of the system required developing effi- cient algorithms for processing all possible variable combi- nations and outcomes while minimizing file size and maximizing the processing speed. File size was substan- tially reduced by representing cause-of-death outcomes as dummy variables (yes vs. no). Nested macro subroutines and macro variables were developed for reuse in similar processes macro variable, where statement, cpu time, proc means, proc step, macro loop, macro definition, dataset, sas log, binary variable, data cleaning 10
113 The Pegboard Game: A Recursive SAS Macro Solution Houliang Li Rick Langston of SAS Institute Inc. provided an iterative SAS program to solve the famous Pegboard game during SUGI 30. Since this game is generally considered a recursion problem, a recursive solution is in order. This presentation describes recursion and the depth-first search algorithm, and how they are used to find all possible solutions to the Pegboard game regardless of the starting position. The highly sophisticated yet succinct macro program clearly demonstrates the elegance, utility, and power of recursion, which is fully backed by the SAS Macro Language macro call, macro variable, macro definition, macro facility, %if-%then-%else, macro loop, do loop 12
114 The Philadelphia Story (Or the LUG at the RUG) John J. Cohen,
Robert Schechter
PhilaSUG (the Philadelphia Area SAS Users Group) has been called the best local user group in the most su c- cessful regional user group. This is most flattering, but we'll settle for being in the 95 th percentile. Attendance of 75 to 150 members at each of our three -times yearly meetings certainly suggests that we are doing som e- thing right. Is it our location (in the City of Brotherly Lov e, fourth larg- est media market in the nation, of Rocky and Ben, home of the Iggles and the Broad Street Bullies), the qua lity of our meeting speakers and topics, of our additional pr o- gram components (web site, newsletter, e -newsletter, low annual dues, the gourmet lunches, or the dedication of our volunteers? And what doesn't work as well for us, what are our challenges and the issues that keep our President up at night? We will share with you our successes and failures and hope to both offer you insight as well as an opportunity for you to help contribute to our continued success sas base, logistic distribution 10
115 The Plot Thickens from PLOT to GPLOT Wendi L. Wright This paper starts with a look at basic plotting using PR OC PLOT. A dataset with the daily number of hits on three websites is used. The presentation continues wi th examples of how to create more informative and professional looking plots by adding titles, footnotes, and reference lines and changing the symbols, legends and axes. This is done in a step by step approach with examples of how the plot changes at each step. A look at PROC GPLOT is next using the same Web exam ple. The final plot created using PROC PLOT is compared with the same program run in the PROC GPLO T procedure. Further improvements are made in the same step by step fashion using various SAS Graph statements. The first change is to the Titles and Footnotes. Then, one at a time, changes are made to the symbols (SYMBOL statement), the legend (LEGEND statement), and the axes (AXIS statement). The Hands-On presentation de als only with the second half of this paper, PROC GPLOT proc step, proc gplot, title statement 22
116 The Power of PROC FORMAT Jonas V. Bilenas The FORMAT procedure in SAS is a very powerful and productive tool, yet many beginning programmers rarely make use of it. The FORMAT procedure provides a convenient way to do a table lookup in SAS. User generated FORMATS can be used to assign descriptive labels to data values, create new variables and find unexpected values. PROC FORMAT can also be used to generate data extracts and to merge data sets. This paper will provide an introductory look at PROC FORMAT for the beginning user and provide sample code that will illustrate the power of PROC FORMAT in a number of applications. Additional examples and applications of PROC FORMAT can be found in the SAS Press book titled "The Power of PROC FORMAT" (2005, Bilenas) Ins & OutsNESUG 2006 proc format, proc step, lookup, dataset, proc freq, missing value, proc tabulate, char., put statement, format statement 9
117 The USPS TIGER/ZIP+4 Data Product Adeline J. Wilcox The USPS TIGER/ZIP4 data product looked like a geocoding solution in 2003 when I wanted to verify claims submitted for Prospective Payment by Medicare with the Zone Improvement Plan (ZIP) Code from the Outcome and Assessment Information Set(OASIS). Documentation for this data product states that the records relate ZIP Codes to geographic areas that include Metropolitan Statistical Areas. Released in 2002, the TIGER/ZIP+4 offers SAS programmers some interesting challenges. Many counties and county equivalents are missing from this data product. I recount other data anomalies in these files and discuss some of the complexities of ZIP Code geography. Code using the RXPARSE and RXMATCH functions to prepare ZIP Codes for matching to the TIGER/ZIP+4 is explained. I demonstrate ZIP Code lookup using a table of Home Health providers from Medicare's Home Health Compare database. This involved downloading a Microsoft Access database and reading it into SAS 14
118 Those Sneaky SAS Functions: Beware of Unexpected Handling of Missing Data and Variable Lists Christianna S. Williams When is a SUM not a sum? When is a hyphen not a hyphen? SAS arithmetic and summary functions don't always behave the way you might expect when it comes to missing values and variable lists. In this brief presentation, I'll confess to how I've gotten tripped up by making assumptions about the behavior of a few commonly used functions and perhaps save you from making similar mistakes missing value, variable list, sas function 4
119 Tips and Traps in Large Scale Clinical Trials Changhong Shi In large scale clinical projects that contain numerous protocols, the procedure to do statistical analysis in the most efficient way can be quite different from small projects, especially when many related protocols are processed almost simultaneously. In this paper, I will review some useful tips and traps that have been found while perform- ing large scale project work. The main discussion will focus on folder structure design, programming, communica- tion, data management and resource allocation. Even though the questions and solutions are from the view of programmers, statisticians can also benefit from these findings when working on large projects data cleaning, csr 4
120 UltraEdit: Thumbs-Up Code Editor for SAS Programming On PC and UNIX Servers Eugene Tsykalov The use and features of UltraEdit, a powerful and p ractical Program Editor application, are described for creating, editing and saving SAS program code when working on the PC and remote servers. UltraEdit is a Windows application, which runs on a PC and has a familiar and user-friendly interface. It has common for Windows-editors features like text highlighting with the mouse and shift-arrow keys; same commands for copy, paste, cut; etc. What makes UltraEdit unique is its ability to work with files on any remote server transparently for u sers, as if you are working with files on your local hard drive. Using a built- in FTP engine, UltraEdit allows programmers to easi ly open/save/reload files residing on any PC-based or mainframe server and in any operating system (UNIX, VMS, Windows NT, etc.). While some other editors (MultiEdit, SlickEdit) pro vide similar FTP features, UltraEdit has by far the most convenient, intuitive and complete implementation of remote work with files sas programmer, proc contents, sas programming, excel, proc step 7
121 Urban Legends and SAS Stanley E. Fogleman This paper presents a variety of well-known misconceptions about SAS. Sometimes the most difficult part of implementing a new project is overcoming these preconceived notions. The paper will draw on submissions solic- ited from SAS-L and personal experience. The aim of the paper is to be fun and thought-provoking dataset, business intelligence, proc step 3
122 User-Written DATA Step Functions Jason Secosky For years, users have requested the ability to write functions in DATA STEP syntax. The day has come when this is possible. In SAS9, PROC FCMP, provides the ability to write functions using DATA STEP syntax. In SAS 9.2, these functions can be called from DATA STEP. This paper will introduce how to write functions with PROC FCMP, how these functions are invoked from a DATA STEP, and caveats to be aware of when calling PROC FCMP functions from DATA STEP proc step, proc fcmp, return, put statement, file statement 9
123 Using a Control Dataset to Manage Production Compiled Macro Library Curtis E. Reid By default, SAS compiles and stores all macros into the WORK library. This creates an overhead when a programmer executes a SAS program. By compiling and saving these macros into a permanent library, the SAS program can save compilation time. The drawback is t hat many macros often need to be updated and recompiled as specifications or requirements change. Additionally, many organizations now require that their programs have version control or software configuration m anagement process in place. Thus updating a macro(s) in a SAS program becomes a non-trivial, time-consuming task. The use of a make-compile -control-data set removes the need to manually compile all macros by reading in the make-comp ile-control-data set, obtaining co rrect macro(s) to compile, and storing into the library. The value added from using this programming tool is that it facilitates maintenance and reduces business risks macro definition, macro loop, stored macro, %if-%then-%else, macro variable, error message, macro flow control 10
124 Using Annotate Datasets to Enhance Charts of Data With Confidence Intervals: Data-Driven Graphical Presentation Gwen Babcock Data and accompanying confidence intervals (e.g.1.2 95%CI 1.0-1.5) are often presented in tabular formats that complicate the ability to compare data sets. A graphical format, as opposed to tabular, can be superior when it is desirable to quickly compare data sets. However, standard SAS graphs are not well suited to such presentation. This paper explores the use of the Annotate facility with PROC GLPLOT to produce graphical presentations of data with confidence intervals. Annotate datasets are powerful tools for customizing charts or graphs. These datasets can be used to produce data-driven changes of the color and size of symbols, lines, text, and other chart features. Using a graphical display instead of tables eases comprehension of data and comparison between categories confidence interval, bar chart, proc step, proc gplot 9
125 Using PROC CDISC Chauthi Nguyen The paper will present the use of PROC CDI SC to convert SAS data sets in Clinical Trials of different domains into CDISC data sets in XML format. The new version of PROC CDISC will be used for the task. This paper is written mainly for SAS users who are new to PROC CDISC proc step, dataset, system organ class, medical history, clinical sas, sample, error message, cdisc 5
126 Using PROC GENMOD to Model Adverse Event Counts in a Healthcare Setting John Ulicny,
Thomas Klumpp
Statistical models for adverse events have been developed as part of a quality management initiative at the Fox Chase - Temple Bone Marrow Transplant Program in Philadelphia, PA. Their purpose is to enable the transplant team to compare recent adverse event counts to what should be expected based on the patient population currently under care by the team. The count of adverse events is the response variable in the regression models. Generalized Linear Modeling, as implemented in the PROC GENMOD procedure, is an effective tool for performing regression analysis on a response of this type. Unlike ordinary least squares (OLS) it can be applied to a wide range of non- normal responses as long as they come from the natural exponential family of distributions and meet certain other assumptions. The models in this paper were developed using Version 9.1.3 of SAS adverse events, regression analysis, response variable, proc step, proc genmod, poisson distribution, proc reg, multiple regression, binomial distribution, predictor variable, poisson regression 13
127 Using PROC NLMIXED and PROC GLIMMIX to analyze dyadic data with binary outcomes Peter L. Flom,
Samuel Friedman,
James McMahon,
Enrique Pouget
In the social and health sciences, data are often hierarchical (subjects nested in groups). One kind of hierarchy is the dyad, or couple, where each group consists of two subjects. Dyadic data pose particular problems for statistical analysis for several reasons: First, variation may occur at the individual or dyadic level. Second, the data are not independent. Third, the small group size poses special difficulties. Multilevel models have been used for dyadic data; we demonstrate the use of PROC NLMIXED and PROC GLIMMIX, and discuss the strengths and weaknesses of this approach in general, and these SAS procedures in particular. We illustrate this with data on predictors of viral Hepatitis C among heterosexual couples in Harlem in New Y ork City. Keywords: Dyadic Multilevel NLMMIXED GLIMMIX binary proc step, likelihood function, proc mixed, estimate, response variable, proc glimmix, covariance 10
128 Using SAS Data Integration Studio to Convert Clinical Trials Data to the CDISC SDTM Standard Barry R. Cohen A new industry standard for cl inical trials data, the CDISC St udy Data Tabulation Model (SDTM), has been developed and is quickly being adopted b y th e pharm aceutical/biotechnical ind ustry. T hus, for future Marketin g App lications to the F DA, companies will need to convert their clinical trials data from various legacy and current internal standards (and non-standards) to the ne w in dustry sta ndard SDT M. This will be a ma jor und ertaking for an y or ganization, an d a data inte gration/data warehouse tool can be of significant help in this PROC ess. SAS Data Integration Studio, (or as it is n ow known -- SA S Data Integration Studio), is the new SAS product designed to support data conversion and warehouse building processes. Octagon Research Solutions uses Data Integration Studio as the key software application in the process of converting clinical trials data for clients into submission-ready data based upon the CDISC SDTM standard clinical data, sdtm domain, data standard, raw data, dataset, data warehouse, clinical trial, data integration, data cleaning, data transformation, sas programmer, cdisc 8
129 Using SAS to Analyze the Summary Data Zhenyi Xue Most of the time, we have the raw data to conduct t he necessary statistical analysis in SAS. However, when there is only summary data available, some additional SAS coding is necessary in order to perform the hypothesis test. SAS procedures, as well as sim plified macros ( %SUM_TTEST, %SUM_ANOVA, %P_ANOVA, %SUM_CHI ) with examples, will be discussed in this paper fo r chi-square test, two sample t-test, and analysis of variance with summary data as input proc means, sample, proc step, chi-square test, anova, sample size, standard deviation, data science, proc freq, proc ttest, logistic distribution 6
130 Using SAS to Find Bootstrap Estimates of Field Air Sampling Data James Slaven,
David Bartley,
Mike Rose,
Martin Harper,
Michael Andrew
Air samplin g and analysis methods th at are u sed in determining the a mount of airborne contaminants can be given accuracy ratings that describe their expected performance when used by others. For labo ratory methods, the Natio nal Institute for Occupational Safety and Health methods m anual a ssumes a normal di stribution, but finding the point estimate and confidence interval for the accuracy of field data can be difficult because these data are often not normally distributed. Bootstrap sampling can be used to obtain the analogous accuracy measure for non-normal data. SAS code is p resented here to find the point estimate and the confidence intervals using the bootstrap method. SAS version 9.1 was used to create the code, which includes data manipulation in the data set step with arrays and do loops, and PROC MIXED confidence interval, bootstrap, sample, proc mixed, proc step, standard deviation, normal distribution, regression analysis 4
131 Using SAS to improve the quantification of environmental chemistry samples Charles Dow,
Anthony Aufdenkampe
Quantifying chemistry samples, the process of applying a calibration curve defining the relationship of an instru- ment response across a set of known standard concentrations to sample values, is an often overlooked aspect of laboratory work. Instrument software packages have calibration routines embedded but these packages offer lim- ited flexibility in applying and evaluating different types of calibration curves. We have developed a semi- automated routine that uses various SAS products/procedures to capture instrument data, develop calibration equations, run diagnostics on the developed calibration equations, and present the output in an easily accessible and interpretable format sample, quality control, proc step, regression analysis, proc report, scatter plot, txt, proc reg, proc sql 8
132 Using the ORACLE LIBNAME Engine to Reduce the Time it Takes to Extract Data From an ORACLE Database David D. Chapman This paper reviews the ORACLE LIBNAME engine and shows how to use it to extract data from an ORACLE Da- tabase. Common parameters for the ORACLE LIBNAME engine are illustrated. We discuss issues related to re- porting resource usage. ORACLE hints are described and expl ained as a way to reduce the time it takes to ex- tract data from an ORACLE table and to improve processing. Several examples of ORACLE hints are given. The paper discusses the use of ORACLE indexes as a way to improve efficiency and avoiding sorting. Examples are given of the use of the DBKEY option to efficiently extract part of an ORACLE table libname engine, cpu time, oracle, dataset, proc sql, proc step, macro variable, proc contents, sample, sas library 13
133 Using the time dependent ROC curve to build better survival model in SAS Li Lu,
Chenwei Liu
The ROC curve is mainly used to evaluate the discrimination power of a continuous variable for a binary outcome. Recently, time dependent ROC curves have been used to assess the predictive power of diagnostic markers for time dependent disease outcom es, thus to analyze censored survival data. Among the various methods of estimating the time dependent ROC curves, the Kaplan-Meier method is based on Bayes' theorem and Kaplan-Meier survival function. It is easy to understand, implement and use. In this paper we implement the Kaplan-Meier estimate of time dependent ROC curves in SAS. Using the data of a clinical study, we demonstrate how time dependent ROC curves and area under the curve can be used to select predictive covariates and build better survival models roc curve, auc, proc step, survival function 6
134 Utilizing SAS to Automate the Concatenation of Multiple Proc Report RTF Tables Andrew Newcomer This paper describes a useful and effective technique which utilizes SAS and the Microsoft Windows OS command language (MS-DOS) to automate the concatenation of multiple, RTF ta- bles (Rich Text Format) produced using PROC REPORT in SAS. Our goal is to simplify the review and delivery of multiple RTF tables by combining them into one file, viewable by applications such as Microsoft Word. To accomplish this task, we need to first understand the RTF file structure and how ODS produces it. Once understood, we can apply that knowledge by manipulating the RTF code in our out- put and then combine an unlimited number of RTF files into one single document. This paper details how we can form such a technique into one, powerful SAS macro. Technical Specifications During the experimentation of this technique, I was using SAS version 8 and 9 for all table production. All tables were pro- duced using ODS RTF via PROC REPORT. Programming was done using PC SAS proc report, txt, proc step, data step, dataset, %if-%then-%else 7
135 Variable List Short-Cuts in PROC SQL Kenneth W. Borowiak PROC SQL queries require the SELECT statement to specify the variables to be included in the output destination. You have the option to explicitly state which variables to keep or use the wildcard as a short-cut to select all fields from some or all tables involved in the query. Have you ever encountered the problem of having to choo se between typing in a long list of variables to keep or use the to select more variables than are actually needed? Have you ever wanted to select all the fields from a table except for one or two fields? Using the DROP and KEEP data set options are particularly useful for alleviating these conundrums. Moreover, these data set options allow you to use variable list short-cuts that are not available in the SELECT statement proc sql, proc step, create table, select, variable list, numbered range list, file statement, name range list 4
136 Variable Selection in the Credit Card Industry Alec Cheng,
Moez Hababo,
Ray Falk
The credit card industry is particular in its need for a wide variety of models and the wealth of data collected on customers and prospects. We propose a methodology to select variables for predictive modeling purposes out of the plethora of data available using a combination of Oblique Component Analysis (PROC VARCLUS), Information Value (IV) and Weight Of Evidence (WOE) analysis, and business intelligence. Our tools enable us to quickly identify the most informative variables for logistic regression models proc varclus, proc varreduce, proc step, correlation, feature selection, credit card, proc princomp 5
137 Virtualizing Software Development Life Cycle Environments in SAS Robert Jones Operating system environment variables provide a simple way to embed environment-dependent information (host machines, pathnames to files and folders, 3rd-party data technologies, etc.) into SAS source code. This paper considers how to utilize environment variables using Citrix MetaFrame XP Presentation Server and SAS Integration Technologies as client/server technologies to consolidate multiple SAS server environments onto a single physical machine, thereby saving money in SAS licensing fees options statement, sas enterprise guide 8
138 Wanna Date? Stephen J. Rhoades Ever need to read a date into SAS or write it out? Need to know the number of days between two days, or the weeks, months, years? What about incrementing (or decrementing) a date to the first of next month, or the fifteenth or; well you get the idea. SAS is very, very flexible and offers quite a few ways to handle dates. However it is not always apparent what is available. The intent of this paper is to provide a concise presentation of what is available and includes a file of self contained code that allows you to run a number of the informats, formats and date functions and see the results quickly. International dates are not covered thoroughly in this paper, but there are separate sections for both informats and formats that do provide some details sysdate9, date variable, sample, variable, character variable 13
139 When is New Really New? Proc Compare Gives the Details Jared Smith Have you ever gotten similar data from two different sources - for example, students' self-reports of g rades and school records - and needed to compare them? Have y ou ever received a series of the same files with ad ditional information in each update? How do you check that the original data included in the new file are unch anged? Have you ever finally gotten the long-awaited "fixed/rep aired data file" and wondered whether anything real ly changed? This paper will walk through real-world examples of how to summarize differences between similar data. We will use PROC COMPARE to create OUTSTATS data sets, post-process them, and create summary tables proc compare, proc step, proc means, data step, proc print, sample 7
140 Where Did Those Duplicates Come From? Kenneth Gold,
Roger S. Cohen
Duplicate records can find their way into your database in any number of ways. Records may be categorized as duplicates if they have all or only a subset of their va riable values in common. Using very handy SAS language elements, we present a simple, general met hod for identifying duplicate records. We use this program to review them before choosing to discard them or subject them to additional processing by group processing, macro definition 4
141 Working outside the SAS Box: Calling Other Applications from within SAS James Zeitler SAS remains my tool of choice for most data manag ement and analysis tasks, but I know that it's not necessarily the right tool for every job. Furthermore, some of my cli ents are more comfor table with other analytical software. So sometimes I have to resort to other tools and programs. When they can be implemented via a command line, those tools and programs can be run fr om within a SAS program. In this example, I'll illustrate some of the ways this ca n be done from within SAS. The ex amples are executed in SAS running under Windows, but most of the concepts apply in other operating systems also dataset, proc step 4
142 You Can't Stop Statistics Maura E. Stokes,
Robert N. Rodriguez
bayesian statistics, proc step, regression analysis, proc quantreg, proc glmselect, odds ratio, sample, proc genmod, proc glimmix, proc mixed, likelihood function, prior probability, feature selection, significance level, anova, maximum likelihood estimation, response variable, treatment period, piecewise exponential model, data cleaning, confidence interval, posterior probability, proc phreg, standard deviation, credible interval, estimate, histogram, poisson distribution, logistic distribution, density plot, treatment effect, box plot, proc glm 32
143 ZIP Code 411: A Well-Kept SAS Secret Louise S. Hadden,
Michael S. Zdeb
SAS provides many useful files in its SASHELP direc tory. One of the less well-known but incredibly use ful files is the SASHELP.ZIPCODE file that ships with SAS V9 and is regularly updated. This paper explores current and potential uses of t he SASHELP.ZIPCODE file data. Data and programming re- sources provided by SAS and other sources will be h ighlighted, with a walk-through of several programm ing pro- jects recently conducted by the authors sample, proc step, proc gmap 12

Back to Conf go 2007 go 2005

This site serves as a convenient hosting location and does not work as a publisher. All copyrights belong to their respective owners.

The information on this site is provided for general reference purposes only. Whilst every effort is made to ensure that the site is up to date and accurate, no warrant, nor any responsibility or liability for, the accuracy or completeness of the content or for any loss which may arise from reliance on information contained in this site is provided. Links to other sites are provided for your convenience but no responsibility or liability for the content of those sites or of any external site which links to this site is accepted. References to any specific commercial product, process, service, or corporation are also for information only, and do not constitute endorsement, recommendation or favoring.

SAS is a registered trademark of SAS Institute Inc. SAS, Statistical Analysis System, and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.