HOME QUICK SEARCH AUTHORS KEYWORDS HELP BUGS

SESUG 2008 Papers - Index

144 papers. Source: SESUG (SouthEast SAS Users Group) conference proceedings.

# Title
×
Authors
×
Abstract
×
Keywords
×
Extras Pages
1 "Development, Test, Production ... Oh My!" Making It to the Land of Oz (also known as a satisfied IT Department) Using SAS9 and Business Processes Angela M. Hall sas data integration studio, sas management console source 5
2 "SAS macros are just text substitution!" ... ARRRRGGGHHH!!! Dianne Piaskoski Before I truly understood what, "SAS macros are just text substitution!" meant, I swear that if one more person said that to me, I was going to scream. If you: · have heard about macros · know that they would greatly simplify your code · understand that they reduce the chance of errors · do not have a resource that explains the very basics before leaping too quickly to the fancier stuff, then this paper is for you. It is aimed at the SAS user who has never used SAS macro variables or macro statements before, or who has been scared off by seeing too many '%'s and '&'s too quickly. By building a strong foundation of the basics of the macro language, you will be able to implement immediately what you have learned here, as well as gain the confidence to move forward with more advanced macro topics. I swear macro variable, macro facility, macro definition, call symputx, macro put, macro loop, sas log, macro parameter, &variable, proc step, do loop, macro function, sas 9, symbol table, sas programming, put statement, %macro parameters source 10
3 2008 Using the SAS INPUT Statement for Not So Friendly File Formats Inga Allred and Barbara Felts, RTI International, Research Triangle Park, NC Inga Allred,
Barbara Felts
The SAS INPUT statement is simple, yet is a very powerful tool allowing data from many types of formats to be included in SAS datasets. However, it often leaves users confused and uncertain about how exactly the statement is best utilized. In this paper, we intend to show how to use a basic SAS INPUT statement and will differentiate between those pesky trailing @ and double trailing @'s. We will also give explanations on the many different ways of handling missing values in input data by using INFILE options like FLOWOVER, STOPOVER, MISSOVER, and TRUNCOVER. The examples used throughout this paper will showcase how SAS can be efficiently used in transforming documentation into a useful SAS INPUT statement creating a single SAS record from multiple lines of input text input statement, txt source 4
4 A "SAS Programmer's" Guide to SAS Enterprise Guide Marje Fecht,
Rupinder Dhillon
You have been programming in SAS for a while….. You have been told "we are moving to Enterprise Guide" and removing Display Manager". You say …… I can program everything just fine myself, thank - you! OR What am I supposed to do with all these windows? This presentation will demonstrate how SAS programmers can use SAS Enterprise Guide as their primary interface to the SAS system while maintaining the flexibility of writing their own customized code. We will look at how to navigate the views and menus how SAS Enterprise Guide can be used as your primary SAS Editor * how you can leverage the more complex built-in capabilit ies available in SAS Enterprise Guide to further enhance the information you deliver. Enterprise Guide version 4.1 will be used sas enterprise guide, bar chart, sas programmer, macro variable, sas log source 18
5 A macro for nearest neighbor imputation Lung-Chang Chien SAS software only has one data imputation procedure named PROC MI for multiple imputation to provide an easier way to impute missing data. However, it requires sufficient background to understand how to use it properly. In addition, multiple imputation needs strong assumption of data profile, but sometimes practical data cannot match it. This paper describes an alternative data imputation method named nearest neighbor imputation, and also provides an easy SAS macro along with a simulated data example and a case study imputation, missing value, correlation, model training, response variable, scatter plot, proc means, proc step, macro definition source 6
6 A Propaedeutics for PROC SQL Joins Lisa A. Mendez,
Toby Dunn
Would you like to be able to join information from separate tables quickly and easily? Have you ever had two or more tables that you want to join but just don't know where to begin? If the answer is "yes" then "Join" us for a crash course over PROC SQL joins. This paper will help get you started by introducing you to four basic types of SQL joins: inner, outer, natural, and Cartesian. Through the use of carefully crafted examples and detailed explanations we will take you on a guided tour of SAS SQL joins inner join, where statement, proc sql, data merging, proc step, full join, normalization, cross join, right join source 9
7 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= op tion 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, numeric variable source 12
8 A SAS Macro for Statistical Power Calculations in Meta-Analysis Guy Cafri Although statistical power is often considered in the design of primary research studies, it is rarely considered in meta-analysis. Background and guidelines for conducting power analysis in meta-analysis are provided, followed by the presentation of a SAS macro that calculates power using the methods described by Hedges and Pigott (2001, 2004). Several detailed examples are given, including input statements and output. Practical issues in the application of power analysis to meta-analysis are discussed effect size, power analysis, macro call, raw data, sample source 8
9 An Added Dimension: Exploring OLAP Cubes with SAS Enterprise Guide Rupinder Dhillon The amount of data that is captured electronically is increasing at an exponential rate. While advances in scalable storage solutions allow companies to house this data, those tasked with analyzing and summarizing it now find themselves faced with the following questions: How do we turn raw data into useful information? How do we surface this information in a meaningful way? * How do we provide access to all facets of the information that people may need to see? To tackle these and other dilemmas, more and more organizations are turning to OLAP Cubes. OLAP, or Online Analytical Processing, provides a multi-dimensional view of aggregated data. It provides quick and easy access to facts, figures and statistics and gives the user the flexibility to change the view of the data to hone in on the aspects that are most pertinent to them. With the latest incarnation of SAS Enterprise Guide, SAS Programmers can also take advantage of the benefits of storing data in OLAP cubes proc step, sas enterprise guide, proc sql, dataset, create table, sql server source 16
10 An Approach for Deriving a Timing Variable in SDTM Standards Shaoan Yu,
Joyce Gui
Time since Last Dose is a variable that relates adverse events to study medication administrations. This variable is very useful information for data analysis and e-Submissions. But, the derivations are complicated, and if the rules are not clearly defined it makes a hard task even harder. To meet the standards of CDISC SDTM, Merck & Co., has created business rules for deriving important variables for analysis and e-Submissions. Time since Last Dose is one of these derived variables. To implement the rules and to perform User Acceptance Testing on the derived data, we developed SAS programs and macros for this important timing variable. Keywords: timing variable, CDISC, SDTM, business rule create table, data step, cdisc source 9
11 An innovative approach to the "other specify" recoding procedure in research survey Ruben Chiflikyan,
Barbara Bibb,
Mai Nguyen
A common data quality control procedure in research survey is reviewing and recoding response data from the "Other Specify" questions. An "Other Specify" question is one which often follows a preceding question with a list of pre - coded responses. The "Other Specify" question provides a way to capture response data that is outside of the pre - coded list. Recoding the other specify fields consistently becomes difficult if there are multiple coders or if there is a massive amount of data to review. Using tools or computer applications to aid in the recoding process will reduce error and create more consistent results. Our development team at RTI International has come up with a set of efficiently designed SAS programs and a Microsoft Access application to semi-automate the extraction of the fields that need to be re viewed. This system of programs will programmatically manipulate the data and user inputs to facilitate the recoding process excel, macro variable, character variable source 12
12 An Optimal Way to Import Excel Worksheets into PC SAS Nathaniel Derby There are many ways to import data from Microsoft R⃝ EXCEL R⃝ into PC SAS R⃝, and the "optimal" way often depends upon the project and the programmer's preference. However, by adhering to clear definitions of three generally desirable properties (precision, flexibility and automation), we can agree upon a definition of "optimal". We then propose a solution that fulfills these three properties. This is most appropriate for situations where data from a large set of EXCEL worksheets is periodically loaded into SAS, where each EXCEL worksheet has the same structure from load to load (although the worksheets can have different structures from each other). This proposed solution involves an easily used macro which works on all versions of PC SAS, Windows R⃝ and EXCEL, and which is freely available for downloading. Keywords: SAS, DDE, EXCEL, Export, Import, X4ML. This paper is an excerpt1 from Derby (2008b), which may be updated and can be downloaded for more information excel, macro variable source 10
13 Another Way to Make Use of Variable Labels Stephanie R. Thompson Variable labels are a useful part of SAS. They allow you to put a more descripti ve name to the sometimes cryptic variable names encountered as a programmer. Used in many procedures automatically, labels can make reporting much easier. However, what if you want to put a variable label into a different variable? How can it be done? The simple answer is CALL LABEL. This routine allows you to easily drop variable labels into another variable. KEYWORDS: call routine, VLABELX label statement, excel source 2
14 Architecting a Regulatory Compliant Macro Library Using SAS Drug Development Virginia Redner,
Margaret M. Coughlin
Centralized macro libraries can provide efficient solutions to project programming and analysis needs. They also may provide consistency of statistical methodologies, programming techniques and implementation of industry standards across projects. In the pharmaceutical industry, programming is required to comply with 21 Code of Federal Regulation (CFR) Part 11. This requires traceability of changes to programs or macros. Additionally, validation of programs or macros is needed to ensure they perform the functionality intended. SAS Drug Development (SDD) provides a regulatory compliant repository. This paper addresses the challenges of architecting a centralized macro library stored in SDD for use in analysis and reporting data cleaning, audit trail, validation documentation, libname statement source 5
15 Are Your SAS Programs Running You? Marje Fecht,
Cape Coral
Most programs are written on a tight schedule, using the most accessible knowledge of the programmer. Often the programmer mistakenly assumes that the program will never be used again; five years later the spaghetti code is still in use. While the tasks are accomplished and the results are accurate, the program may not be as efficient as possible and subsequent submissions may require tedious and time-consuming input and modifications. This presentation looks at typical SAS Code, and then suggests changes to improve the efficiency and maintenance of the programs. If you are a programmer who has inherited code that was written "many SAS versions ago", you will benefit from examples of "updating your code to the current decade" proc step, macro variable, proc sort, proc sql source 7
16 ATTENUATE: A SAS Macro for Computing Confidence Intervals for Disattenuated Correlation Coefficients Jeffrey D. Kromrey,
Robert H. Fay,
Aarti P. Bellara
Correcting correlation coefficients for attenuation resulting from measurement error has a long history (dating back to Spearman's work in 1904). However, the estimation of confidence intervals for disattenuated correlation coefficients is a more recent concern. The macro descr ibed in this paper computes the point es timate of the correlation coefficient after adjusting for measurement error, and the endpoints of two estimates of confidence intervals: the traditional Fisher/Spearman interval and the confi dence set suggested by Charles (2005). The macro is written in Base SAS software, with arguments consisting of the obtained sample correlation coefficien t, estimates of the reliability of each variable, sample size, and level of confidence for the in tervals correlation, sample, confidence interval, sample size, confidence level, ods html, dataset, sas base, pearson correlation, data step, macro definition source 13
17 Automated Data Converting of Character into Numeric Fields Mila Chiflikyan Providing high quality numeric data to be used in data analysis is a crucial component in data delivery using the SAS system. However, because of many data transformat ions using various systems including scanning from paper forms, exporting to EXCEL and importing back, the data values often become 'contaminated' and the variables that previously contained only numeric values can appear as character variables in the final SAS datasets. After the obligatory data cleaning, one needs to check whether all values for any eligible variables does not contain alpha characters and then to convert these variables to the appropriate numeric format. This is a time -consuming process for the developer to complete, especially for datasets containing hundreds or even thousands of variables proc step, character variable, macro variable, proc contents, proc transpose, numeric variable, proc sql, data transformation, proc sort, excel, dataset, proc import source 11
18 Automation Of An Audit Waterfall Using SAS Macros and ODS Tagsets.ExcelXP Denise A. Kruse,
Independent Contractor
Programmers often need to communicate data results with analysts that do not have access to SAS but ha ve many questions about the data. When forwarding the progr am log is simply not an option, a waterfall can fil l the void and provide useful information. For the purposes of thi s paper, the term "waterfall" will be used to show how records in a targeted population fall out of that population as a result of exclusion or business rules. In other w ords, this waterfall will track the reduction of volume from the startin g universe of records to the ending universe of rec ords. An automated audit waterfall is one way to provide an analyst with precise data details without additiona l time spent cutting and pasting record counts from the SAS log to an EXCEL spreadsheet. The automation of this cod e is made possible by using SAS Macros and Output Delivery Sy stem (ODS) TAGSETS.ExcelXP record count, excel, proc step, macro call, proc report, macro variable, proc template, quality assurance, sample source 12
19 Best Practices for SAS Business Intelligence Administrators: Using the Configuration Troubleshooter to Keep SAS Solutions and SAS BI Applications Running Smoothly Tanya Kalich There is a tool that will help pinpoint access problems, check that security has been implemented correctly, debug WebDAV configuration issues, monitor the health of the Web application server, and more for your SAS Business Intelligence installation. It will even allow you to create c hecks of your own, comparing configuration files to standards that you define. This tool is the Configur ation Troubleshooter, and it is invaluable for creating and maintaining a smooth-running BI environment. This present ation will teach you how to use the Configuration Troubleshooter for maintenance and troubleshooting. Using ca se studies collected from SAS Technical Support, we will step through the process of problem discovery, investigation, and resolution using this tool. Keywords: configuration troubleshooter, administration, business intelligence, tr oubleshooting, logs, install, deploy, metadata, portal, Xythos, WebDAV, report, SAS Web R eport Studio, solutions, BIP tree, SAS administrator sas administrator, business intelligence, sas management console source 16
20 Biosurveillance and the Holy Grid - Does it Compute? Russell Gann (OLAP, Portal, WebReport Studio) for the Bi oSense Application. Despite all caveats, the search for technology silver bullets continues in every field. The concept of a grid of computing resources originated in the 1970's, and has re-emerged in the 90's and this century as computing power, networks and mi ddleware capabilities advanced to support it. Grid computing can provide a powerful backbone for healthcare research issues. However, establishing a grid is not just a matter of clusteri ng large numbers of disks or blade servers, nor is it a solution for every pub lic health issue. Grid-like resource usage can enable systems not typically associated with massively parallelizable problems to achieve higher levels of availability and re liability. This presentation will review the basics of grid architecture (i.e grid computing, time series analysis, business intelligence, view source 41
21 Breaking Up Isn't Hard To Do After All Toby Dunn In the ever varying world of the SAS programmer, there comes a time when either the specs or a DBGB (Dilbert Pointy Haired Boss) demands either a data set be broken into N number of data sets or individual reports. While there are many ways to achieve this either through hard coding or using the Macro language, the question remains "are these solutions the most efficient"? I say Nay, what follows in this paper is an easy one step solution for each of these problems. The solutions are designed to be both easy to read, write, and maintain, thus effectively minimizing the programmers job to merely writing a general solution for either problem. Key Words: Hash, ODS, NewFile, FileVar, Call System hash table, data step source 6
22 Building a Clinical SAS Programming Group from the Ground Up Devin J. Hunt Structuring and building a clinical SAS Programming group from scratch can be a formidable task for just about any group or company. When an organization decides to provide SAS programming support in-house instead of contracting out, or to supplement programming services, there is an inordinate amount of planning and development that must be initially conducted in order to provide the most effective and streamlined start-up. The United States Food and Drug Administration (FDA) and the International Conference on Harmonization (ICH) have clinical trial reporting and submission guidances and standards that organizations should follow and take into consideration when developing programming policies and procedures. Presented in this paper is one example of how the United States Army Medical Materiel Development Activity (USAMMDA) began the SAS Programming group within their Biostatistics Branch clinical research, clinical sas source 4
23 Calculating the point estimate and confidence interval of Hodges-Lehmann's median using SAS software Lingling Han Nonparametric analysis methods are sometimes used to detect treatment differences of Pharmacokinetic variables in clinical trials. For exampl e, Hodges-Lehmann's median analysis is recommended to calculate the treatment differences for T max. However, there is no existed SAS procedures can direct ly produce the Hodges-Lehmann's median estimate. This paper describes the proce dure for calculating the point estimate and confidence interval of the Hodges-Lehmann' s median differences for both independent and paired groups. SAS MACROs are provided for readers to use confidence interval, macro definition, treatment effect, clinical trial source 7
24 Checks and Balances Using a Macro Liza M. Thompson When dealing with new data, there is always the chance for a few incorrect observations. When dealing with very large datasets, finding a few bad observations may seem a bit impossible. One may not even realize that bad observations are lurking in the dataset. GoodCents created a foolproof way to identify these bad observations and display them to the user in a way that they simply cannot ignore. Using a macro statement, a do loop, the call symput statement, and a window statement, SAS creates a pop-up window that alerts the user of a bad record. The user has to press the Enter key on the keyboard to continue with the program or move on to the next bad record. The code can easily be changed to hold any test value, print any message, and print any portion of the record. To find bad records, the user could simply write a new DATA STEP with the same test value in an if-statement and print the bad records to the output window data step, do loop, call symput, macro definition, macro variable, sas output, macro loop, usage data source 4
25 Combining Text and Graphics with ODS LAYOUT and ODS REGION Barbara B. Okerson Through the Output Delivery System (ODS), SAS Software provides a means for creating an attractive, concise, and functional report without post-processing using other software products. Because ODS is an object-oriented (OO) technology, it provides the ability to move beyond template descriptions to complete output layout. This paper presents a combined text and graphics report based on an exploratory analysis of behavioral health cost risk using ODS LAYOUT and ODS REGION and writing to the PDF destination. In addition, this paper provides information on additional options that can be used with both ODS LAYOUT and the PDF destination to assist users in the creation of customized presentation and production reports. The example in this paper was developed with version 9.1.3 of SAS executing on a Windows XP platform. SAS Version 9.1 is required for the ODS graphics extensions and was required for the graphics used in this paper output delivery system, business intelligence source 7
26 Complex Survey Data Analysis in SAS and the Link between PROC SURVEYFREQ and SURVEYMEANS Taylor Lewis This paper highlights two commonly used, closely related survey data analysis procedures for reporting and testing significance, SURVEYFREQ and SURVEYMEANS. They are counterparts to the more familiar PROC MEANS and FREQ, to be employed under complex survey designs, such as when stratification or clustering is involved. Issues and caveats related specifically to survey data analysis which may not be obvious to everyday programmers will be discussed. The situation where SURVEYMEANS and SURVEYFREQ can be substituted for each other is illustrated. SAS's survey analysis capabilities are compared with other statistical software packages, and the paper concludes with a look ahead to what is new in SAS's SURVEY procedures with SAS 9.2 proc step, proc calis, sample, proc surveymeans, proc surveyfreq, data science, numeric variable, proc freq, sample size, sas programmer, subgroup analysis source 5
27 Conversion from Daylight Savings to Standard Time Audrey Ewen GoodCents created the daylight savings to standard time conversion code to simplify a tedious program previously attempted. Prior to the simplified version, users would have negative values for the variables hour, day, and month! The new and revised code now allows users to complete the simple time conversion process with one simple program. Using the SAS date-time value, various date and time functions, and a series of macros, the conversion code allows users to input a SAS dataset currently in Daylight savings time and the date of the time change. We will present the clever but simple conversion code from a user's design perspective, demonstrating the simple steps required by the user, as well as from a coder's perspective, sharing code. KEYWORDS: macro, SAS date-time value, TIMEPART, DATEPART, YEAR, MONTH, DAY, and HOUR functions, time conversion macro variable, time variable source 6
28 Count Regression Models in SAS David Steenhard,
Nan-Ting Chou
This paper provides a survey of count regression models in SAS, which incorporates various count data modeling strategies. Our estimation procedure allows for a wide variety of count data distributions which can be used to model both under- and over-dispersed count data. We also provide estimation procedures that estimate count data that has excess zeros (zero-inflated) in the sample. A SAS macro is provided to allow one to estimate a variety of count regression models including: zero-inflated, hurdle, censored, truncated, finite mixture, semi-parametric, squared polynomial expansion, and generalized heterogeneous. Model evaluations are carried out via statistical tests, including goodness-of-fit, Vuong's test, and information criteria. This paper provides a SAS macro program that incorporates a comprehensive list of count regression models and evaluates the performance of various count models poisson distribution, poisson regression, regression analysis, likelihood function, binomial distribution, predictor variable, negative binomial distribution, response variable, negative binomial regression, estimate, sample, chi-square test, proc freq source 12
29 Creating Common Information Structures Using Lists Stored in SAS Data Step Hash Objects Shawn Edney The ability of the Version 9 DATA STEP hash object to resize the amount of information that can be stored during DATA STEP execution opens up a number of opportunities for us to exploit. Significantly it provides a dynamic framework upon which we can mimic the behavior of other common information structures such as array lists, stacks, queues, deques and linked lists. We are able to accomplish this by using the hash object to store list data and implementing custom code to provide list functionality. This paper provides a brief introduction to lists followed by a series of discussions and example code for implementing several common information structures hash table, hash iterator, data step, lag function, sas programmer, missing value, numeric variable, conditional do loop, linked list source 18
30 Creating county-level estimates from National Weather Service data Liang Wei An analysis of health survey data required estimates of daily temperature and precipitation for each day in 1999-2005 for ≈3,000 U.S. counties. The National Oceanic and Atmospheric Administration's National Climatic Data Center (NCDC) provides climatological data from the ≈6,000 National Weather Service (NWS) surface observing stations in the Surface Land Daily Cooperative Summary of the Day (DSI-3200) data set[1] and station location data in the Master Station File. Creating county estimates involved: 1) creating temperature and precipitation SAS data files at the weather station level from 58,416 raw ASCII files, 2) creating county-level daily temperature and precipitation average based on the six nearest weather stations, and 3) predicting daily temperature and precipitation at each county centroid using ordinary kriging proc step, dataset, proc mixed, macro definition, do loop, filename statement, infile statement, correlation, txt, macro variable source 14
31 Creating Order from Chaos Using SAS Functions Kristine L. Dougherty SAS analysts may have to cope with data sources with less than optimal design. An example: addresses stored in free text fields on a mainframe. This paper shows the program written to convert the free text field into street address, city, state, and zip code, using a variety of SAS functions and Perl regular expressions, all available in SAS version 9.1.3 sample, sas function source 6
32 Creating Your Own Worksheet Formats in exportToXL Nathaniel Derby %exportToXL is a freely available SAS R⃝ macro which allows the user to create custom-formatted EXCEL R⃝ worksheets, using Dynamic Data Exchange (DDE). It works on all versions of PC Base SAS, Windows, and EXCEL. Using this macro, the user can create custom-formatted worksheets by either exporting the SAS data onto a pre-formatted EXCEL worksheet, or by using a worksheet format. This is a set of commands which tells EXCEL how to format certain aspects of a worksheet such as font sizes and column widths. While %exportToXL comes with a few different pre-programmed worksheet formats, any programmer with some basic knowledge of the SAS macro language and DDE commands can make his/her own. This paper is a tutorial about how to do just that. Keywords: SAS, DDE, EXCEL, Export, X4ML excel, macro facility, macro variable, macro definition source 10
33 Crossing the Border: Steps to Writing SAS Stored Processes Peter W. Eberhardt Writing a SAS Stored Process requires more that a thorough understanding of the business problem you are trying to solve; it requires a basic understanding of the SAS BI Architecture. This paper will provide a simple introduction to the SAS BI Architecture, and then dive into the workings of the SAS IOM servers to help you tune your code and return the appropriate results to your client. You will learn the nuances of parameter handling at the top of your program, through to discovering the identity of the user submitting the code, and down to the various options to controlling the output you will return. As with all SAS programming, you have many ways you can develop your SAS Stored process; this paper will help you to understand the implications of some of your decisions macro variable, macro function, sas enterprise guide, business intelligence, sas administrator source 15
34 Customized Excel Output Using the Excel Libname Harry Droogendyk The advent of the ODS ExcelXP tagset and its many features has afforded the SAS user great flexibility in creating publishable EXCEL output. But what if the report must be delivered by populating pre-defined, customized EXCEL worksheets? DDE has been around for ages, and is a viable option, but often not a simple one to execute. This paper will demonstrate another method, the EXCEL LIBNAME engine. Using the EXCEL LIBNAME, SAS is able to write data into specific, pre-defined "named ranges" in customized EXCEL worksheets excel, name range list, ods excel, libname engine, data step, proc step, libname statement source 11
35 Data Manipulations Using Arrays and DO Loops Patricia Hall,
Jennifer L. Waller
Using public databases for data analysis presents a unique set of challenges. Although governmental databases contain enormous amounts of useful information, they are not necessarily optimal for efficient data analyses. Since these databases are often maintained by various federal, state, or local agencies, they are not always structurally compatible and must be manipulated to merge with other data sets and for data analysis. One example of an administrative data set is the publicly available Georgia's Physician Workforce database, which gives physician counts for each of 61 physician specialties across the columns and a separate row for each county/race combination resulting in multiple records for each county represented across several rows of data. To simplify analysis, and to maintain structural consistency with other county-level databases, it may be desired to collapse the data into one record per county without losing information, such as the racial delineations in this case do loop, data science source 9
36 Data Set Options: Beyond DROP, KEEP, RENAME, and WHERE Sarah Woodruff,
Edward Heaton
While the DROP=, KEEP=, RENAME=(), and WHERE=() data set options are extremely useful and well known, there are numerous other data set options that can greatly enhance computer efficiency and programmer productivity. However, finding them and the documentation can be daunting because not all options are a part of Base SAS and their descriptions exist in various locations. This paper will provide a quick reference to the documentation for data set options and then go on to discuss a handful of data set options that deserve special consideration. Some of these are Base SAS data set options and some are provided with SAS/ACCESS software. Our discussion of the documentation will cover both that which is available through the Help menu in the SAS Display Manager and what is available online via support.sas.com. Keywords: label=, genMax=, genNum=, compress=, dbLabel=, dbSasLabel=, dbSasType=(), dbType=(), sasDateFmt=() sas base, dataset source 20
37 Database Vocabulary: Is Your Data Set a Dimension (LookUp) Table, a Fact Table or a Report? Ronald J. Fehd fact table, proc freq, proc step, key, relational database, dimension table, foreign key source 8
38 Degree Data for All: A Web Report Studio Reporting Solution M. Paige Borden Timely, informative information is a core precept of Institutional Research offices. In an effort to meet this objective, a new degree application was created using the SAS Enterprise BI Server software suite. Previous degree reports were static .pdf files with no graph or trend details. The new Degree application development initiative utilized SAS Enterprise Guide, Information Map Studio, Information Delivery Portal, and Web Report Studio (WRS). End users now have a full range of aggregate data views, including graphs and trends of all degrees awarded at the university. This presentation will detail the development, testing and release of the WRS Degree solution sas enterprise guide, dataset source 17
39 Die Macro Die! Daniel Olguin Have you ever tried to work your way through some convoluted SAS Macro Language code and thought to yourself, there's got to be an easier way. SAS Macro language syntax misleads many a SAS newbie into thinking in terms of subroutines and functions. It comes as quite a shock when they learn that SAS Macro languages sole purpose is to produce text! If the goal is to produce text and every programming language in existence can produce text, it's a good bet that there are better tools for the job. This paper will demonstrate how Ruby and StringTemplate, both open - source tools, can make life simpler. Keywords: Ruby, JRuby, macro, open-source, stringtemplate macro facility, macro definition source 5
40 Evaluating Predictive Models (Part 1): Computing and Interpreting the c Statistic Sigurd W. Hermansen source 9
41 Evaluating Predictive Models (Part 2): Assessing Whether More Complex Models Predict Better Sigurd W. Hermansen source 20
42 Evaluating Sample Code for an Interview Stephanie R. Thompson Requesting sample SAS code from job candidates before an interview is a good way to gauge their level of experience, ability, and style. Once you have reviewed the code, prepare your questions for the candidate. You want to make sure that they 1) wrote the code themselves, 2) understand what they wrote, and 3) are familiar enough with it to explain why things were done the way they were. This paper will provide you with some guidelines on how to get answers to these questions in an interview. Code samples that I have received over the last few years and the questions that arose will be used as examples. This is also a good time to ask if the candidate can think of another way to accomplish the same task using a different approach. Evaluating work samples can be a way to gain invaluable insight into your candidate's skills and this paper will help you get the most out of it that you can. KEYWORDS: evaluation, interview, skill sample, proc step, if-then-else, cpu time, proc sql, macro facility source 6
43 Exploring the Undocumented PROC SQL _METHOD Option Kirk Paul Lafler The SQL Procedure contains many powerful and elegant language features for SQL users to take advantage of. This paper explores the _METHOD option as an applications development and tuning tool. Attendees will learn how to use this undocumented and powerful option to better understand and control how a query processes. Keywords: SQL, PROC SQL, _METHOD, undocumented, join algorithms proc sql, proc step, data merging source 2
44 Flexible SAS Daniel Olguin In 2007 Adobe Inc. open -sourced it's Flex SDK. The Flex SDK gives developers the ability to develop RIA applications for the Flash environment. Combining the rich user interface capabilities at which Flash excels, and the data access and statistical capabilities of SAS, can give the end user great power in a pleasing experience. The interface capabilities of Flex include highly interactive business graphics and dashboar ds. This paper will briefly explore the combination of Flex and SAS with a small demonstration application mimicking some of the basic functionality of SAS Enterprise Guide. Keywords: Enterprise Guide, open-source, Ruby, JRuby, Flex sas enterprise guide, sas base source 8
45 Formats - Let the Data Do it Janet E. Stuelpner Would you like your formats to be dynamic? Do you want the data to create the format for you? Using the CNTLIN feature of PROC FORMAT, you can do just that. It is quick and easy and you don't need a whole bunch of information in your dataset to create the format. This presentation will show you just how much data you need and the details of how to do it proc format, proc step source 4
46 Generating Fantastic Graphs in 10 Seconds or Less Ben Cochran When Enterprise Guide (EG) first came out, someone described it as SAS/ASSIST on steroids. While there is so much you can do with the point and click, drag and drop interface of EG, this paper focuses only on creating graphical output. A step by step approach is taken to create, then greatly modify and enhance the appearance of these graphs. This paper shows the user that it is very easy to harness the strength of EG to create superior results. Was EG ever on steroids? Let the user decide. Keywords: Enterprise Guide, SAS/GRAPH, Graph sas enterprise guide, box plot source 7
47 Gracefully Terminate a DATA Step If the Input Data File Is Not Available Erik W. Tilanus The standard method to read external data into a SAS data set consists of the following steps: - Allocate the data file using a FILENAME statement - Create a DATA STEP to read the data using INFILE and INPUT statements. The allocation creates a link between the SAS program and the data file. Normally SAS will access the data file during the compilation phase of the DATA STEP to determine the availability and the attributes of the file. If the data file is not available, the DATA STEP will fail during the compilation and you are left without control about what to do next. By using the FILEVAR option of the INFILE statement you can move the process of allocation from the compilation to the execution phase of the DATA STEP and regain control over what is happening with the input file. This allows for corrective actions in case that the input data file is not available dataset, sas log, macro variable, filename statement, infile statement, compilation phase, error message, input statement, execution phase source 4
48 Have your SAS program email information to you or your clients Bob Bolen Have you ever had a long running SAS job that ends early with an error? Wish you would have known about it? Would you like to have the program send the results of a run to your client? Come see a technique for using email to do this and more filename statement, data step source 3
49 Health Status and Attitudes Towards Health in Medical Expenditure Panel Survey (MEPS) Sample Population Pramit Nadpara BACKGROUND: Studies have shown that lack of health insurance is associated with important clinical characteristics, including using fewer health care services, delaying seeking medical care and forgoing necessary care for potentially serious symptoms. OBJECTIVE: To examine associations between health status and attitude about health in sample Medical Expenditure Panel Survey population (MEPS). DESIGN: The Household Component (HC) public use file from the 2005 MEPS data, a nationally representative survey of the noninstitutionalized US population was used. Health attitudes and health status were measured using the Self-Administered Questionnaire (SAQ) data collected within MEPS. ANALYSIS: Data were analyzed using SAS 9.1.3. Descriptive statistics were obtained using PROC UNIVARIATE. PROC CANCORR in SAS was used to measure canonical correlation between set of attitude about health variables and set of health status variables health insurance, proc cancorr, correlation, proc step, sample, proc univariate, scatter plot, standard deviation, outlier source 6
50 How to Create Variables Related to Age Joyce Gui,
Shaoan Yu
A derived variable not explicitly included in a domain model is permissible to be used in the supplemental qualifiers (SUPPQUAL) for that domain for clinical data submission to FDA per the CDISC V3.1 Submission Data Standards Implementation Guide. However, one critical problem is the efficient creation of a consistent set of Study Data Tabulation Model (SDTM)-derived data that support the analysis of the safety or efficacy of the product. This paper will discuss how to define and derive the variable age at event start to meet the CDISC standards. To illustrate some of the derivations, business logic and SAS code will be provided sample, clinical data, cdisc source 5
51 How to Read, Write, and Manipulate SAS Dates Jenine Milum No matter how long you've been programming in SAS, using and manipulating dates still seems to require effort. Learn all about SAS dates, the different ways they can be presented, and how to make them useful. Thi s paper includes excellent examples in dealing with raw inp ut dates, functions to manage dates, and outputting SAS dates into other formats. Included is all the date information you will need: date and time functions, Informats, and arithmetic operations sysdate9, date variable source 10
52 Identifying and listing outliers without using PROC Format option Other=Invalid Ruben Chiflikyan The identification of outliers in formatted datasets is a critical data quality issue, particular in the data review process. Having a long history, it culminated by Ronald Fehd establishing a set of powerful m acros for performing range and logic checks on datasets and the writing of file exceptions to edit and use for updates. As a necessary condition for this approach, the existence of a properly written data dictionary containing the other=INVALID option for all format values is required. In practice, however, often one has to work with the formats that do not have the required structure, and, for various reasons, it is difficult to transform them in the form required. As a supplement to the established appro ach, we have created a macro that handles situations where the presence of the other=INVALID option is not obligatory in character, numeric regular and multi -label value formats proc format, proc step, macro variable, outlier, character variable, proc sql, label statement source 12
53 Innovative Ways to Enhance Proc SQL Output Kalyani Chaturvedula SAS programmers are always looking for new and different ways to format their output. PROC SQL, though not widely used to format output, provides the functionality necessary to allow the user a number of innovative ways to enhance the appearance of their output. SQL or Structured Query Language is a language primarily developed for retrieving data from relational databases, but is much more robust in application. These formatting methods are especially beneficial for SAS programmers who prefer PROC SQL to SAS DATA STEP and would like to get their output formatted within the PROC SQL procedure rather than do an additional DATA STEP to format output but are relevant for a general SAS audience. Examples were created with SAS 9.1.3 of SAS executing on a Windows XP platform but are not platform specific. Keywords: SQL, CATX, RESET, FORMAT proc sql, proc step, data step source 5
54 Interactive Outlier Review and Regression Analysis in Stat Studio Robert Seffrin The National Agricultural Statistics Service of the U.S. Department of Agriculture uses survey data and satellite imagery to create an annual Cropland Data Layer (CDL) land cover classification product over the central United States. This CDL along with survey data are used to establish crop acreage estimates necessary for the agribusiness industry. One concern when creating thes e estimates are the non-sampling errors that can arise in the survey data and incorrect land cover classifications in the CDL. A review of the data used to set the estimate is an important step to ensure the delivery of quality estimates. In SAS 8.2 and 9.1 the IML Workshop provided an interactive way to display and select data points. In SAS 9.2 the IML Workshop has been incorporated into SAS Stat Studio regression analysis, outlier, proc reg, proc step, sample source 9
55 Interpreting Three-way Interactions Using SAS Anh Le,
Maribeth H. Johnson
When factors such as treatment group, sex, or race are in interaction with a continuous variable, testing for homogeneity of slopes is straightforward. However, when there is a significant 3-way interaction between two continuous variables and a categorical variable for analysis of a continuous dependent variable, the interpretations become complex. The next step should be to look at the parameter estimates to look for trends for interpretation purposes but this is a daunting task since the interaction involves multiple continuous values. This paper will present an approach that will dichotomize one of the continuous variables at the median, obtain the parameter estimates of the slopes for the all combinations of categorical variables, and then graphically represent the separate trends across the levels of the continuous variable. The technique is then repeated for the other continuous variable interval variable, estimate, proc calis, proc step, histogram source 12
56 Interrogate the Interrogator: Presenting SAS Usage Information Using BI Tools Emilio J. Power,
Shawn Edney
In simple and complex SAS deployments performance monitoring is often desired to ensure ideal efficiency in resource utilization. With out of the box deployments the availability of this information is somewhat difficult to extract and analyze though. The SAS Application Response Monitoring (ARM) tool allows you to collect a variety of metrics on how your SAS environment is performing. Useful information such as user CPU statistics and data accesses can be evaluated to measure system performance, user utilization and provide for data access monitoring. While several resources are available on how to implement the ARM tool there is a lack of information on how to analyze or report the information. This paper will present a series of examples using BI principles to gain insight on the utilization of your SAS BI environment and provide feedback to management, system administrators and users proc sql, business intelligence source 7
57 Introduction to the SAS 9 Business Intelligence Platform: A Tutorial Gregory S. Barnes Nelson Business intelligence (BI) is a broad category of application programs and technologies for gathering, storing, analyzing, and providing access to data to help enterprise users make better business decisions. BI applications support the activities of decision support, query and reporting, online analytical processing (OLAP), statistical analysis, forecasting, and data mining. BI includes a set of concepts and methods to improve business decision making by using fact-based support systems. This tutorial will guide participants through the landscape of business intelligence and how it has been implemented in SAS 9. We will provide a broad overview of what things we can accomplish with BI, lay the groundwork for continued learning and discuss the tools and technologies and how they interact in some common architectural scenarios. The goal of this presentation will be to get users comfortable with the concepts and vocabulary of BI business intelligence, data mining source 12
58 JavaObj, the newest production component object Richard A. DeVenezia The DATA STEP component object repertoire continues to grow in each new major release of SAS . HASH and HITER were the first objects supported in release 9. In release 9.2 JAVAOBJ has gone production and is fully supported. This paper will show some examples incorporating JAVAOBJ. Keywords: JavaObj, Java Object, Component Object, Interface, DATA STEP, SAS9.2, instantiation, custom classes input statement, sysrc source 8
59 Joins: How to Put it All Together Janet E. Stuelpner How to make two datasets into one seems like it would be an easy task. There are so many choices. If you are a DATA STEP bigot then you might want to M ERGE. If your favorite step is PROC SQL, then a JOIN might be the way to go. The type of join that you choose depends on the desired results. This paper will try to demystify the mysterious world of joins proc sql, proc step, inner join, create table, full join, merge statement source 10
60 Lessons Learned from Integrating SAS Applications C. Jenny Shiao National Agricultural Statistics Services conducts Agricultural Resources Management Survey annually. The Survey is large and time we are allowed to work on is limited. Due to the demand in distributed database processing, increasing need of flexibility and productivity, interactive GUI features, and reducing printing cost, staffs from the business units and IT worked together to find ways to meet these challenges for this survey. The goal was to bridge the batch oriented mainframe processing and more recently developed interactive systems. Through several iterations of enhancements, the system life cycle development process of planning, design, implementation, and support guides us to realize this goal. One of the major applications the business process utilizes runs on various platforms, mainframe, UNIX, and Window, that involves Base SAS, SAS AF, SAS Connect, etc sysrc, macro variable, sas base, macro definition source 8
61 Let Me Look At It! Graphic Presentation of Any Numeric Variable Anastasiya M. Osborne Have you ever been asked to produce a high quality, management-friendly report in record time? Have you ever spent time typing ranges for PROC FORMAT to apply in tables or maps? During Congressional hearings, U.S. Department of Agriculture (USDA) often gets urgent requests to graphically represent politically-sensitive data. This paper presents a SAS macro that was developed to allow flexibility in choosing a dataset, a variable in question, and a number of groups for statistical analysis. The macro then produces the results in an EXCEL spreadsheet, and an ODS output. It also automatically creates a format for the variable that can be used in PROC GMAP to produce an impressive map. The macro reduces programming time by eliminating time-consuming tasks to analyze the variable and manually type ranges for PROC FORMAT proc step, proc format, macro variable, proc gmap, call symput, proc freq, macro facility, excel, data science, macro definition source 11
62 Lithium Battery Analysis: Probability of Failure Assessment Using Logistic Regression Travis A. Moebes Fourteen-hundred rows by 53 columns of vendor cell acceptance data [1] were processed though Logistic Regression using SAS Enterprise Miner (EM) to find any significant correlation between 52 test output parameters (independent variables) and the pass/fail outcome for each of the 1,400 battery cells tested. The goal was to find helpful predictors for detecting "good" or "bad" cells in the form of a best Logistic Regression model. Data from five cells selected by Johnson Space Center's (JSC's) Energy Systems Division (ESD) were processed through three model options (Option1, Option2, and Option3) to determine the best model and to indicate a known cell that failed. The output from the best model s howed good acceptability statistics and indicated the failed cell was less acceptable than the other cells regression analysis, logistic regression, logistic distribution, data mining, predictor variable, likelihood function, response variable, null hypothesis, anova, binomial distribution, excel source 9
63 Macro Quoting Toby Dunn One of the more perplexing things for any SAS programmer to learn is the effective use of macro quoting functions. This confusion is of little wonder, given the number of quoting functions, their similarity, and the subtle differences between when each may be applied. Choosing the optimal function or combination of functions to use is often a daunting task for even advanced programmers. The difficulties in debugging macro errors increase the complexity even more. To intelligently choose the optimal quoting function the programmer needs to know what symbols to mask and when they need masking, and how this depends on the compilation and execution of the macro and surrounding program. This paper surveys macro quoting, with an emphasis on which quoting function to use and when to use them. The paper assumes working knowledge of macro processing and the intended audience is journey-level SAS programmers and above macro variable, macro facility, macro quoting function, macro put, macro definition, macro function, put statement, substr function, %if-%then-%else, macro call, &variable source 13
64 Make Your PROC TABULATE Tables Pretty Using ODS Style Options Wendi L. Wright This intermediate level presentation shows several examples of how to use the ODS Style= option in PROC TABULATE to customize tables and improve their attractiveness. This option is very versatile and, depending on where the option is used, can justify cells or row and column headers, change colors in both the foreground and background of the table, modify borders, add a flyover text box in ODS HTML, or add GIF figures to the row or column headers proc tabulate, proc step source 7
65 Making Sense of Census Data Robert S. Matthews The United States Census Bureau publishes a vast amount of data on many different facets of the U.S. population. One of the most utilized resources is the data available from the decennial census. This data is summarized and stratified in many different ways and can be used for a myriad of purposes. The task of actually extracting particular pieces of information from the census data can be daunting since there are literally hundreds of files containing thousands of individual variables. Not only is the data itself voluminous, but the documentation is also very extensive. An example of extracting three variables from the 2000 census data is presented in this paper to illustrate the tasks involved in reading, understanding, and using the data. dataset, input statement source 7
66 Making Sense of SAS Enterprise Business Intelligence (EBI) Log Configuration Files to Gain Valuable Insight on User Behavior Piyush Patel,
Sandeep Kharidhi
This paper focuses on the benefits of monitoring user log-in activity. Without reliable logs it can be very difficult to keep track of usage. From a security standpoint, logs are one of the most important assets contained on the server. After all, without logs, how will an administrator know who is accessing the system and what information is being accessed from the server? By analyzing the log-in information, one can determine the amount of time spent by users accessing the portal, creating reports or performing other analyses. SAS EBI includes some very powerful features to track portal usage, yet not always are these tools enabled. This paper describes how to modify the log-in configuration files for Portal Web Applications and how to parse through the log files to monitor and track users' activity. This paper will also provide a step-by- step guide through the use of Information Delivery Portal or Web Report Studio to analyze the portal log usage sample, business intelligence source 4
67 Marketing Mix Modeling: Techniques and Challenges Patralekha Bhattacharya Marketing Mix Modeling refers to the analytical and statistical methods used to quantify the effects of various media and marketing efforts on a product's performance. These methodologies help marketing executives comprehend and distinguish the effects of their marketing efforts from other factors that affect sales. Marketing Mix Models can help managers optimize their media budgets and allocate scarce resources into the most profitable marketing and media channels. This paper provides a brief overview of the methodologies most frequently used in marketing mix modeling and the challenges faced by marketing practitioners marketing mix, regression analysis, proc step, latent variable, sample, response variable, predictor variable, binary variable, proc mixed, proc princomp source 6
68 MISSING VALUES: Everything You Ever Wanted to Know Malachy J. Foley Many people know about the 28 different missing values for SAS numerical data. However, few people know about the many different missing values for character data. This paper reviews all the different types of missing values, their sort order, the difficulties they can cause the SAS programmer and how to avoid those difficulties. It also discusses the MISSING system option, and how to use the various missing values in input, output, comparisons, and in PROC FREQ missing value, proc step, options statement, proc freq, sas log, input statement, proc print, macro variable source 8
69 Model Validity Checks In Data Mining: A Luxury or A Necessity? Mike Speed,
Simon Sheather
It has been stated that, because of vast amounts of data, the data miner does not have the luxury of verifying assumptions and hence checking for model validity. This paper uses two databases to investigate implications of not verifying assumptions and hence the validity of models. The first one is the Dominick's Finer Foods database (James M. Kilts Center, GSB, University of Chicago). This database consists of same store sales of 58 stores over 268 weeks. The second one is The Direct Mail Fundraising database. This paper demonstrates that ensuring that the fitted models for either continuous or binary outcomes are valid improves predictions, sometimes dramatically so. In these real examples considered in this talk, using valid models, greatly improved the results. Thus, the data miner may want to consider that the checking of assumptions and validity is not a luxury, but in fact a necessity source 22
70 Moving from Listing Reports to Visual Reports using SAS/GRAPH Maps Elizabeth Ceranowski Listing Reports, like the output from the PRINT Procedure, can be good. Summary reports, like those produced by the REPORT procedure, can be better. However, a good visual report, like a color coded map, can sometimes be more effective in communicating information. Don't have SAS/GIS ? You can do this using SAS/GRAPH ! This presentation will get you started in using the GMAP procedure to create graphical output and using ODS to publish the output. Attendees will also see examples of use, and basic syntax to get started with SAS/GRAPH Maps and ODS. Code and output will be shown, as well as ways to customize the output. The content of this paper can also be easily extended to be used as Stored Processes in the SAS Business Intelligence Platform, and could easily be added to a SAS Information Delivery Portal proc gmap, response variable, proc step, ods html, where statement, proc print, proc report, options statement source 20
71 Names, Names, Names - Make Me a List H. Ian Whitlock Any number of macros have been written to generate enumerated lists of names. For example, lib.w1 lib.w2 lib.w3 ... But they probably would not work with lib.a lib.b lib.c or q1_a q1_b q2_a q2_b Now consider a problem to convert a list of character variables to numeric with the same names while keeping the same names. For example, data w ( drop = __: ) ; set w ( rename = ( x=__x y=__y z=__z ) ) ; x = input ( __x , best32. ) ; y = input ( __y , best32. ) ; z = input ( __z , best32. ) ; run ; The renames (in red) form a list and the assignment statements (in blue) form a list. All these problems involve lists but one usually uses special purpose macros for each problem. General tools will be discussed to handle these problems in a uniform manner without modifying the underlying macros macro variable, macro quoting function, macro definition, %if-%then-%else, macro put, proc sql, macro loop source 11
72 New SAS Performance Optimizations to Enhance Your SAS Client and Solution Access to the Database Mike Whitcher The SQL procedure has been used for years as the way many SAS clients and solutions query for their data. Take a look at the new SQL performance optimizations that have been added to this bellwether procedure, optimizations designed to greatly expand query pass-through capability to databases and shorten your SAS client and solution query response times. Also, see the new SQL enhancements for use with SAS data sets. Whether you use SAS Web Report Studio, SAS Marketing Automation or other SAS clients or solutions, or still submit your SQL queries in batch, you owe it to yourself to see how you can make them run faster proc sql, proc step, put statement, where statement, dataset, proc format, record count, user-defined format, sas function, ansi sql, sas base, having, business intelligence, hash table, group by, sysdate9, sample, create table, macro variable source 15
73 Non Linear Programming Of Time Series Data To Minimize Eutrophication In Truckee River, Nevada Anpalaki J. Ragavan In Truckee River, Nevada high total phosphorus concentrations (TP) lead to Eutrophication and subsequent depletion of dissolved oxygen, increase in dissolved organic carbon and poor water quality. Identifying the exact pattern of relationship among the multiple independent variables that result in low TP is important to implement remediation methods. In this data mining study a non-linear model was developed to identify the relationship of multiple independent variables to TP in Truckee River, Nevada, sampled monthly (from January 1997 to October 2004) over six sites, which was minimized non-linearly with respect to TP. Independent variables included were alkalinity, total soluble phosphorus, stream flow, seasonality, man-made intervention, water pH, water temperature, dissolved organic carbon, and dissolved oxygen proc step, proc mixed, linear programming, missing value, time series analysis, predictor variable, estimate, proc nlmixed source 13
74 NOTEs in a SASLOG : Of LOST CARDs and MERGE Statements with Repeats of By Values Andrew T. Kuligowski Everyone knows they should look over the SASLOG aft er their routine ends, even if the run appears to be successful. They may not always do i t, but they know they should. One reason for doing this is because there are several conditions that do not trigger an ERROR or a non-zero return code, but cause a NOTE to be written to the SASLOG that might indicate an unexpected or unacceptable situation. This presentation looks at two such messages: NOTE: LOST CARD. and NOTE: MERGE statement has more than one data set with repeats of BY values. Through the use of short ad hoc routines, the prese ntation will explore methods to discover the data conditions that triggered these messages, and provide the information necessary for the analyst or programmer to adjust their routines to eliminate these messages. Keywords: BY Statement, MERGE Statement, PROC MEANS , SASLOG input statement, merge statement, proc step, numeric variable, dataset, out=, by group processing, infile statement, proc means, sample, record count source 14
75 Optimizing the Marketing Mix Patralekha Bhattacharya Practitioners in the media industry are frequently faced with the problem of diverting limited resources among several alternative channels. The paper looks at this problem of optimal allocation of limited resources to maximize an objective function within the context of media mix modeling. If the objective function is linear or convex these problems can be easily solved by applying standard methods of linear or geometric programming. However, in the media world, non linear relationships between sales and media variables and advertising carry over effects can lead to non convex objective functions that make matters more complicated. In this paper, we develop an alternative solution using an algorithm (which we deploy with the help of a SAS macro) that can be used to obtain a "close to" global solution for the optimal media mix. The algorithm uses an iteration method to obtain the value of the marketing mix, interaction effect source 4
76 Order From Chaos: Using the Power of SAS to Transform Audit Trail Data Yun Mai,
Susan Myers,
Nanthini Ganapathi,
Vorapranee Wickelgren
As survey science has turned to computer-assisted interviewing (CAI) for primary data collection, the keystroke or Audit Trail data, the automatic by-product of CAI software systems, has received increasing attention. Such data contain valuable information about the interview process, and includes responses as well as timing, audio settings, and literally every keystroke made by the respondent. How to efficiently convert these semi-structured Audit Trail ASCII files into user-friendly database files such as SAS datasets remains challenging. To process the voluminous Audit Trail data, RTI has developed a SAS system to convert the ASCII files into SAS datasets. This system expands the accessibility of text files to a wide range of users for survey analysis. The resulting data are used in many ways, such as to assess the performance of field interviewers, to assure the accuracy of the survey instrument, and to monitor the time required to complete the interview audit trail, txt, proc sql, data wrangling, proc step source 8
77 Parameter Passing by Name H. Ian Whitlock SAS Stored Processes are used in SAS Enterprise Guide and many other SAS software products. 1 Communication of the user's requests to the stored process, i.e. program or macro, is via global macro variables. The user's multiple choice selections are communicated to the SAS program or macro by three different interfaces depending on the number of selections. Consequently each program has to go through the logic of deciding which interface is appropriate whenever a selection of multiple choices is involved. A macro is presented to handle this logic in general so that the program can simply call one macro and expect a single common interface for all user choices. The method hinges on passing parameter names instead of values. Consequently passing parameters by name instead of value will be discussed. The techniques involved will be explained, and then applied to the problem stated above macro variable, macro put, &variable, macro parameter, %macro parameters, macro loop, macro definition, %if-%then-%else source 8
78 Parameter-Driven Data Validation and Transformation Or The Marriage of Microsoft Excel and SAS Macro Variables to Solve ETL Problems Hugh Shinn,
Wanda Hopkins
This paper discusses processing data from multiple sources through the use of linked Microsoft EXCEL parameter files or logical data maps (LDMs) that specify the name, type, length, and validation rules for each target variable in a SAS data set or other table structure (e.g. Oracle, DB2, Access, etc.) and the associated source variable information (e.g. source variable name, and type). The LDM also includes the transformation rules that are used to convert the source variable into the target variable. Each LDM is based on a master logical data map to which there is a link for the validation rules. Thus, it's possible to change the validation rules in the master LDM and have those modifications appear in the subordinate LDMs. In our case, we examined weather data from North America and Europe to determine their daily variations. Using SAS Enterprise Guide we imported the LDMs and the input data files macro variable, data cleaning, data validation rules, response variable, data step, call execute, macro definition, excel, sas enterprise guide, proc step, raw data source 17
79 Parsimony vs. Complexity: A Comparison of Two-Level, Three-Level, and Cross-Classified Models Using Add Health and AHAA Data Bethany A. Bell,
Corina M. Owens,
John M. Ferron,
Jeffrey D. Kromrey
Multilevel modeling has become a common analytic technique across a variety of disciplines including education and other social and behavioral sciences. Such models are o ften used when researchers examine relationships between school and/or neighborhood characteristics and some individual -level outcome (e.g., academic achievement, high school completion). Although many samples are theoretically cross-cla ssified between multiple level-2 units, the application of cross-classified random effects models is rare in such re search proc calis, main effect, estimate, proc mixed, sample, proc step, fixed effects, interaction effect, correlation source 13
80 PDA Data Collection: Data Collection issues... SAS Data Step to the Rescue! Mira Shapiro With the increased use of handheld devices for data collection, some interesting data management issues have emerged. This paper will describe the challenges we overcame in order to prepare and analyze data that was presented to us at the end of a pilot study designed to measure the effectiveness of a PDA-based health education program. We were presented with data that was collected on PDAs that were given to the participants at the beginning of a cancer screening education pilot study and then collected at the end of the study. The individual files were uploaded to our server for analysis. We were faced with a number of challenges, such as the presence of multiple coding schemes for the same question, the option for a participant to use the PDA's "back button" to change answers to survey questions, the need to extract the subject number from the FILENAME, and the fact that some responses to a given question were accepted as text strings, while others were accepted as numeric lag function, proc step, dataset, data step, proc format, proc sort, select, sas programming, input statement source 6
81 PivotTable - A Powerful Tool for Data Exploration in the Pharmaceutical Industry Wei (Lisa) Lin,
June Cheng
PivotTable is a powerful Microsoft EXCEL tool used to create interactive tables that automatically extract, organize, and summarize large amounts of data. Additionally, PivotTable reports can be used to analyze data, make comparisons, detect patterns and relationships, and discover trends. As statistical programmers working in a large pharmaceutical company, we have found PivotTable to be a very useful tool for communicating with our clients because it is fast, easy and interactive. We mainly use these PivotTable reports for exploratory/ad-hoc analysis before formal reporting tables are produced. This paper will show how to use patients' Adverse Event (AE) information to create pivot tables from a SAS dataset excel, dataset source 8
82 Poor man's Parallel Processing using the DATA Step View Erik W. Tilanus The use of DATA STEP Views can reduce the elapsed time of programs that contain combinations of DATA steps and PROC steps. Under circumstances this reduction can be even in the order of 40 or more percent. The penalty is a higher CPU usage. The paper explains how DATA STEP Views are created and used and demonstrates the elapsed time saving, based on a practical example elapsed time, parallel processing, proc step source 3
83 PROC REPORT - Your How-to Guide for Producing Customized Summary Tables Deborah B. Buck A numbe r of years ag o SAS developers res ponded to reques ts from SAS programmers f or a single report-writing procedu re that in corporated the features of PROC PRINT, PROC ME ANS, PROC TABULATE, and the DATA _NULL_ step. The resulting procedure, PROC REPORT, is highly versatile with the capabilities to produce both detail and summary reports. In this workshop we will focus on PROC REPORT statements that will produce complex summary tables which include multiple dimensions, frequently reported descriptive statistics, columns of information not included in the data set, and customized summary statements. Although PROC REPORT can be used in a wi ndowing environment with p oint-and-click report building, we will use a programming approach to create the reports. This workshop is intended primarily for beginning to intermediate SAS users, or anyone who would like to become more familiar with PROC REPORT, and is applicable to all operating systems proc report, proc step, dataset, missing value, proc tabulate, proc print, class variable source 13
84 PROC REPORT in Color ... What's Your STYLE? Wendy Boberg,
Little Rock
Are you using the Output Delivery System (ODS)? Have you found the STYLE, layout and color scheme, you like? Do you know how to edit the colors on a table using ODS PDF? Do you know how to add background color to highlight a row, column, or cell? I used to get a highlighter out of my desk and go to work, but now I let SAS and the printer do all of the work. This paper will discuss a few different ways you can customize your reports. I will share my favorite styles and show you how to look at your tables in the different styles available. I will briefly explain how you can create your own style by changing the color scheme of an existing style so that it can be used for all of your reports. You will learn by example how to truly customize your table using PROC REPORT. I will explain how I used the pieces of code to get the table with a row, a column and individual cells highlighted with several different colors. Keywords: REPORT, ODS, ODS PDF, STYLE, TEMPLATE, CALL DEFINE, BACKGROUND, proc report, proc step, proc template, user-defined format, ods pdf, variable list source 11
85 PROC SQL for DATA Step Die-Hards Christianna S. Williams PROC SQL can be rather intimidating for those who have learned SAS data management techniques using exclusively the DATA STEP. However, when it comes to data manipulation, 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 implemented 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 familiar, followed by SQL code that will accomplish the same data manipulation proc sql, proc step, create table, group by, order by, where statement, inner join source 17
86 PROC SQL for Exact Testing Trend in Proportions Jonghyeon Kim,
Neal Oden,
Sungyoung Auh
PROC SQL is SAS' implementation of the ANSI Standard Query Language (SQL), an ANSI standard database programming/query language. Syntax is simple and its utility is broad in scope. As another capability, we find that PROC SQL is a very useful tool to perform exact test for monotonic trend in mean responses of discrete random variables. In this paper, we show utilization of PROC SQL to construct a null configuration set and to compute p-value for conditional exact likelihood ratio test for trend in proportions proc sql, proc step, exact test, likelihood function, sample, macro definition source 10
87 Quick 'n Dirty - Small, Useful Utility Macros Harry Droogendyk Macros are useful to define "canned" code that may be made available to other users in your organization. But, there's also simple, less sophisticated macros that are useful in your day to day coding efforts, if only to reduce keystrokes. This presentation will demonstrate a few of these macros, even ones that generate only partial statements: %dups generate code snippet to identify duplicate observations %fiscal return formatted SAS dates offset by fiscal year %cleanup work datasets and/or global macro variables %single resolve macro variables within single quotes KEYWORDS: utility, macros, fiscal, delete, duplicate, single quote macro variable, macro definition, temporary dataset, date variable, macro call, work library, macro facility, macro quoting function, %macro parameters, macro parameter source 7
88 Reject Inference Methodologies in Credit Risk Modeling Derek Montrichard In the banking industry, scorecards are commonly built to help gauge the level of risk associated with approving an applicant for their product. Like any statistical model, scorecards are built using data from the past to help infer what would happen in the future. However, for application scorecards, any applicant you declined cannot be used in your model, since the observation contains no outcome. Reject Inference is a technique used such that the declined population can now be included in modeling. This paper discusses the pros, cons, and pitfalls to avoid when using this technique proc hpsplit, logistic regression, sample, variable, logistic distribution, application scorecard, credit risk, residual, roc curve, regression analysis source 10
89 Renaming Tool Series Vincent Weng,
Ying Feng
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. Our Renaming Tool Series is a group of "renaming" macros, 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 source 8
90 Ride the Wave - Using Waterfall Graphs to Easily Depict Gaps between Starting and Ending Values Rebecca Bremer Booth The Waterfall graph is an innovative way of displaying data graphically to allow the viewer to quickly see what categories are contributing to differences in starting and ending values. The Waterfall graph is deceptively easy to create using SAS/GRAPH and is understood by audiences everywhere. This type of graph is growing in popularity and an example appeared in The Wall Street Journal. At HMC, these graphs are used primarily to demonstrate where cases leave the process between identification and member engagement. The Waterfall has proven to be a useful tool that allows the viewer to quickly determine areas of impact within a process to allow him/her to narrow his/her focus. The examples in this paper are not specific to the healthcare industry and demonstrate how Waterfalls can be applied to other industries as well. Keywords: Waterfall graphs, SAS/GRAPH, GCHART proc gchart, insurer source 5
91 Rounding in SAS: Preventing Numeric Representation Problems Imelda C. Go As SAS programmers, we come from a variety of backgrounds . We range from having little or no formal computer science background to having academic degrees in computer science. Numeric precision and represent ation are standard topics in computer science education. Programmers eventually enco unter numeric precision and representation issues. Their associated problems are particularly harmful when the programmer is not aware that they are pres ent and hence, did not take programming steps to handle such problems. For example, we might notice that our numeric comparison results are not what we expected. Consider the SAS statement "if 0.3=3*0.1 then equal='Y'; else equal='N';" If you think the result is Y, then this paper is a must-read. Fortunately, there are steps you can take to prevent these types of problem. Note: Due to differences in hardware limitations and operati ng systems, the PC SAS examples shown below may vary from the results on other computer systems numeric functions, proc print, proc step source 6
92 Ruby Functions from the SAS DataStep Daniel Olguin Are you tired of waiting on SAS to provide user-defined functions to the DataStep? Incensed at the limitations that will still exist for user-defined functions when SAS 9.2 is finally released? With 3 relatively easy and painless steps you can add Ruby, a programmer friendly, Object-Oriented language, to your SAS Tool-Box. This paper will examine examples of using Ruby from the DataStep. Keywords: Ruby, JRuby, open-source, DataStep, user-defined, function source 6
93 Rule based filtering - categorizing unwanted inputs Richard A. DeVenezia Web based survey questions typically request a respondent make one or more selections from a prepared list of valid values. However, it may be the case that a portion of the survey is designed to collect free form input via text boxes. There is no guarantee that the input will be valid for the context of the question, or that the respond ent will be particularly helpful in their data entry. This paper will only address the issue of eliminating nonsense inputs (noise), by way of pattern detection and the use of if/then rule sets whose parameters are stored in an EXCEL workbook. The inputs that pass the noise check are passed to an ETL process that performs further processing that classifies inputs into additional categories of matched (to a master list) and unmatched. This processing is beyond the scope of this paper. Keywords: Survey, Filtering, Noise, Rules, Control data, Code generation Survey data Consider an English language survey that gathers information from book purchasers user-defined format, macro variable, excel source 9
94 SAS Add in to MS Office - A Tutorial Angela M. Hall Business folks use EXCEL and have no desire to learn SAS Enterprise Guide? MS PowerPoint presentations prevail in displaying charts and summarizing results? SAS Add in to MS Office is a perfect fit for these scenarios. Users have the ability to open huge datasets in MS EXCEL and run SAS analytics via a simple interface. From PowerPoint, users can create charts and quickly update them in future meetings with new data sample, excel, bar chart, sas enterprise guide source 25
95 SAS Administration, More relevant than ever Shawn Edney The SAS Intelligence Platform is a complex software environment, with many moving parts. Server side configuration and optimization, links to databases and aut hentication directories, web- based java applications, and securing access to these resources all play a part. The care and feeding of such a complex environment is far from trivial. This paper aims to share experiences and perspectives on what it takes to administer the SAS 9 architecture along with real world examples of successful and unsuccessful efforts to do the same. Attendees will learn what skills need to be available to a SAS Administrator, as well as which skills may be redundant to a person in this role sas administrator, sas programmer source 8
96 SAS Code for Variable Selection in Multiple Linear Regression Models Using Information Criteria Methods with Explicit Enumeration for a Large Number of Independent Regressors Dennis J. Beal,
Oak Ridge
SAS 9.1 calculates Akaike's Information Criteria (AIC), Sawa's Bayesian Information Criteria (BIC), and Schwarz Bayesian Criteria (SBC) for every possible 2 p - 1 models for p ≤ 10 independent variables. AIC, BIC, and SBC estimate a measure of the difference between a given model and the "true" underlying model. The model with the smallest AIC, BIC, or SBC among all co mpeting models is deemed the best model. However, for large multivariate data sets where p > 10, SAS displays AIC, BIC, and SBC for only a fraction of all possible models. This paper provides SAS code that evaluates all po ssible linear regression models for any p > 0 to determine the best subset of variables that minimizes the information criteria among all possible models. Simulated multivariate data are used to compare the performance of the REG procedure to select the optimal model for p > 10 when the optimal model is determined through an explicit enumer ation of all possible models using AI C, BIC, and SBC proc reg, proc step, predictor variable, macro definition, multiple regression, feature selection, regression analysis, do loop, macro variable, response variable, main effect source 9
97 SAS Graphics on ODS 9.2 Performance-Enhancing Steroids Daniel O'Connor In the midst of performance-enhancing drug scandals in professional sports, you would think that SAS graphics on ODS 9.2 performance-enhancing steroids would be a bad thing. That is until you experienced the ability to customize professional-looking graphics in seconds with a variety of appearances. ODS graphical style enhancements provide advanced capabilities to unleash your creativity without spending endless hours manipulating options. Choose from a list of predefined styles, or create your own to match your corporate theme. ODS styles are both customizable and extendable, and they provide a powerful way to bring your content to life. Explore these new features in HTML, PDF, RTF, and PostScript documents. Astonish your customers and amaze yourself with SAS 9.2 ODS enhancements for SAS graphics file statement, options statement, sas base, catalog entry, data science source 18
98 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. Keywords: Small Multiples, SAS/QC, ODS HTML, ODS LAYOUT output delivery system, proc sql, proc step, create table, macro variable, macro definition, sas output source 12
99 SAS Hash Objects: An Efficient Table Look-Up in the Decision Tree Ying Liu Table look-up is the one of the most important and frequently performed data processing operations. There are three commonly used techniques in the decision tree data processing; they are: IF-THEN-ELSE logic, MERGE with BY and FORMAT with PUT(). IF-THEN-ELSE, although conceptua lly very easy can require a lot of coding and CPU processing time; moreover, when the tree logic changes the maintenance of the tree can be an onerous task. MERGE with BY forces us to sort and re-sort the data; in addition, many passes thr ough the data may be required. Sorting large data sets can increase the CPU and disk requirements significantly. Using SAS FORMATs with PUT() can reduce the CPU and program maintenance requirements, but they do not allow us to do compound key lookup. The HASH Object, introduced in SAS 9.1, performs t he standard operations of fi nding, adding and removing data dynamically in the memory. No sorting is required for the input data sets proc hpsplit, if-then-else, data step, hash table, cpu time, data wrangling, response variable, lookup, proc step, format statement, proc format, credit risk source 15
100 SAS Log Summarizer - Finding What's Most Important in the SAS Log Milorad Stojanovic Validity of SAS programs is an important task. Lots of information about the execution of SAS programs can be found in SAS Log file. Carefully examination of the SAS log is a mandatory task, but it can be cumbersome and tedious for very large logs. Log Summarizer is a tool designed to reduce the burden of this review. It can be used to extract the most important information (ERRORs, WARNINGs, and specific NOTEs), while preserving section indicators, statement sequence, original line numbers and message text. Log Summarizer's output is in RTF format and will provide programmer and/or QA analyst with a condensed version of the information they are most interested in reviewing sas log, by group processing source 6
101 SAS Macro Programming Tips and Techniques Kirk Paul Lafler The SAS Macro Language is a powerful tool for extending the capabilities of the SAS System. This hands-on workshop presents numerous tips and tricks related to the construction of effective macros through the demonstration of a collection of proven Macro Language coding techniques. Attendees learn how to process statements containing macros; replace text strings with macro variables; generate SAS code using macros; manipulate macro variable values with macro functions; handle global and local variables; construct arithmetic and logical expressions; interface the macro language with the DATA STEP and SQL procedure; store and reuse macros; troubleshoot and debug macros; and develop efficient and portable macro language code. Keywords: Macro, macro variable, macro statement, macro reference, macro functions, Autocall facility macro facility, proc step, autocall macro, macro definition, macro variable, macro function, macro parameter, %macro parameters, proc sql, dictionary tables, options statement source 8
102 SAS Resources: Places to Find Answers and Ideas Nat H. Wooding Jr. SAS' documentation has grown over the years from a few pages of printout to shelves of books written by SAS staff as well as users. There are now websites maintained by the Institute, universities, and private individuals. And, there are even more ways of exchanging ideas and solutions. This paper attempts to introduce a number of these information sources sas risk engine, numeric functions source 7
103 SAS Stat Studio: A Programming Environment for High-End Data Analysts Rick Wicklin bootstrap, time series analysis, scatter plot, series plot, proc princomp, sample source 19
104 SAS: The Ultimate Dashboard Machine Jeff Wright Leaders want to align their organizations around strategic goals and metrics. Knowledge workers need ready access to data about what is happening right now. IT seeks to make information available and useful to the business, and yet observe appropriate security policies. For many organizations, all of these goals are coming together in a single focal point: Dashboards. SAS is known for its advanced analytics tools and broad suite of business intelligence offerings, so it should be no surprise that there is more than one way to implement a Dashboard initiative using SAS technologies. This paper will begin by categorizing the objectives that organizations normally have in creating dashboards. Next, several best practices for effective visual display of information on dashboards will be presented. Finally, the paper will describe a variety of techniques for creating dashboards using SAS, including the new BI Dashboard tool, SAS/GRAPH, custom web development, and the SAS Portal sas base, proc sql, sas programming source 11
105 SET, MERGE and beyond. Erik W. Tilanus You know the SET statement and the MERGE statement. Is there more to it? Well, yeah there are a few more tricks to know. We will discuss random access to SAS data sets, based on observation numbers or indices and we will create a "look ahead" to see what is in the next observation (more or less the opposite of the LA G function). We will explain how to prevent the well-known note in the SAS Log: "MERGE statement has more than one data set with repeats of BY values". Then it is time to move on to the UPDATE and MODI FY statements. We will di scuss their features and the differences between these statements and SET and MERGE set statement, modify statement, by group processing, merge statement, master data management, transaction data, update statement, dataset, point= option, output, end= option, in= option, proc step, missing value, sas log source 15
106 Simple SAS Web Services with Ruby Daniel Olguin You have an investment in SAS programs and data and you'd like to make them available over the World Wide Web. If you're a Java programmer, SAS has examples for you. However, if you're not a Java programmer do you then have to climb Mt. Java and endure the Java police along the way just to make your SAS resources available on the Web? Luckily for you the answer is no! This paper will present a simple method for producing R ESTful Web services for SAS through JRuby. Keywords: Ruby, JRuby, Restful, web service, open-source web service, service provider source 5
107 Six Cool Things You Can Do In Display Manager Jenine Milum Many people use Display Manager but don't realize how much work it can actually do for you. Display Manager can help you research data issues, write code for you, transform data to and from SAS , and even some things you probably shouldn't use. Learn a few tips to make your Display Manager experience more productive proc step, dataset source 6
108 Smoke and Mirrors!!! Come See How the _INFILE_ Automatic Variable and SHAREBUFFERS Infile Option Can Speed Up Your Flat File Text-Processing Throughput Speed William E. Benjamin Jr. Processing speed for small files is never really a problem; one eye blink looks and feels much the same as two or three blinks of the eye. With today's computer speeds any machine will do a lot of work in three blinks of the eye. However, when processing hundreds of thousands, or millions of records blinks can become pauses, yawns, naps, or even an over-night sleepover. When a Base SAS DATA STEP reads in text files and writes out nearly the same file the work proceeds as follows; (a) read input file data into input buffer, (b) move data values to DATA STEP variables process data variables, (d) move data to output buffer, (e) write output file from output buffer. SAS reads your source code every time you run the code and builds the "current" processing steps (unless the code is compiled separately first) then executes them. By packing more work into each instruction less time is wasted between instructions, this means more work in less real time cpu time, automatic variable, dataset, data step, txt, flat file source 8
109 Standardization of Lists of Names and Addresses using SAS Character and Perl Regular Expression (PRX) Functions Elizabeth Heath Survey samples are often provided as lists of names and addresses that contain numerous spellings and abbreviations for the same word. Frequently, the variations must be standardized to match application specifications before samples can be processed. Data standardization can be performed in a reproducible manner with SAS character and PERL regular expression (PRX) functions, leaving only a small number of ambiguous cases to be handled manually. We will show how a small, fictitious survey sample can be standardized using SAS. KEYWORDS: PRX functions, pattern matching, SAS functions sample, character functions source 6
110 Surviving Survival Analysis - An Applied Introduction Christianna S. Williams By incorporating time-to-event information, survival analysis can be more powerful than simply examining whether or not an endpoint of interest occurs, and it has the added benefit of accounting for censoring, thus allowing inclusion of individuals who leave the study early. This tutorial -style presentation will go through the basics of survival analysis, starting with defining key vari ables, examining and comparing survival curves using PROC LIFETEST and leading into a brief introduction to estimating Cox regression models using PROC PHREG. The evaluation of the proportional hazards assumption and coding of time - dependent covariates wi ll also be explained. The emphasis will be on application, not theory, but pitfalls the analyst must watch out for will be covered. Examples will be taken from real -world data from health research, and some features newly available in SAS 9.2 will be highlighted survival analysis, proc step, time-dependent covariate, hazard ratio, regression analysis, sample, proc phreg, censoring, estimate source 17
111 T.I.P.S. (Techniques and Information for Programming in SAS) Kathleen J. Harkins,
Carolyn Maass,
Mary Anne Rutkowski
This paper provides a collection of basic programming tips and techniques that SAS users can implement in their daily programming. This collection of tips should be useful immediately and will improve the efficiency of the programs. There are several examples organized by the following categories (Keywords proc sort, proc step source 11
112 Tag Clouds - A list of tokens, sized by relative frequency Richard A. DeVenezia A tag cloud is a list of tokens, wherein the text size of a token varies according to how frequently the token has appeared within a collection of texts or text streams. Tag clouds have been found useful in various Internet search engines and some blogging frameworks. This paper will demonstrate how to render a tag cloud into the ODS PDF destination and use it as a navigation aid at the top of a document. Code was submitted in SAS Foundation version 9.2. Keywords: Tag Clouds, Tokens, ODS, PDF Data Token data can pulled from a number of sources. In some scenarios a parsing process will scan numerous text or narrative objects for meaning rich tokens. In other scenarios the tokens will be retrieved directly from a log, such as an Apache web server log, or from the output of a log parser, such as AWStats. It is outside the scope of this paper to discuss parsing ods pdf, proc freq, output delivery system, sample source 7
113 Tailoring the use of SAS Enterprise Miner Sascha Schubert A growing number of SAS users with different goals and skill levels need access to data mining functionality. The new generation of SAS Enterprise Miner 5 and the SAS stored process facility provide an easy way to tailor data mining functionality to the user's needs. The flexible architecture of SAS Enterprise Miner and the integration of Enterprise Miner into the SAS Enterprise Intelligence architecture allow the product users to create data mining projects for interactive or batch execution and share projects with other users. The software's Extension facility allows users to build specific functions that are fully integrated into the Enterprise Miner workbench. Based on the integrated batch processing capabilities, model training and model scoring code can be easily extracted from SAS Enterprise Miner and integrated into the SAS Enterprise Intelligence Platform using the SAS stored process facility. For users of the data mining, batch processing, correlation, macro variable, model training, proc corr, batch job source 14
114 Teaching Data Mining: the University of Alabama and SAS Michael D. Conerly,
J. Michael Hardin
In March 2002, The University of Alabama (UA) and SAS developed a partnership whereby students who complete a sequence of four graduate-level courses can receive a joint Data Mining Certificate from UA and SAS. Recently, the opportunity to earn this certificate has been made available to MBA students as well. This presentation will discuss the teaching data mining in a business school, the data mining curriculum at UA and the advantages of the partnership with SAS. The market demands for students with this certificate and lessons learned in developing and implementing the program will also be covered data mining, business intelligence, regression analysis source 5
115 Techniques for Developing Quality SAS Macros Ginger Redner,
Liping Zhang,
Carl Herremans
Defining specific guidelines and standards for designing and developing library macros can significantly increase the quality of those macros. This paper details some of the macro design and development guidelines we've defined in our organization for developing quality, easy to use, flexible macros that have minimal impact on the SAS session in which they are executed. Sample code to assist in adhering to these guidelines will also be discussed. This paper is intended for programmers with a sound foundation in SAS macro programming macro variable, symbol table, sas log, macro definition, local symbol table, in=, macro call, sample, macro parameter, data science, macro loop, %if-%then-%else source 11
116 Techniques for Evidence-Based Decision Making Using SAS Ian Stockwell SAS has many tools that can be used for data analysis. From Freqs and Means to Tabulates and Univariates, SAS can present a synopsis of data values relatively easily. However, there is a difference between what the data are, and what the data mean. In order to take this next step, I would like to introduce correlation and hypothesis testing using regression models and discuss how these methods can be used in evidence-based decision making. A brief statistical background will be included, along with coding examples for correlation and linear regression correlation, regression analysis, numeric variable, response variable, predictor variable, null hypothesis, estimate, anova, proc step, pearson correlation, proc corr, proc reg, standard deviation source 8
117 The Art of Debugging H. Ian Whitlock Program bugs are a fact of life, yet I never met a programmer that did not believe his/her program was bug free. Bugs are almost always a surprise because the programmer thought one thing and the program another. You can even have a bug before the first line of code is written. Do you plan for bugs? Can you spot the symptoms of a bug? Can you locate the bug? Do you recreate it? Do you know the difference between the symptom and the problem? Do you know that even programs that work and produce correct results can have bugs? If you don't know the answer or answered no to any question, then you probably need a lesson in the gentle art of debugging. This talk is aimed at the beginning level SAS programmer, but it takes an expert to really foul up a program, so almost anyone interested in SAS may find something of interest. Although the examples come from using the SAS/BASE software under Windows, the ideas are general enough to be of interest for any platform and any SAS software product missing value, error message, by group processing, options statement, if-then-else, dataset, proc step, character variable, libname statement, merge statement, put statement, retain, input statement, macro definition source 20
118 The Devil Is in the Details: Styles, Tips, and Tricks That Make Your Microsoft Excel Output Look Great! Eric A. Gebhart The Microsoft EXCEL XP tagset has given us the ability to create nicely formatted output for EXCEL, but it's not perfect and it's not always easy to get those last details ironed out. The tagset has over 50 options, and can also be controlled by styles in numerous ways. This paper will show some of the best styles available as well as several tips and tricks to get your Microsoft EXCEL output looking just the way you want excel, proc print, proc step, proc report, ods excel, macro variable source 20
119 The DOW-Loop Unrolled Paul M. Dorfman,
Lessia S. Shajenko
The DOW-loop (Whitlock DO-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, automatic variable, data step, proc sql source 19
120 The Impossible - An Organized Statistical Programmer Brian Spruell,
Kevin McGowan
Organization is the key to every project. It provides a detailed history of what the client wanted and shows the means by which the programmer met client goals. It also allows for reproducibility. Finally, and perhaps most importantly, it reduces headache. This paper will demonstrate tools and techniques developed at Constella which were used for a large clinical trials project. Programs were standardized so that all changes would have to be made in one place. A master meta data file was developed and maintained throughout the project. The meta file itself was an EXCEL spreadsheet. It contained columns of information which called certain programs, added titles, would subset the data based on certain variables, etc. This cut down on human error and significantly reduced the programming time. Keywords: organization, macro, meta file, header excel, dataset source 8
121 The Plot Thickens from PLOT to GPLOT Wendi L. Wright This paper starts with a look at basic plotting using PROC PLOT. A dataset with the daily number of hits on three websites is used. The presentation continues with examples of how to create more informative and professional looking plots by adding titles, footnotes, and reference lines and changing the symbols, legends and axes. This is done in a step by step approach with examples of how the plot changes at each step. A look at PROC GPLOT is next using the same Web example. The final plot created using PROC PLOT is compared with the same program run in the PROC GPLOT procedure. Further improvements are made in the same step by step fashion using various SAS Graph statements. The first change is to the titles and tootnotes. Then, one at a time, changes are made to the symbols (SYMBOL statement), the legend (LEGEND statement), and the axes (AXIS statement) proc step, proc gplot, title statement source 22
122 The Various Mechanisms of Calculated OLAP Cube Measures Angela M. Hall OLAP Cubes are extremely useful in storing and pre-summarizing large data volumes for quick queries. SAS OLAP Cubes can be created in PROC OLAP steps or via SAS OLAP Cube Studio while cube measures can be defined within these. Find out how these same measures are defined and managed as well as some of the advantages and disadvantages we have come across proc step, sas enterprise guide, sample, proc sql source 13
123 Time Series Analysis with SAS and R Samuel T. Croker When you need to analyze time series data but all you have is Base SAS R⃝then you are faced with the decision of how to conduct the analysis outside of SAS. This usually requires you to break the workflow into several different steps, which increases both the work and potential for errors. One attractive solution is to use SAS for all data preparation and reporting while using R to conduct the analysis and data visualization. R is open source statistical computing and graphics software available for Windows, UNIX/LINUX and Mac OS X. The key to the simplicity of this technique is that all of the programming can be done within a SAS program. This technique should please both SAS and R enthusiasts and can be extended well beyond the boundaries of time series analysis time series analysis, data step, proc step source 9
124 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 discusses using the new XML support in Base SAS-9 software to create multi-sheet Microsoft EXCEL workbooks (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, proc print, by group processing, sas output, sas base, proc step, proc template, title statement, output delivery system, ods xml, macro definition source 19
125 Tips and Tricks to Make SAS Life Easier Claudine Lougee What would you want to know if only given a day to learn SAS ? What SAS tips would make your life easier? What would you want another programmer to do for you in their code to help you "debug" their inefficiencies? This paper will attempt to show the beginner, intermediate, or even advanced SAS programmer that even an old dog can learn new tricks. Oh, and you might even learn why some errors occur! proc step, proc freq, rename statement, error message, keep statement, proc format, run, sas programmer, proc sql source 6
126 Tips to Customize SAS/GRAPH ... for Reluctant Beginners et al Claudine Lougee SAS graphs do not have to be difficult or created by SAS/GRAPH "experts". There are ways that graphs can be turned from basic to bold. Simple SAS/GRAPH options are demonstrated in easy steps to show even the beginner programmer or graph user. A few simple tricks may even impress the SAS/GRAPH "experts" sample, proc gplot source 5
127 Two SAS macros for DIF Analysis Shiqi Hao odds ratio, confidence interval, raw data, macro definition, excel source 10
128 Tying it Together: Using ODS to Insert EXCEL Hyperlinks James E. Snider This paper explores the use of ODS to insert hyperlinks in Microsoft EXCEL spreadsheet output. Although Microsoft Office provides some examples of how to insert hyperlinks, these methods do not work when using ODS without some additional manipulation. This paper will demonstrate linking to other spreadsheets as well as to other file types excel, create table source 5
129 Undocumented and Hard-to-find PROC SQL Features Kirk Paul Lafler The SQL Procedure contains many powerful and elegant language features for experienced SQL users. This paper introduces SQL topics that will help users unlock many hidden features, options, and other hard-to-find gems in the SQL universe. Topics include: conditional logic scenarios using case expressions; techniques on implementing table integrity constraints; an in-depth analysis of indexes and their uses; complex queries with join and set operators; integrating DICTIONARY tables with the macro language; and performance tuning techniques to improve query processing. Keywords: SQL, PROC SQL, case expressions, integrity constraints, indexes, joins, Dictionary tables proc sql, proc step, dictionary tables, where statement, select, macro variable, inner join, macro facility, sas library, sas log, macro call, view, create table, group by, order by, right join, work library source 17
130 Use of Post Processor in Clinical Data Reporting Niraj J. Pandya In clinical data reporting, data passes through many compl ex data steps and procedures to get its meaningful presentation in the form of report and different for matting issues of this report is also equally important as the data being presented in the report. Many times, proper form atting of the report is also time consuming and so it is worth to have post processing macros that takes care of all these issu es which is the last step of generating listings and analysis reports of clinical data and is the essential aspect of better presentable reports. In general these macros developed in SAS software are very flexible for repeat ed use and can work with varying needs of report presentation. Post processor macros generally take care of di fferent formatting, display, and other presentation attributes associated with the report. There are variou s methods to generate and invoke the post processor macros macro variable, proc step, clinical data, proc report, proc sql, data step, macro definition, character variable source 7
131 Using Data to Write SAS programs Kevin McGowan,
Brian Spruell
On occasion SAS programmers need to write programs that have a lot of programming statements that can be generated from data that is already in electronic format. Examples of this include using data to write input statements, SAS macros, formats, and if-then statements. These programming techniques are particularly helpful when the data is received from an external source in electronic format and the description of the data is also in electronic format. Using data to write SAS programs cuts down on programming time as well as errors in programming. This paper will show examples of using data several different ways to generate SAS code that can be used in other SAS programs input statement, format statement, proc format, proc step, macro call, macro facility, data step, macro definition, %if-%then-%else source 9
132 Using External Files to Maintain An Application Edgar Adams Tired of re-writing your SAS code every time the data changes. Then keep your changing data in an external file for the application to read and process. The moment the application is executed is when the "most current" data is used by the application. Maintain the external file or files and the application is always up-to-date. The trick is to store them in a way that uses the SAS format power of processing; storing the data Values and the Meaning of those Values proc format, proc step, excel, proc import, macro variable source 8
133 Using Functions SYSFUNC and IFC to Conditionally Execute Statements in Open Code Ronald J. Fehd macro variable, proc step, macro put source 10
134 Using Lookup Tables to Match Data Wenyu Hu,
Fang K. Chen,
Liping Zhang
Table lookup or searching is a common task performed in SAS. Base SAS Version 8, as well as earlier versions, offer many lookup methods such as SET with KEY=, arrays, SQL joins, formats, and MERGE with a BY statement. SAS Version 9 introduced the DATA STEP hash object, which provides additional ways to perform table lookups without the need for sorting or indexing. This paper analyzes the programming details of the various table lookup methods and compares the advantages and disadvantages of each approach. The comparisons shown in this paper will aid programmers in selecting the optimal table lookup method to use, as dictated by their specific situation. Keywords: Table Lookup, Set with KEY=, Array, Merge, SQL, Hash, Formats lookup, hash table, set statement, proc sql, proc step, by group processing, composite key source 7
135 Using PSI to monitor predictive model stability in the database marketing industry Shihong Li,
Sandeep Kharidhi,
Matt Kramer
Predictive models help streamline the decision-making process by improving the quality and consistency of decisions being made. In order to achieve maximum ongoing effectiveness and maintain profitability, front-end reports should be put in place to track model stability through the model's entire life cycle. Population Stability Index (PSI) applications can be developed to serve this important business need within the database marketing industry. Population Stability Indices are calculated and monitored using a methodology known as "Entropy" (Chern, 2006). The PSI application is a tool for creating front-end reports that track model stability. PSI is widely utilized as stability metric and has proven to be very effective sample, metadata management source 4
136 Using SAS Arrays to Manipulate Data Ben Cochran The DATA STEP has been described as the best data manipulator in the business. One of the constructs that gives the DATA STEP so much power is the SAS array. This workshop takes the user on a tour of SAS array applications starting from a very elementary level to more advanced examples. After brief explanations of each application, the attendees will get a chance to try their skills at solving an array of challenges array, array bounds, character variable, proc print, proc step source 10
137 Using SAS Graphics to Explore Behavioral Health Cost Risk Barbara B. Okerson Behavioral health disorders result in significant economic loss through costs associated with inpatient admissions, lost work days and reduction in at-work productivity. Additionally, over 30% of health plan members with complex health issues have at least one behavioral health issue driving cost risk. This paper looks at graphical representations of cost as part of an effort to develop an overall methodology for prediction of future cost risk from selected behavioral health issues. SAS provides a comprehensive set of graphics tools and procedures as part of the SAS/GRAPH product. Additionally, the SAS/STAT module provides an extensive library of tools for data analysis. Within SAS/STAT, the new ODS graphics applications add value to this ability by providing customizable statistical graphics that display automatically with these procedures when ODS graphics are invoked proc step, series plot, proc sgplot, proc template, output delivery system, histogram source 8
138 Using SAS to Analyze Longitudinal Study Abbas S. Tavakoli format statement, proc format, data science, proc step source 13
139 Using SAS to Parse External Data Andrew T. Kuligowski Most "Introduction to Programming" courses will inc lude a section on reading external data; the first assumption they make will be that the data are stor ed 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 occu rring in a documented, consistent format - a lot of it, but not all of it. This presentation will address some techniques that can be used when we are not dealing with cleanly formatted data, when the data we want is in a less- than-ideal format, perhaps intermingled or seemingl y 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 Sta tement, Parser input statement, named input, proc print, proc step, sample, conditional do loop, index, sas log, sas base, character functions, cpu time, end source 14
140 Using the SAS/GRAPH Annotate Facility to Create Timeline Plots Erin L. Abner,
Marta S. Mendiondo
A timeline plot is a simple but effective way of graphically representing events over time. Unlike survival curves, which can only be used to depict one-time events at the group-level, a timeline plot can be used to show transitions in and out of disease states at the individual level. Although SAS does not automatically create timeline plots, the SAS/GRAPH Annotate facility provides a convenient means of producing these graphs. This presentation will demonstrate how, using relatively simple syntax, an Annotate data set allows you to use multiple line types, colors, and symbols within the same plot line to depict any number of events over time. Keywords: SAS/GRAPH, Annotate, timeline plot proc gplot, proc step source 7
141 Using Unnamed Pipes to automate loading a sas data warehouse using only Base SAS Vicky Feldman This paper presents examples that use unnamed pipes to load a SAS data warehouse from zipped mainframe text files with generational data group names. The process uses Winzip version 10 with Command Line Support Add-On and Base SAS version 9.1.3 on a Windows XP Pro platform. The text files are not unzipped during this process. Header records read from the mainframe COBOL extract file are used to create dataset names that include parameter information. Finally, the zipped text files are moved to appropriate file folders on a server, and information on the parameter dates is used to rename the zipped files for archiving purposes. With tight state budgets, this has allowed the agency to improve efficiency with only existing licensed SAS components dataset, txt, sas base, macro variable source 4
142 Utilizing Hash Tables to Obtain Matched Post-Hoc Control Populations Elayne Reiss,
Jeffrey Reiss
In education, we are frequently asked to conduct post-hoc studies to measure the effectiveness of a particular student instructional program. In other words, those implementing the program have not identified an appropriate control group for comparison purposes. Some studies target a very specific type of student with a particular background academic and demographic profile, so the creation of a closely matched control group-after the fact-is essential to quality data comparison. This paper will explore a simple yet handy use of hash tables to turn a large database of mostly "mismatched" potential control group observations into a much more comparable sampling population. This code can accommodate as many baseline comparative factors as necessary, both continuous and discrete. We will also include the data preparation requirements and sampling procedures (through PROC SURVEYSELECT) to provide a holistic view of the analytical process hash table, sample, proc step, proc sort, interval variable, proc surveyselect, index, key source 9
143 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. KEYWORDS: macro, SASAUTOS, SASMSTORE, stored, compiled stored macro, macro definition, macro catalog, catalog, permanent library, autocall macro, work library, catalog entry, macro loop, %macro parameters source 14
144 You Use SAS, Your Boss Uses EXCEL, Guess Where Your Results are Going to Appear! Digging Deeper into ODS to Put SAS Data into EXCEL William E. Benjamin Jr. The Author's first paper on this subject presented at WUSS 11 in 2003 described general processes helping programmers run EXCEL macros to move their data from SAS readable file structures into Microsoft EXCEL spreadsheets. The processes included trivial data output solutions, simple DDE tasks, and progressed to complex SAS and EXCEL routines that manipulated EXCEL from SAS and then accessed SAS data from EXCEL. This paper digs further into the use of ODS on the SAS side to prepare EXCEL spreadsheets directly. SAS code and macros will be demonstrated to create multi-page EXCEL spreadsheets, giving the programmer the ability to build tools to exploit data and display information for the end user. As a result the SAS programmer will be able to create spreadsheets for distribution, automate the standardization of reports, and the building of powerful spreadsheet applications with access to information built by offline SAS processes that the end user can refresh excel, proc print, sas base, ods excel, proc step source 11

Back to Conf go 2009 go 2007

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.