HOME QUICK SEARCH AUTHORS KEYWORDS HELP BUGS

NESUG 2009 Papers - Index

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

# Title
×
Authors
×
Abstract
×
Keywords
×
Extras Pages
1 9 Ways to Join Two Datasets David W. Franklin Joining or merging data is one of the fundamental actions carried out when manipulating data to bring it into a form for either storage or analysis. The use of the MERGE statement inside a datastep is the most common way data is merged within the SAS language but there are others. This paper looks at nine methods, including the use of the MERGE statement, for a one to one, or one to many merge, introducing the SAS code needed to join to datasets into one merge statement, proc sql, hash table 6
2 A Closer Look at PROC SQL's FEEDBACK Option Kenneth W. Borowiak The FEEDBACK option on the PROC SQL statement controls whether an expanded or transformed version of a query using terse notations is written to the SAS R⃝log. This paper will review some of the documented features of this option and provide additional programming conventions that are explicitly stated when the option is enabled. It will be shown that the FEEDBACK option is an invaluable tool for understanding how PROC SQL processes a query and how it can be used as a code generator. Keywords: PROC SQL, feedback, select *, natural joins, macro variables, operator mnemonics proc sql, sas log, proc step, create table 7
3 A Complete Derivation of Duration and Display in ISO 8601 Using SAS Program Joyce Gui,
Helen Wang,
Sandy Wang
In clinical trials, an adverse event (AE) can occur anytime during the course of a study. In data analysis, it is common to relate AE information with study medication which is referred to as time since last dose . If the duration variable is included for regulatory submission, it must follow the ISO 8601 duration formats as described in the CDISC SDTM Implementation Guide (Version 3.1.1) section 4.1.4.3. This paper will use the adverse experience start date/time and the study medication date/time to derive the time since last dose based on defined rules using SAS programs, and display the duration in ISO 8601 duration format data step, adverse events, cdisc 8
4 A Generalized Procedure to Create SAS/Graph Error Bar Plots Sanjiv Ramalingam Different methodologies exist to create error bar re lated plots. Procedures exist to use the dataset by itself to create error bars either for st andard deviation +/- mean (INTERPOLATION=STD1JT), standard errors +/- mean (INTERPO LATION= STD1TJM) or min and max values but it bec omes cumbersome to generate figures by just usi ng the PROC PLOT procedure as one has to go through numerous options available to find the right option. This paper discusses a methodology to plot the difference between the means with the standard error as an example proc calis, proc step, change from baseline, standard deviation, proc gplot 10
5 A Picture Is Worth a Thousand Words: Integrated Visualization of Clinical Data Vikash Jain Researchers in the Clinical domain are more interest ed in presenting their data and compiled text using visual graphics. This not only increases the clarity of the presentation, but also makes it easier for their target audience to understand the distribution of data and to draw inferences right away when they eyeball it at first glance. With this objective in mind, this paper will concentrate on how to produce various kinds of box plots with an integrated mean distribution and a refe rence line. We will be incorporating an array of BOXPLOT PROCEDURE OPTIONS available to the user. We will also show how to annotate descriptive statistics and data outliers dynamically in a more efficient manner using SAS9 PROC BOXPLOT options. Also covered is a discussion on powerful but simple techniques to incorporate the tabulated summary of statistics or a list report of outliers based on user business needs proc boxplot, proc step, box plot, outlier, sample 10
6 A Practical Introduction to implementing the Clinical Data Acquisition Standards Harmonization (CDASH) standards Jennifer Price On October 1st, 2008, CDASH released the first 16 common CRF streams (or domains) for use by the Pharm a- ceutical Industry. The goal when putting together the initial domain streams was to find out which data fields are essential to the analysis of clinical data, and collect only that data in a standard way. In order to do this, CDASH has provided clear definitions, SDTM mapping (if relevant), CRF completion instructions and additional sponsor information for each data element. The focus of CDASH is on data collection, not data reporting. In some instances the optimal data collection method conflicts with the Study Data Tabulation Model (SDTM) for reporting data. In these cases additional trans- formations and derivations may be needed to create the final SDTM compliant datasets adverse events, clinical significance, medical history, sample, cdisc 7
7 A PROC SQL+Data Step Alternative to the Hash Object for Creating Multiple, Data-Driven Data Sets Michael S. Zdeb Creating multiple data sets from a single data set based on the value of one or variables is a common task. If the number of data sets to be created is small and all the values of the variable(s) to be used are know, one could write a DATA STEP that specified the names of the new data sets and use OUTPUT statements to direct observations to the appropriate data sets. However, if the values of the variable(s) to be used to create the data sets are unknown, other approaches can be used. One that has been suggested by others is use of the HASH OBJECT. Another method that uses PROC SQL to create a macro variable prior to a DATA STEP is suggested in this paper and compared to the HASH OBJECT method. The SQL method presents an alternative to the HASH OBJECT method when sorting the original data set, as required by the hash technique, may be impractical or costly hash table, proc sql, proc step, macro variable, data step, proc freq, cpu time, elapsed time, proc sort 6
8 A Proposed SDTM Implementation of Response Data for Solid Tumor Trials in Oncology Mei Dey,
Elisabeth Pyle
procedures, adam dataset, survival analysis, data science, efficacy summary, sdtm domain, cdisc 18
9 A Row is a Row is a Row, or is it? Get Comfortable with Transposing your Data Christianna S. Williams Sometimes life would be easier for the busy SAS programmer if information stored in multiple rows (observations) were all accessible in one observation, using additional columns (variables) to hold that data. Sometimes it makes more sense to turn a short, wide data set into a long, skinny one (i.e. convert columns into rows). Base SAS provides us with two primary methods for converting rows (observations) into columns (variables) or vice versa - PROC TRANSPOSE and our trusty old friend the DATA STEP. How do these two methods work? Which is best suited to different transposition problems, such as situations requiring multi-row arithmetic or transposing multiple variables? The purpose of this example- packed tutorial is to demonstrate various types of transpositions using the DATA STEP and to demystify the TRANSPOSE procedure (e.g. nail the BY statement and the NAME= option once and for all). Afterwards, you should be the office go-to gal/guy for reshaping data. Sweet! proc transpose, proc step, by group processing, character variable 12
10 A SAS Macro Approach to Simultaneous Superiority and Noninferiority Testing in Clinical Trials Analysis William Chen,
Margaret M. Coughlin
Analysis of clinical trial data invo lves a variety of statistical techni ques depending on the study design, sample size, type of data collected and how the dat a are distributed. Two types of tr ials, superiority and non-inferiority, involve specific hypothesis testing. In a superiority trial, demonstration that t he test drug is superior to the control drug, on average, is the objective. Here, the null hypot hesis tests that the differ ence between the test drug and control is zero. The alternative hy pothesis tests that the difference betw een the test drug and control is greater than zero. Non-inferiority trials are commonly undertak en where the test drug and control are expected to be approximately equally effective. In this case, hypothesis te sting looks for either greater effectiveness of the test drug over the control or equivalency of the test and control drug. Many arti cles exist that discuss superiority and non-inferiority testing confidence interval, macro definition, alternative hypothesis, hypothesis testing, null hypothesis, sample 5
11 A Secure Automated FTP Process to Transfer Data from a Remote Server Shankar Yaddanapudi A SAS Risk Dimensions based system was implemented for use by an investment group of a bank. The system re- quires up to date market data as input. An interface to Bloomberg was implemented which consists of a set of macros which request and download required market data automatically from Bloomberg server every business day. One of the requirements for the process was that the transfer of data files to and from Bloomberg server should be com- pletely automatic and as fail-proof as possible. Another requirement was that the Bloomberg login credentials as well as reply files from Bloomberg need to be encrypted, for security reasons. The password encryption requirement was handled by PROC PWENCODE in conjunction with FILENAME FTP engine which accepts encrypted password. The more challenging task of making the process near fail-proof was handled by a combination of SAS functions which will be discussed in this paper infile statement, macro variable 6
12 A Serious Look Macro Quoting H. Ian Whitlock You can make decisions macro with %IF and do looping with %DO-loops. But there are times when you don't understand why the beast does what it does. Now what? It is time to come to this presentation. It is time to take a serious look at macro quoting. I have often said that anyone who thinks macro quoting is simple, probably doesn't understand the problem; so I have been there. Now I want to explain how simple it is. Everything relevant to this paper is in BASE SAS. Although the examples have been executed on a PC under Windows, the examples are independent of any particular operating system with the exception of file definitions. You might think this paper is a compendium of all the macro quoting functions. It is not. It is more about the subject of macro quoting than about the macro quoting functions macro facility, macro variable, macro quoting function, macro put, macro function, &variable, put statement, filename statement, macro definition, macro call, %if-%then-%else 13
13 A Taste of SDTM in Real Time Changhong Shi,
Beilei Xu
The Study Data Tabulation Model (SDTM) is a Clinical Data Interchange Standards Consortium (CDISC) standard. At Merck, pilot studies have been completed in which SDTM is implemented to the collected data up- front with the following proven advantages from SDTM: 1. standardization across studies; 2. facilitation of data integrity checking; and 3. tabulation data structures readily leveraged for ADaM (Analysis Dataset Model) data setup. This paper will describe these three advantages in detail. Keywords: SDTM, CDISC, ADaM, ADSL data governance, vital signs, cdisc 6
14 A Tutorial on the SAS Macro Language John J. Cohen The SAS Macro language is another language that rests on top of regular SAS code. If used properly, it can make programming easier and more fun. However, not every program is improved by u sing macros. Furthermore, it is another language syntax to learn, and can create problems in debugging programs that are even more entertaining than those offered by regular SAS. We will discuss using macros as code generators , saving repetitive and tedi ous effort, for passing parameters through a program to avoid hard coding values, and to pass code fragments, thereby making certain tasks easier than using regular SAS alone. Macros facilitate conditional execution and can be used to create program modul es that can be standardized and re -used throughout your organization. Finally, macros can help us create interactive systems in the absence of SAS/AF. When we are done, you will know the difference between a macro, a macro variable, a macro statement, an d a macro function macro variable, macro definition, macro facility, macro loop, do loop, %if-%then-%else, title statement, macro put, proc step, sample 7
15 A Utility Program for Quickly Identifying LOG Error or Warning Messages Zhengyi Fang,
Paul Gorrell
This paper will show you how to create and install a utility program that will allow Windows users to find SAS error or warning messages quickly and easily by right-clicking the LOG file in Windows Explorer. All and only LOG lines containing 'error', 'warning', 'uninitialized', or other specified strings will be displayed in a DOS prompt. A one-line batch file is all that needs to be created. Installation of this utility program is very simple. In fact, it's as simple as adding a new item to the right-click menu in Windows Explorer for the SAS LOG file. Each step in creating and using this file will be demonstrated sas log, sample 5
16 Ad Hoc Data Preparation for Analysis Using SAS Enterprise Guide I-Kong B. Fu SAS Enterprise Guide is a popular application for conducting ad hoc data manipulation and data preparation for data mining and other analytics. This paper will walk through a few examples of data preparation, putting features of SAS Enterprise Guide into action, and discuss scenarios where SAS Enterprise Guide can be used with other popular SAS applications such as SAS Enterprise Miner. The examples are targeted to business analysts who would primarily like to use a point-and-click approach to these tasks sas enterprise guide, data wrangling, proc freq, binary variable, proc transpose, data mining, inner join, txt, proc step, proc sql 11
17 Add Spices to Your Graphs Using the Annotate Facility Qingfeng Liang One of the most powerful features in SAS /GRAPH is the Annotate facility. The Annotate facil ity uses a SAS data set to store the graphics instructions. Each observation in SAS data set corr esponds to an instruction and the variables provide all information required to process each instruction. You can use the Annotate facility to add text, lines, bars, pie slices, or map to SAS/GR APH procedure output. You can also produce custom graphics using the Annotate facility with the GSLIDE or GANNO procedures. It sounds complicated but you definitely can grasp it within couple hours after you are guided through the paper. The basic necessary elements for developing the Annotate facility are introduced nicely by asking five "W" questions. The paper als o shows you a simple way to debug the Annotate data set. The paper shows how to place text on specific loca tion and label data points for the X/Y plots throug h example dataset, bar chart, proc step, missing value, by group processing 16
18 Aggregation without Aggravation: Determining Spatial Contiguity and Joining Geographic Areas Using Hashing Gwen Babcock Grouping smaller neighboring geographic areas into larger regions based on specified criteria was done using two SAS 9.1/9.2 programs. The first program creates a list of areas and their neighbors known as a contiguity table. The table is used by the second program to aggregate geographic areas into larger regions. In public health sur veillance, aggregation might be necessary to preserve the confidentiality of those diagnosed with illnesses or to show stable rates in areas with sparse population. For example, the New York State Department of Health may wish to create a map of low birth weight births, where each aggregated region includes a minimum number of births. The process could also be used to delineate health service areas which have a minimum number of poten tial clients. In addition to containing a minimum number of cases, clients, or population, regions may need to meet other criteria, such as to be compact or to be contained within counties or states hash table, proc step, macro variable, unique key, do loop, proc gmap, hash iterator, hashing function 17
19 All Rolled Up Into One: Using SAS to Generate Patient-Level Analysis Files from Insurance Claims Data Kathy Hardis Fraeman Medical insurance claims data are a valuable research tool for a variety of disciplines, such as epidemiology and health economics. Many health insurance claims databases are currently available for analysis, and several of these databases can be obtained in SAS format. A single patient can have many thousands of individual insurance claims, and analysis of these claims data usually requires summarizing individual insurance claims into one patient-level observation. A variety of SAS programming techniques can be used to summarize individual insurance claims into relevant patient-level analysis variables. This paper discusses Base SAS programming techniques to derive patient-level variables, such as use of FIRST., LAST., and RETAIN; DO loops; MACRO programming; and SQL, which joins when looking at intervals between many dates insurance claims, flag variable, proc step, proc sql, sas programming, macro definition, health insurance 12
20 Analyzing MCBS Data with PROC SURVEYFREQ: The Maybe Cheesy but Simple Approach Christine E. Leonard PROC SURVEYFREQ comes to the rescue for SAS programmers who need to analyze stratified and weighted data such as the MCBS (Medicare Current Beneficiary Survey) 1. New to SAS in Version 9.1, this procedure opens up new territory for statistically challenged but adventurous SAS data programmers heretofore op en only to those familiar with SUDAAN 2, Stata3, WesVar 4, CDC's Epi Info 5 and a few other statistical software pack- ages with capabilities to analyze these complex survey data 6. In this paper I provide a "trip report" of a MCBS pro- ject using PROC SURVEYFREQ . I present a logical process whereby I use SAS pr ograms in a batch (vs. interac- tive) environment to document, prepare, analyze, au dit and report data from the MCBS. Most importantl y, I spe- cifically address the necessary challenge of handli ng missing, sparse and irrelevant data within the c ontext of PROC SURVEYFREQ proc step, proc surveyfreq, proc freq, proc sql, sample, data dictionary, propensity score, excel, missing value, dataset, alter table, design effect, proc printto, by group processing, call execute, create table, random sampling 19
21 Automating Comparison of Multiple Datasets Sandeep Kottam Have you ever been asked to compare new datasets to old datasets while transfers of data occur several times during the project life time, yet the dataset names, to compare are different and each dataset has different key variables? SAS macro facility along with metadata files with rules on how to compare can be used for orchestration of this process. The Rules metadata file contains information about filenames (old & new), key variables to be used to compare each dataset and variables not to compare for each dataset. Focus on the metadata file will result in the tool providing meaningful output to review. This paper will discuss the process and identify how it provides confidence in the output excel, call symput 5
22 Automating JMP via Scripting tools and MS Windows COM Matthew J. Flynn One occasionally has a need to automate and control an analysis using JMP on a Windows platform. Perhaps you are a 'nix SAS coder with plenty of scripting experience, but are not up to speed with common Windows technologies such as VB, or Visual C++. A standard JMP installation comes with automation examples in those technologies. But beyond those languages, it can be difficult to find examples for scripting JMP on Windows plat- form. This paper attempts to remedy that situation by providing a walk-through of a JMP scripting session using common external scripting tools. We'll show and discuss the example using TCL. Appendix A provides parallel code in Tcl, Python, Perl, VBscript, Ruby, and even R. The magic ingredient for this to work so well is MS Win- dows Component Object Model, or COM dataset, bubble plot, sample, excel 19
23 Automating SAS Macros: Run SAS Code when the Data is Available and a Target Date Reached. Nitin Gupta This paper describes a method to run discreet macro(s) embedded in a single SAS code on a particular day of the week or date in the month. The initiation of the macro happens only when both the day of the week is reached and source(s) data is available. This paper is appropriate for SAS users who run SAS jobs on a production environment. The macro efficiently moves analytical activities given the available schedule/data, avoiding redundancies in running SAS jobs. The code is a combination of SQL and SAS Macro language. This paper is intended for SAS users of all skill levels. Keywords: SAS Macros, Scheduling SAS Jobs, SQL, %Sysfunc(exist), DO loop macro definition, macro variable, proc sql, macro facility 6
24 Be a More Productive Cross Platform SAS Programmer Using Enterprise Guide Alex Tsui sas programming, sas enterprise guide, sas programmer, excel 6
25 Boot Camp for Programmers: Stuff You Need to Know That's Not in the Manual - Best Practices to Help Us Achieve Reproducibility Elizabeth Axelrod Imagine that you completed a research project a year ago, and now your clients are challenging the results. They doubt your numbers, and they want to know how you came to your conclusions. Could you retrace your steps and reproduce your results? Could you describe what you did and why you made those decisions along the way? Could you find the data or the programs that you wrote? With the passage of time, it becomes more and more difficult to recall or recover the process, data, or results of a project. As programmers, we're tempted to head straight for the keyboard, and start writing code. But first some basic training is in order. This paper is geared for programmers and programmer wannabes, focusing on specific guidelines, best practices, and techniques which can help us ensure the reproducibility or our results, and in doing so, improve the quality of our work raw data, sas log 7
26 Build Multilevel Model to Assess the Length to Inpatient Readmission Using SAS PROC MIXED Qingfeng Liang Multilevel models are known as hierarchical linear models or general linear mixed models. The definin g feature of these models is their capacity to provide quantification and prediction o f random variance due to multiple sampling dimensio ns (across occasions, persons, or groups). Multilevel models offer many advantages fo r analyzing both hierarchical models which analyze the data on individuals nested within hierarchies (e.g., patients within hospitals) and i ndividual growth models which are designed for expl oring the longitudinal data over time. Multilevel models become very popular in educationa l and behavioral research, but they are still new t o healthcare research, especially for health insurance outcome assessment. Multilevel mo dels could fit nicely with the nature of patients' healthcare data (both hierarchical and longitudinal structures). SAS PROC MIXED offers great flexibilities to fit ma ny common types of multilevel models proc mixed, fixed effects, proc step, covariance, proc calis, regression analysis, anova 13
27 Building the Better Macro: Best Practices for the Design of Reliable, Effective Tools Frank C. DiIorio The SAS macro language has power and flexibility. When badly implemented, however, it demonstrates a chaos- inducing capacity unrivalled by other components of the SAS System. It can generate or supplement code for practically any type of SAS application, and is an essential part of the serious programmer's tool box. Collections of macro applications and utilities can prove invaluable to an organization wanting to routinize work flow and quickly react to new programming challenges. But the language's flexibility is also one of its implementation hazards. The syntax, while sometimes rather baroque, is reasonably straightforward and imposes relatively few spacing, documentation, and similar requirements on the programmer. In the absence of many rules imposed by the language, the result is often awkward and ineffective coding. Some amount of self-imposed structure must be used during the program design process, particularly when writing systems of interconnected applications macro variable, macro facility, macro definition, macro loop, macro put, data cleaning, automatic macro variable, keyword parameter, %macro parameters, sas log, error message, sysrc, %if-%then-%else, symbol table, macro function, autocall macro, macro parameter, options statement, proc step, dictionary tables 16
28 Choosing the Right Technique to Merge Large Data Sets Efficiently Qingfeng Liang This paper outlines different SAS merging techniqu es for both the many-to-one match merge and the man y-to-many match merge. For the many-to-one match, PROC SQL JOIN, MERGE, FORMAT, A RRAY, and HASH OBJECT were investigated. For the ma ny-to-many match, PROC SQL join and MATCH-CROSSING methods were discu ssed. CPU time, I/O, and memory usage are factors that SA S programmers need to consider whether data sets w ith large volumes are merged efficiently. These factors have been benchmarked fo r all match merging techniques mentioned above when the volumes of data are increasing. This paper shows that the HASH object is the winner to perform a many-to-one match for large data sets in terms of efficiency. PROC SQL JOIN is the best choice for a many-to-many match wh en the size of data is getting larger lookup, hash table, proc sql, cpu time, data merging, proc step, memory usage, do loop, unique key 9
29 Clearing the Pipe: Overcoming Certain System Limitations when using the SAS Pipe Channel of Communication Fuad J. Foty Many are all-to-familiar with the error phrase "Argument list too long" in Linux. The Pipe channel of communica- tion in SAS programs has an inability to list files in a certain directory where the list is exceptionally long. A care- ful investigation of the problem demonstrat es that the root cause is a buffer within the operating system. This problem can be easily overcome by giving multiple comm ands, separated by a semicolon in one single line of the SAS code. This paper will concentrate on diffe rent ways of handling various tasks in SAS and ensuring that the ultimate result is what is aimed to be accomplished. Basic tasks such as getting file names and sizes from your disk are as crucial to the proper running of SAS as performing the coding operation of your SAS program. Re- naming, moving, and setting security standards on production files is easily done in an automated fashion with the help of the Pipe channel of communication and the computer 's operating system filename statement, error message 8
30 Coding Standards Russell M. Lavery Coding standards, if enforced by management, are a great help in a company's goal to have programmers produce easy to maintain (and therefore inexpensive to maintain) code. This paper is one programmer's collection of coding standards and is intended to be a starting point for discussion within companies that lack standards and a resource for people starting a career as a SAS programmer. The goal of these standards is to create an environment where code is easy to understand, maintain and to protect the ability of your department to produce high quality low-cost reports. Implementing standards will create 1) programs that are, in large measure, self-documenting and 2) a useful "outside of the program" document that describes the program logic proc step, data step, excel, select, if-then-else, job security, macro parameter, permanent dataset, proc sql 15
31 Crossing the environment chasm - better queries between SAS and DB2 Mark Sanderson The source data used by many SAS programmers resides within non-SAS relational databases such as DB2 or Oracle. In these situations significant performance gains can be realized by adopting a "pass-through" mentality - let the database do the hard work prior to returning results to the SAS environment. This paper covers the standard approach (and some pitfalls to avoid) related to leveraging PROC SQL against DB2 tables proc sql, proc step, group by, inner join, relational database 6
32 Customized Proportional Venn Diagrams from SAS System Shiqun (Stan) Li Within our SAS community, there has been a high demanding for a SAS procedure or SAS macro that can generate proportional Venn diagrams[1]. In SAS Global Forum 2009[2], for the first time we presented an algorithm and a SAS macro that can create proportional Venn diagrams. The macro uses ANNOTATE functions to draw the Venn diagrams. In this presentation, we will introduce another SAS macro, which utilizes PROC GPLOT instead to generate customized proportional Venn diagrams. The Venn diagrams can have enhanced patterns, customized colors, pop-up and drill-down properties. Several Venn diagram examples will be exhibited to demonstrate the usages of our SAS macro. This paper is prepared for an intermediate and advanced audience. Key Words: Proportional Venn diagram, SAS/GRAPH, SAS/MACRO, Data Visualization macro definition, proc gplot, proc step 7
33 Customizing a Correlation Matrix That Would Make Pearson Proud Aaron Hill PROC CORR is a great tool for exploratory analysis, statistical modeling, and data screening. However, with more than ten variables in a correlation matrix, output can be difficult to read. This paper will describe how to use PROC REPORT and ODS to produce a continuous, unbroken matrix formatted with visual cues and traffic - lighting. The final result: a visual masterpiece with maximum readability and utility correlation, excel, proc step, proc report, ods html, label statement, proc corr, out=, format statement, sas output, macro variable, proc template, proc sql 10
34 Dealing with Blanks: Leading, Trailing, In-Between Virginia Chen Dealing with blanks sometimes can be a headache. Very often, the data you receive might contain unwanted spaces, and you want to remove them to make your data clean. Fortunately SAS provides a variety of useful character functions to handle blanks in a character string. This paper compares some frequently used functions that remove leading blanks, trailing blanks or multiple blanks in the middle of a string. The paper also discusses an efficient way to concatenate character strings after removing blanks. The purpose is to make data manipulation more accurate, efficient and ultimately a breeze for your daily data work. The functions we will discuss include TRIM, TRIMN, STRIP, LEFT, COMPRESS, COMPBL, and a few concatenation functions including CAT, CATT, CATS, and CATX. The intended audience is beginning to intermediate SAS users with good knowledge of Base SAS. COMPARISON 1: TRIM vs. TRIMN The first comparison is between the TRIM and TRIMN functions character functions, compress function, trimn 6
35 Deciding if the EM Algorithm is the Right Choice Michael B. Moldoff The Expectation-Maximization (EM) Algorithm is sometimes used to impute incomplete or missing data. The algorithm utilizes maximum likelihood estimators (MLEs) to produce estimates. However, programming this entire method in SAS can be tedious and tricky when many calculations and probabilities are involved, or because of the complexity of a par- ticular model's MLE. SAS has an EM Algorithm option in the procedure PROC MI. SAS imputes values for missing observations for a numeric variable using the other existing data. However, when looking at examples on the web, I could not find a method in SAS that used the EM Algorithm to impute categorical variables. To better illustrate the difference, here is an example of the data that I found the SAS EM Algorithm ready to handle: data EMdata; input temp pressure UVindex; DATALINES ; 68 29.02 3 70 . 5 65 30.00 . . 28.60 2 80 . 6 ; In this dataset, there are missing values of temperature, air pressure, and/or UV index missing value, data standard, data mining 3
36 Developing Standard Processes and Tools to Capture Analysis Requirements for a Clinical Trial Jane E. Marrer A SAS programmer needs to have well defined requirements in order to successfully create a package of analysis and reporting deliverables to support a clinical trial. SAS programmers should consider using a standard process and tools to define and document the analysis and reporting needs. This will enable the efficient generation of consistently high quality tables, graphics and datasets that meet the customer's needs. This will be a great way to reduce unplanned work or re-work for the programmers. Template tools pre-filled can serve an invaluable purpose in streamlining the process and ensuring accurate documentation of requirements clinical trial, sample 8
37 Don't Despair, You Do Have An Option! Wei (Lisa) Lin,
Jiannan Kang
A large number of SAS programmers may never change SAS system options. Why? Because SAS provides a full load of default system options based on assumptions of how programmers want the system to work. Default system options save programmers from having to specify every little detail when working in SAS, but programmers are not always satisfied with the assumptions SAS formulates. However, SAS provides a way for programmers to override the default options. Some options can only be specified when SAS initializes, but most system options can be changed at any time during the SAS session with a simple OPTIONS statement. This paper will discuss some of the common SAS system options that will make SAS work easier options statement, by group processing, sas log, dataset, proc print, proc step, error message, merge statement, autocall macro, macro variable, libname statement, exception handling, sas output, macro put, macro definition, cpu time, proc options 13
38 Dropping Automatically Variables with Only Missing Values Selvaratnam Sridharma Sometimes all the values of some variables in a SAS dataset are missing or null, and we would like to drop these variables to save disk space. Here we introduce a macro %DROPMISS that can automatically identify and drop SAS variables that have only missing or null values. You have the option of not dropping the variables you do not want to drop by using a parameter in the %DROPMISS macro missing value, dataset, macro conditional 6
39 Enhancing Textbook-Style Histograms with the PLOTHISTON09 SAS Macro Perry Watts,
Samuel Litwin
A textbook-style histogram origina lly defined in the NESUG-08 paper Using SAS Software to Generate Textbook Style Histograms [8] contains frequencies and endpoints rather t han percents and midpoint s that are the SAS de- faults. Textbook-style histograms can be generated in PROC UNIVARIATE or from scrat ch in the PLOTHISTON09 (PLOTHISTO-NESUG09) macro. PLOTHISTO was originally developed in 2008 to handle limit ations associated with endpoint definitions in PROC UNIVARIATE. With the syntax restricted to <m TO n BY increment> in version 9.1.3 SAS, it was not possible to gen- erate histograms when the numbers of bins or uneven bin widths were specified. These limitations were overcome in 2008, and then in 2009 the hi stogram macros were extended to produce subgroup histograms and histograms gen- erated from summary data; two additional graphs that are not available in PROC UNIVARIATE histogram, proc univariate, proc step, proc freq, scatter plot, proc format, macro variable, proc gplot, proc sgplot, %if-%then-%else 18
40 Enterprise Guide: Tips for Programmers John D. Chapman,
Mark Chapman
SAS Enterprise Guide is a Microsoft Windows client application that provides a guided mechanism to exploit the power of SAS. Enterprise Guide, also known as EG, integrates an array of SAS analytics into a friendly interface that allows business analysts to produce reports they need. Though SAS marketing has emphasized this accessibility to users who are not programmers, Enterprise Guide also provides an improved work environment for programmers. That is the focus of this paper, which introduces SAS Enterprise Guide to programmers. It describes and explains features that make Enterprise Guide an attractive alternative to the conventional Windows interface for programming, whether using SAS on a PC or on a server. The primary objective is to motivate SAS programmers not yet using Enterprise Guide to give it a try. There are also several tips that programmers with some Enterprise Guide experience could find useful sas enterprise guide, sas programmer, excel 10
41 Evolution of the Investigator Satisfaction Ranking Report: The Advantage of Using the "PROC REPORT Procedure/ODS Excel" versus a "CROSSTAB Output" or "CROSSTAB/ODS Excel" Mollie E. Van Loon,
John M. Shingler
This paper describes the evolution of the SAS progra mming of a report used in employee evaluations by a government agency. The data is taken fr om a survey seeking customers' opinion of the service they received from the agency. We entered the data into a SAS dataset a nd developed a ranking for each employee. The agency requires the final report to be in MS EXCEL. When we began processing the report, the programming was written in SAS Version 6. The report was derived from a CROSSTAB output .LST file and typed into an EXCEL table. With SAS Version 8, we were able to output the CROSSTAB table into an EXCEL file using ODS. Although the results were in EXCEL, they still required much editing. Thus, the first tw o versions were both time consuming and error prone. To resolve these issues, we changed the SAS programming a nd used PROC REPORT and ODS statements excel, proc report, proc step, proc freq, sas programming 8
42 Formatting Tips and Techniques for Printable Excel Tables Created with the SAS Excel XP ODS Tagset and PROC REPORT Kathy Hardis Fraeman The SAS EXCEL XP ODS Tagset can be used to generate multi-sheet EXCEL workbooks directly from SAS. The output of PROC REPORT sent to EXCEL with the Tagset can be nicely formatted for printing using a variety of programming tips and techniques specific to PROC REPORT, such as the use of COMPUTE blocks. These techniques allow the programmer to apply a variety of formats, both automatically and conditionally, to specific table headers, rows, columns, and even individual cells. Other formatting techniques available through the EXCEL XP ODS Tagset include page setup, headers and footers, titles, the insertion of line feeds and special characters in text with the use of PROTECTSPECIALCHARS = OFF, and the use of in-line formatting and ODS excel, proc report, proc step, xls, output delivery system, odds ratio, proc template, dataset 14
43 From Unfriendly Text File to SAS Data Set: Reading Character Strings Anastasiya M. Osborne What does it take to automatically clean unwieldy text files in SAS9? It takes business necessity and intermediate-to- advanced combinations of SAS9 options, statements, character and date functions, call routines, macros, and OS commands. This paper describes how to automate an otherwise tedious and error-prone process of extracting data from text files with inconsistent structure and format. The data is then used in a real-life project txt, dataset 12
44 Getting from SAS 9.1.3 to SAS 9.2: Migration Tools or Promotion Tools Sandy McNeill If you are running a metadata server in your SAS 9.1.3 environment, you must upgrade your metadata when you move to SAS 9.2. There are two possible approaches to take. The first approach is a migration, which will essentially copy your SAS 9.1.3 environment over to SAS 9.2 as part of your SAS 9.2 installation process. The second approach is to make a fresh start by installing SAS 9.2 first, then promoting specific content from SAS 9.1.3 afterwards. This paper will describe the tools, processes, and considerations for each approach. The goal is to help you make an educated assessment to determine which approach will work best for you sas management console, sample, data cleaning, spk file 12
45 Getting the IN operator to FUNCTION inside a SAS Macro Perry Watts Large SAS macros with many parameters require that user values be checked at run ti me. One convenient checking tool is the IN operator that has bee n extended in 9.2 SAS to work inside a ma cro. Usage and syntax updates for the newly extended operator are included in the presentation. For those with earlier versions of SAS software, the IN FCN ("in-function") macro has been developed to mimic the 9.2 IN operator. INFCN has been select ed as a name, because the INDEXW function plays a major role in its opera- tion. Also the macro has been implemented as a macro function so that it ends up working just like an operator. The crossover from function to operator is made possible by the fact that t hese structures can often be used inter- changeably. In the paper, the interchangeability is demonstrated and the INFCN macro is reviewed in detail macro function, macro facility, macro definition, data step, macro variable, %if-%then-%else, %macro parameters, macro parameter 5
46 Going Postal - automating distribution of formatted reports using base SAS Tracy DeCanio,
John Blackwell
macro variable, macro definition 5
47 Good Programming Practices in SAS Jason L. Ford macro variable, proc step, proc sql, create table 9
48 Graphs in Flash, using Graph Template Language (GTL) Himesh Patel The Graph Template Language (GTL) offers many opportunities for application developers to package simple or complex custom-designed graphs into stand-alone template libraries. In SAS 9.2, users can generate static output only through Java rendering. Let's take a peek into future rendering through the use of Adobe Flash. You will be able to use your current GTL code to generate interactive graphs using Flash technology. Once data is visually analyzed, you will be able to publish the graphs in presentations or reports graph template language, output delivery system 7
49 Guido's Guide to PROC UNIVARIATE - A Tutorial for SAS Users Joseph J. Guido PROC UNIVARIATE is a procedure within BASE SAS used primarily for examining the distribution of data, including an assessment of normality and discovery of outliers. PROC UNIVARIATE goes beyond what PROC MEANS does and is useful in conducting some basic statistical analyses and includes high resolution graphical features. Output Delivery System (ODS) interface for this procedure will also be examined and demonstrated. This tutorial will cover both basic and intermediate uses of PROC UNIVARIATE including some helpful tips to expand the use of numeric type data and give a framework to build upon and extend knowledge of the SAS System proc univariate, proc step, p-value, proc calis, normality test, output delivery system, box plot, group by, interquartile range, histogram, proc means 18
50 Health Status and Attitudes Towards Health in Medical Expenditure Panel Survey (MEPS) Sample Population Pramit A. Nadpara health insurance, proc cancorr, correlation, sample, proc step, scatter plot, proc univariate, outlier 7
51 How Proc Freq Can Help You Merge Emmy V Pahmer Merging large datasets is often a question of ident ifying patterns and making sure they are consistent across datasets. The Frequency procedure can help you do that. It's a us eful tool to take a look at your data prior to merg ing. This paper will present simple examples to illustrate this point proc freq, proc step 5
52 Improve Your Dating: The INTNX Function Alignment Value SAMEDAY Bruce F. Gilsen date variable, sysdate9 2
53 Incidence-Density Sampling: Alternative Programming Approaches to Achieve the Same End Robert Gately,
Bruce Turnbull
There are various ways one can go about coding data, analytical, or sampling steps using SAS. In this paper we demonstrate two distinct approaches to generating an Incidence-density based control population for two separate pharmaco-epidemiological case-control studies. Incidence-density sampling is a sampling approach intended to produce a set of controls for epidemiological case-control studies that mimic the underlying risk-pool of person-time of the population from which the sample was drawn. In one of our examples the underlying risk is exposure to ce rtain medications, individually or in combination. Our other example involves a general population of individuals 18 years of age or older with at least 183 days of continuous health plan enrollment. With both examples we will demonstrate the steps leading to the set-up of the datasets from which the samples were drawn as well as the sampling procedure itself sample, point= option 10
54 Integrating Tables and Graphs with ODS LAYOUT Steven H. Feder ODS layout of PDF output can arrange multiple tables and graphs on the same page, and even overlay tables onto graphs and vice versa. This can replace GREPLAY coding of multiple graphs with reduction of the most tedious aspects. It also pr o- vides easier and more flexible coding of certain elements of graph annotation. Matching style elements such as colors, lines, and symbols of graphs with text helps integrate the appearance for easier user interpretation proc report, proc step 13
55 Let SAS Abbreviations help answer the question "How did I do that the Last Time?" Kathleen J. Harkins,
Mary Anne Rutkowski
SAS Abbreviations are an easy, quick and efficient way to reduce programming time. Utilizing abbreviations helps eliminate time consuming searching for proper syntax, trial and error coding, and tedious typing. Abbreviations can help reduce the occurrences of trying to remember "How Did I do that the Last Time?" Abbreviations only have to be defined once in the Enhanced Editor. With just a few keystrokes, the proper syntax is inserted automatically into your SAS program. Once created, abbreviations are available to all of your future SAS sessions. Abbreviations can also be shared with other SAS programmers for additional efficiencies. This paper will introduce the use of abbreviations and provide examples of abbreviations that have been useful for programming in the pharmaceutical industry proc step, rename statement 6
56 LOCF Method and Application in Clinical Data Analysis Huijuan Xu The Last Observation Carried Forward (LOCF) imputation method can be used when data are longitudinal (i.e. repeated measures have been taken per subject by time point). The last observed non-missing value is used to fill in missing values at a later point in the study. Therefore one makes the assumption that the response remains constant at the last observed value. There are several ways of achieving this goal. Before we use this imputation method, we need to know several things: what the data structure is like, at what time point the observed value can be carried forward, and what is the last time point for non-missing value to be carried forward in the study. In this paper, a couple of data merging methods will be discussed and applied to a simple case and a more complicated case imputation, missing value, last observation carried forward 5
57 LOCF: It's more than just carrying forward Vikash Jain,
Niraj J. Pandya
Missing data is part of any clinical study been perfor med and it's always a priority for any clinical team on how to deal with it. There are numerous app roaches been adopted in clinical data analysis to impute the missing data using SAS softw are. This paper is presented from the programmer's point of view on the list of things wh ich have to be taken care while imputing missing data points using last observation carried forward (LOCF) approach. To carry forward the previous records to impute the missing data point, a clear approach, a list of rules/conditions and a detailed algorithm design has to be stated. this paper outlines couple of real case scenarios and approaches on imputing missing values for repeated measured studies, will caution on few of the pitfalls, how to avoid them and validate to make sur e that the algorithm is working as desired baseline, missing value, adam dataset, imputation, data cleaning, clinical trial, raw data, visit, data science, last observation carried forward 10
58 Look Ma, No Hands! Or How We Move SAS Into Microsoft Excel With No Manual Intervention John J. Cohen No matter how prolific our SAS processes or robust, detailed, and intricate our results, the seemingly -secondary task of providing output to our end users in some format other than standard SAS data sets and reports may u nder- cut the perceived value of our otherwise brilliant work. So, porting results successfully to, say, the favorite end -user tool of choice in my environment - Microsoft EXCEL - becomes critical to successful completion of a project. In the circumstance of a one -off analysis, any manual cutting-and-pasting, formatting, and the like, is likely a crit ical part of one's analysis anyway. However, i f a project reaches a point of needing to be "productionized," genera lized across multiple sales geographies or therapeutic areas, updated on a monthly basis, or some other requir ement, the likelihood of moving SAS results into EXCEL using a substantially manual process with any degree of timeliness and accuracy is probably unacceptably small excel, sas output, proc step, data step, xls, sample, data cleaning, dataset, macro variable 8
59 Macro - How and Why H. Ian Whitlock Time does not allow for a complete macro course; however, the student is provided with a complete course to finish at home. The course assumes that the student is familiar with some basic SAS (elementary DATA steps, PROC PRINT, etc.) and how to operate interactively with the display manager, but it does not assume any knowledge of macro. Some basic macro programming will be introduced during the hands on workshop. We begin with the idea of macro as a parameter driven unit of SAS code. The main example is drawn from a macro that generates SAS code for making test prints. Various features are added throughout the lecture with the student implementing and/or testing some of them to end up with a fairly useful little macro that also illustrates what macro is all about. If you complete the course you will end up having macros getting help from other macros to solve significant problems. Quentin McMullen has been a great help in developing and preparing an earlier version of the course macro loop, macro variable, proc print, proc step, put statement, macro put, macro definition, proc sql, %if-%then-%else, macro function 4
60 Magic Spells with SAS Christopher J. Bost Programmers often need to calculate spells, or the number of consecutive periods of time under different conditions. For example, you might need to calculate months of employment and unemployment, or days on and off a medication. This paper describes how to use multiple arrays and index variables to identify the beginnings and endings of spells, and how to summarize the number, minimum, maximum, and average length of spells proc means, do loop 5
61 Making SAS Training Stick Christopher J. Bost This paper describes a five-step process for designing and delivering memorable SAS training: 1) assessing needs; 2) preparing for training; 3) delivering training; 4) transferring training; and 5) evaluating results. This process helps to improve retention and to maximize the return on your SAS training investment macro definition, sas programmer 7
62 Migration from Mainframe to LINUX: Leading but Still Bleeding Edge Val Volovik The successful migration of SAS applications across platforms cannot be accomplished without extensive pre-planning and analysis. This paper addresses the steps we took to migrate established statistical applications and their associated data from Mainframe to LINUX. Steps included obtaining upper management and end-user buy in, Proof of Concept testing (a hi-speed storage appliance and LINUX), redesigning of existing applications to take advantage of the new platform features, and determining the most optimal ETL processing Perhaps most important, we learned that patience and optimism were absolute prerequisites for this major undertaking proc sql, flat file, proc step, sample, dataset 11
63 More Than One Way To Age A Cat Lloyd Butler There are different ways to determine someone's age. In every day life, we just want to know how many years someone has been alive. For example, I'm 29 until my birthday, when I suddenly become 30. But sometimes we want to know someone's age at a finer grain. Have you reached your 1/2 birthday yet? You get penalized for withdrawing from your IRA before you turn 59 1/2. What age will you be at the end of the year? To determine if your child is your dependent for tax purposes, you need to know whether they turned 19 by the end of the tax year. How do we account for leap years? If you are born on February 29th, do you age 1/4 as fast as other people? When is your birthday on non-leap years? This paper will illustrate some of the SAS tools to help answer questions about someone's age 7
64 More Tips and Tricks for Creating Multi-Sheet Microsoft Excel Workbooks the Easy Way with SAS Vincent DelGobbo Transferring SAS data and analytical results between SAS and Microsoft EXCEL can be difficult, especially when SAS is not installed on a Windows platform. This paper explains how to use the XML support in Base SAS 9 software to create multi-sheet Microsoft EXCEL workbooks (for EXCEL versions 2002 and later). You will learn step-by-step techniques for quickly and easily creating attractive multi-sheet EXCEL workbooks that contain your SAS output, and also tips and tricks for working with the ExcelXP ODS tagset. Most importantly, the techniques that are presented in this paper can be used regardless of the platform on which SAS software is installed. You can even use them on a mainframe! The use of SAS server technology is also discussed. Although the title is similar to previous papers by this author, this paper contains new and revised material not previously presented excel, xls, date variable, sas output, proc template, sas base, sysdate9, output delivery system, title statement, by group processing, proc print, ods xml, format statement, proc step, sample 20
65 Notes on Programming Style Allan Glaser Programming style is important. A small but growing body of literature suggests that style is a critical component of programming quality, and many authors offer specific guidance about what good style should, or should not, be. Unfortunately, there is very little scientific evidence proving that any specific style really has an advantage over any other style. This paper will identify some key elements of programming style, discuss techniques to measure those elements within the context of SAS programming, suggest ways to use the results for process improvement, and propose topics for future research. The intent is to inject clarity, rationale, and objectivity into the issue of programming style; to encourage programmers to recognize the importance of good style; and to encourage managers and organizations to implement reasonable and beneficial standards. Overall, this will enhance the art of programming proc step, sample, if-then-else 8
66 ODS Graphics Designer Sanjay N. Matange The SAS/GRAPH ODS Graphics Designer is a GUI based intera ctive tool for users who want to create custom graph quickly without any programming. This video presentation will show you can combine different types of plots, insets and legends to create the graph you need. Use this flexible tool to incrementally build single-cell or multi-cell graphs adding rows and columns as you go. Bu ild data driven classification paneled graphs as easily as simple scatter plots. Start from scratch, or build on top of graphs from a custom izable gallery, adding your own custom graphs to the graph gallery for future use, or to share with others histogram, class variable, density plot, scatter plot, box plot, bar chart, proc sgdesign 24
67 ODS Packages: Putting Some Zip in Your ODS Output Eric A. Gebhart ODS packages and package templates add powerful new abilities to ODS. Automatically create zip files and SAS packages which contain all the output generated from your SAS program. ODS packages make it easy to e-mail your ODS output to others and can help keep your file system clear of file clutter. With integration technologies, ODS packages can also publish to WEBDAV, Email, Queues, and Subscriptions as well as Archives. ODS packages are also completely integrated with TAGSETS allowing for fully automatic generation of packages and the creation of some of the newer file formats like Open Document Format and Microsoft Office 2007. Learn how easy it is to use ODS packages and find out how they will impact the future of ODS output delivery system, ods html, proc step, ods packages 10
68 Parsing Useful Data Out of Unusual Formats Using SAS Andrew T. Kuligowski Most "Introduction to Programming" courses will includ e a section on reading external data; the first assumption they make will be that the data are stored in some sort of documented and consistent format. Fortunately, in the "real world", a lot of the data we deal with has the same basic assumption of occurring in a documented, consistent format - a lot of it, but not all of it. This presentation will address some techniques that ca n be used when we are not dealing with cleanly formatted data, when the data we want is in a less-th an-ideal format, perhaps intermingled or seemingly buried with unnecessary clutter. It will discuss the principles of using SAS to parse a file to extract useful data from a normally unusable source. This will be accomplished by citing examples of unusual data sources and the SAS Code used to parse it Keywords: INDEX Function, INPUT Stateme nt, Parser input statement, named input, proc print, sample, proc step, conditional do loop, cpu time, index, sas log, sas base, character functions, end 15
69 PDF to SAS Adeline J. Wilcox You can convert a Portable Document Format (PDF) file to ASCII by saving it from Adobe Professional as a text file or by running the Linux program named ps2ascii. These methods can produce different results. To read selected columns of a tabular report in PDF, I first ran ps2ascii. ps2ascii output each table row into several successive records. Next, I used Linux programs with regular expressions again and again to prepare an ASCII file that I could read into SAS. In particular, I used the Linux egrep program with its line-numbering and trailing context options to delimit the table rows. This produced a file from which I could identify the first record and and read it and the next four ASCII records into one SAS observation. With SAS, I used the prxchange function for final data processing. The ps2ascii program is a handy tool for SAS programmers with Linux and regular expressions in their skill sets data step, prxchange 6
70 Please don't Merge without By !! Monal Kohli Have you ever merged datasets and forgotten a by Statement, looked at the results and thought wow -- 100% match but when you started validating the results they were all jumbled up. The culprit here is the "BY" statement. It is a really powerful statement and its placement can be critical in achieving correct merge results. In this paper we will discuss the MERGENOBY SAS option and other common errors that can during a merge by group processing, merge statement 11
71 PROC CALENDAR: Get organized using SAS! Murphy Choy,
Matthew Komos
Do you need a simple and effortless way to manage y our time? Ever had the misfortune of losing your no tebook with all your appointments inside? Maybe your PDA expired on you when you needed it most? Or are you simply annoyed because your email program seems to hate you? Don't worry! Let me show you a simple and easy way to organize your l ife with SAS PROC proc step, sample 4
72 PROC SQL for DATA Step Die-Hards Christianna S. Williams PROC SQL can be a bit daunting for the 'old dogs' who have learned SAS data management techniques using exclusively the DATA STEP. However, when it comes to data manipulati on, SAS often provides more than one method to achieve the same result, and SQL provides another valuable tool to have in one's repertoire. Further, Structured Query Language is im plemented in many widely used relational database systems with which SAS may interface, so it is a worthwhile skill to have from that perspective as well. This paper will present a series of increasingly complex examples and hands- on exercises. In each case I will demonstrate the DATA STEP method with which users are probably already familia r, followed by SQL code that will accomplish the same data manipulation proc sql, proc step, create table, order by, group by, inner join, where statement, subsetting if, filtering, set statement, standard deviation, proc means, data governance, outlier, by group processing 19
73 PROC SQL Tips and Techniques Gail Jorgensen,
Susan P. Marcella
SAS has always been an extremely powerful data manipulation language. The inclusion of PROC SQL in the SAS pack- age made a very powerful addition to the SAS programmer's repertoire of tools. However, for those of us who learned SAS before the addition of PROC SQL, the terminology and very different syntax of this procedure may be enough to prevent us from taking advantage of its flexibility and usefulness. There are several books that teach the concepts of queries, joins, and relational databases to instruct the novice user. This paper, however, is aimed at providing a clear explanation of the PROC SQL query by comparing it to the already-familiar DATA STEP, and will offer some tips and techniques for the types of situa- tions when PROC SQL can be particularly effective and useful proc sql, proc step, out=, select, macro variable, sample, in=, full join, right join, inner join, proc freq, missing value, create table, dictionary tables, if-then-else, where statement 23
74 Process Excursion Detection using Statistical Analysis Methodologies in High Volume Semiconductor Production Peter Frankwicz As high volume semiconductor manufacturing approaches sub-65nm transistor technology nodes, process excursions during production and their avoidance are consuming sizeable engineering resources. Daily fabri- cation production can be significantly impacted by process induced defects and result in increase wafer scrap caused by poor wafer handling, tool aborts during process and resultant suppressed wafer yields [1, 2]. Ex- amples of process excursions in manufacturing range from the obvious plasma ignition abort to not so obvious reduction in backside wafer cooling gas flow. Process excursions are generally detected, in best cases, at downstream OLPM (on-line production monitor) data collection. Unfortunately, worst case scenarios are not detected until electrical testing at the first metal layer or end-of-line wafer sort yields data mining, data science 8
75 Proper Housekeeping - Developing the perfect "Maid" to Clean your SAS Environment Chuck Bininger As programs run in any SAS environment they often leave messy residual artifacts lying around. It is this mess that can often create unexpected results when running a SAS program. Sometimes Titles and Footers need to be cleared, options reset to their original values, or macro variables put in the trash. We try to pick up after ourselves by using good programming practices but often we fall short and find ourselves in need of a good scrubbing. This paper will not only show the readers where to look for all dirt that may affect your environment but also supply the reader with the tools needed to keep your environment clean macro variable, dictionary tables 4
76 Purrfectly Fabulous Feline Functions Louise S. Hadden Do the following snippets of SAS code look familiar? length stcounty $ 5 citystzip $ 60; stcounty=trim(left(put(state,z2.)))||trim(left(put(county,z3.))); citystzip=trim(left(city))||', '||trim(left(statecode))||' '||trim(left(zip)); Now there's an easier way! Leave those vertical bars behind and join us as we explore the purrfectly fabulous feline functions (and call routines) available in SAS version 9.1 and above. Enhancements available in version 9.2 will be demonstrated proc contents, sas log, cpu time, proc step, character functions, length statement 12
77 QC the Qualitative Part of Clinical Data in SAS Datasets Tse-Hua J. Shih,
Xitao Fan,
Cliff Meng,
Eugenia Henry
In the Pharmaceutical industry, qualitative descriptions are prevalent in clinical data (e.g., lab, adverse events, etc.). Also often encount ered are variables formatted with character values (e.g., metadata in SDTM and ADaM formats). To spot misspelled words in qualitative data and variable formats, a straightforward method is to copy-and-paste those data onto word documents and do eye-ball chec ks pages after pages. It consumes lots of time and energy, which often results in human errors due to physical tiredness. For each SAS dataset to be checked, this paper dem onstrates how to document misspelled words, rows of data that contain misspellings, and variable names that have misspellings in format or variable values. Values of both character variables and numeric variables formatted with character values can be checked simultaneously dataset, character variable, cdisc 5
78 Really 'Cool' Graphics with SAS/GRAPH - Plotting and Embedding Likert Scales in Your Reports Richard M. Mitchell The use of Likert scales can be a very effective approach in reporting one's data. While this type of scale is commonly used across a wide -range of professions to show where a given measure fits within a predefined scale, references on how to generate this as a high-quality professional looking graphic in SAS are rare at best. This paper will discuss an approach to generating Likert scale graphics that is unique, yet basic. By utilizing PROC GPLOT within SAS/GRAPH along with a few nifty ODS features, a SAS programmer can easily plot and embed his or her own Likert scales into reports. Users of this approach will undoubtedly get a "Wow, those are really cool graphics!" reaction from their coworkers sas programmer, ods html 10
79 Renaming Variables in Batches Ying Feng,
Vincent Weng
Renaming SAS variables may sound easy, but what if you have hundreds of variables that must be renamed? In this instance it will become an annoying and error-prone process if you simply use Rename statements to rename each variable individually. This paper addresses how you can perform the renaming of many variables quickly and error- free. A group of "renaming" macros will be created, which perform different renaming jobs, i.e. renaming all the variables in a SAS data set, renaming partial variables, adding prefixes, adding suffixes, and/or replacing the prefix or the suffix. It's a very handy tool for tailoring variable names in batches quickly to fit different needs proc sql, macro function, proc step, dictionary tables 7
80 Revolutionary BI: A Vision for Business Intelligence Charles D. Kincaid We generate and use Business Intelligence Reports in much the same way we used paper reports. However, like the Reese's Peanut Butter Cup we get even better results when we combine our information and analytics with new methods of creating and distributing them. For example, a lot of time and money is spent gathering requirements for and then developing business intelligence reports. Is that the best way? Does the value received warrant that level of investment? It can, but often times the work sits unused or incomplete because it doesn't meet the real needs of business users. How do you get at those needs efficiently without the overhead? Delivering BI reports has many similarities with delivering other information over the web (e.g. consumer products or search results). Many companies successful delivering that information. How do they do it? We'll discuss the techniques that have succeeded in the Web 2.0 world, e.g. Google, Amazon, Apple business intelligence, sas enterprise guide 6
81 Running SAS on Windows Servers in Research Environment Joanne Ellwood Running SAS Foundation products on Windows Servers with many users can be very challenging. Users can experience slow downs and suspended blue screens when trying to log onto the server. Runaway SAS sessions can consume large amounts of CPU while doing no real work. This presentation will show how SAS server administrators and users can manage these problems using standard Windows utilities, successfully avoiding the dreaded non-scheduled reboot of a SAS application server. Strategies discussed in the presentation may have application to other SAS installations such as BI Server. Main This presentation assumes running SAS on a dedicated server using the Windows operating system and Terminal Services Management. Multiple users c an log onto the server using Remote Desktop Connection and run The SAS System either interactively or via Windows Batch Submit cpu time, dataset 4
82 SAS and Unix: Getting Started Sara Hickson The Unix operating system is a powerful way to run programs efficiently on very large datasets, and has advantages in flexibility over a Windows sy stem when combined with SAS . The introduction to Unix and Unix scripting can be quit e a shock, however, compared to the relatively intuitive interface of the PC. Althoug h each environment has its own versions and added software, this paper will touch on the more u niversal challenges of getting started using SAS in Unix, including the basics of getting starte d in Unix, running programs in batch mode and how to use the most commonly available editors to write programs. We will also look at some simple Unix scripting to investigate files data step, proc step 10
83 SAS EG Options: Let the Tools Work for You Susan M. Jumper,
Harsha M. Kotian
The purpose of this paper is to communicate to SAS users the broad range of Options contained within S AS En- terprise Guide. Located under the Tools menu, the Options item on the dropdown list provides a divers e assort- ment of settings available for specialized applicat ion development. Choices offered to the user inclu de those im- pacting the SAS environment, servers, tasks, result s and data. Also explained are the selections avai lable when applying individualized user preferences. Topics c overed herein are applicable across all supported o perating systems. This presentation is designed not only fo r users new to Enterprise Guide and wanting to begi n by using the most efficient methods of project creation and processing, but also for the intermediate user look ing to in- crease project efficiencies in real world scenarios sas enterprise guide, dataset, proc sql, proc step 20
84 SAS Formats: Effective and Efficient Harry Droogendyk SAS formats, whether they be the vanilla variety supplied with the SAS system, or fancy ones you create yourself, will increase your coding and program efficiency. (In)Formats can be used effectively for data conversion, data presentation and data summarization, resulting in efficient, data-driven code that's less work to maintain. Creation and use of user-defined formats, including picture formats, are included in this paper user-defined format, proc print, date variable, sysdate9, data step, dataset, proc step, format statement, input statement, proc format, put statement, e., numeric variable, excel, proc sql 16
85 SAS Graphs in Small Multiples Andrea Wainwright-Zimmerman Edward Tufte has championed the idea of using "small multiples" as an effective way to present large amounts of data in limited space. This paper will discuss the issues of formatting SAS Graphs for scaling down, and the challenges of putting many graphs together in the same medium. I will also discuss options for drawing attention to specific graphs in this paper proc sql, output delivery system, proc step, create table, macro variable, macro definition, sas output 12
86 SAS Output to Excel: So Many Choices, What Do I Do? Cathryn Ooro,
Stephen J. Rhoades
SAS gives you a lot of choices for getting your data into EXCEL and it can get confusing pretty quickly. You can create a variety of files such as CSV, HTML, XML and XLS via SAS using Data _NULL_, ODS or PROC EXPORT. So are there any other choices? Well your other choices within a workbook are a single spreadsheet, multiple worksheets or multiple outputs in a single sheet. And of course there are differences between the mainframe and PC. This presents some challenges when the data is on the mainframe. So what do you need to do in these cases? In our shop there is not much time for learning so we prefer seeing the input, output and the technical details. It tends to speed the development process. For the poster, the flow will be the same to reduce the learning curve. Now you can really get into this by the use of templates which is a topic in itself. However, there will be some excel, proc step, proc print, dataset, ods html 16
87 SAS Programming Knowledge Management John He There are a lot of industry or programming related knowledge are tacit, individual, internal, or project specific that need to be transferred into written, explicit, corporation-utilized, and externalized assets. The SAS programming knowledge management will enable higher levels of performance by dynamically connecting people to people, people to technology, and people to data. Whether the knowledge of the best programming practice of each indi- vidual programmer can be captured, retained, transferred and shared will be dependent on how the programs are designed, organized, documented and become institutionalized. The best programming practice should be based on an effective knowledge management system that is aiming at knowledge learning, knowledge sharing and knowledge transferring sas programming 5
88 SAS Text Miner: Introduction and Case Study Maria Skaletsky,
Dominique Haughton
In this paper we demonstrate an application of SAS Text Miner to the imputation of the missing key player description field in a customer database. Often textual data collected by marketing departments remain unused due to a difficulty of any automated proces sing. SAS Text Miner provides a solution to this problem and makes processing of textual data manageable. As a result of this project missing textual customer information in a database collected by a marketing department of a large provider of information infrastructure was successfully imputed. This project demonstrates that the implementation of SAS Text Miner into the processing of customer data could eliminate the need for manual treatment of text data and increase the usefulness of the customer database imputation, proc freq 5
89 SAS/GRAPH for the Timid Earl R. Westerlund SAS/GRAPH is one of the foundation products of SAS, and an invaluable tool for anybody who needs to see the information in the data. Its procedures work the same way as any other procedure. But the number of proce- dures, statements and options available are so numerous - and, in many cases, cryptic - that many people be- come intimidated. The purpose of this paper is to provide a gentle introduction to SAS/GRAPH, with numerous examples to show how the fundamentals work. It is based on the following premises: If you can create a crosstab in PROC FREQ , you can create a plot in PROC GPLOT. If you can set a title or footnote, you can change the appearance of a graph line. * If you can change the linesize of a listing, you can change the color of the title text. This paper is intended for those who have not used SAS/GRAPH, or those who have tried and given up in frustra- tion proc gchart, proc gplot 14
90 Searching for Variable Values with CAT Functions: An Alternative to Arrays and Loops Michael S. Zdeb When one wants to search through a large number of variables for one or more specific variable values, the common approach is to first use an array to store the variable values and then use a DO loop to cycle through the array elements looking for the value(s) of interest. With the advent of the various CAT (concatenation) functions in version 9, there is an alternative to the array/loop approach that reduces the amount of SAS code needed to search for values, with the added benefit of taking approximately as much elapsed time as the array/loop approach. This paper shows several scenarios where one of the CAT functions can be used in combination with version 9 FIND and COUNT functions to simplify the task of searching for variable values. The standard approach (an array plus a loop) is often shown first, followed by the CAT function solution character functions, index, cpu time, character variable, sas log, elapsed time, if-then-else, subsetting if 9
91 Simultaneous Migration of SAS Software Versions and Hardware Platforms Duggan Collier This paper documents a simultaneous migration from SAS 8.1 on an HP server/OS to 9.1.3 on an IBM server/OS. It generally will proceed in time order, describing the events in the order in which they occurred. It will focus on surprises, unexpected events, and ways in which these events can be handled. Migration on one server can be simple. Users can be given a general script, be told to modify it, and to migrate their own files. Migrating to a different server is more complex. BACKGROUND AND JUSTIFICATION As part of ongoing cost rationalization, one area of opportunity for savings corporations look at can sometimes be found in the licensing and deployment of various software and hardware platforms. Our company had SAS software installed on several different servers and had several different site licenses. The different SAS licenses were more expensive than one license and supporting several servers also posed a strain on limited IT resources proc step, cpu time, dataset, batch job, proc upload, raw data, proc sql 13
92 So Now You're Using PROC REPORT. Is it Pretty and Automated? Daphne E. Ewing,
Ray Pass
PROC REPORT will display data. That's a given. That it is more powerful than the standard SAS reporting tool PROC PRINT is also becoming common knowledge. But what can PROC REPO RT really do? It is certainly more than a glorified PROC PRINT, but it does take some additional work beyond mastering some of the basics of the pr ocedure before it can be used to produce output that can rival t hat of a serious DATA _NULL_ step. This paper will discuss the use of several customized macros that can work together with some PROC REPORT options, and standard SAS title and footnote stat ements, to make your PROC REPORT output really shine proc report, proc step, macro variable, footnote statement, sample, options statement, macro definition 20
93 So You're Still Not Using PROC REPORT. Why Not? Ray Pass,
Daphne E. Ewing
Everyone who can spell SAS knows how to use PROC PRINT. Its primary use may be as a development tool to help in debugging a long multi-step program, or as a simp le report generator when all that is r eally needed is a quick look at the data , or even a basic low-level finished report. However, if a re port generation/information delivery tool with powerful formatting, summarizing and analysis features is called for, then PROC REPORT is the solution. PROC REPORT can provide the standard PROC PRINT functionality, but in addition, can easily perform many of the tasks that you would otherwise have to use the SORT, MEANS, FREQ and TABULATE procedures to accomplish. PROC REPORT is part of the Base SAS product, can run in both an interactive screen-painting mode or a batch mode, and should be the basic tool of choice when there is a need to produce powerful and productive reports from SAS data se ts proc report, proc step, class variable, character variable, proc print, numeric variable, proc tabulate, proc means 22
94 Sol LeWitt and the CDISC Initiative: A Comparative Essay Karin LaPann sample, clinical trial, clinical research, cdisc 10
95 Solving Word Search Puzzles Using SAS Paulette W. Staum Have some fun solving word search puzzles using SAS. First, we will load the puzzle and gather information about it. Next, the puzzle will be stored in an array and searched for the target words using character functions. Finally, we'll display the solution, including circled answers, using the DATA STEP Graphics Interface proc sql, dataset 8
96 Some Simple Perl Regular Expressions Examples in SAS 9 Selvaratnam Sridharma Perl regular expressions allow you to locate patterns in a string. Many of the string processing tasks in SAS can be done using Perl regular expressions. These tasks can also be performed using traditional string functions in SAS. But, Perl regular expressions can sometimes provide a much more compact solution to a much more complicated string manipulation task. Here we will give some examples to show the usefulness of the Perl regular expressions in SAS programs character functions, prxchange 5
97 Stopping Stepwise: Why Stepwise Selection Methods are Bad and What you Should use Instead David L. Cassell,
Peter L. Flom
A common problem in regression analysis is that of variable selection. Often, you have a large number of potential independent variables, and wish to select among them, perhaps to create a 'best' model. One common method of dealing with this problem is some form of automated procedure, such as forward, backward, or stepwise selection. We show that these methods are not to be recommended, and present better alternatives using PROC GLMSELECT and other methods. Keywords: Regression selection forward backward stepwise glmselect regression analysis, data cleaning, stepwise selection, proc step 7
98 Successful Lab Result Conversion for LAB Analysis Data with Minimum Effort Pushpa Saranadasa proc step, proc contents, adam dataset, proc freq, clinical trial, laboratory data, cdisc 8
99 Successfully Implementing Predictive Analytics in Direct Marketing John Blackwell,
Tracy DeCanio
Successfully Implementing Predictive Analytics in Direct Marketing An analysis of the benefits of modeling in direct marketing as well as a review of the dangers associated with common data mining mistakes. The presentation will review specific examples of how SAS data mining prod- ucts have been successfully utilized at the one of the world's largest non-profit organizations to dramatically im- prove ROI. Specifically, this session will focus on 1) measuring the true value of predictive models and 2) preparing data for modeling and avoiding pitfalls and 3) building models and selecting the best for deployment and 4) the importance of industry expertise and questioning what the data are "saying" and 5) assessing the readiness of your organiza- tion in building analytics capacity in-house regression analysis, proc hpsplit 7
100 Supporting CDISC Standards in Base SAS Using the SAS Clinical Standards Toolkit Peter Villiers The use of regulatory standards aimed at clinical research data and metadata has become more commonplace over recent years. In the USA, the FDA is accepting standards from the Clinical Data Interchange Standards Consortium (CDISC) for submission of tabulation data (SDTM) and the main study metadata XML file (CRT-DDS). Work continues on new standards and updates to the existing ones. Previously, SAS users have not had to think so much about metadata and strict compliance to prescribed standards. The changing regulatory standards place an additional burden on SAS users, which translates to higher costs for companies. This paper will explain how the SAS Clinical Standards Toolkit supports users by providing a framework of macro- based functionality to help ensure that standards are applied to clinical data and metadata. It will explain how users can create their own standards and use them within the framework data cleaning, macro variable, autocall macro, controlled terminology, raw data, clinical research, cdisc 13
101 Survey Analysis: Options for Missing Data Paul Gorrell A common situation researchers working with survey data face is the analysis of missing data, often due to nonresponse. In addition to missing values for analysis variables, SAS excludes observations if the weight of any of the design vari- ables (strata, cluster, domain) have missing values. This paper discusses two options available with the SAS survey pro- cedures (e.g. SURVEYFREQ, SURVEYMEANS): the MISSING option and the NOMCAR option. The MISSING op- tion is used with categorical variables to instruct SAS to treat missing values as a valid category. The NOMCAR option (new with version 9.2) is used when the default assumption that missing values for analysis variables are missing com- pletely at random (i.e. the group of non-respondents do not differ in any relevant respect from the group of respondents) is not appropriate. Use of the NOMCAR option instructs SAS to perform a domain analysis of missing and non-missing values missing value, proc calis, missing completely at random, sample, standard deviation, nominal variable, proc surveymeans, proc step 11
102 Taming the Box Plot Sanjiv Ramalingam Box plots are used to portray the range, quartiles and outliers if any in the data. PROC BOXPLOT can b e use d to obtain the necessa ry graphi c but certain situ ations may arise where dire ct application of the procedure and use of the plethora of options that come along with it may not be sufficient to get the d esired g raph. O ne such a pplication i s discussed in detail. This sh ould empower the reader upon understanding to create any box plot that the read er may wi sh. The methodology discussed assumes that the reader has at least a modicum of understanding of the annotate feature box plot, proc step, macro variable, proc boxplot, proc freq, outlier 7
103 Techniques for Labeling SAS Variables Paulette W. Staum This paper demonstrates techniques for automating the creation of variable labels. The first example creates l a- bels that are similar, except that each label includes a different numeric suffix. The second example imports labels from an external data source. The third example captures and modifies labels from an existing data set using PROC SQL and DICTIONARY.COLUMNS proc step, label statement, proc import, proc datasets, sample, proc sql, excel, macro definition 6
104 Techniques for Managing Projects Outsourced to Offshore CRO Hong Qi,
Margaret M. Coughlin
Outsourcing projects to CROs overseas has become common practice in the pharmaceutical industry in recent years. This brings new challenges to project and resource management due to various circumstances uncommon to in-house studies or studies outsourced to domestic CROs. These circumstances include differences in skill sets, work experience, communication style, time zones, cultural norms, etc. In this paper, the authors discuss several techniques being used for functionally outsourced projects where the sponsor process and procedures are required for the success of the project when working with an offshore CRO pharmaceutical industry, clinical data 4
105 Techniques to Perform the Lead Function Through Data Manipulation Kruti Pandya,
Niraj J. Pandya
There are numerous amounts of functions available i n SAS which makes data imputations, data comparison and data manipulation easier for a progra mmer. Though there are some tasks for which SAS does not have functions readily available for us e. One such task is to read next record while working on the current record and at the first thought one can imagine an exact opposite processing of data to LAG function, which can be named as LEAD fu nction. Unfortunately SAS does not offer any such function. But fortunately there are some tricks and techniques which can simulate opposite processing of LAG function and can read next couple of r ecords while still processing current record in the dataset. By little addition of extra piece of code, some of these techniques can also handle cases where processing has to be done by grouping vari ables by group processing, class variable, lag function, proc sql, proc step 6
106 The Application of Survival Analysis to Customer-Centric Forecasting Michael J. Berry Survival analysis, also called time-to-event analysis, is an underutilized tool outside the clinical and manufacturing worlds where it is well established. The particular application addressed in this paper is creating a long-range daily forecast for a subscriber population that is a constantly changing mix of customers segments, each with its own survival function. A bottom-up forecast of this sort is more useful as a planning tool than the typical aggregate forecast because the survival-based forecast is very sensitive to changes in assumptions about the characteristics of new customers. The work described here is based on several successful forecasts developed for newspapers, telephone companies, and other subscription-based businesses survival analysis, predictor variable, liquidity gap 10
107 The Building Blocks of SAS Datasets - S-M-U (Set, Merge, and Update) Andrew T. Kuligowski S-M-U. Some people will see these three letters and immediately think of the abbreviation for a private university and associated football team in Texas. Others might treat them as a three-letter word, and recall a whi msical cartoon character created by Al Capp many years ago. Ho wever, in the world of the SAS user, these three letters represent the building blocks for processing SA S datasets through the SAS DATA STEP. S, M, and U are first letters in the words SET, MERGE, and UPDATE - the 3 commands used to introduce SAS data into a DATA STEP. This presentation will discuss the syntax for the SET, MERGE, and UPDATE commands. It will compare and contrast these 3 commands. Finally, it will provide a ppropriate uses for each command, along with basic examples that will illustrate the main points of the presentation dataset, set statement, merge statement, modify statement, update statement, by group processing, libname statement, out=, input statement, proc step, proc append, if-then-else, sysrc, stop, where statement, missing value 13
108 The Dirty Secret Behind the Box: Why Programming Efficiency Should Matter to All of Us John J. Cohen In Data Mining we tend to focus on the sexy front -end tools, the built in procedures, and canned routines. These have certainly been optimized for us, and in any case, we will need to do whatever it takes to produce final results. Unfortunately the less visible part of the job - data preparation - can take up to 75% of the effort. Further, we sometimes have to creat e our own procedures. Because of this, writing efficient programs should be important to all of us. We will suggest here how to do that without losing sight of our main analysis. ______________ proc step, proc sort, mp connect, proc format, where statement, character variable, dataset, if-then-else, cpu time, keep statement, numeric variable, proc print, proc means, flat file, sample 9
109 The DOW-Loop Unrolled Paul M. Dorfman,
Marina Fridman
The DOW-loop is a nested repetitive DATA STEP programming structure, intentionally organized in order to allow for programmatically and logically natural isolation of DO-loop instructions related to a certain break-event from actions performed before and after the loop, and without resorting to superfluous conditional statements. Readily recognizable in its basic and most well-known form by the DO UNTIL (LAST.ID) construct, which naturally lends itself to control-break BY-processing of grouped data, the DOW-loop, however, is much more morphologically diverse and general in nature. In this talk, we aim to examine the internal logic of the DOW-loop and use the power of example to reveal its aesthetic beauty and pragmatic utility set statement, hash table, missing value, output, by group processing, dataset, data step, automatic variable, proc sql 18
110 The Dynamic Manipulation of Numerous Web Files Ruben Chiflikyan,
Mila Chiflikyan,
Valentina Grouverman
In an earlier paper, we reported on a complex online analysis tool we developed for PONDER that offers an intuitive point-and-click interface that encourages researchers and policymakers to use their existing data. The tool presents analyses tailored to specific research questions. The system contains the wording of questionnaire questions as HTML files, which have to be updated by client request. Previously, the update request was sent to the programmer, who used numerous intermediate steps to manually identify the corresponding HTML files and update them according to the client's specifications. This approach was time consuming, tedious, and error-prone. We developed a new approach to updating the HTML files that involves two applications. Our approach allows the client to update files without requesting the programmer's help. The first application reads all the HTML files, extracts the variable names from filenames, merges with meta-table by variable name, and produces two reports txt, data dictionary, sample 9
111 The Great Escape(char) III Louise S. Hadden SAS provides programmers with many ways to enhance ODS output in addition to the use of both SAS-supplied and user-written ODS styles. In-line formatting of titles, footnotes, text fields and table cells and formatting of data using user-written formats and within the DATA STEP can be accomplished by using ODS ESCAPECHAR. A quick overview of syntax for some of the many possibilities for enhancing ODS output with ODS ESCAPECHAR currently available in SAS 8.2 and 9.1.3 will be presented, including underlines, pre and post images, special functions, line feeds and super and subscripts. Some new features available in SAS 9.2 will be discussed proc format, proc step, output delivery system 18
112 The Macro Debugging Primer Frank C. DiIorio macro variable, macro facility, macro loop, proc step, sas base, macro put, proc sql, %if-%then-%else, sas log, macro call, sysrc, macro function, error message, macro definition 16
113 The SAS Hash Object in Action Paul M. Dorfman,
Marina Fridman,
Koen Vyverman
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. Hash objects are instantiated, deleted, allocate memory, and get updated all at the run-time. Intuitively, it is clear that such traits should make for very inventive and flexible programming unseen in the DATA STEP of yore. Still better, Version 9.2 has added new methods, attributes, and parameters. This paper includes both hash propaedeutics and material intended for programmers already familiar with SAS hashigana at basic to very advanced levels hash table, dataset, hash iterator, composite key, sample, length statement, cpu time, group by, sas programmer, variable, proc sql, sas log, memory usage, proc means, proc step 26
114 This is the Modern World: Simple, Overlooked SAS Enhancements Bruce F. Gilsen proc step, date variable, sysdate9, libname statement, character variable, proc copy, proc cport, dataset, relational database, proc sql 10
115 Tips of Using Proc Report For Summary Tables And Listings Jenny H. Zhang The REPORT procedure is an easy-to-use, ad hoc report generator that simplifies the report development process. It combines features from the PRINT, MEANS, and TABULATE procedures with features of DATA STEP to provide a powerful report writing tool. It is frequently used in the pharmaceutical industry to create summary tables and listings. Many SAS programmers have been very familiar with the basics of PROC REPORT, such as Define, Column, Break and Compute statements. However, there are many advanced futures and options available to generate customized reports. This paper presents some of these advanced options which are very useful in PROC REPORT. They can make programming job much easier. They include: (1). Using FLOW option. (2). Specify one or more ID variables to print on each page and (3). Using #BYVAL title option proc report, proc step, medical history 6
116 Tiptoe through the Templates Cynthia L. Zender Are you confused about the difference between style templates, table templates, tagset templates, and graph templates? Do you wonder how they're all used with ODS? This paper provides an overview of all the different template types and how they're used with the Output Delivery System. From style and table templates, that first appeared with SAS 7 to the newest graph templates that appeared with SAS 9.2, this paper will provide an overview and several concrete examples for each template type. Along the way, we'll also discuss the template garden (SASHELP.TMPLMST) where all the templates live, how to transplant your templates to a different garden, how to come up with your own new variety of templates (PROC TEMPLATE), and how to find your way to the new template garden (ODS PATH). New features of PROC TEMPLATE syntax (such as the IMPORT statement) will be highlighted proc step, proc freq, proc template, proc means, ods html, proc print, proc report, sas log, ascii, ods pdf, sas output, txt, output delivery system, sas enterprise guide 27
117 Use of Advanced ODS Features to Generate Multiple Outputs on a Single Page Niraj J. Pandya Generation of multiple graphs or tables on a single page might sound a difficult task with SAS 8 and older versions but it has become an easy task now with advanced features of SAS 9. Generating such outputs were demanding great set of programming skills in the past. But now this task is as easy as 1 2 3. Such outputs are genera lly a multiple frames one window kind of reports and it is hard to get such outputs through co nventional SAS programming which usually gives listing form of output. Advance features of Output Delivery System (ODS) are greatly helpful to overcome the limitations of traditional SAS output. This paper is focusing on various features of ODS, new powerful SAS Version 9 capabilities and fun ctionalities of output destinations like HTML and PDF to get multiple graphs, charts, maps, listings and tables on a single page output delivery system, sas output 13
118 Using Data Set Labels to Make Your SAS Output Self Documenting Stanley E. Legum While programmers are frequently encouraged to use comments and other techniques to make their code self-documenting, they often neglect to document their data sets and output. SAS data set labels are an easy-to-use but often overlooked documentation technique. This paper describes how to create data set labels and how to use them in title and footnote statements to document report outpu t. The technique employs PROC SQL and macro functions macro variable, footnote statement, proc sql, label statement, proc step, dictionary tables 6
119 Using DATA STEP MERGE and PROC SQL JOIN to Combine SAS Datasets Dalia C. Kahane This paper demonstrates important features of combining datasets in SAS. The facility to combine data from different sources and create a conv enient store of information in one location is one of the best tools offered to the SAS programmer. Whether you merge data via the SAS DATA STEP or you join data via PROC SQL you need to be aware of important rules you must follow. By reading this paper yo u will gain a deep er understanding of how the DATA S t e p MERGE works and will be able to compare it to parallel PROC SQL JOIN examples. You may then select what is best for your own programming style and data situation proc sql, by group processing, proc step, create table, data merging, merge statement, full join, inner join, right join, data step, proc sort, where statement, error message 15
120 Using DataSets to Define Macro Loops and Local Macro Variables Steven M. Ruegsegger A common and optimal way to execute repeated tasks in SAS is to write a template of the task in a macro function and then call that macro function the desired number of times. This can be difficult to implement when running the code in batch mode. Often, the number of times to execute the macro or the parameter values to use are not known until data is pulled. This paper will look at defining a macro loop from a Control Dataset, where each row (observation) is one loop iteration and each column (variable) is one local macro variable. Two implementation methods will be investigated. Both use Macro Language %do loops to repeatedly call the analysis template. The first method defines all local macro variables for all iterations a priori . Within each loop iteration, the appropriate local macro variables will be referenced with the format "&&var&i". The second method is a bit more elegant, using nested %do loops to define the local macro variables only for the current iteration macro variable, macro function, macro loop, inner join, left join, proc sql, proc step, macro facility, macro parameter, macro conditional, do loop, macro call, macro flow control, macro definition, macro put 10
121 Using HASH to find a sum over a transactional path Richard A. DeVenezia The HASH component object has become well established in current DATA STEP programming as a versatile tool for solving a wide variety of data processing and transforming problems. The principal strengths of a hash are automatic dynamic memory allocation and keyed access to data. This paper will demonstrate how to use a hash to traverse linked records in a transactional data set. Code was run in SAS Foundation version 9.2 but will also run in earlier version 9 releases. Keywords: Hash, Hiter, Transaction, Linked List Data Transactional data can take on many forms. For this paper the following business rules apply: - Each transaction record has an identifier (tid), an amount and a prior transaction identifier (pid) - Each tid is a unique 15 digit character string - A transaction may be the prior transaction of only one other transaction - A set of related transactions comprise a path and are linked through the pid data validation rules, conditional do loop, hash table, linked list 5
122 Using Macros to Build a Robust, Data Driven Proc GLM Ginger Lewis,
Frank J. Tedesco
A programmer can face many challenges when developing code to perform least square means tests with incomplete clinical trial data. They must review the data to determine class, indepen- dent, dependent and by variables to manually create the linear combination of coefficients for a single effect in the model. Each time data changes, the assumptions about variables and the L vector must be reviewed, potentially resulting in a need to modify the PROC GLM statements. This paper presents a macro that provides a dynamic, data driven solution for constructing the L vector of coefficients for PROC GLM. The macro will use the parameters passed into the macro to determine the number of levels of each by variable and construct the CLASS, MODEL, LSMEANS, ESTIMATE and CONTRAST statements based on available data. It will evaluate the types of data available and build formats to accommodate numeric or character data class variable, proc genmod, proc glm, macro definition, proc step, macro variable, hypothesis testing, clinical trial, data cleaning, macro loop, data science, %if-%then-%else 9
123 Using PROC RANK and PROC UNIVARIATE to Rank or Decile Variables Jonas V. Bilenas In direct marketing applications prospects are often ranked by scores that predict response, risk and/or profitabili- ty. Justification is to evaluate lifts in performance by soliciting the most profitable individuals as defined by score ranking. Many programmers write complicated code using PROC SORT, MACRO calls, and DATA STEPS to rank or decile these scores. These programs often don't handle score ties which can result when 2 or more pros- pects with the same score end up in 2 or more ranks. We will show how using PROC RANK will provide a quick and simple way to rank or decile individuals that will handle ties with the PROC RANK TIES option. We will look at the syntax of PROC RANK with a number of examples and applications. Since PROC RANK does not have a WEIGHT statement to handle weighted samples we will show how to handle weights using PROC UNIVARIATE and PROC FORMAT to perform a weighted ranking proc step, proc rank, sample, proc print, proc univariate, numeric variable, proc freq, proc format, proc sort, proc npar1way 16
124 Using SAS BI to deliver Ongoing Professional Practice Evaluation (OPPE) At Maine Medical Center Rocket Wong,
Mark E. Chasse,
J. Peter Chingos
Maine Medical Center (MMC) is leveraging the power of the SAS Business Intelligence (BI) platform in de- livering customized provider performance reports 24/7 via MMC's intranet and the internet. The reports are used by our medical staff office, department chiefs and individual providers to meet The Joint Commission regulatory requirement for Ongoing Professional Practice Evaluation (OPPE). OPPE reports are used to monitor department and provider performance on key quality and safety goals. These reports are created by logging into the SAS Information portal and selecting the OPPE report link. The reports will then be generated with the most current information available. This paper is a review of the Business Intelligence (BI) infrastruc- ture which we have created to deliver a secure OPPE reports to the departments of medicine, surgery and pathology and to their respective providers business intelligence, sas management console 7
125 Using SAS Catalogs to Develop and Manage a SAS Project David D. Chapman A key concept in program management is to develop the code in one place, make changes at one location, move the code to where it is needed for testing or use, and when making changes make sure changes work before modifying production code. SAS catalogs are ideal for developing, testing, and managing DATA STEP programs. This paper reviews SAS catalogs and the different kinds of entries they contain. It discusses SOURCE, LOG, OUTPUT, Macro, Format, and CATAMS entries. For each an example is given of how to put it into a catalog, how to retrieve if from the catalog, and how to use it. A discussion is given of how to manage and sequence code coming out of the catalog that make up the SAS project data steps and procedure programs. The use of PROC CATALOG to view catalog contents and copy elements to another location, and PROC UPLOAD and PROC DOWNLOAD to move the SAS catalogs to a production location on a different computer are discussed proc step, catalog, cpu time, proc catalog, data step, catalog entry, proc report, macro variable, proc printto, proc upload, proc format, dataset, proc download 11
126 Using SAS ODS to Create High Quality Item Characteristic Curve Graphs Qianli Ma In SAS version 9.1, new features of the SAS Output Delivery System (ODS), such as PROC DOCUMENT, ODS DOCUMENT, and ODS LAYOUT, are still in the experimental phase. This paper explores how these new features enhance the graphical presentation of the item response theory (IRT) item characteristic curves (ICC) showing item parameter drift (IPD) over multiple test administrations. Using PROC DOCUMENT, the outputs from different procedures, PROC GPLOT and PROC REPORT, can be replayed and manipulated on the same page or multiple pages in one PDF file. However, PROC REPORT is not fully supported by ODS DOCUMENT in SAS 9.1. We demonstrate the use of PROC TABULATE with a little trick to generate desirable report in the example. Simple Macros are used to generate multiple PDF pages proc step, proc report, ods pdf, proc tabulate, sas output, sas base, proc gplot 9
127 Using SAS Software and Visual Basic for Application to Automatically Produce Customized RTF Tables from SAS List Files Zemin Zeng,
Mei Li
This paper demonstrates how to dynamically set up Visual Basic fo r Application (VBA) procedures in the Microsoft Word from SAS environment. As a byproduct, a SAS macro LST2RTF is developed. The macro LST2RTF converts SAS list files to customized RTF files. The conversion is an automated process and is achieved through the dynamic conversation between SAS software and Visual Basic for Application (VBA) in the Microsoft Word. The codes of both SAS and VBA macros are included in the paper. The application of the macro was verified in a Windows Operating System PC with SAS version 9.0 and 9.1.3 and Microsoft Office 2003 and 2007 macro definition, sas output 6
128 Using SAS Stored Processes in Enterprise Guide 4.2 Frederick E. Pratter New in SAS 9, Stored Processes are SAS programs that can be stored centrally on a server so that they may be accessed from anywhere in the organization. The primary advantage of Stored Processes is the ability to centrally maintain and manage code. They can provide better control over changes, enhance security and application integrity, and ensure that every client executes the latest version of code. Also, since the programs run on the server, the client need only have SAS Enterprise Guide installed, which can greatly reduce software licensing and maintenance costs and lighten the burden on already overworked SAS system administrators. SAS Stored Processes can be used in many different client applications, including SAS Enterprise Guide and the SAS Stored Process Web Application. This paper will cover creating and running SAS Stored Processes using SAS Enterprise Guide 4.2, part of the SAS 9.2 release sas enterprise guide, sample, macro variable 16
129 Using SAS to Handle HL7 Messages in A Health Information Exchange Enxu Zhao,
Kathryn J. Schmit,
Linh H. Le
This paper will discuss issues regarding the design of an automated data processing system for the New York State Department of Health's (NYSDOH) Health Information Exchange (HIE). Base SAS and SAS/ACCESS are used to access HL7 data from Oracle databases, generate minimum datasets (MDS), and initiate data transmis- SAS/INTRNET is used for data analysis and visualization. Some of the challenges encountered during system development, such as SQL queries, X commands, ODS and HTML Web posts, will also be discussed proc step, proc sql, macro variable, data wrangling, web service, oracle, stored procedure, sas log, dataset, create table, macro definition 13
130 Using SQL Joins to Perform Weighted Matches on Multiple Identifiers Jedediah J. Teres Matching observations from different data sources is problematic without a reliable shared identifier. Using multiple identifiers can be mo re restrictive as it r equires multiple exact matches. One way around this is to create a match score based on the number of matching identifiers. This score can be weighted to favor certain matches or sets of matches (e.g., first name and last name) over o thers (e.g., first name and date of birth). This paper will describe a technique for using a match score in the context of a SQL join to find matches in cases when all identifiers are not exactly the same proc sql, proc step, inner join, create table, proc freq, sample, group by, data merging 8
131 Using Systask to Dynamically Create Libname Statements Ray Cloutier Spending a little extra time planning your directory structure can have big returns. When projects are stored in similar folder structures, it becomes very easy to create cross-project applications. This paper will demonstrate how to use the systask command to dynamically create LIBNAME statements to perform cross-project analysis macro variable, txt, proc sql 3
132 Using the New SURVEY Procedures From a Modeling Perspective Jonas V. Bilenas This is an introduction to the use of PROC SURVEYSE LECT, SURVEYREG and SURVEYLOGISTIC to illustrate applications in modeling. We will show how efficien t it is to use SURVEYSELECT to generate BOOTSTRAP d ata that is far superior than having hold-out validatio n samples. A number of examples will be shown detai ling the SURVEYSELECT procedure. We will conclude with how t o use SURVEYREG and SURVEYLOGISTIC when you have sampled data to calculate the correct p-values for modeling coefficients sample, proc step, regression analysis, bootstrap, proc freq, proc surveyselect, logistic distribution, estimate, maximum likelihood estimation, random sampling, correlation, likelihood function, proc surveylogistic, proc surveyreg 13
133 Visual Basic for Application with SAS Software to Dynamically Collate Microsoft Word Documents Mei Li,
Zemin Zeng
This paper describes the process of devel oping an application to collate and print Microsoft Word documents with SAS output tables and charts by region . The authors' need was to customize Word doc uments generated by SAS, collate the Word document with SAS created tables and charts for individual regions selected by the SAS code, then print and mail the set of Word and SAS output files to the individual regions. To automate the process, the authors first use SAS to create external BAS files, dynamically import BAS files into Microsoft Visual Basic for Applicatio n (VBA) projects, then execute the VBA projects to automatically collate and print Word documents in Microsoft Word sas output, excel 6
134 What Drives Physicians to Use A Particular Product when Prescribing Marc States In any given therapeutic area, there are numerous products that a doctor can select in order to properly treat a patient. After reviewing a patient's profile, the doctor is able to make the appropriate treatment selection for the patient. This decision is driven by three factors: the patient, the doctor's opinion of current therapies and the doc- tor himself. When taken individu ally, each factor tells an important piece of the story. Combining all three parts allows the bigger story to be told and also reveals the relevance importance of each factor. With t his impor- tance, you will be able to rank order all the factors and determine the overall driving force behind the physicians prescribing. This paper will discuss the analysis of one of the factors (the doctor himself) since the analysis of the other two factors is very similar proc step, proc corr, proc logistic, correlation, binary variable, predictor variable, logistic distribution, proc sql, excel 5
135 What's New in SAS Add-In 4.2 for Microsoft Office Tim Beese SAS Add-In 4.2 for Microsoft Office offers several new features for users that make data analysis and reporting in Microsoft Office easier and more powerful than in previous releases. In this release, the SAS add-in is better integrated with Office 2007 and blends seamlessly with the Office 2007 Ribbon. The SAS add-in is also integrated with SAS Enterprise Guide and SAS Web Report Studio, allowing the user to open reports from either application into Microsoft Office. When opening reports, the user is able to choose specific elements within the report to display. The SAS add-in also has improved support for OLAP cubes, including calculated members and calculated measures as part of a PivotTable. For administrators, the SAS add-in supports the same role-based architecture as other business intelligence applications from SAS. This allows the administrator to control which users have access to different functions of the application sas enterprise guide, excel 10
136 When Good Looks Aren't Enough Lisa Eckler Have you ever looked over a SAS dataset or report you've prepared and concluded that it "looks good" or worse still, "good enough"? One of the great advantages SAS programming - the ease with which you can manipulate data - is also a potential hazard. It's far too easy to create something that's close, but not exactly correct. Beyond instinct or some sort of sniff test, how do you know that your results are correct? How can you prove it to others? As SAS programmers or users, we should be striving for clear and accurate data, not just "good enough" data. A SAS log showing no syntax or data errors or warnings and some reasonable numbers of observations is only a small step. This paper offers a common-sense approach to simple data validation, expanding on some of the most frequently used validation techniques. Some may consider these recommendations obvious. Experience has proven that they are obvious only if you follow them proc step, proc contents, proc compare, proc freq, data cleaning, quality assurance, sample 11
137 Which Line is That Adjustment For? Wei Wang A medical claim can receive several iterations of adjustments. Each adjustment line details the line item number it is adjusting, but it does not carry information about the original line item number when the claim line is adjusted more than once. This paper presents a simple program to take care of this issue proc sql, proc step 4
138 Which SASAUTOS Macros Are Available to My SAS Session? Harry Droogendyk The SAS installation process makes a number of SAS supplied macros available to your SAS session via the SASAUTOS option. In addition, useful macros created by users in your organization may be made available to SAS users via SASAUTOS or by way of the Compiled Stored Macro facility. But… how do I know which macros are available? And, if a macro has been defined in more than one location, which one will be utilized? This paper will explain the different methods of defining and storing macros, discuss how SAS searches for macros, demonstrate how to specify the appropriate options to allow access to compiled stored macros and define the SASAUTOS search order. The meaty stuff will involve a walk through %list_sasautos, a useful utility macro, written by the author, that will identify all of the macros available to your SAS session stored macro, macro definition, macro catalog, catalog, catalog entry, permanent library, autocall macro, work library, macro loop, %macro parameters, %if-%then-%else 15
139 Why Does SAS Run Clockwise? Robert Krajcik With apologies to author David Feldman, every programming language has its quirks -- things that are not considered bugs or defects but just behave in an unexpected way. And SAS is no Exception. Starting with a brief history of the SAS compiler and Macro processor, The author will take you through some of the quirks (or traps) and undocumented features of SAS 9.1 that you may also encounter where statement, character variable, data governance, macro variable, proc step, character functions 11
140 Why We Need a Bayesian Approach to Early Detection of Epidemic Outbreaks and Financial Bubbles Using First-Order Autoregressive Models with Structural Changes Ernest S. Shtatland,
Timur Shtatland
We propose a Bayesian alternative to the frequentist approach developed in our NESUG 2007/2008 and SGF 2008 presentations. This approach includes first-order autoregression modeling, estimating autoregression parameters, building confidence intervals and hypothesis testing. For the purpose of early detection, this statistical inference is performed daily using short samples of previous observations. The results obtained within the frequentist approach are important, however, this approach suffers from well-known downward bias and related asymmetric distribution of classic least square estimates of autoregression parameters, so that standard methods for constructing confidence intervals based on symmetry are inaccurate. In our Bayesian alternative, we can avoid these disadvantages. Additionally, everyday testing results in a multiplicity problem and requires some adjustment, which is not always effective within the frequentist approach sample, confidence interval, hypothesis testing, posterior probability, time series analysis, ar(1), bayesian statistics, probability distribution, inferential statistics, type ii error, normal distribution 12

Back to Conf go 2010 go 2008

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.