HOME QUICK SEARCH AUTHORS KEYWORDS HELP BUGS

NESUG 2008 Papers - Index

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

# Title
×
Authors
×
Abstract
×
Keywords
×
Extras Pages
1 10 Things a Beginner Should Know Before Writing a SAS Program Lisa Eckler Writing and running one's first SAS program can be w onderfully quick and easy - or not. Either way, there's a long route with many lessons to be learned between writing that first program and truly being a SAS programmer. This paper will address some of th e things your best friend would tell you about SAS before you tried it, if your best friend were an experienced SAS programmer. An early awareness of some of these ideas may help you avoid having to discover them in the face of a looming deadline, with a program that has gotten un manageably complicated and doesn't produce the desired result. This paper should be of value to b eginner programmers or those making a transition to SAS from some other programming language. It will include some fundamentals of programming, an introduction to some tips and techniques for understa nding and working with SAS code, and pointers to some classic SAS papers and other recommended resources proc step, sas programmer, put statement, proc format, proc print, dataset, where statement, proc contents, sas log, macro variable, macro definition 10
2 A Faster Index for Sorted SAS Datasets Mark Keintz In a NESUG 2007 paper with Shuguang Zhang, I demonstrated a "condensed index" which provided significant (about 33% elapsed time and cpu time) performance gains in selecting subsets from datasets in which each level of the sort variables(s) has many observations, and the sort variable was used as the selection criterion. This pa- per extends the condensed index in two ways: (1) further performance gains (up to 50%) by selectively replacing direct access (i.e. POINT=) techniques with sequential access (FIRSTOBS and LASTOBS), and (2) application to datasets in which each level of the sort variable(s) has just one observation. This paper demonstrates, with sample DATA steps, how to create and use a condensed index, and compares its performance to SAS indices, and to our previous results. Other advantages such as precise prediction of the number of retrieved records will be discussed. This paper assumes the reader has an intermediate level of familiarity with the SAS DATA STEP index, set statement, cpu time, elapsed time, data step, dataset, sorted data 11
3 A Hands-on Tour Inside the World of PROC SQL Kirk Paul Lafler Structured Query Language (PROC SQL) is a database language found in the Base SAS software. It enables access to data stored in SAS data sets or tables using a powerful assortment of statements, clauses, options, functions, and other language features. This paper presents core concepts of this powerful language as well as its many applications and is intended for SAS users who desire an overview of the capabilities of this exciting procedure. Attendees will explore the construction of simple SQL queries, ordering and grouping data, the application of case logic for data reclassification, the creation and use of views, and the construction of simple inner and outer joins proc sql, proc step, dictionary tables, where statement, select, macro variable, inner join, sas library, sas log, macro call, macro facility, view, create table, group by, order by, right join, work library 17
4 A PROC SQL Primer Matthew Taylor Most SAS programmers utilize the power of the DATA STEP to manipulate their datasets. However, unless they pull from a relational database, there is a good chance they have not explored an alternate method of data ma- nipulation, namely PROC SQL. Once learned, PROC SQL can be more intuitive in some cases than DATA STEP solutions and also have unique properties that allow certain functionality that is very difficult to obtain through a DATA STEP. This paper will review the basics of PROC SQL including creating and manipulating datasets, combin- ing tables, summarizing data and tips to help the beginner code efficiently proc sql, proc step, by group processing, group by, inner join, select, sample, relational database, proc sort, order by, dataset, where statement, sas programmer, full join 11
5 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 proc transpose, proc step, by group processing, numeric variable 12
6 A Sampler of What's New in Base SAS 9.2 Jason Secosky Coding with SAS is easier than ever with SAS 9.2. This paper highlights the top new features and performance improvements in DATA STEP, PROC SQL, and PROC SORT. Included are writing functions with DATA STEP syntax, improved performance when accessing an external database from PROC SQL, more intuitive and culturally acceptable sorting with PROC SORT, and several "Top 10" SASware Ballot items proc step, proc sql, study day, proc sort, put statement, where statement, proc format, proc fcmp, hash table, do loop, sas function, character variable, sas programmer, macro loop, infile statement, sas log, set statement, sas base, txt, user-defined format, work library, macro definition 15
7 A Short SASsy Overview of SAS Tech Support and SAS-L JoAnn R. Matthews Sooner or later, SAS users will face an issue that seems impossible to solve. This SASsy paper will demonstrate the use of two resources for SAS users: SAS Institute's Tech Support and SAS-L. SAS Institute is committed to user support. SAS's Technical Support is one resource that can be used. Customer needs for immediate technical support are met by phone, fax or e-mail. In addition, SAS Institute offers free subscriptions to e-newsletters, RSS feeds and Blogs. SAS-L is another powerful resource for SAS users. Founded in 1986, SAS-L is one of the oldest and most successful programming-oriented Listserv lists. Populated by SAS users, and independent of SAS Institute, SAS-L affords users the opportunity to communicate with some of the best and brightest SAS programmers around the globe, with virtually instantaneous peer-to-peer exchange 11
8 A Tiptoe Through the Tagset Field Mike Molter The flexibility that the markup destination has added to ODS is comparable to the benefits ODS originally brought to SAS output, but it comes at a price known as the tagset. With ODS, we could display results in web pages without HTML knowledge; in Word without RTF knowledge. Deve lopers soon realized though that having ODS do all the work wasn't always ideal; that on oc casion, users could benefit from having some control over how markup was generated. Just as templates instruct ODS on display custom ization, TAGSETS instruct ODS on markup customization. The advantages are clear - even more flexibility in the generat ion of output. The price is similar to that paid for display flexibility - more TEMPLATE procedure syntax, and an understanding of how ODS constructs files from these instructions. Great accomplishments often come from modest beginnings. This paper is your modest beginning proc step, put statement, sas output, proc freq, proc print, title statement, output delivery system, proc report, standard deviation, proc template 23
9 Adapting your SAS Programs into the SAS9 Paradigm Cynthia L. Zender Do you want to convert existing SAS programs into SAS Stored Processes? Would you like to learn how to convert and adapt your existing SAS programs so that they can be executed from selected SAS Business Intelligence client applications? Topics in this paper include basic SAS program conversion to a SAS stored process, conversion of SAS/GRAPH programs, use of macro variables in program conversion, streaming versus transient package output from stored processes, and permanent result packages macro variable, sas enterprise guide, macro definition, proc step, ods html, proc gchart, proc report, symbol table, global symbol table, business intelligence, libname statement, macro call, sas administrator, %if-%then-%else, spk file, if-then-else, sas 9, macro facility 21
10 Address Cleaning Using the TRANWRD Function Rena Jones,
Michael S. Zdeb
SAS data sets sometimes contain character variables that need alteration. Address databases used to generate mailing lists or for geocoding (assigning of a geographic coordinate location in terms of latitude and longitude based on street address) require standardized address information. The various portions of the address (numbers, street names, street types) should conform to a set of pre-specified rules. SAS string functions are one way to manipulate the components of address data. SAS on-line help states that the TRANWRD function replaces or removes all occurrences of a given word (or a pattern of characters) within a character string. This paper will provide an overview of the TRANWRD function syntax and its utility for cleaning an address database either by itself or in conjunction with other string functions (COMPRESS, TRANSLATE). A SAS macro is described that uses the TRANWRD function to adjust for common inconsistencies and errors in address data tranwrd function, character functions 4
11 An Animated Guide: the Logical cascade when entering Orres data Russell M. Lavery character variable, sample, cdisc 11
12 An Animated Guide: Using the Put and INput functions Russell M. Lavery This paper explores features and complexity in the use of Put and INput functions. Put and INput are useful for convertingvariables from character to numeric and the reverse. This paper starts with simple examples and builds to more complexexamples showing dates and nested use [ e.g. Put(INput(cust_id,6.0),Z6.0) ].The Put function converts from a numeric or character input/variable/target to a character output, applying a format as part ofthe conversion. The Put function can be applied to a character or numeric input, but the output of the Put function isalways character. INput converts only from a character input/variable/target to either numeric or character output/variables,applying an INformat as part of the conversion. The INput function can only be applied to a character target, but theoutput can be character or numeric. As a quick summary, Put can take two types of input and produces one type of output(character) input statement, char., put statement, numeric variable, character variable 10
13 An Approach to CDISC SDTM Implementation for Clinical Trials Data William Chen,
Margaret M. Coughlin
The Clinical Data Interchange Standards Consortium (CDISC) is a non-profit international organization estab- lished to define standard data formats to support the exchange of clinical data among and within organiza- tions such as pharmaceutical and medical device compani es, contract research organizations, universities, medical research institutions, and regulatory agencies. The CDISC Study Data Tabulation Model (SDTM) defines the standard format for t abulation data. Generally, there ar e three approaches for implementing SDTM within the pharmaceutical industry: pure SD TM, submission-only, and database-only. The pure SDTM approach means all study data will be SDTM-complian t, starting from data capture and ending with data analysis and submission. The submission-only approach leaves the current practice alone and creates the SDTM-complaint datasets for submi ssions. The database-only approach feeds the study data into a clinical database, which is SDTM-compliant data validation rules, sdtm programming, cdisc 5
14 An Introduction to the SAS Survey Analysis PROCs Xiuhua Chen,
Paul Gorrell
This paper provides an introductory overview of the SAS survey analysis PROCS: SURVEYMEANS, SURVEYFREQ, SURVEYLOGISTIC and SURVEYREG. For all procedures we will discuss the STRATA, CLUSTER and WEIGHT statements with respect to specifying the sample design and generating weighted estimates. We will also discuss the importance of not deleting observations in order to analyze subpopulations, as well as analyzing data with missing values. Other PROC-specific statements will be discussed, e.g. TABLES in SURVEYFREQ, DOMAIN in SURVEYMEANS and MODEL in SURVEYLOGISTIC. In addition we will briefly discuss the Taylor linearization method for variance estimation used by SAS and how SAS (by default) handles situations where there is only one cluster in a stratum. Concrete examples will be used (with SAS 9.1.3). This paper will be of interest to SAS programmers who need to analyze the results of complex, i.e. not simple, random, surveys sample, proc step, proc calis, missing value, missing completely at random, proc freq, proc surveymeans, random sampling, proc surveylogistic, standard deviation, nominal variable, regression analysis, by group processing, format statement, binary variable, proc surveyfreq 17
15 Analysis of Correlated Recurrent and Terminal Events Data in SAS Li Lu,
Chenwei Liu
Recurrent events data have been increasingly important in clinical studies. There are many methods to analyze this type of data. Several papers have been presented about how to perform repeated events analysis in SAS. In clinical studies, we may encounter recurrent disease episodes in patients with a terminal event such as death, and the terminal event is often strongly correlated with the recurrent event process. In this paper, using a simulated organ transplant dataset as example, we demonstrate how to model and analyze correlated recurrent and terminal events data in SAS proc mixed, proc step, proc phreg, clinical trial, cumulative hazard, frailty model, macro definition, likelihood function 8
16 Analyzing Laboratory Assay Data for Accuracy Sara Hickson,
Jeanne Sparrow
The Nurses' Health Study and Nurses' Health Study II combined have biological samples from over 60,000 women and are involved in dozens of studies to evaluate potential biomarkers, such as hormone levels and genetic markers, with risk of disease. We have developed a number of techniques in SAS for ensuring that the biomarker data are accurate and reproducible, and to check for the possibility of laboratory error. We will touch briefly on quality control samples and pilot studies, the different sample types involved, and describe in more detail the methods used in SAS to evaluate the results. This paper will detail the techniques involved, and how they were developed. There are 3 major components that this paper will consider: Evaluation of pilot studies from various labs, evaluation of embedded quality control samples, and the various kinds of different quality control samples utilized. This is targeted at an intermediate level. Pharmaceuticals, Health Care, and Life SciencesNESUG 2008 sample, quality control, proc step, correlation, standard deviation, raw data, proc sort, proc sql, control testing 13
17 Another Helping of HASH Lee Dodoo,
Stephen J. Rhoades
There are some excellent papers on SAS Hash Tables, but I needed something for training our staff. When I first heard about hashing tables I was told everything had to be in memory. Since we often have files with millions of records I ruled them out. However this is not the case, only the hash tables need to be in memory, not the base file. They are supposed to be faster for sorts, merges and summaries, other papers showed even more options. So, are they faster? What about on all the platforms in our shop, z/OS, UNIX, PCs? Are there differences? And then the syntax is a bit intimidating. These factors were added to the training along with lots of examples. This paper will boil it down to essentials and provide a list of other sources for how to use Hash Tables hash table, hash iterator, proc sql, inner join, unique key 18
18 Automated GPLOTs from sorted dataset using CALL statements Kenneth Gold Create a macro, %PLOTVENDOR, to plot and save graph s from a dataset of thousands of subjects over 20 or more time periods. Within a DAT A step, use CALL SYMPUT to assign the macro arguments and CALL EXECUTE to invoke the macr o. From the source data create an auxiliary dataset, INDEX, that controls the assignm ent of global variables used by the macro call execute, call symput, catalog, proc gplot 6
19 Avoiding Common Traps When Accessing RDBMS Data Michael D. Rhoads Accessing data from databases such as Oracle and SQL Server has become an increasingly common requirement for SAS programmers. SAS offers powerful and flexible c apabilities for accessing such data, and many aspects of this process are quite straightforward, especially when LIBNAME engines are used. However, there are some traps that lurk for the unwary that can potentially produce unexpected error messages, incorr ect output, or frantic calls from your normally -friendly Database Administrator. This paper highlights a few of the most common traps and explains how to avoid them proc sql, proc step, missing value, dataset, sql server, libname statement, proc contents, character variable, relational database, proc print, where statement, create table, error message, drop table, order by, sas programmer, variable, sql pass-through, options statement, date variable 11
20 Behind the Scenes with SAS Louise S. Hadden SAS provides many opportunities to add customized images to SAS ODS output. This presentation will demonstrate various ways to add custom backgrounds to tabular and graphic output; add custom images to titles, footnotes, ODS text fields and tabular output; and add custom "fills" to SAS/GRAPH maps and graphs. Some possible uses of custom images include a company logo embedded in SAS output, graphic displays of pos itive or negative outcomes, and watermarks containing "draft" or "confidential". The SAS code to accomplish all these potential uses, and more, will be shown sample, ods pdf 10
21 Benchmarking Tool for Hardware resources Sreekanth Reddy Middela,
Venkata S. Bhamidipati
The main functionality of benchmark macro %Compare is to summarize, aggregate, and display the various hardware resources utilized by a SAS program. Additi onally, %Compare compares, between two programs, resources such as memory, real time, CPU time, etc ., which is a useful benchmarking technique to help deter- mine the program structure and hardware needs. %Compare can be hel pful for programmers working on large databases such as those occurring with vaccine clinical tr ials or sales data. This paper will illustrate techniques using various real scenarios cpu time, proc step, proc means 6
22 Better Tools for Visualizing the Voice of Your Process: New Developments in SAS/QC Software in SAS 9.2 Bucky Ransdell SAS/QC provides a rich set of statistical and graphical methods for improving the quality of products, processes, and services. Methods are available for basic problem solving, design of experiments, statistical process control, process capability analysis, and reliability modeling. The first part of this presentation, intended for newcomers to SAS/QC, explains how these methods help you understand process variation in health care management, marketing campaigns, pharmaceutical manufacturing, and customer call centers. The second part highlights new features in SAS 9.2. The ANOM, CAP ABILITY , CUSUM, MACONTROL, P ARETO, RELIABILITY , and SHEWHART procedures now produce graphs that conform to ODS styles, so that creating consistent output is easier. Also, you now have two alternative methods for producing graphs. With the traditional graphics system, you can control every detail of a graph through familiar procedure syntax customer satisfaction, anova 9
23 Better, Faster, and Cheaper SAS Software Lifecycle Edmond Cheng In designing software applications, the enduring process faces realistic business challenges to overcome the re- stricted time, limited resources, and quality constraint in engineering paradigm. Over emphasizing on share of the three engineering limitations upsets the balance of producing highest quality, shortest time, and lowest budget cost during product development lifecycle at the highest efficient mode. By considering the following four design practices during your SAS software lifecycle, it is possible to defy an ap- proach to build SAS software thru maximizing limited constraints. The paper presents 1) functional techniques in expanding single-use program's flexibility and maintainability, 2) practical guidelines to promote code library and reusability, 3) strategies and advantages of modular process design, and most importantly 4) connection of indi- vidual program components into user-driven application stored macro, sas programming 6
24 Boot Camp for Programmers: Stuff You Need to Know That's Not in the Manual Elizabeth Axelrod Imagine that you completed a research project a year ago, and now your clients are challenging the results. They doubt your numbers, and they want to know how you came to your conclusions. Could you retrace your steps and reproduce your results? Could you describe what you did and why you made those decisions along the way? Could you find the data or the programs that you wrote? With the passage of time, it becomes more and more difficult to recall or recover the process, data, or results of a project. As programmers, we're tempted to head straight for the keyboard, and start writing code. But first some basic training is in order. This paper is geared for programmers and programmer wannabes, focusing on specific guidelines, best practices, and techniques which can help us ensure the reproducibility or our results, and in doing so, improve the quality of our work dataset, raw data 7
25 Box Plots in SAS: UNIVARIATE, BOXPLOT, or GPLOT? Robert Adams The continuous nature of some clinical trial data makes it well-suited for display using box plots. Box plots convey, at a glance, a wealth of information about the data being graphed. This includes the data's central value, distribution, and variability, as well as how categorical variables compare side-by-side. This paper examines three procedures for creating box plots in SAS: PROC UNIVARIATE, PROC BOXPLOT, and PROC GPLOT. Features and limitations, as well as similarities and differences, are discussed and demonstrated for each of the procedures. As a result, participants are better prepared to choose the SAS procedure which can most effectively present the clinical trial results box plot, proc step, proc boxplot, proc univariate, proc gplot, by group processing, sample, clinical trial, class variable, univariate analysis 11
26 Breakthrough Improvements through Reliable Modern Testing using SAS and JMP Sunil Kumar Gupta Conducting experiments that put competing alternatives to test (A/B testing) has long been a best practice for fact-based decision making by leading direct marketers. Now, with the growth of online merchandising and the availability of free online tools such as the Google Website Optimizer, the number of companies that can do sta- tistical testing, the number of alternatives they can test simultaneously, and the frequency with which they can monitor interim results has multiplied greatly. The purpose of this paper is to show how SAS and JMP can be used to improve and simplify the design, monitor- ing, and evaluation of experiments. Using examples from various online and offline tests - conducted with and without Google's Website Optimizer - this presentation will show just how you can better use the software you already have to get better results faster sample size, sample, main effect, proc step, confidence level, confidence interval, null hypothesis, proc logistic, a/b testing, proc freq, logistic distribution, proc power 14
27 Building a Simple Document Server with SAS/IntrNet and Microsoft Word John Ulicny SAS/INTRNET is an established tool for enabling SAS applications to run and display output via the web. Typical applications almost always involve manipulating and/or displaying combinations of character and numeric SAS data. SAS/INTRNET software can also be used to provide the end user with the ability to enter data into a dataset through HTML forms and to download data from the server. This paper will illustrate another use - the display and management of a colle ction of word processing documents macro variable, dataset, macro call, data step, put statement, macro definition 13
28 Building the Better Macro: Best Practices for the Design of Reliable, Effective Tools Frank C. DiIorio The SAS macro language has power and flexibility. When badly implemented, however, it demonstrates a chaos- inducing capacity unrivalled by other components of the SAS System. It can generate or supplement code for practically any type of SAS application, and is an essential part of the serious programmer's tool box. Collections of macro applications and utilities can prove invaluable to an organization wanting to routinize work flow and quickly react to new programming challenges. But the language's flexibility is also one of its implementation hazards. The syntax, while sometimes rather baroque, is reasonably straightforward and imposes relatively few spacing, documentation, and similar requirements on the programmer. In the absence of many rules imposed by the language, the result is often awkward and ineffective coding. Some amount of self-imposed structure must be used during the program design process, particularly when writing systems of interconnected applications macro variable, macro facility, macro definition, macro loop, macro put, data cleaning, automatic macro variable, keyword parameter, %macro parameters, sas log, error message, sysrc, %if-%then-%else, symbol table, macro function, autocall macro, macro parameter, options statement, proc step, dictionary tables 16
29 Business Intelligence at Maine Medical Center J. Peter Chingos,
Rocket Wong
Maine Medical Center (MMC) is leveraging the power of SAS' data warehousing capabilities and SAS/ACCESS to integrate data from multiple sources into one location for analysis. This paper reviews the Business Intelligence (BI) infrastructure MMC has created to deliver information throughout the organization. Examples are presented of the SAS Information Delivery Portal; SAS Strategic Performance Management; Automated reporting using SAS Enterprise Guide and SAS Add-in for Microsoft Office sas enterprise guide, business intelligence, sas management console, excel, libname statement 19
30 Butterflies, Heat Maps, and More: Explore the New Power of SAS/GRAPH Susan L. Schwartz In SAS 9.2, SAS/GRAPH introduces the statistical graphics (SG) procedures. The SG procedures provide an easy way to produce commonly used analytical graphs. This presentation will demonstrate how to use these new tools to create butterfly plots, heat maps, risk maps, stacked plots, and other unique charts. Sample code will be presented so you can start building your own library of new charts. You will learn how to create paneled plots to compare results across multiple classification variables and overlay multiple plots onto one chart proc sgpanel, proc sgplot, bar chart, user-defined format 19
31 Clinical-Data Acceptance Testing Procedure Sunil Kumar Gupta In the pharmaceutical industry, there is a regulatory responsibility, 21 CFR Part 11, to analyze only the clinical data that has passed data acceptance testing or is considered 'clean data' after a database lock. Clinical data acceptance testing procedure involves confirming the validity of critical data variables. These critical data variables might need to be non-missing, consist only of valid values, be within a range, or be consistent with other variables. If incorrect clinical data is analyzed, then invalid study conclusions can be drawn about the drug's safety and efficacy. In 2001, the Data Warehousing Institute conducted a survey of over 600 business professionals. Across all industries, the survey results estimate that data quality problems cost U.S. corporations more than $ 600 billion per year data validation rules, clinical data, macro call, data cleaning, clinical trial, proc step, crf, adverse events, proc freq, macro parameter, raw data, statistical programmer, database lock, proc compare, where statement, macro definition 15
32 Common Sense Tips and Clever Tricks for Programming with Extremely Large SAS Data Sets Kathy Hardis Fraeman Working with extremely large SAS data sets - where the numbers of observations are in the hundreds of millions - can pose many challenges to the SAS programmer. Simple SAS code, including programs that involve basic DATA STEP programming and ordinary PROC SORTs, can become extremely difficult to run on such large data sets. Problems range from frustratingly long run times, exceeding available memory, and seemingly unexplainable and random I/O errors that cause previously working programs to crash unexpectedly. This paper discusses common sense tips and clever tricks developed in Base SAS to improve programming with these extremely large SAS data sets. SORT/MERGEs on large data sets can be avoided by a trick using SAS formats, and the SAS options SGIO (Scatter-read/Gather-write Input Output) and BUFNO can be combined to avoid I/O errors that sometimes occur when reading extremely large SAS data sets dataset, proc sort, proc step, error message, insurance claims, flag variable, reference data, sample 7
33 Competing with Analytics: The Case of a College Bookstore Sunil Kumar Gupta With the growth of online book stores, College Book Stores on campuses across the country are facing tougher times. If they cannot generate enough volume through sales of new and old books, their ability to provide many valued services and conveniences to students and local communities will be in jeopardy. The purpose of this presentation is to show how one College bookstore is using SAS in conjunction with EXCEL to structure and understand students' purchasing preferences. This, in turn, is helping them create new programs of value to students and increasing share and sales for the bookstore excel, dataset, proc step, predictor variable, proc sql, proc freq 14
34 Constructing a System for Tracking Revenue Generated from Dissimilar Projects Roger S. Cohen,
Paul Bastian
Organizations developing projects that generate revenue need a systematic way of m onitoring the results of those projects. Dissimilar projects often require widel y different methods for estimating or measuring the revenue they generate. This is cert ainly the situation faced by our team which develops tactical solutions to improve compliance with New York State tax laws. In this paper, we explain the system and procedures that we developed to automatically track and report revenue using a single database working in conjunction with an array of individualized SAS routines. This database is also linked with the database that we use to track project development and maintenance sql server, proc sql 6
35 Cryptography, The Art of Disguising The Written Word David W. Franklin "Can we hide or encrypt that variable somehow so that it appears as complete gibberish?" That was the question put to me on a Friday afternoon, which started the journey into what is known as Cryptography, the process of converting information into unintelligible goblygook and then taking that text and converting it back into its original form. This paper takes a look at cryptography, introduces monoalphabetic, polyalphabetic and transposition cyphers, and finally introduces key-based cypher that is considered to be the essential element in generating modern cyphertext. Emphasis will be placed on encrypting a single variable within a dataset, rather than a whole dataset as there are tools from SAS and third party software to do this task macro definition, frequency analysis 5
36 Customize SAS Output Files Using SAS Output Delivery System Li Liu,
Junjie Lu
As SAS programmers in the pharmaceutical industry, our primary job is to create statistical analysis tables and listings. In addition to company defined standard reports, we often work on an ad hoc basis. Our customers always have very special job requests for us; such as output files in special format, applying specific content layout, and using different fonts and special symbols to enhance the appearance of our product. That means we cannot fulfill the job simply by using SAS defaults or company's standard macro programs. When this occurs, we look for help from SAS ODS (Output Delivery System). SAS ODS is a powerful tool. It gives us a great flexibility to handle the output files in many ways. There are many useful features on SAS ODS that may not be familiar to many of us. This presentation will explore some of them in detail; such as control fonts, enhancing titles, and footnotes sas output, sample, proc template, sas log, proc step 7
37 Develop A Demographic Data Analysis Report System By SAS and Visual Basic Richard Zhou This paper describes how to use SAS plus Visual Basic software to develop an analysis report system, using clinical demographic data as the analysis data. The system consists of general statistical analysis processes, output reports which include three parts: (1) Statistical Summary (a text RTF file), (2) Analysis Graphs (a HTM file with drill-down information) and (3) Data Listings (an EXCEL file with the option of multiple worksheets). All process functions are integrated and located in one working window. The system tool is simple, efficient and powerful. Moreover, because this tool can be built into an executable file (.exe), it is user-friendly even to those who do not have SAS experience macro variable, excel, dataset, class variable, data science, character variable 13
38 Dummy Variables and the Relationship of Deaf and Hearing Growth Using SAS/GRAPH Richard Dirmyer,
Sara Schley
Historically, deaf education in the United States h as achieved poor results. An oft-quoted statistic i s that on average, deaf students graduating from high school (at age 18-21) perform at the level of hearing 8-10 year olds in terms of reading and writing skills (Allen, 1994; Traxler, 2000). In thi s research, deaf children and their hearing sibling s from a longitudinal database are tracked during their elementary and se condary school years. This presentation will focus on graphic displays of the longitudinal data, focusing on presenting indiv idual data points and sub-group regression lines on a single graph (here, one regression line for the deaf sample, and one fo r the hearing siblings), tracking their school prog ress from K-12. These displays inform statistical data analysis. Detailed examples of code will be shared, as well as insigh ts into the value of combining graphic displays with data analysis regression analysis, sample, binary variable 6
39 Early Detection of Epidemic Outbreaks and Financial Bubbles Using Autoregressive Models with Structural Changes Ernest S. Shtatland,
Timur Shtatland
This paper is a further development of our previous work presented at SUGI 2006, NESUG 2007 and SGF 2008. Our b asic model is AR(1) (first-ord er autoregression). This model emerges as a natural a pproximation of a classi c su sceptible-infectious-recovered (SIR) mod el. It inherits first principles of SIR models and can be used in both epidemiological and fina ncial applications for early detection of epidemics and financial bubbles. We co nsider epidemic outbreaks or financial bubbles as structural changes in the autoregressive coefficient in AR(1) models. We propose two methods of estimation of the autoreg ressive p arameter: least-sq uares and m edian-ratio ba sed methods, di scuss t he q uestions of bi as correction and confidence inte rvals construction. The value of our f irst-order autoregressive coefficient less than o ne corresponds to a station ary, no- epidemic/no-bubble re gime sample, confidence interval, time series analysis, bootstrap, ar(1), hypothesis testing, null hypothesis, significance level, sample size, unit root, normal distribution, autoregressive model, likelihood function, outlier, proc freq 15
40 Effective Problem Solving in Teams Fabian Robinson Have you ever been a part of a very talented team that solved a critical issue well for one circumstance and completely floundered for a somewhat similar problem in another case? In theory, this team has the technical and project management expertise to tackle many problems but fails when varied circumstances arise. If you can relate to this, you're not alone, and it's not necessarily the team and/or management's fault. It's quite simple if you view the problem as a moving target; we won't need Enterprise Miner, SAS statistical coding or a lot analytics to figure this out. The goal of this paper is to provide some good tips on how to improve the problem solving ability of a team. After all, the whole is only as effective as the sum of its parts problem solving, data mining 6
41 Effective Use of SQL in SAS Programming Yi Zhao proc sql, proc step, data step, relational database, macro variable, create table, inner join, sas programmer, foreign key, order by, key, sas function, full join, where statement 8
42 Extending the Power of SAS with Java Joseph Belice,
Kevin C. Harper,
Steven Schwartz
Combining SAS and Java can solve many difficult problems, however, combining SAS and Java is not a difficult problem. We need to understand the situations that will benefit from this combination, the bridging mechanism, and a style of Java programming that is easily supported by SAS programmers. We will use the SAS Macro Facility to allow our SAS programmers to use Java classes if-then-else, macro call, macro definition, excel, proc step, proc sql, macro variable, sas programmer, proc import, dataset, data validation rules, response variable, macro facility 20
43 Find Out What You're Missing: SAS Enterprise Guide for SAS Programmers Bill J. Gibson,
Chris Hemedinger
In this paper, you can read about the productivity gains that you can enjoy when you add SAS Enterprise Guide to your SAS programming toolbox. You will see how to perform old tasks in a new way as well as how to accomplish some tasks that would have been very difficult-if not impossible-without the benefit of an integrated tool like SAS Enterprise Guide. Topics in this paper include: Working with projects and the process flow Getting the most from SAS tasks Flexing your power with project prompts Conditionally running portions of your project * Noting a few things that you cannot do sas enterprise guide, macro variable, excel, sas programmer, proc report, sas log, sas programming, dataset, proc step, macro definition 11
44 Fitting Generalized Additive Models with the GAM Procedure in SAS 9.2 Weijie Cai Generalized additive models are useful in finding predictor-response relationships in many kinds of data without using a specific model. They combine the ability to explore many nonparametric relationships simultaneously with the dis- tributional flexibility of generalized linear models. The approach often brings to light nonlinear dependency structures in your data. This paper discusses an example of fitting generalized additive models with the GAM procedure, which provides multiple types of smoothers with automatic selection of smoothing parameters. This paper uses the ODS Statistical Graphics to produce plots of integrated additive and smoothing components proc gam, proc step, estimate, regression analysis, response variable, binomial distribution, proc genmod, data cleaning, logistic distribution 14
45 Four Thousand Reports Three Ways Stephanie R. Thompson How do you go about generating over four thousand PDF reports in up to three different versions? When a large, southern research university decided to add up to five optional questions per class section and up to five more questions at the prefix level to their core set of fifteen questions on the student evaluation of faculty survey, it seemed like a project that would never be completed. If the additional questions weren't enough, the reports were being revamped at the same time to improve their appearance for delivery on the web. Each report had a tabular section and two customized box and whisker plots. Thanks to ODBC / SAS Access, PROC SQL, macro, DATA STEP programming, PROC GPLOT, goptions, and ODS it all came together. This paper summarizes how each SAS component was used and contributed to the completion of the project proc step, proc sql, macro variable, sas enterprise guide, proc gplot, sql server 12
46 From Obscurity to Utility: ADDR, PEEK, POKE as DATA Step Programming Tools Paul M. Dorfman APP functions is an (unofficial) collective abbreviation for the SAS functions ADDR, PEEK, PEEKC, the CALL POKE routine, and their so-called LONG 64-bit counterparts - SAS tools designed to directly read from and write to the physical memory in the DATA STEP and SQL Procedure. APP functions have long been a SAS user dark horse. Firstly, the examples of APP usage in SAS documentation boil down to a few tidbits in a technical report, all intended for system programming tasks, with no hint how the functions could be used in plain data management SAS programming. Secondly, the note about the CALL POKE routine in the SAS documentation is so intimidating in tone that many a folk may have decided to avoid the potentially precarious route altogether numeric variable, character variable, sas programmer, temporary array, proc sql, length statement, data governance, variable list, dataset 19
47 From Play-Doh to Real Dough: Helping Students Develop Strong SAS Skills to Jump Start Their Careers in Analytics Elizabeth Ceranowski Analytics are everywhere. Businesses are drowning in data that seemingly double every year. Securing the future flow of students with the analytical skills immediately needed in the work place is a challenge. Companies that can recruit students prepared to contribute on day one have a competitive advantage in the marketplace. Students prepared to contribute with analytical skills on day one maintain a competitive advantage in the recruiting process. SAS has its roots in academia when the company was founded on the campus of North Carolina State University by Dr. Jim Goodnight, then a professor of statistics. Since its inception, SAS has strived to nurture students in their acquisition of analytical skills in order to fill the need for analytically savvy employees. SAS offers a variety of opportunities to support professors and students to teach and gain these skills sas programming, data mining, sas enterprise guide, proc step 7
48 Generate a Customized Axis Scale with Uneven Intervals in SAS - Automatically Perry Watts The conventional order clause in the axis statement for SAS/GRAPH software is well-suited for scatter plots with continuous data or line plots where discrete data are evenly spaced apart. However, accommodating discrete or- dinal data with uneven intervals requires a two-step approach. First, a hidden conventional axis with narrow inter- vals needs to be generated where ticks and labeling are turned off. Then the hi dden axis is overlaid by the un- even scale that is plotted from ANNOTATE. With ANNOTATE there is no need to hard-code formats or label ticks in an axis statement. Instead, full automation can be achieved by combining ANNOTATE with a few macros. A calling program, UnevenAxDemo.sas, is included in the paper. Also included are relevant graphics examples such as needle plots, box plots, uneven width histograms, and enhanced line plots that accommodate several class values. Associated macros and input data are stored separately in the NESUG proceedings macro function, histogram, ordinal variable 9
49 Get into the Groove with %SYSFUNC: Generalizing SAS Macros with Conditionally Executed Code Kathy Hardis Fraeman %SYSFUNC was originally developed in SAS version 6.12 to allow the incorporation of SCL (SAS Component Language, formerly Screen Control Language) functions into the SAS macro programming environment. Among its many capabilities, %SYSFUNC can determine the existence of a SAS data set, count the number of its observations, and characterize the attributes of the data set's variables. Using %SYSFUNC in a SAS macro can make the macro more flexible and general by allowing conditional execution of code based on the observed run- time characteristics of data sets and variables. %SYSFUNC can be used to conditionally execute SAS code in many types of macros, including those for data manipulation, statistical calculations, and report generation. A general data manipulation macro can use %SYSFUNC to automatically determine if the data's "key" variable is character or numeric and then execute the appropriate version of code appropriate for the data type macro function, dataset, macro variable, macro definition, chi-square test, nominal variable, character variable 8
50 Get your Census data for free. Bryan Beatty The Census Bureau provides a nice user interface to retrieve data from the 2000 census. However, if you want to analyze the data at a granular level such as Census block or you want to look at many different fields then you might find it easier to pull the data from the Census Bureau's ftp server. The Census Bureau provides all of their 2000 Census data free. This paper will show you how to get the zipped files from the Census Bureau's ftp server, unzip the files, and read them into SAS datasets all in SAS code macro parameter, macro variable, filename statement, dataset 6
51 Get Your Hands Dirty Cleaning Your Data with SAS Data Quality Server Faron Kincheloe The SAS Data Quality Server module brings the power of DataFlux into the SAS platform. This can be extremely beneficial for those who are already using SAS to manipulate and cleanse data. During this hands-on workshop, attendees will use SAS Data Quality Server to parse the elements of a name, identify duplicate names and addresses in dirty data, estimate gender, and standardize organization names. We will cover the syntax and parameters used for creating matches and standardization schemes. We will experiment with these parameters to show how they affect the data cleansing process. A real-world example will be presented to show the impact data quality has on decision making proc sql, group by, order by, proc step, create table, adam dataset, excel 17
52 Guido's Guide to PROC MEANS - A Tutorial for Beginners Using the SAS System Joseph J. Guido PROC MEANS is a basic procedure within BASE SAS used primarily for answering questions about quantities (How much?, What is the average?, What is the total?, etc.) It is the procedure that I use second only to PROC FREQ in both data management and basic data analysis. PROC MEANS can also be used to conduct some basic statistical analysis. This beginning tutorial will touch upon many of the practical uses of PROC MEANS and some helpful tips to expand one's knowledge of numeric type data and give a framework to build upon and extend your knowledge of the SAS System proc step, confidence interval, by group processing, proc means, null hypothesis, standard deviation, data science 11
53 HELP! - My MERGE Statement Has More Than One Data Set With Repeats of BY Values! Andrew T. Kuligowski Most users of the SAS system have encountered the following message: NOTE: MERGE statement has more than one data set with repeats of BY values. There are many papers in the Proceedings from past SAS User Group conferences that describe how to programatically force this "many-to-many" me rge to occur. These presentations are built upon the assumption that the user wants to merge datasets that have repeats of BY values. However, it is also possible that the coder did not expect this condition and wishes to avoid and eliminate it. This presentation will demonstrate a technique usin g a series of ad hoc programs that will isolate the observations causing the many-to-many merge, so that we can modify our underlying data assumptions, and hopefully eliminate this condition. MERGE Statement: Repeats of BY Values As previously mentioned, most users of the SAS system have encountered the following message: NOTE: MERGE statement has more than one data set with repeats of BY values merge statement, proc step, numeric variable, dataset, out=, proc means 5
54 Holy Emacs, Batchman! Sara Hickson Transitioning from one mode of operating to another can be challenging. This is especially true for the transition to Unix from a Windows/PC environment. The differences are immense, and the introduction to Unix and Unix script-ing can be quite a shock compared to the relatively intuitive interface of the PC. Although each environment has its own versions and added software, this paper will touch on the more universal challenges in this transition. This paper will present the differences and challenges in transitioning from a Windows/PC environment to a UNIX envi-ronment, and recommendations for follow-up resources. There are 3 major components that this paper will consider: batch mode versus interactive mode, available edi-tors, and introducing command line editing. Anyone working full time in SAS may deal with this transition at some point in their career, but this is targeted at a beginner level. Coders' CornerNESUG 2008 sas base, proc step 6
55 How Do I Love Hash Tables? Let Me Count The Ways! Judy Loren I love hash tables. You will, too, after you see what they can do. This paper will start with the classic 2 table join. Nothing new, you say? But this version does it in one step without sorting. And, it's the fastest method around. Next, you will see the use of hash tables to join multiple datasets on different keys in one pass, again with no sorting. How about unlimited recursive chained lookups (like when you need to update an ID through as many incarnations as it may have had)? Hash tables solve that one, too. And before you catch your breath, you'll see how to create n datasets from one (or more), where n is determined (at runtime) by the number of values encountered in a variable. No muss, no fuss. One step (well, OK, this one does require a prior sort) and you're done. We'll wind up with an outer join, just to show that hash tables can do that, too. Take a look at what they can deliver, and you'll be counting the ways you love hash tables before the year is out hash table, conditional do loop, hash iterator, pdv, do loop, dataset, out=, proc means, key 14
56 How to Ensure That Your First SAS Conference Is Not Your Last! Richard M. Mitchell You just got approved by your organization to attend a SAS conference and now it's "showtime!" What you do before the conference, during the conference, and after the conference is going to have a big impact on whether or not you ever get to go to another conference again. S e r io u s l y , organizations a r e ma k in g a n expensive investment when sending an employee to a conference and they are loo king to get a significant return on their investment. Th is pape r discusses how you can ge t the mos t out o f your SAS con fe re nce experience so that it is a win-win situation for both you and your organization. Concepts on developing and following through on a clear plan with specific goals are presented in this paper to help you ensure that your first SAS conference does not end up being your last! proc step, sample 10
57 Implementing SAS Enterprise BI Server at HUD Seth Marcus The mission of HUD's Office of Policy Development and Research (PDR) is to provide impartial analysis, advice, and policy recommendations to the HUD Secretary, other HUD executives, Congress, and the President on HUD's multi-billion-dollar housing subsidy programs. Considering the size and scope of these programs, PDR staff must analyze large, complicated, and disparate datasets and provide the information requested in a user-friendly format. Our challenge was to rapidly create an enterprise-wide SAS Business Intelligence platform, something unprecedented at HUD. It had to be accessible to, and shared by, multiple offices within HUD with different missions, planned usage, and data environments sas enterprise guide, excel 10
58 Introducing the SAS Code Analyzer Richard D. Langston,
Eric Thies
This paper introduces the PROC SCAPROC procedure, the SAS Code Analyzer that is new in Release 9.2 of Base SAS Software. We will examine the advantages of using the procedure, its syntax and phases of execution, and the output that the procedure can produce proc step, proc means 4
59 Is .1+.2 equal to .3? Shaoji Xu numeric variable, normalization 13
60 Just What the Doctor Ordered: Using SAS to Calculate Patient Drug Dose with Electronic Medical Record (EMR) Prescription Data Kathy Hardis Fraeman Electronic medical records (EMRs) are paperless digital versions of physicians' paper charts. EMRs can contain a myriad of health care information - including details of physician drug prescriptions - and research efforts with EMR data often include determining patient drug treatment patterns and dose modifications. Unfortunately, electronic versions of physician prescriptions are often as varied and undecipherable as their paper counterparts. Elements in EMR drug prescription data include the often unstandardized text name of the drug, and inconsistently used numeric variables indicating the number of pills to be taken at one time, the number of times per day the pills should be taken, number of days the pills should be taken, and dosage amount per pill numeric variable, proc freq, insurance claims, format statement, dataset, character variable 9
61 Look Ma, No Hands! Or How We Move SAS Into Microsoft Excel With No Manual Intervention John J. Cohen No matter how prolific our SAS processes or robust, detailed, and intricate our results, the seemingly-secondary task of providing output to our end users in some format other than standard SAS data sets and reports may un- dercut the perceived value of our otherwise brilliant work. So, porting results successfully to, say, the favorite end- user tool of choice in my environment - Microsoft EXCEL - becomes critical to successful completion of a project. In the circumstance of a one-off analysis, any manual cutting-and-pasting, formatting, and the like, is likely a criti- cal part of one's analysis anyway. However, if a project reaches a point of needing to be "productionized," general- ized across multiple sales geographies or therapeutic areas, updated on a monthly basis, or some other require- ment, the likelihood of moving SAS results into EXCEL using a substantially manual process with any degree of timeliness and accuracy is probably unacceptably small excel, sas output, proc step, xls, data cleaning, dataset, macro variable 6
62 Make the Map You Want with PROC GMAP and the Annotate Facility Michael G. Eberhart This paper describes how to use SAS/GIS and PROC GMAP to create presentation-quality maps of geographic data. Topics discussed include using U.S. Census Bureau TIGER/Line files for geocoding address data, using PROC GMAP and the annotate facility to display map datasets in a variety of formats, importing map files from other software products, and assigning geocoded cases to polygons based on spatial location. Additional topics include coordinate systems and map projections, PROC GMAP options that control appearance of maps, annotating polygon borders, creating and combining annotate datasets, using annotate macros (%maplabel), summarizing data and handling missing values, creating map output files using device options, loop processing with NULL datasets, replaying graphics with high resolution, and customizing map legends with legend options and annotating proc step, proc gmap, dataset 14
63 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, mo dify borders, add a flyover text box in ODS HTML, o r add GIF figures to the row or column headers proc tabulate, proc step 7
64 Managing your results with the DOCUMENT procedure Michael F. Tuchman The basic facility of the DOCUMENT procedure is to enable replaying of results later without re-running analysis. You will learn how to use the DOCUMENT procedure to save Output Delivery System output for later replaying, both in whole and in part. Replaying is not the only thing the DOCUMENT procedure can do. After reading this paper, you should be able to produce documents that list nicely so that other team members can quickly what each section of your the ODS output is supposed to communicate. Finally, you will learn how Document NOTES can further annotate ODS output for easier reading. PREREQUISITES Prerequisites from BASE SAS are few: The first is a basic familiarity with the SAS Output Delivery System, such as specifying output destinations. Of course, the usefulness of the DOCUMENT procedure will increase proportionately with your command of ODS. you should also know how to create and use permanent library references proc step, macro variable, proc tabulate, output delivery system, proc sql, sas base, sas output, sample, libname statement 16
65 Merging Data Seven Different Ways David W. Franklin Merging data is one of the fundamental functions carried out when manipulating data to bring it into a form for either storage or analysis. The use of the MERGE statement inside a datastep is the most common way this task is done within the SAS language but there are others. This paper looks at the seven possible methods, including the use of the MERGE statement, for a one to one, or one to many merge, introducing the SAS code needed to combine the data. No one method is better than another but some pointers will be given on choosing a method for your data merge statement, proc sql, hash table 4
66 Methodologies for converting Excel Spreadsheets to SAS datasets Karin LaPann Much functionality has been added to the SAS to EXCEL procedures in SAS version 9. In SAS version 8.2 there were some improvements, but one still had to do one of the following to make the EXCEL sheet readable: A) Save it as a "Microsoft EXCEL 5.0/95 Workbook (.xls)", with only one sheet per workbook. B) Save it as a comma delimited file "CSV (Comma delimited) (.CSV) and read in with input statement in a DATA STEP. C) Save it as text file "Text (Tab delimited) (*.txt)" and read in with input statements. This last form being readable only if you had no missing data in any columns. The example could be read directly by SAS using PROC IMPORT. However, the EXCEL spreadsheet could only have one tab, ergo the reason to save as EXCEL 5.0. The second and third examples could be read in with DATA STEP input statements. The third example was readable only if you had no missing data in any columns, as SAS assumes variables in sequential rather than positional order excel, dataset, input statement, lookup, proc step, sample, proc import 8
67 Motivating Clinical SAS Programmers Daniel J. Boisvert,
Andy Illidge
Almost every job advertisement requires prog rammers to be "highly motivated," and for managers to "be able to motivate othe rs." But what drives clinical SAS programmers? Clinical SAS programmers fill a unique void in the industry, and cannot be classified as either software developers or as statistician s. This paper will delve into the clinical SAS programmer in order to figure out his/her mo tivation, and stand as a guide for managers to inspire their program mers to new heights of achieveme nt and satisfaction. This paper will discuss general motivational factors, an d look at specific mo tivations of various classifications of clinical SAS programmers clinical sas, statistical programmer, sas programmer, clinical trial, adam dataset, cdisc 8
68 Multiple Adverse Event Tables without Surgical Intervention Adel Fahmy,
Carol Matthews
In clinical trials, one of the most import ant safety reports created is the set of Ad verse Event (AE) tables. One of the most common types of tables includes counts of event occurrence s and individual subjects by Body System and Preferred Term. While the basic statistics presented in this type of table is the same (counts and percents), those tables are being produced by different subsets. Most commonly these tables are produced Overall and then by Seriousness, Fatality, Severity, Relationship to study drug, Outcome, and Action taken. We present here a set of consistent ma cros that create all of the tables mentioned above with minimum effort on the part of the programmer. Simply by calling these macros and prov iding the standard variable names for Subject ID, Body System, Preferred Term, and any other related fields for which tables are required, a programmer can produce tables that can be used for both production and validation purposes adverse events, system organ class, macro variable, temporary dataset, sample, stored macro, create table, in=, proc step, data cleaning, proc freq 11
69 Multiple Facts about Multilabel Formats Gwen Babcock PROC FORMAT is a powerful procedure which allows the viewing and summarizing of data in various ways with- out creating new variables in the DATA STEP. The addition of the MULTILABEL option in SAS 8 has made PROC FORMAT even more powerful by allowing formats to have duplicate and/or overlapping ranges. This paper will give examples of the use of MULTILABEL formats with the /mlf option in PROC MEANS, PROC SUMMARY, and PROC TABULATE. In addition, this paper addresses what happens when MULTILABEL formats are used in other procedures or without the /mlf option. This paper also shows how MULTILABEL formats, like other formats, can be created from an exiting dataset. MULTILABEL formats are a valuable addition to any SAS programmer's repertoire proc step, proc format, proc means, proc tabulate, proc freq 8
70 ODS Graphics Editor Sanjay N. Matange SAS/GRAPH ODS Graphics Editor is an interactive GUI-based tool for editing and customizing plots created by the ODS Graphics system. With SAS 9.2, many SAS analytical procedures automatically cr eate graphical output. This video poster will demonstrate how you can edit and customize vi sual aspects of an output gr aph with this interactive tool. We will edit the title, add a f ootnote, reposition the legends, and change marker and line attributes. We will add free-form annotation to highlight the resu lts in the plot. Finally, we will us e the data label m anagement facility to control the specific dat a labels that are shown in the plot. The ODS Graphics Editor is particularly useful for making specific changes, highlighting outliers, or touching up a graph before publishing. The changes are saved with the edited graph, but they are not persisted if the original code is rerun proc robustreg, outlier 9
71 Optimizations in Marketing Mix Modeling 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 marketing mix, interaction effect 4
72 Orchestrating SAS Processes Using Business Process Management (BPM) Software Kimball Lewis Business Process Management (BPM) is a technology and methodology for controlling the activities - both manual and computer - needed to make a business function. BPM software is relatively new and highly sophisticated. This paper describes how BPM is used to fully orchestrate a complex series of SAS and human processes that together define the workflow for a key business process at a leading healthcare company. BPM is often associated with the orchestration of activities within a Service Oriented Architecture (SOA). In the example that will be described in this paper, the SAS processes run as SOA services. A brief introduction to SOA concepts will be provided. This paper should be of interest to those who want to learn more about the following: How to automate and orchestrate a series of SAS and other processes that together make up a business workflow insurance claims, health insurance 11
73 PC Tips for Mainframers Claudine Lougee Do you ever need to access, change, view, or edit data on the mainframe? Do you not like the mainframe or like logging onto the OS/390 environment for fear of getting "lost"? There are ways to help you avoid writing JCL code or submitting a job that will sit in queue waiting for CPU time. Even if you are an expert mainframe user, there are tips and tricks in the PC environment that will make your life easier proc step, proc export 3
74 Plotting Overall Mean and Individual Values in One Graph Jenny H. Zhang Using the SAS PROC GPLOT procedure to display multiple plots onto one graph has been proven a very effective data presentation tool. One particular application of this kind of tool is often seen in graphically summarizing pharmacokinetic (PK) data. Obtaining PK data through PK studies is a key early step in the new drug development process. It is a quantitative measure of drug exposure that is needed for the sound interpretation of non-clinical efficacy. In PK studies, the drug (chemical) concentration values from individual subjects as well as summarized overall subject mean concentration by certain time points are often required to be plotted together for better observation. Since the GPLOT procedure can only open one dataset whereas in practice, the overall mean and individual values typically exist in different datasets, some programming intervention is needed for conveniently plot the data proc gplot, sample, proc step 7
75 Post Processing Macro in Clinical Data Reporting Niraj J. Pandya Post Processing is the last step of generating listings and analysis reports of clinical data reporting in pharmaceutical industry and is the essential aspect of better presentable reports. In general these macros developed in SAS software are very flexible for repeated use and can work with varying needs of report presentation. Post processor macros generally take care of different formatting, display, and other presentation attributes associated with the report. There are various methods to generate and invoke the post processor macros. This paper discusses such methods to create, and effectively use the post processor macros in variety of reporting needs. The approaches suggested here include usage of global macro variables by resolving such variables in the post processor macro and development of post processor macro based on the report presentation needs. The paper also talks about aspects like flexibility, user control, and effectiveness of the post processor macro usage macro variable, proc step, proc report, clinical data, proc sql, data step, macro definition, character variable 7
76 Printable Spreadsheets Made Easy: Utilizing the SAS Excel XP Tagset Richard Andrews The SAS System offers myriad techniques for reporting on data within Microsoft EXCEL. Depending on the task at hand SAS Access or the Output Delivery System (ODS) might be good choices; Dynamic Data Exchange (DDE) or the old standby, Comma-Separated Values (CSV). This paper describes a method of creating multi- tab, print-ready reports using the EXCEL XP tagset available in version 9.1. This feature of Base SAS can greatly minimize the manual and repetitious task of preparing headers, footers, and various other formatting needs excel, proc step, proc print, ods html, sas base, footnote statement, proc report 13
77 Printing Avery Sticky Labels with SAS and LaTeX Adeline J. Wilcox SAS and LATEX can be used together to print sticky labels when there are too many labels to print with a point-and-click application. File folder labels needed to be created to organize production of 2010 Census questionnaires and other printed materials to be used in our decennial census. Printed materials were listed in a column of an EXCEL spreadsheet. After exporting the worksheet to CSV file format, I deleted unneeded rows with my favorite text editor, gvim. I read the CSV file into SAS, then wrote it out to an ASCII file containing L ATEX markup codes. In the LATEX users' literature on the Web, I found a paper with L ATEX code that I was able to modify for my purpose. The example code showed me how to read the ASCII file I wrote with SAS into LATEX . Running my L ATEX program successfully, I output a PDF file that, routed to the laser printer, produced sticky labels proc step, put statement 6
78 Proc Logistic Plus: The Power Of Variable Transformations Krishna Mehta,
Nitin K. Jain,
Varun Aggarwal
Logistic Regressions are used to drive analytics for a wide range of industry applications. In almost all of these applications, the focus of the analysis is to identify a list of targets with the highest possible accuracy. These targets could be prospects a business wants to acquire, or existing customers who are likely to respond to a promotion, attrite or default on a payment. Due to its focus on creating a rank ordered list of customers or prospects, predictive accuracy (lift) is the one of the key metrics to compare, when evaluating the quality of a logistic model. While logistic regression can be implemented by various procedures in SAS , PROC LOGISTIC is probably the most commonly used. Its popularity stems from the fact that it allows the practitioner to develop high quality models fairly easily logistic distribution, proc logistic, data transformation, logistic regression, proc step, regression analysis, data mining, binary variable 4
79 PROC LOGISTIC: Traps for the unwary Peter L. Flom Keywords: Logistic proc logistic, logistic distribution, proc step 8
80 Professional Graphics with SAS/GRAPH Samuel T. Croker Effective data visualization is perhaps the best tool for an analyst to get an idea across to a non-analytical audience. Unfortunately, too many SAS R⃝ users have subscribed to the notion that SAS/GRAPH can only produce substandard graphics. Learning a few simple principles of SAS/GRAPH will have you gener- ating production-quality data visualizations from simple SAS programs. First, you will see how to use SAS/GRAPH statements to draw your graphs correctly. Next, you will see how to manipulate fonts and other formatting options with the GOPTIONS statement. Then you will see how to use SAS graphic device drivers to deliver the graphical image in the best format for your application. Lastly, you will see how to export the graphics to files that you can use with other programs. All elements of this presentation are valid for SAS versions 8 and 9 data visualization, best. 5
81 PRX Functions and Call Routines: There Is Hardly Anything Regular About Them Kenneth W. Borowiak The PRX functions and call routines are a family of powerful tools to work with text strings. Introduced in Version 9, the PRX functions give you access to the Perl-style regular expressions to match, validate, and replace patterns of text. While many of the traditional character string functions (INDEX, TRANWRD, COMPRESS, etc.) and the LIKE operator can handle many of the trivial text matching and replacement tasks that come your way, the PRX functions shine in the face of the most complicated cases. Though regular expressions offer an immense amount pattern matching capabilities, this paper will cover only the basics of PRX. Keywords: regular expression, metacharacters, character class, alternation, anchors, word boundaries prxchange, proc sql 12
82 Purrfectly Fabulous Feline Functions Louise S. Hadden Do the following snippets of SAS code look familiar? length stcounty $ 5 citystzip $ 60; stcounty=trim(left(put(state,z2.)))||trim(left(put(county,z3.))); citystzip=trim(left(city))||', '||trim(left(statecode))||' '||trim(left(zip)); Now there's an easier way! Leave those vertical bars behind and join us as we explore the purrfectly fabulous feline functions (and call routines) available in SAS version 9.1 and above. Enhancements available in version 9.2 will be demonstrated cpu time, character functions, length statement 11
83 Quartile Conundrum Patricia Guldin,
Liping Zhang
Calculating quartiles is a common task that can be accomplished in multiple ways, but not all calculations return the same results for the same data. There are many definitions of a quartile as well as multiple descriptive terms (percentile, quartile). The challenge for a programmer is in determining which code to use. This paper will offer, to both new and seasoned programmers, the awareness that understanding what you are being asked to provide regarding quartiles is just as important as knowing how to provide it proc step, proc univariate 5
84 Reading Difficult Raw Data Matthew Cohen Raw data from outside sources is often messy and can be difficult to read into SAS . This paper will cover many of the features and creative uses of the INFILE and INPUT statements that make this task easier. It will also discuss using file and directory SAS I/O functions to add another level of flexibility. This is intended for beginner or intermediate programmers, or anyone who reads raw data into SAS. Since all of the examples in this paper are based on real situations, most require the use of multiple options column input, raw data, input statement 7
85 Regular Expressions: Finding and Replacing in the SAS Enhanced Editor Russell M. Lavery,
Kenneth W. Borowiak
proc step, sas programmer 4
86 Run SAS Code based on Filename extensions Shiva Srinivasan,
Shailaja Ramesh
Do you want to execute SAS processes based on the FILENAME extension? Do you want to know how to read the Windows dir structure information via SAS? You have come to the right place. This paper breezes you through some quick and slick SAS code that you can use to read the Windows dir structure, look through the directories, sub-directories, given a root and then finally process SAS code based on the FILENAME extensions. The paper uses SAS pipes, SAS char functions, SAS DATASTEP, and SAS Macro functionalities dataset, macro variable, macro definition 7
87 SAS Chaining Logic in One Step Ginny Rego,
Libing Shi
Event dates stored in multiple rows pose many challenges that have typically been resolved by lengthy SAS code. This is particularly true if the earliest start date, the final end date and the total number of event days must all be determined. This paper examines how to use a RETAIN statement in conjunction with FIRST.var and LAST.var processing to find and keep the earliest start date and final end date for an event. At the same time, DO loops and IF/THEN statements are incorporated to track the number of days the event occurred as well as any "gap" days , i.e. days between the start and end date on which the event did not occur. All this information can be obtained through one easy to use and understand DATA STEP data step, class variable 7
88 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 18
89 SAS Macro for Calculating Sample Size and Power on GLM Models with Correlated Binary Outcomes Qianyu Dang,
Patricia R. Houck,
Sati Mazumdar
sample size, sample, proc mixed, correlation, clinical trial, within-subject correlation, covariance structure 5
90 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 macro facility, proc step, autocall macro, macro definition, macro variable, macro function, macro parameter, %macro parameters, proc sql, dictionary tables, options statement 8
91 SAS Macros To Help Create Report Quality Tables in Word Documents Brendan Bartley,
Heather Ribaudo
This paper describes macros to enhance RTF output for reports. The first macro allows the user to move tables within a document and have the table numbering change corresponding to their location in the document. It also sets up bookmarks for reference in a report. Another macro eliminates all but the first section breaks in a RTF document. The last macro gives a table its own style name so that its formatting does not change when text formatting in the document changes. SAS Product: Base SAS, Skill Level: Any, Keywords: Macros, ODS, RTF, no_section, caption, bookmark, Wordstyle, Word field instructions, Word, \sect proc freq, proc step, ods rtf, title statement, %if-%then-%else, macro definition 10
92 SAS ODS Technology for Today's Decision Makers Sunil Kumar Gupta Have you ever wondered why there has been so much excitement about ODS ever since it was introduced? How does ODS significantly enhance the presentation quality of reports and create files that were never before possible from SAS? Have you ever thought about how ODS can directly improve your daily activities and what it actually has to offer you as a programmer, statistician or manager? If you have ever had any of these questions about ODS, then this presentation is for you because it provides something for everyone at all levels. As a programmer, you can now create most any file types directly from SAS. In addition, the level of control and flexibility to format the output enables a higher degree of customization. As a statistician, you will want to take advantage of ODS for more efficient data analysis. The tools available in ODS facilitate multiple iterations of an analysis and ease of locating significant results proc step, proc tabulate, proc print, excel, proc report, macro variable 16
93 SAS Program for Bivariate Growth Curve with Kalman Filter Amy E. Begley,
Qianyu Dang,
Patricia R. Houck,
Sati Mazumdar
proc mixed, fixed effects, correlation, covariance, likelihood function, maximum likelihood estimation, response variable 6
94 SAS Web Report Studio - Hands on Tutorial Angela M. Hall All steps necessary to create a report will be covered in the hands on workshop. First, attendees will be introduced to SAS Information Maps created from SAS Information Map Studio, which are the only data available to utilize within a report. New measures not currently existing within the SAS Information Map will then be created within a particular report. Report formats will be covered, including header and footer generation and layout. Attendees will also learn how to add graphs and tables as well as arrange them on the screen. This class is geared to users with little to no SAS Web Report Studio experience proc sql, sas management console 17
95 SAS/Graph Tidbits for Customization 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 5
96 Sensitivity Training for Building Better Bar Charts with SAS/GRAPH Software Perry Watts This workshop combines instructions for chart building wi th principles defined by the statistical graphics experts, Edward Tufte and William Cleveland. Step-by-step instructions are provided for building midpoint, group and sub- group charts that use the graphics principles to gener ate publication-quality output. Gratitude is extended to SAS Institute Inc. for granting permi ssion to use the DEPT data set from The How-To Book for SAS/GRAPH Soft- ware by Thomas Miron [4]. Besides learning the GCHART procedure, time is sp ent on looking at how the PATTERN, AXIS, FORMAT and LEGEND statements are incorporated into chart building. Instructions are also provided in the workshop for creat- ing a high-resolution graphics file and showing how it is transferred to PowerPoint for display. Even if you have minimal experience with SAS/GRAPH softw are, you should come away from this presentation knowing how to create a polished bar chart with GCHART bar chart, proc gchart, proc step, proc freq 15
97 Simplifying Psychometrics with SAS Charles A. DePascale,
Jennifer Dunn
"The point of evidence displays is to assist the thinking of producer and consumer alike. Evidence presentations should be created in accord with the common analytical tasks at hand, which usually involve understanding cau- sality, making multivariate comparisons, examining relevant evidence, and assessing the credibility of evidence and conclusions….The metaphor for evidence presentat ion is analytical thinking" - Edward Tufte There are countless statistics and procedures commonly used for describing, analyzing, and evaluating the qual- ity of large-scale, K-12 educational achievement tests. However, many of these psychometric analyses are com- plex, difficult to interpret, and not easily understood by policy makers and education official responsible for admin- istering the tests. Additionally, to a large extent, information provided by these statistics is static, making its use passive and limited proc step, proc gchart 10
98 Strategies for self-documenting programs Mark Friedman This paper describes the concept of a macro-based system to make SAS programs self-documenting for purposes of runtime information, output and environmental co ntrol. The system also helps create several global macro values that can be used to reduce error and standardize information. Using such a system can supplement other required documentation in an automated way. Examples of generated output will be reviewe d. The paper also shows several in-line code documentation concepts macro variable, sample 19
99 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 variables, 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 will 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, time-dependent covariate, proc step, regression analysis, hazard ratio, proc phreg, sample 17
100 Table Lookups: Getting Started With Proc Format John J. Cohen Table lookups are among the coolest tricks you can add to your SAS toolkit. Unfortunately, these techniques can be intimidating both conceptually and in terms of the programming. We will introduce one of the simplest of these techniques, employing PROC FORMAT and the CNTLIN option as part of our construct. With any luck, this will prove both easy-enough to program and more efficient to run proc format, proc step, lookup 5
101 Tales from the Help Desk 4: Still More Solutions for Common SAS Mistakes Bruce F. Gilsen proc sql, proc step, macro variable, length statement, retain, select, proc print, sas log, character variable, missing value, macro loop, %if-%then-%else, date variable 8
102 Talking Past Each Other? How to Communicate with Medical Writers When Preparing Clinical Research Manuscripts for Journal Submission Scott C. Thompson,
Stephanie R. Thompson
Clinical research manuscripts are often a blend of qualitative prose and quantitative data. And, the people who help the author(s) prepare each section - introduction, methods and materials, results, and discussion - are typically from very different parts of the research organization and have different backgrounds. Speaking a com- mon language makes the process easier. This paper will present some tips on how to improve communication between medical writers and SAS programmers, such as biostatisticians. Presented from both points of view, what does and doesn't work will be discussed in a point, counter-point fashion clinical research, p-value, confidence interval, sample, hypothesis testing, standard deviation, sas programmer, sample size 7
103 The DOW-Loop Unrolled Paul M. Dorfman 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. In its basic and most well known the DoW-loop is readily recognized by DO UNTIL (LAST.ID) construct, which naturally lends itself to control-break (BY-) processing of grouped data. However, is it significantly more morphologically diverse and generic. In this workshop, we aim to use the SAS DATA STEP debugger to interactively examine the internal logic of the DoW-loop and reveal its aesthetic beauty and immense pragmatic utility. I. DoW-LOOP: THE CIRCUITRY set statement, hash table, missing value, output, by group processing, dataset, automatic variable, data step, proc sql 18
104 The Great Escape(char) Redux Louise S. Hadden SAS provides programmers with many ways to enhance ODS output in addition to the use of both SAS -supplied and user-written ODS styles. In -line formatting of titl es, footnotes, text fields and table cells and formatting of data using user -written formats and within the DATA STEP can be accomplished by using ODS ESCAPECHAR. A quick overview of syntax for some of the many possibilities for enhancing ODS output with O DS ESCAPECHAR currently available in SAS 8.2 and 9.1.3 will be presented, including underlines, pre and post images, special functions, line feeds and super and subscripts. Some new features available in SAS 9.2 will be discussed proc format, proc step, output delivery system 16
105 The History of How, Who, Which, What, Where - Utilizing the SAS Trace Module! Jerry Alex For any organization that uses SAS software there are couple of questions that needs to be answered. How often is the software being used, who uses it, which SAS products are being used, from what terminal is SAS being accessed (ssh, web, sasconn), where exactly does SAS proves to be more efficient? And more often than not, these questions are not exactly easy to answer especially for those organizations that run SAS on multiple platforms. Although the SAS RTRACE feature can provide files that depict information about SAS usage within the organization, the feature is not effective enough to develop a pin-point accuracy of needed data. This paper exploits the RTRACE feature by using the SAS trace feature that parses, extracts and creates two master datasets using the output logfile generated by SAS -RTRACE module. This technique is an effective solution for SAS installations that require a statistical report of their usage of datasets proc step, proc contents 16
106 The Mighty Macro That Will Change How You Macro Marie Byrd Alexander,
Sharon Avrunin-Becker
Macros are designed to make your life easier. They help us to avoid repeating code over and over. They save us time and energy. But what happens when you have a SAS dataset that contains data for five sites, and you want to create individual reports for each site? Do you call the macro five times, specifying the site number that should be used each time? That i sn't so bad when there are only five sites. However, if there were 100 sites or 1000 sites, you could get pretty tired changing your macro call that often. This paper will introduce you to a macro that will read your dataset and generate a report regardless of whether there are 5, 500, or 5000 sites macro call, proc step, proc sql, macro variable, do loop 3
107 The Plot Thickens from PLOT to GPLOT Wendi L. Wright This paper starts with a look at basic plotting usi ng PROC PLOT. A dataset with the daily number of h its on three websites is used. The presentation contin ues with examples of how to create more informative and professional looking plots by adding titles, fo otnotes, and reference lines and changing the symbo ls, legends and axes. This is done in a step by step a pproach with examples of how the plot changes at each step. A look at PROC GPLOT is next using the same Web exa mple. The final plot created using PROC PLOT is compared with the same program run in the PROC G PLOT 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 state ment) proc step, proc gplot, title statement 22
108 The Rest of the Way There ... Creating Multiple Graphs on a Single Page Mary Buckwalter,
Terek J. Peterson
Have you ever felt like you have been left in the woods when trying to find solutions to your SAS coding problems? We all know using graphs to convey information is powerful, but producing the right one can be a bear. This paper will lead you through the trees to uncover dynamic solutions to creating multiple graphs on a page with a single title and common legend. This paper will also uncover interesting code gnomes that present graphs in high quality. This paper is for intermediate SAS users, even if the authors have the knowledge of a troll when it comes to SAS/GRAPH data step, macro parameter 6
109 The SAS Data Step: Where Your Input Matters Peter W. Eberhardt Before the warehouse is stocked, before the stats are computed and the reports run, before all the fun things we do with SAS can be done, the data need to be read into SAS. A simple statement, INPUT, and its close cousins FILENAME and INFILE, do a lot. This paper will show you how to define your input file and how to read through it, whether you have a simple flat file or a more complex formatted file input statement, infile statement, raw data, data step, sample, date variable, character variable, sas log, cpu time, delimited file, dataset 18
110 The SAS Terminator: An Ultimate Killer of UNIX Processes Houliang Li As a UNIX SAS user, you may not realize that when your SAS program terminates, whether voluntarily or by external force, it may leave behind one or more UNIX processes spawned by the now dead top level process. In fact, a SAS program can create multiple generations of processes. Merely killing the patriarch does not stop its children or grandchildren or great-grandchildren from running wild. This paper shows you how to safely and efficiently eliminate the entire lineage of UNIX processes started by your SAS program. In effect, you become The SAS Terminator. Now which killing mode gives you more satisfaction: methodically iterative or decisively recursive? macro variable, macro definition, proc sql, %if-%then-%else 8
111 The WWW of the WIKI sasCommunity.org Ray Cloutier What is WIKI? Why use WIKI? Who should use WIKI? This paper will explain the 3 Ws of WIKI and try to entice users to go out and create their own WIKI page. In addition to learning how to traverse WIKI pages, readers will learn how to create their very own WIKI pages and join the growing online SAS community of the future at sasCommunity.org 6
112 Things Dr Johnson Did Not Tell Me: An Introduction to SAS Dictionary Tables Peter W. Eberhardt SAS maintains a wealth of information about the active SAS session, including information on libraries, tables, files and system options; this information is contained in the Dictionary Tables. Understanding and using these tables will help you build interactive and dynamic applications. Unfortunately, Dictionary Tables are often considered an 'Advanced' topic to SAS programmers. This paper will help novice and intermediate SAS programmers get started with their mastery of the Dictionary tables. Ever needed a list of the tables (datasets) in a library? How about the columns (variables) in a table? Need to make sure you reset any titles after you run a report? Got some pesky warning messages in your SAS log you would like to clean up? Sure, you can look them up in the table and column properties in the explorer window. Or you can run a PROC CONTENTS and check the listing. And of course you can ignore the warnings and errors in the SAS log since they 'almost always appear' dictionary tables, proc sql, proc step, sas log, data step, sas programmer, sashelp, sas library 15
113 Time Series Analysis Using SAS - Part I - The Augmented Dickey Fuller (ADF) Test Ismail E. Mohamed The purpose of this series of articles is to discuss SAS programming techniques specifically designed to simulate the steps involved in time series data analysis. The first part of this series will cover the Augmented Dickey-Fuller (ADF) test of time series (stationarity test). The second part will cover cointegration and error correction. The SAS techniques presented in both parts can be used with the more complex SAS routines such as PROC ARIMA , which require a high level of research and analysis expertise (Bails & Peppers, 1982) time series analysis, regression analysis, unit root, time series data, dif function, null hypothesis, proc reg, stationarity, data step, lag function 6
114 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 9
115 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 19
116 Top Ten Reasons to Switch to Enterprise Guide (Say Goodbye to PC SAS) Heather Y. Seeno My love affair with PC SAS began on May 13, 1996, my first day of work as Data Analyst at a new job. After years of learning "just enough" JCL to run mainframe SAS programs, PC SAS was a delight. A Program Editor, Output Window, Log Window, File Explorer and command line all available at a glance! With Version 8 we gained an Enhanced Editor with color-coding and collapsible c o d e ! L i f e w a s g o o d . % I N C L U D E b e c a m e m y s t a n d a r d method of indicating the flow of SAS code throughout a project. PROC EXPORT and DDE bridged the gap to EXCEL. ODS meant I could share SAS output with non-SAS users. Then along came SAS Enterprise Guide. No need to use %INCLUDE now that we have process flows. DDE won't work. Why give up PC SAS? This paper outlines the Top Ten Reasons why SAS Enterprise Guide is the number 1 tool in my SAS toolkit sas enterprise guide, proc step, macro variable, where statement, sample, sas programmer, excel, proc freq, proc sql 15
117 Transitioning to SAS Enterprise Guide Michael Todd What are pros and cons of implementing SAS Enterprise Guide on a department-wide basis? This paper dis- cusses whether pharmaceutical companies can reduce development and validation costs with the power-assisted coding tools Enterprise Guide provides. Even though pharmaceutical companies have tremendous investments in traditional macro-based applications, this paper argues that the benefits of a validated code-generator like Enter- prise Guide cannot be ignored. However, costs involving learning curve and technical process conversion have to be considered sas enterprise guide, sas programming, pharmaceutical industry, proc step, proc sql, sas enterprise guide project, data cleaning, select 8
118 Tricks to Quickly Analyze and Graphically Represent Numeric Data 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 9
119 Try, Try Again: Replication-Based Variance Estimation Methods for Survey Data Analysis in SAS 9.2 Pushpal K. Mukhopadhyay Complex survey samples are constructed with selection schemes that affect the usual random assumptions, so SAS/ST A T software provides specialized procedures to analyze them: SURVEYMEANS, SURVEYFREQ, SUR- VEYREG, and SURVEYLOGISTIC for means, frequencies, regression, and logistic analysis, respectively . These pro- cedures all use the T aylor series expansion method for variance estimation, which is usually considered to be the "gold standard" when it is practical to compute. However, replication methods are also widely used in practice for variance estimation. Replication methods, such as the jackknife and balanced repeated replication (BRR), replace complex al- gebra with simple repeated analysis. They enable you to analyze the data without the original sample design, protecting survey security , and they ease the task of estimating variances for nonlinear quantities. With the release of SAS 9.2, the SAS/ST A T survey analysis procedures now also implement replication methods sample, proc step, proc calis, proc surveylogistic, regression analysis, dataset, health insurance, odds ratio, estimate, relative risk, label statement, proc surveyreg, missing value, proc surveymeans, sample size, proc surveyfreq, proc freq 16
120 Turn the Tables on Boring Reports with SAS 9.2 and RTF Tagset Options Louise S. Hadden SAS 9.2 offers new ways to create presentation quality RTF documents directly from the Output Delivery System (ODS). T his paper highlights a new technique to rotate column headers in tabular RTF output without post - processing in Microsoft Word or Open Office. Prior to SAS 9.2, this could only be accomplished using a post - processing macro within SAS. Now, rotating column headers can easily be accomplished simply by specifying RTF tagset OPTIONS. User -written special style functions will also be explored. Examples producing tables in 9.1.3 (using the post -processing macro and PROC TABULATE) and in 9.2 ( using the RTF tagset and PROC TABULATE, and the RTF destination and PROC REPORT ) will be demonstrated. Full code samples are available from the author upon request proc step, output delivery system 10
121 Understanding Why Physicians Choose A Certain Drug When Treating A Patient - What Product Attributes Matter Most Marc States With all the different therapies available to treat a medical condition, doctor s must evaluate how the different products perform on different treatment goals in order to select the appropriate therapy for a patient. This evaluation process is used to determine which product is best when treating a particular patient. This paper will discuss the collection and analysis of the treatment goal data. The data is collected on several treatment goals (attributes) for several different therapies (products). The data collected is for existing product s as well as future entrants into the market. This is done to not only analyze the current market but to also predict changes in the market as new products are added to the existing market basket. In order to properly analyze the data, the entire process is done as repeated measures using PROC GLM. The program computes means and compares the mean of the comparator drug with the remaining drugs, testing for significant differences proc genmod, proc glm, predictor variable, repeated measures, proc step, regression analysis, proc freq 5
122 User-Written DATA Step Functions Jason Secosky For years, users have asked for the ability to write functions in DATA STEP syntax. The day has come when this is possible. In SAS9, the FCMP procedure provides the ability to write functions using DATA STEP syntax. In SAS 9.2, these functions can be called from a DATA STEP. This paper explains how to write functions with PROC FCMP and how these functions are invoked from a DATA STEP. It also contains caveats when callin g PROC FCMP functions from a DATA STEP put statement, proc step, return, proc fcmp, file statement 9
123 Using Array, Formats and Macros to Unbundle Medicaid Fraud John Zheng,
Gary M. McQuown
Identifying unbundling fraud in Medicare and Medicaid medical claims data requires that potentially dozens of claims for a recipient be compared to an extensive list of unacceptable claim code combinations under various conditions. If any payment matches the unacceptable claim code combinations, an overpayment has been made. Given the requirement and the characteristics of the data, there are a number of potential issues. While the task was initially performed in PROC SQL, processing time was excessive and greater flexibility was desired. The chosen solution was to combine macros, arrays and formats in a single process to create an extremely efficient and flexible solution to a complex problem. The following discussion is designed for those already familiar with macros, arrays, functions and formats data step, normalization, proc sql, cpu time, proc step 12
124 Using DATA STEP MERGE and PROC SQL JOIN to Combine SAS Datasets Dalia C. Kahane This paper demonstrates import ant features of combining datasets in SAS. The facility to combine data from different sources and create a convenient store of information in one location is one of the best tools offered to the SAS programmer. Whether you merge data via t he SAS DATA STEP or you join data via PROC SQL you need to be aware of important rules you must follow. By reading this paper you will gain a deeper understanding of how the DATA STEP MERGE works and will be able to compare it to parallel PROC SQL JOIN examples. You may then select what is best for your own programming style and data situation proc sql, by group processing, proc step, create table, data merging, merge statement, full join, inner join, right join, data step, proc sort, where statement, error message 15
125 Using Formats and Other Techniques to Complete PROC REPORT Tables David D. Chapman Calculating the totals correctly is not the end of a PROC REPORT project, it is the beginning of the end. A key part of completing a table is to presenting the numbers. This paper discusses two parts of a table: cells and footnotes. Displaying cells with only numbers, with only symbols, and with both numbers and symbols are discussed separately. The use of standard SAS formats and user defined formats to display standard numbers and numbers truncated, rounded, and expressed to two significant digits is demonstrated. Compute statements are used to illustrate how to display table results to two significant digits and to add warning flags. When numbers are not enough, cell notes are needed. Cell notes are numbers or symbols that replace or supplement numbers in a cell. Examples of cell notes are symbols to represent missing data (NA), and values suppressed to prevent disclosure (D) proc report, proc step, missing value, proc format, proc tabulate, format statement, dataset, imputation, data step 12
126 Using ODS Object Oriented Features To Produce A Formatted Record Layout Suzanne M. Dorinski This paper uses the Fiscal Year 2005 State Library Agencies Survey to demonstrate the usefulness of storing the survey metadata in an EXCEL spreadsheet. The metadata were originally stored in a Word document, and not easily available to the programmer. When the metadata are stored in a spreadsheet, we can read it with SAS and have it available to produce the required database documentation. We can also produce the formatted record layout as RTF, which looks almost identical to the original Word document. To produce the formatted record layout, we use the new data _NULL_ ODS object oriented features experimentally available i n SAS 9.1.3. We note that when changes are made to the metadata in the EXCEL spreadsheet, they easily flow to both the formatted record layout and the database documentation excel, ods rtf, data step, dataset, macro variable, proc freq 17
127 Using PROC DOCUMENT To Modify PDF Bookmarks Generated by PROC FREQ Suzanne M. Dorinski In SAS 9.1.3, PROC FREQ generates several levels of PDF bookmarks automatically. If you have requested multiple outputs from PROC FREQ, the automatically generated bookmarks can be useful to distinguish among the outputs. However, if you are only requesting simple frequency counts for many variables, the automatically generated bookmarks can be quite repetitive. With PROC DOCUMENT, you can get rid of the bookmarks you do not want, instead of updating the PDF bookmarks manually proc step, proc freq, ods pdf, binomial distribution 10
128 Using Proc SQL to Run SAS Procedures on a Group of Datasets within a Single Directory Diana Ventura Sometimes it is necessary to analyze a group of datasets in the same way. In this case it makes sense to create a macro variable that represents the dataset names. PROC SQL DICTIONARY TABLES contains a variable named memnane. The memname variable can be read as a macro variable. The macro variable allows SAS to dynamically generate the dataset names so that SAS procedures can be run without typing the individual names of each dataset. This is a helpful utility that can be used to perform a wide range of SAS procedures with much less typing and repetitive code macro variable, proc sql, proc step, do loop, macro loop 4
129 Using SAS Software to Generate Textbook-Style Histograms Perry Watts Percent tallies associated with midpoint labeled in tervals define the basic histogram generated in PROC UNIVARIATE. However, most statistics textbooks display histograms with frequencies and endpoints rather than percents and midpoints. Frequencies are more descript ive, and endpoints are better suited for continuous data. With recent updates to SAS software it is now easy to generate a te xtbook histogram by using PROC UNIVARIATE. Enhancements to the textbook histogram such as a normal curve overlay and bar height labels are also easily managed in PROC UNIVARIATE. Unfortunately, the UNIVARIATE endpoints= option, new for Version 9.13 SAS, is restricted in form to <m TO n BY increment>. This means that plotting an n-bar histogram or a histogram wi th unequal intervals is only possible when the graph is developed from sc ratch in PROC GPLOT. A macro that works with any release of SAS soft- ware is provided that automates the production of GPLOT generated histograms histogram, proc freq, proc step, proc univariate, bar chart, proc gplot, normal distribution, relative frequency, proc format, proc gchart, macro parameter, %if-%then-%else 18
130 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 t he principles of using the SAS System to parse a fi le 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 input statement, named input, proc print, proc step, sample, conditional do loop, sas log, sas base, character functions, cpu time, end 14
131 Using the SAS XML Mapper and ODS PDF to create a PDF representation of the define.xml (that can be printed) Lex Jansen When submitting clinical study data in electronic format to the FDA, not only information from trials has to be submitted, but also information to help understand the data. Part of this information is a data definition file, which is the metadata describing the format and content of the submitted data sets. When submitting data in the CDISC SDTM format it is required to submit the data definition file in the Case Report Tabulation Data Definition Specification (define.xml) format as prepared by the CDISC define.xml team. CDISC has made a basic style sheet available on their website to display the define.xml in a human readable form in a web browser. However, this style sheet is not suitable to generate a paper-based presentation of the define.xml. This paper illustrates how the define.xml can be converted to Adobe's Portable Document Format (PDF) by using SAS/BASE software, and also how the define.xml can be transformed into relational SAS data sets by using SAS XML Mapper technology ods pdf, dataset, crf, proc report, annotated crf, sample, proc step, cdisc presentation 20
132 Wandering Cross-Reference Lines in PROC GPLOT Sharon Avrunin-Becker,
Marie Byrd Alexander
PROC GPLOT is an interesting and somewhat mysterious SAS procedure. New users of PROC GPLOT often find the procedure useful in producing simple graphs, but find it intimidating when trying to enhance and guide the visual interpretation of the graph. One type of plot involves the use of vertical and/or horizontal reference lines to emphasize the plotted points on the graph. Usually, when the horizontal (HREF) and vertical (VREF) reference lines are defined in the PLOT statement, a specific number is referenced to create the lines (e.g. HREF=10). What do you do if you have a graph where you want to have horizontal, vertical, or both, reference lines placed dependant on the data itself? This paper will demonstrate how to turn your reference lines parameters into macro variables and how to call the same PROC GPLOT routine to create unique and individualized graphs for each subject proc gplot, proc step, call symput, do loop 8
133 Wow! You Did That Map with SAS/GRAPH? Robert E. Allison,
Louise S. Hadden,
Michael S. Zdeb
SAS/GRAPH and ODS provide SAS program mers with tools to create customized, full color maps for a variety of uses. The production of useful, impressive looking maps using SAS/GRAPH is surprisingly easy, and can be accomplished with greater ease in SAS 9.2. This paper walks through the creation of a number of different maps using SAS 9.1 and 9.2 and shows some exciting new choices and possibilities in SAS 9.2 proc step, bar chart, proc gchart, proc gmap, macro variable, ods pdf, sas programmer 20

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.