HOME QUICK SEARCH AUTHORS KEYWORDS HELP BUGS

NESUG 2010 Papers - Index

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

# Title
×
Authors
×
Abstract
×
Keywords
×
Extras Pages
1 # or ## - how to reference SQL server temporary tables Xiaoqiang Wang This paper introduces the ways of creating temporary tables in SQL Server, also uses some examples to illustrate the use of SQL Server temporary tables from a SAS programmer's point of view. Some techniques discussed also apply for other relational databases (we pick SQL Server because its syntax on temporary tables is more flexible) and can be initiated from other database clients proc sql, sql server, create table, proc step 8
2 %whatChanged: A Tool for the Well-Behaved Macro Frank C. DiIorio macro variable, create table, order by, sas log, macro facility, out=, %if-%then-%else, proc sql, macro definition 14
3 A Benchmarking Technique to Identify Best Practices in SAS Tony Pisegna The term benchmarking is used widely across many indust ries and at a generic level it refers to the act of comparing a process or product against an accepted stand ard (a benchmark) with the intent of evaluating differences in measured outc omes in order to make info rmed decisions. In the cont ext of SAS, the ideology of benchmarking can be us ed to compare proced ures, functions and general SAS c ode on several measures of efficiency in order to ident ify and/or verify best practices. In this paper, an overview of the determinants of SAS program efficiency is provided and the design consider ations of a benchmarking technique using SAS code are discussed. The steps and SAS code used in this technique are illustrated within the context of comparing several efficiency-improving SAS coding principles cpu time, response variable, bar chart, predictor variable 14
4 A Few Quick and Efficient Ways to Compare Data Aileen D. Bennett In the fast paced environment of a clinical research organization, a SAS programmer has to frequently compare clinical trial data present in two data sets to validate results. This paper is intended to explore the various possi- bilities of comparing data using the COMPARE procedure, and get acquainted with the various techniques avail- able. Once these techniques are learned, the programmer will have a big impact on the data quality and be better equipped to meet the timelines of the clinical study. Generally double programming is done to validate clinical re search data presented in tables or derived data sets. The production programmer and the validation progra mmer independently write programs and compare the re- sults electronically. Some of the common problems are that the variables do not have the same name or the vari- able attributes are different or the values of the variables are different proc compare, macro variable, proc step, clinical research, sysrc, data cleaning 6
5 A Hercules of Programming - What is A Central Macro Library and Why John He This paper will introduce the basic idea, usage, management and maintenance of central macro library. There are many reasons for a user or a group of users to build a central macro library. The essential reason could be that it can bring the important value of proposition to the user and customer. A central macro library can be used to establish the productive environment across the business units or func- tionalities, to share the common programs, to set up the defined paths in production, to standardize the process or output, such as ODS template environment, to improve the quality and efficiency, and to meet the regulatory requirement. Creation of a macro library could be easy. But, development of an efficient macro library and then management of the library could be very challenging. A good central macro library will bring you the power and flexibility. How- ever, a bad macro library may bring you the duplication, confusion, inefficiency, or even error sas programming, imputation 6
6 A Macro to Make Table Templates Mark J. Mihalyo The scenario: Data must be placed in a table or chart design provided by the company or entity requesting the data. There must be no errors transposing the data to the required table. The solution sometimes can be as simple as creating a template in SAS that replicates the table the data must go into. That way the data is going directly to the source that can be added to the report and concerns go away with having to transfer any data from one place to another. Both the macro statement and the TEMPLATE pr ocedure are great tools in SAS. Using them together, however, can be very useful and provide a lot of the versatility needed when creating report tables macro variable, proc template, proc step, macro definition 6
7 A Mass Symphony: Directing the Program Logs, Lists, and Outputs Thomas Santopoli When executing programs in SAS, it is efficient to direct the development versions of log, list, and output files to a different location than the production versions. Development versions are typically executed in interactive mode. However, to ensure quality, production versions are most effectively executed in batch mode. There are innovative SAS programming techniques that can automatically direct log, list, and output files to various destinations based on whether the program is executing in interactive mode (development) or in batch mode (production). These destinations can be set dynamically, according to the relative location of the executable program in the directory structure. Additionally, it is often useful for logs and lists to be displayed in the interactive windows as copies are simultaneously directed to external files. This presentation will explain an integrated approach to applying these techniques macro variable, proc printto 6
8 A Practical Approach to Process Improvement Using Parallel Processing Viraj R Kumbhakarna In applications which process huge volumes of data for analysis purposes, it is often essential to minimize processing time to increase efficiency. Large data volumes (in the author's experience, row counts of 1.5 million and up to 2500 columns) result in very long processing times of about 4 to 5 days. It is often required to reduce the execution time for such processes. This paper discusses the following generic steps for improving any process. (1) Identify areas for improvement (understand the process thoroughly; analyze logs to identify steps which take the longest amount of time). (2) Look for certain processes that can be executed in parallel (actual parallelization of independent processes executed one after another; automated virtual multithreading; executing multiple in- stances of jobs in UNIX) cpu time, transaction data, proc step, dataset, proc sort, where statement, if-then-else, proc format, flat file, key=, parallel processing 16
9 A SAS Application to Identify and Evaluate Outliers Richard Hendra,
Paulette W. Staum
This paper presents an approach to outlier identification and evaluation that utilizes multiple SAS procedures packaged into a unified application. The output includes reports and plots, with information about extreme values, influence statistics, and the effect of outliers on a model of relationships among variables. It produces a compact, readable report for each variable of interest. The focus is on analyzing outliers within experimental research designs outlier, proc step, sample, proc glm, proc univariate, proc genmod, regression analysis, box plot, scatter plot, histogram, proc sgplot, interval variable, ods pdf, sensitivity analysis, proc reg, macro definition, %if-%then-%else 16
10 A Serious Look Macro Quoting H. Ian Whitlock You can make decisions macro with %IF and do looping with %DO-loops. But there are times when you don't understand why the beast does what it does. Now what? It is time to come to this presentation. It is time to take a serious look at macro quoting. I have often said that anyone who thinks macro quoting is simple, probably doesn't understand the problem; so I have been there. Now I want to explain how simple it is. Everything relevant to this paper is in BASE SAS. Although the examples have been executed on a PC under Windows, the examples are independent of any particular operating system with the exception of file definitions. You might think this paper is a compendium of all the macro quoting functions. It is not. It is more about the subject of macro quoting than about the macro quoting functions macro facility, macro variable, macro quoting function, macro put, macro function, put statement, &variable, macro call, %if-%then-%else, macro definition 13
11 A Side of Hash for You to Dig Into Shan A. Rasul Within the realm of Customer Relationship Management (CRM) there is always a need for segmenting customers in order to gain insights into customer behaviour and being able to use that information to better align customers with current and ongoing marketing strategies. This paper discusses a macro created using SAS version 9.2, which makes use of the DATA STEP hash object for the purposes of customer segmentation hash table, data step, do loop, customer segmentation, transition matrix, proc freq 7
12 A View Toward Performance Edward Heaton Often we need to preprocess our data through a DATA STEP before we submit it to some SAS Procedure. When our data are very large - billions of rows - this processing of reading the entire dataset, making the modifications to each row, writing the entire dataset back out to disk, and then reading then entire dataset back into the PROC can take a very long time. The author proposes the use of a DATA view to process the data one row at a time and then to send that row directly to the PROC for processing. With very large datasets the time savings can be on the order of 60% cpu time, dataset, proc step, proc freq, proc sql 8
13 Accessing the power & functionality of the MS Windows API via the JMP LoadDll function Matthew J. Flynn This paper will show and discuss JMP scripting code (JSL) examples to access the power & functionality of the MS Windows API via the JMP LoadDll function. Examples include accessing Windows environmental variables, controlling and positioning JMP windows, defining hot-keys, importing and exporting data to MS EXCEL, GUI auto- mation testing via sending keystrokes. For example, your JMP script can programmatically open an external file with the "ShellExecuteA" function: shell32 = Load DLL( "shell32" ); shell32 << DeclareFunction("ShellExecuteA",Convention( STDCALL ),Alias( "ShellExecute" ), Arg( UIntPtr, input, "hWnd" ), Arg( AnsiString( 20 ), "lpOperation" ), Arg( AnsiString( 256 ), "lpFile" ), Arg( AnsiString( 256 ), "lpParameters" ),/ Arg( UInt32, "lpParameters" ), / Arg( UInt32, "lpDirectory" ), Arg( UInt32, "nShowCmd" ), Returns( UInt32 ) ); //If the function succeeds, it returns a value greater than 32 dataset, informat statement 14
14 Acquisition and Management of Market Data for SAS Risk Dimensions Shankar Yaddanapudi SAS Risk Dimensions is an Enterprise Risk Management solution to help financial institutions manage their risk. To implement a market risk solution, SAS Risk Dimensions requires two major inputs, portfolio data and market data. The acquisition and management of market data presents a significant challenge in a typical SAS Risk Di- mensions implementation. Availability of accurate, up to date and relevant market data is essential for a successful implementation of any market risk system. The market data is used to price various instruments in the portfolio, and then risk measures like Value-at-Risk can be computed using either a Monte Carlo approach or a historical simulation approach. This paper describes a SAS based interface built to acquire required market data from Bloomberg. This interface allows a batch job to request and download market data automatically from the Bloomberg server every business day sas risk, market risk, flat file, cpu time, sas base, enterprise risk, sample 8
15 After SAS Performs the Surgery, Excel Applies the Make-Up: Making Healthcare Data Look Pretty Andrea E. Scott Sometimes we are asked to perform what is seemingly impossible: turn Healthcare data into a simple and understandable message. How is it possible to make Medica l or Pharmacy claims, or enrollment data look pretty? What better way to do this than by breaking the data down to its simplest form (not necessarily a simple task) then transforming the numbers into colors. Shading can be used to denote intensity of dosage or addition of claims plus enrollment; contrasts can be used to compare populations. There are times when words hinder the message. The visuals speak for themselves. Numbers aren't always the optimal way to communicate analytic results excel, proc step, insurance claims, health insurance, binary variable, insurer 5
16 An Animated Guide: An introduction to Poisson Regression Russell M. Lavery This paper will be a brief introduction to Poisson regression (theory, steps to be followed, complications and interpretation) via a worked example. It is hoped that this will increase motivation towards learning this useful statistical technique poisson distribution, poisson regression, regression analysis, likelihood function, maximum likelihood estimation, proc genmod, goodness of fit, proc step, response variable, binomial distribution 17
17 An Animated guide: Suggestions for coding standards Russell M. Lavery Coding standards are not a matter of st yle or professionalism. Coding standar ds, if enforced by management, are a great help in a company's goal to hav e programmers produce code that is inexpensive to write and to maintain. This paper is one programmer's collection of coding standards. It is intended to be a starting point for discussion within companies that lack standards and a resource for people starting a career as a SAS programmer. Implementing standards will cause the creation of 1) programs that are, in large measure, self-documenting and 2) a useful "outside of the program" document that describes the program logic. The above two points will create "well documented programs" and will: Simplify and enhance communication A llow faster program validation Provide "backup" for programme rs Reduce frustration and delays REDUCE THE COST, AND INCREASE THE ACCURACY, OF PROGRAM MAINTENANCE The 2010 additions to this paper are in suggestion 55 and the appendix proc step, data step, excel, proc sort, data validation rules, if-then-else, select, sas programmer, job security, macro parameter, permanent dataset, proc sql 24
18 An efficient way to create graphs in SAS 9.2: Utilizing SG procedures and GTL Yunzhi Ling In SAS 9.2, the new SAS/GRAPH SG procedures and the Graph Template Language (GTL) become production. The SG procedures, which are built on GTL, support a clear and concise syntax for creating many types of graphs. While the SG procedures are powerful, they do not cover all options in GTL and may not meet users' specific requirements. For a graph that is beyond the scope of the SG procedures, a customized graph template written in GTL syntax is a must. Through examples, this paper shows how to utilize the SG procedures and GTL simultaneously to create some common statistical graphs in clinical research proc step, proc sgplot, scatter plot, graph template language, bar chart, line chart, relative risk, proc sgpanel, adverse events 12
19 An Exercise Using PROC SURVEYREG and NYC HANES: Examining Social Support as a Predictor of Body Mass Index in New York City Jackie Lee You're a budding epidemiologist who has just obtained some data sets available on the Internet for public use. With several hypotheses already cooking up in your mind, you sit down to begin your data analyses. However, you realize that because these are survey data sets with complex designs, the traditional SAS procedures will not produce appropriate standard errors and confidence intervals . This paper will demonstrate how to an alyze survey data using one SAS SURVEY procedure, the SURVEYREG procedure. The relationship between social support and body mass index among New York City adults is examined using data from the New York City Health and Nutrition Examination Survey proc surveyreg, proc step, regression analysis, sample, predictor variable, cluster sampling, proc calis, proc reg, response variable, sample weight 6
20 An Introduction to Implementing Propensity Score Matching with SAS Kathy Hardis Fraeman A propensity score is the probability that an individual will be assigned to a condition or group, given a set of covariates when the assignment is made. For example, the type of drug treatment given to a patient in a real - world setting may be non-randomly based on the patient's age, gender, geographic location, overall health, and/or socioeconomic status when the drug is prescribed. Propensity scores are used in observational studies to reduce selection bias by matching different groups based on these propensity score probabilities, rather than matching patients on the values of the individual covariates. Although the underlying statistical theory behind propensity score matching is complex, implementing propensity score matching with SAS is relatively straightforward. An output data set of each patient's propensity score can be generated with SAS using PROC LOGISTIC, and a generalized SAS macro can do optimized N:1 propensity score matching of patients assigned to different groups propensity score, propensity score matching, proc logistic, proc step, logistic distribution, baseline characteristics, macro definition 12
21 Applying Metadata Attributes in Analysis Data Sets Using Macro Variables and Proc SQL in SAS Rita Tsang In clinical trials, we create analysis data sets from the case report form (CRF) data to enhance the efficiency of the statistical analysis. We may derive new variables in these analysis data sets. Metadata attributes such as data set labels, variable labels and formats are important and useful to users. Specific metadata attributes are often required as an industry standard, such as the CDISC Study Data Tabulation Model (SDTM), for the regulatory submission. The mapping process however can be cumbersome and manual. This paper will show you how this process can be made easy by using macro variables and PROC SQL in SAS. The SAS macro facility is a tool for text substitution. Using SAS MACRO to apply metadata attributes makes good sense. It can accomplish repetitive tasks quickly and efficiently. The automated process can ensure the accuracy of future updates macro variable, label statement, proc sql, proc step, macro definition, macro facility, cdisc 7
22 Are We There Yet? Nat H. Wooding Jr. The universal cry from the back seat can be heard in the office when one is running a SAS job that lasts more than a couple minutes and one doesn't want to monitor the computer to see when the job has ended. On a Windows computer, a simple SAS step can be used to give an audible warning of the end of the submitted block of code. Although the focus is having a Windows computer issue an audible sound at appropriate times, other notification methods both for Windows and other o/s are suggested very briefly do loop, macro variable 3
23 Automatically Converting Character Variables That Store Numbers to Numeric Variables Christopher J. Bost A character variable can store numbers, but many analyses require numeric variables. This paper shows how to convert character variables that store numbers to numeric variables. The DATA STEP, PROC SQL, and the SAS macro language are used to automate the pr ocess. The result is a new data set that stores all variables with the same names, labels, and order, but with character variables that stored numbers converted to numeric variables numeric variable, character variable, macro variable, dataset, proc sql, do loop, proc step, label statement, macro put, retain, input statement, set statement, missing value, rename statement, where statement, array, character functions, macro loop, order by, macro definition, proc freq, macro quoting function 13
24 Automating Comparison of Integrated Studies vs. Individual Studies Sandeep Kottam,
Sree Lakshmi Kalyani Tripuraneni
An analyst may be asked to compare an integrated study versus individual studies during the process of clinical data submission. The SAS macro facility along with metadata files with rules on how to compare can be used for orchestration of this process. The Rules metadata file contains information about study names, key variables to be used to compare each dataset and variables not to compare for each dataset. Focus on the metadata file will result in the tool providing meaningful output to review. This paper discusses the process and identifies how it provides confidence in the output excel, proc step 5
25 Automating SDTM File Creation: Metadata Files Speeding the Process Daphne E. Ewing For small to mid-size companies that cannot afford to purchase expensive tools to "automate" the SDTM file creation process, tools can be prepared to streamline this process. SDTM conversion can be complicated as clinical study nuances have to be built into the process. Metadata files that are built first by knowing what data are coming from the Clinical Data Management (C DM) system along with describing each CRF field as an SDTM variable begin the mapping process. Adding to these meta data files key information on how to transform the data from its source files into the resulting SDTM target variables round out the metadat a files. Clinical Databases do not lend themselves to creation of 100% SDTM compliant files, thus requiring some processing/mapping prior to having SDTM submission ready files. The use of metadata files makes it efficient to create utility programs that will ensure that there are no holes in the process of getting from the source data into the SDTM structure sdtm domain, controlled terminology, raw data, clinical trial, excel, data cleaning, cdisc 7
26 Binomial Reliability Using DATA Step Calculations Elizabeth A. Schreiber A client needed to assess the likelihood of finding a defect, given that one hadn't yet been found in thou- sands of tests. Standard binomial tables extend to 500 trials but this client wanted 5,000 or more. The formula cannot be calculated directly and even the numeric approximation was intractable given the avail- able hardware. These numbers even exceeded the capacity of SAS's combination and factorial functions. A review of publications extending back through 1964, the application of mathematical methods to sim- plify calculations, and a custom-written SAS DATA STEP led to an answer for the client … vanishingly small sample, confidence interval, binomial distribution, likelihood function 4
27 Black Belt Hashigana Paul M. Dorfman,
Marina Fridman
In SAS 9.1, the hash table, which was the very first object introduced in the DATA STEP Component Interface in SAS 9.0, has finally become robust and syntactically stable. SAS 9.2 has brought much more functionality, such as the ability to store duplicate-key entries and accumulate statistics. The philosophy and usage of the hash object are a radical departure from those of any other DATA STEP structure. Not only are all hash object operations, including its creation and deletion, performed at the run time, but most hash object operations run in O(1) time. Because of that, the dynamic flexibility and performance potential the hash object brings to the DATA STEP go far beyond anything a pre-hash SAS programmer could imagine possible. This paper assumes some familiarity with the basic SAS hashigana hash table, hash iterator, dataset, composite key, sample, proc sql, length statement, cpu time, group by, sas programmer, variable, proc step, sas log, temporary array, proc means 29
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, keyword parameter, %macro parameters, sas log, %if-%then-%else, error message, sysrc, automatic macro variable, symbol table, autocall macro, macro parameter, options statement, proc step, macro function, dictionary tables 16
29 By Your Command: Executing Windows DLLs in SAS Enterprise Guide Darryl Putnam Have you ever wanted to use system shell commands (copying and moving files, creating directories, etc) from SAS Enterprise Guide 4.1? SAS Enterprise Guide default installation turns off this functionality. You can re-enable the X command using -ALLOWXCMD, but do you really want anyone to be able to issue commands like "format C:\" on your SAS server? Luckily it is possible to run external DLLs from SAS under Windows by using the SASCBTBL Attribute table and MODULE family of call routines and functions. This paper will demonstrate how to setup the SASCBTBL table to call a select number of Windows DLLs. A brief description of MSDN library and how to turn the Windows function into SAS callable routines will be presented sas enterprise guide, filename statement 7
30 Challenge! Reading Mainframe Hex Delimited Flat File Where Each Line Has Different Layout Anjan Matlapudi,
James D. Knapp
This paper illustrates how to design an appropriate input program to handle a complex file layout using data collected from pharmacy and health insurance information about individuals. Various INFILE and INPUT options are illustrated in the process, and some related functions are considered. The input file is the output of a COBOL program pulling data from a DB2 database which is then brought to the PC via FTP. Each record contains 6 types of in formation, called segments, for a person. The segments and the fields within are divided by unprintable hexadecimal codes, which SAS represents with notations like the hexadecimal numbers 1E (Segment separator) and 1C (Field separator) respectively. A further complication is the use of 1D which is the group separator to separate r epeating segments. There are also groups of repeating fields within a segment. Since the fields do not have a fixed length and they may be missing on some records, there is no fixed record layout for the file list input, infile statement, input statement, dataset, formatted input, length statement 7
31 Clinical Trials Analysis & Reporting Performance Metrics Ellen L. Asam,
Donna Usavage
How does one define and measure performance metrics related to SAS programming? We will share our experience using a Design for Six Sigma methodology to define and develop a metrics system. Our paper introduces the major steps and tools we employed using the DMADV (Define Measure Analyze Design Verify) approach and describes the business considerations as well as the metrics we identified. Finally, we discuss our actual experience with the system and recent improvements. While our metrics system focuses on a SAS programming department supporting clinical trial analysis and reporting, the approach is not unique to SAS programming and can be applied to any business environment key performance indicator, sample, clinical trial 6
32 ClinicalTrials.gov: Creating an XML upload from SAS Daniel J. Boisvert,
Andy Illidge,
Troy A. Ruth
On September 27, 2007, a law was enacted requiring expanded registry of clinical trials, in order to support increased transparency. The law included a timeline requiring all clinical trial sponsors to register Phase II-IV drug and device trials to ClinicalTrials.gov in December 2007, report basic results for regis- tered trials in September 2008 and, most recently, post adverse event information by September 27, 2009. Enhanced result reporting is scheduled for September 2010. The increasing demands of this law has sent the industry scrambling to figure out a way to report the necessary results for thousands of clinical trials and millions of data points, in a short time frame. In most companies, responsibility for this task has been placed with Regulatory Affairs, who alone have tried to meet the challenges. Ideas such as outsourcing data entry, to hiring a huge team of data entry personnel have been floated around clinical trial, adverse events, phase ii 11
33 Condensed and Sparse Indexes for Sorted SAS Datasets Mark Keintz The standard SAS index normally can speed up data retrieval of subsets, but can be suboptimal for datasets sorted on the index variable. For large sorted groups the normal index wastes disk space by creating a "pointer" to every record in the group. This paper demonstrates a condensed index with pointers only to the first and last record in each group. Dramatic reductions in elapsed time, input/output, and disk space are realized. The paper will also show a "sparse" index for sorted data in which groups are relatively small but the index range is large (e.g. every millisecond over a span of days). When retrieving a subset of cases between a pair of values of the sort variable, an index that points to only a few selected records can also save disk space and elapsed time. The paper will show the SAS programs used to create, and make use of these specia l indexes index, set statement, elapsed time, cpu time, data step, sorted data, dataset, where statement, macro variable 16
34 Counting Drug Exposure in SAS with Interval Graph Modeling Xiaoqiang Wang This paper illustrates how interval graphs can be used as a model to simplify the calculation of the exposure to a certain number of drugs. The model also applies for variations of the counting problem exposure, raw data 10
35 Creating an Input Dataset to Produce Incidence and Exposure Adjusted Adverse Events Pushpa Saranadasa Most adverse event (AE) summary tables display the number of patients experiencing an AE in each treatment group and include a standard percentage calculation. This standard way of calculating percentage is the number of patients experiencing an AE divided by the number of patients who were randomized to a particular treatment. But in studies with long-term follow-up, this percentage calculation may not be appropriate because there is a potential for differences in the follow-up duration between treatment groups. A more appropriate measure under this scenario is the exposure-adjusted incidence rate. The exposure-adjusted incidence rate is defined as the number of patients with a particular AE divided by the total exposure-time among patients in the respective treatment group at risk of an initial occurrence of the event proc step, adverse events 8
36 Creating Graphs Simply Using SAS or R John R. O'Leary,
Jaclyn A. Scholl
SAS users are increasingly collaborating with clinical researchers and biostatisticians who rely on R as their pr i- mary tool for statistical analyses. Having the technical flexibility to use either software when creating exploratory or publication quality graphics can be very useful in especially in a team -oriented research environment. We offer some simple examples for common graphs such as bar graphs , histograms, scatter plots and survival curves coded in both SAS and R. By comparing the different approaches, we demonstrate how one approach may be advantageous to the other by needing fewer lines of code, while the alternative may offer greater flexibility when there is the need to manipulate even the smallest details of a graph. This paper will be valuable to experienced SAS users who want concrete examples of graphing tasks that can be accomplished simply in R, and hopefully to R users who may not realize some of the graphing tools avail able in SAS 9.2 histogram, bar chart, kaplan-meier plot 8
37 Creating Trellis Graph Using SAS Jane X. Liao Data visualization is an important first step in getting to know the data before any formal data analysis. It is sometimes desirable to combine plots from different data sets on the same graph. Multi-panel graphs allow one to view relationships between different variables in the data set. This can be done by overriding the conditioning specifications for a single trellis graph. Trellis graphs allow one to view relationships between different variables in the data set through conditioning. By using trellis graphics, one can view th e data in a series of panels where each panel contains a subset of the or iginal data divided into intervals of the conditioning variables. The trellis graph provides a level of detail in a multi-dimensional context with clarity and graphica l brevity. In this report, different techniques using SAS will be explored in creating a trellis graph proc step, scatter plot, proc corr, proc sgpanel, proc greplay, proc sgscatter, proc gplot 9
38 Date Conversions in SDTM and ADaM Datasets Lily Zhang,
Lili Chen,
Huei-Ling Chen
CDISC (Clinical Data Interchange Standards Consortium) has recommended using the SDTM (Study Data Tabulation Model) data structure to store source data, and the ADaM (Analysis Data Model) data structure to store data for statistical analysis and reporting. The SDTM IG (Implementation Guide) requires using the international standard ISO8601 format to store dates and times. The ISO8601 standard represents dates and times as text. However, dates and times in ADaM datasets are numeric. The purpose of this paper will be to answer how to convert a text date or time from source data into the ADaM date/time format and how to convert a numeric date or time to ISO8601 standard format. This paper provides simple and straightforward syntax and examples to illustrate the conversion methods. In addition, methods to impute the partial date or time are also discussed in this paper time variable, date variable, numeric variable, adam dataset, sdtm domain, input statement, datepart, imputation, raw data, sample, adverse events, character variable, cdisc 8
39 Delivering a Simple Randomization list using RTF MinJung Yoon In clinical trials, a randomization scheme is utilized to minimize bias and to balance the distribution of the known and unknown risk factors among the treatment groups. It is a method designed to ensure that healthy patients don't have a greater likeliho od of receiving a particular treatment versus another treatment. There are many papers sharing macros and programming codes to randomize patients in a complicated study design; however, this paper is intended to provide beginners a jump start on the basi cs of PROC PLAN by explaining each component to the procedure. This paper delineates different randomization methods, such as the blocked and stratified methods, and how to output the randomization list into a more user friendly format, such as RTF, using ODS. Readers will be able to prepare a complete delivery output of a randomization list with this information randomization, proc step, proc report, sample, clinical trial 5
40 Drivers Wanted: Zipping and Moving Along through SAS Marie Byrd Alexander,
Sharon Avrunin-Becker
A variety of organizations provide an Internet web portal as a quick and efficient way to gain access to data. In a clinical setting, a web portal enables sites the ability to download datasets and reports for data management activities. In some organizations, the SAS programmers are responsible for the creation of the SAS data sets and reports. Once these files are generated they are manually moved and zipped before posting to a live web portal. Normally, Windows Explorer and the WinZip Graphical Interface is used which can be repetitive and tedious depending on the number of files. Since SAS is used to create the files, we can use the X statement to run any operating system command from within a SAS session to zip and move files to a web portal. This paper will focus on using the X statement to automate the zip ping and moving of files through SAS and address security concerns macro definition, macro quoting function, macro variable, dataset 6
41 Educational Outcome Analysis Using Maine's Wage Record Matching System Bruce H. Peel As the research arm of the Maine Department of Labor (MDOL) , the Center for Workforce Research and Information (CWRI) extracts demographic and participation data from a variety of program and administrative data bases maintained by govern- mental, non-profit and education and training institutions. In a quest to secure outcomes data and formulate measures of ac- countability, these institutions and programs have entered into agree ments with CWRI to link their data with longitudinal data systems tracking employment, earnings and educational outcomes. By joining these data sets, CWRI is able to provide a rich- er, more comprehensive analysis in a cost effective manner. This paper discusses how SAS is used to provide this comprehensive analysis. A SAS application, the Wage Record Match- ing System (WRMS) imports all data into SAS libraries, matches demographic and lo ngitudinal data, and reports, in aggre- gate, outcome wage and employment information excel, record linkage, longitudinal data, time series analysis, proc export 10
42 ExcelXP on Steroids: Adding Custom Options To The ExcelXP Tagset Mike Molter The multitude of options available with ODS's ExcelXP tagset has allowed users access to dozens of EXCEL features when creating spreadsheets from SAS , but not all of them. ExcelXP is a SAS-made tool, but because it is a tagset, users have the ability to modify it. In this paper we'll discuss strategies for adding simple functionality to ExcelXP. Users of all levels will not only see the brief, intuitive tagset code used to produce the required XML for these specific examples, but will also realize the power over their output that this and other TAGSETS give them. Those with more experience with XML and tagset coding will learn a little more about the inner workings of ExcelXP as well as general strategies for adding any functionality to any tagset excel, proc step, put statement, xls, macro parameter, proc template, macro loop, output delivery system 15
43 Expanding PROC EXPAND Bruce F. Gilsen The EXPAND procedure, which is part of SAS/ETS software, provides many types of data transformation for time series data. This paper shows two examples where getting the desired results requires some manipulation of the data before or after use of PROC EXPAND: calculating an un-weighted quarterly average from monthly data and converting weekly data to a monthly average when the weekly data values represent values for seven days proc step, time series analysis, time series data, data transformation, date variable 4
44 Exploring the Dimensionality of Large-Scale Standardized Educational Assessments Using PROC FACTOR Jonathan Steinberg Large-scale standardized educational assessments are designed to test students in specific subject areas or to measure certain core competencies. Such assessments commonly have a large number of items and students fr e- quently receive sub -scores in these areas, yet these scores may not always correspond to the inter -relation of the test items. Educational researchers will regularly use factor analysis as a data reduction technique to understand a test's internal structure in relation to its design. Exploratory factor analysis (EFA) is traditionally conducted first on either a c orrelation matrix or a variance -covariance matrix. SAS has PROC PRINCOMP, which provides a simple interpretation of a factor structure, yet this procedure has limitations in dealing with the potentially complex structure of standardized test data. This paper will demonstrate how PROC FACTOR is a more useful procedure for carrying out an EFA on a hypothet i- cal large-scale standardized test in two ways proc step, proc factor, factor analysis, correlation, proc princomp, factor loading, scree plot, covariance, maximum likelihood estimation, likelihood function, sample, sample size 8
45 Facilitating Genetic Analysis: SAS, the NHLBI, and CARe Taylor R. Young Two common tasks for a SAS programmer are creating summary statistics and distributing data. Often, these are relatively benign tasks requiring only a handful of SAS statements but on the occasions when a large volume of data must be processed, writing too many of these statements by hand becomes inefficient and ultimately error prone. The purpose of this paper is to describe several techniques for summarizing and distributing a large number of SAS data sets and variables. The methods are discussed within the context of the National Heart Lung Blood and Sleep Institute's (NHLBI) Candidate Gene Association Resource (CARe) project which assembled genotype and phenotype data from more than 40,000 individuals across 9 longitudinal, epidemiological cohorts (Musunuru et al. 2010). To date, 862 SAS data sets encompassing 53,428 distinct variables have been made available to a community of several hundred CARe investigators. Graphics and Data VisualizationNESUG 2010 macro variable, proc sql, proc step, do loop, proc means, macro loop, proc freq, variable list, dataset, macro definition 7
46 Fancy Arrays: Fun and Useful for Analytical Data Marts Val Volovik The common notion is that the usage of fancy multidimensional arrays makes SAS programs difficult to read and understand. The truth is that they make work easier when used for the aggregation of variables from Analytical Data Marts, which are naturally organized as rectangular tables. This paper is intended to show how these scary creatures can be fun and easy to use data mart, macro definition 8
47 Find() the power of Hash - How, Why and When to use the SAS Hash Object John Blackwell The SAS hash object has come of age in SAS 9.2, giving the SAS programmer the ability to quickly do things never before possible within a single DATA STEP. This paper will demonstrate how easy it is to get started using the powerful features of the hash object and show examples of how these features can improve programmer productivity and system performance hash table, proc step, data step, set statement, proc sql, length statement, proc sort, cpu time, sas programmer 5
48 Functional Data Analysis on SAS system Le Yin Functional Data Analysis (FDA) is about the analysis of data in the format of curves or functions, more specifically, realizations of underlying random function with contamination. It provides an intrinsic solution for analyzing high dimension and low sample size (HDLSS) data, which nowadays is commonly encountered in statistical genetics and chemometrics, without dimension reduction as data pre-processing. In this paper, we present our implementation of FDA based on SAS system, which is originally implemented by Müller et al. (PACE) in MATLAB (1). As a first attempt in SAS community, this study starts with Functional Principal Component Analysis (FPCA) and Functional Linear Regression, which are core techniques for functional data analysis and fitting linear models for either sparsely or densely sampled random trajectories and time courses, via the PACE algorithm covariance, data science, sample, proc princomp, weighted least squares, data cleaning, sas programming 9
49 Get Connected - Attach To Your Data Sources Using SAS/ACCESS Laura G. Liotus In today's computing environment, having to connect to data sources besides SAS data sets is common. Community Care Behavioral Health SAS users have the need to connect to a multitude of data sources . These sources include SAS data sets and Microsoft products including SQL Server, Access and EXCEL. We also have Oracle databases and flat files . SAS provides many SAS/ACCESS engines to at tach to the se sources. For some of the sources, there are multiple engines to choose from . In addition to multiple en gines, there are various syntactical ways to attach to the data sources using an engine. In researching the various ways to connect to the data sources at Community Care, I had to contact SAS Support, search the SAS Support Knowledge Base and various other online resources. This paper compiles and demonstrates some of the ways we connect to data sources at Community Care using the SAS/ACCESS engines for which we are licensed proc sql, sql server, oracle access, odbc connection, libname statement, oracle, sql pass-through, excel 9
50 Get Multi-sheet Excel Workbook with STYLE using ODS Niraj J. Pandya Working between SAS and Microsoft EXCEL sounds like day to day job in clinical trials data reporting. But it becomes a bit difficult when SAS is not installed on Windows platform. Also generating an EXCEL file with multiple work sheets becomes a daunting task and demands great set of programming skills and technical knowledge. This paper explains how to generate multi-sheet EXCEL workbook that contains SAS output and how to control the appearance of data in EXCEL from SAS using styles. This paper also explains briefly adding an EXCEL formula in the resulting workbook from SAS code. This paper explains how to generate such EXCEL workbook with the use of XML support in SAS 9 using ExcelXP type of ODS tagset. Techniques explained here are useful irrespective of platform on which SAS is installed. Method explained in this paper generates EXCEL workbook that is compatible with EXCEL version 2002 and later excel, xls, proc print, dataset, proc step, by group processing, date variable, class variable, format statement 11
51 Google Maps and SAS/GRAPH A. Darrell Massengill Google Maps have become one of the most widely recognized means of handling maps and location data. This paper introduces a tool and shows you how to create your own Google Maps from within SAS and SAS/GRAPH. In addition, we will briefly discuss Google Maps and the legal and technical limitations and implications of using these maps macro variable, proc step, dataset 18
52 Happy Birthday! But ... How Old Are You, Really? Elizabeth Axelrod Chances are that at some point in your SAS career you've had to calculate age. There are various ways to do this, but one of the most common one s does not always produce a correct value. This paper presents several alternatives to calculate age, and illustrates what works most accurately - and what doesn't datepart, yrdif 6
53 How to Create an XML Map with the XML Mapper Wendi L. Wright You've been given an XML file and told to read it into SAS. You open this file and think to yourself "This looks like a huge amount of work". However, using the XML Mapper to create an XML map can take only a few minutes and then SAS will treat the XML file as if it is a SAS dataset. This presentation will take a look at an XML file and then will show how to create an XML Map for it using the XML Mapper. The XML Mapper is a really nice tool that makes it extremely easy to read an XML file into SAS. It even provides the SAS code you need to use this map to read in your XML file dataset, proc step 11
54 HOW to DOW Paul M. Dorfman The DOW-loop is a nested repetitive DATA STEP programming structure, intentionally organized in order to allow for programmatically and logically natural isolation of DO-loop instructions related to a certain break-event from actions performed before and after the loop, and without resorting to superfluous conditional statements. Readily recognizable in its basic and most well-known form by the DO UNTIL (LAST.ID) construct, which naturally lends itself to control-break BY-processing of grouped data, the DOW-loop, however, is much more morphologically diverse and general in nature. In this talk, we aim to examine the internal logic of the DOW-loop and use the power of example to reveal its aesthetic beauty and pragmatic utility set statement, hash table, missing value, output, by group processing, dataset, data step, automatic variable, proc sql 18
55 How to Think Through the SAS DATA Step H. Ian Whitlock You are relatively new to SAS and interested in writing SAS code. You have probably written DATA STEP code; some works, some doesn't, sometimes you know why, and sometimes you don't. If this describes you, then this talk is for you. You are an experienced programmer, new to SAS. The DATA STEP language looks similar to PL1 and has some characteristics that look like languages you are familiar with. However, after learning the syntax your code feels awkward and you feel like you are fighting the system. The DATA STEP has been very well designed, but it is different, and it is worth learning how it works, if you want elegant code, this talk is for you. Even people who have been SAS programmers who have been working with SAS for years should find, an "Ah ha, so that's why", in this talk. SAS is Step Oriented Before looking at the DATA STEP in detail, it would be good to take an overall look at SAS. SAS is a step oriented language rather than a routine oriented language set statement, dataset, infile statement, input statement, sas programmer, character variable, filename statement, length statement, merge statement, _eof_, decimal, libname statement, missing value, by group processing, if-then-else, sas output, put statement, array, formatted input, retain, trailing @, proc step 17
56 If You Have Programming Standards, Please Raise Your Hand: An Everyman's Guide Dianne Louise Rhodes When a new project starts, or a new manager takes over an old project, the programming team is faced with a new culture. Often, this means that they are asked to adhere to yet another set of programming standards, use style sheets, and are subject to peer reviews. This process is usually short lived, because of the lack of a practical approach to applying standards and enforcement and failure to budget time and resources in the project schedule. This paper goes through a step by step process of developing programming standards, classifying them and entering them into a database. This database can then be used to develop style sheets and check lists for peer review and testing. Through peer reviews and in preparation for them, programmers learn good programming practices. We describe in detail the most common standards; why and how they should be applied proc step, macro variable 8
57 Impact Analysis - The Smart Way George G. Mendoza Very often, Business Analysts and SAS programmers need to analyze the impacts of making changes to exist- ing tables, datasets, macro variables etc. In order to fully understand the impact of the changes it is critical to list all SAS codes that use or reference the objects (tables, datasets, macro variables etc.) that are changing. This paper describes an innovative method for listing all the impacted code macro variable, dataset 6
58 Improve Customer Retention by Answering Who and Why? Ward Thomas Customer attrition is a significant issue in many industries such as financial services, wireless, healthcare, and insurance. As companies work to acquire greater market share, they must also focus on customer retention in order to sustain that growth. To support customer retention efforts, organizations can apply data mining to behavior patterns of customers who remain loyal and those who defect. Predictive models can be built to periodically and systematically score customers for their likeli h- ood to leave. Armed with this insight, firms can target their r etention marketing budget to those customers with the greatest attrition risk. This is the traditional approach to answering the question, "Who?" is likely to leave. However, when faced with the question of "Why?", satisfaction studies and/or focus groups are commonly co nducted in order to learn why customers are dissatisfied sample, attrition, predictor variable, logistic distribution, customer retention, logistic regression, proc logistic, proc step, likelihood function, regression analysis, data cleaning 8
59 Improving a Graph Using PROC GPLOT and the GOPTIONS Statement Wendi L. Wright Starting with a simple SAS PLOT program, we will transfer this plot into PROC GPLOT and take a look at the many ways you can improve the look of the plot using SAS GRAPH statements. We will make the plot really shine by customizing titles, footnotes, symbols, legends, axes and even the reference line. At each step, a hands-on example will be presented where the user will choose their own features such as symbol colors and placement of the legend. In the end, you will have built your own personalized graph using the Title, Footnote, Symbol, Legend, and Axis statements proc gplot, proc step 20
60 Interactively Make Uniform and Reorganize Variables in a SAS Library Jay Garacani Datasets in a SAS library generally have some common variables. For instance a variable SEX in data set DEMOG may have a different name (like GENDER) in data set AE, or a common variable in a different dataset may not have the same length, format, informat or label. With the help of SAS 9.1 and Microsoft Visual Basic, we can reorganize all variables which do not have the same name, format, informat or length and make them uniform; also we can uppercase or lowercase all variables across the library. All operations are done interactively macro variable, hash table, sas log, call execute, %if-%then-%else 5
61 Introduction to Character String Functions Jason L. Ford Character string functions allow a user to manipulate character variables in a variety of ways. Users can create new variables out of parts of existing character variables, verify the contents of variables, find information within a variable, concatenate variables, and eliminate unnecessary blanks. This paper introduces a programmer to the functions in SAS that do these various tasks character variable, length statement, character functions, verify, index, tranwrd function 12
62 Introduction to Statistical Graphics Procedures Selvaratnam Sridharma SAS statistical graphics procedures (SG procedures) that were introduced in SAS 9.2 help you to create high quality statistical graphics. These procedures include SGPLOT, SGPANEL, SGSCATTER, and SGRENDER. The procedures SGPLOT, SGPANEL, SGSCATTER need only little coding. These procedures can be used to create most of the commonly used statistical graphics. Each procedure is created for different purpose. To create customized statistical graphics and layouts , you can use the PROCEDURE SGRENDER. To use SGRENDER procedure, you need to create templates using Graph Template Language (GTL). The coding for these templates may be little complicated. Here we illustrate some use of these procedu res through some examples. This paper also shows how to enhance the appearance of the graphs created by these procedures using ODS styles scatter plot, bar chart, proc sgplot, histogram, box plot, series plot, regression analysis 20
63 Know What You Are Missing: How to Catalogue and Manage Missing Pieces of Historical Data Shankar Yaddanapudi In certain applications it is necessary to maintain and update historical data on a periodic basis. However the data might be missing in one or more chunks, resulting in gaps in history. This might have an adverse impact on the performance of the application consuming the historical data, and typically various techniques are used to fill in these missing chunks. Before such methods are employed however, the number and size of the missing chunks need to be assessed to decide the appropriate course of action. This is important because the best course of ac- tion in the presence of few missing values scattered all over, might be different from the case when there are large number of missing values concentrated in few spots. This situation is common in Risk Management Applications. In this paper a situation is presented where it is critical to maintain a historical database without any missing val- ues missing value, proc step, proc mi, proc sql 5
64 Learn SAS in 50 Minutes Subhashree Singh SAS is the leading business analytics software used in a variety of business domains such as Insurance, HealthCare, Pharmacy, Telecom etc. Very often, business analysts and other professionals with little or no pro- gramming experience are required to learn SAS. This paper will explain the key concepts and the minimum know- ledge required to get started with SAS. The information presented in this paper will enable new SAS users to get up and running in a very short amount of time dataset, proc step, missing value, sysdate9, date variable, proc contents, proc freq 12
65 Let SAS Write and Execute Your Data-Driven SAS Code Kathy Hardis Fraeman Some SAS programming statements are based on specific values of data, such as the conditions given in IF… THEN…; ELSE IF…THEN…; blocks. If the values of the data are static and the number of data values is small, a SAS programmer can simply hard code the possible data values directly in the program. However, in instances where hundreds of data values need to appear in "IF… THEN…; ELSE IF…THEN…;" blocks, or if specific data values can change with different executions of the same program, then a SAS program can generate data- driven SAS code and immediately execute that code as part of the program, as long as the data values are in a SAS data set. This technique involves using DATA _NULL_ to generate the SAS code and then a %INCLUDE statement to immediately run the code SAS generated with DATA _NULL_ dataset, if-then-else, numeric variable, sas programming, character variable 5
66 Leverage Your Programming with Code Generation Paulette W. Staum Are you tired of writing the same code over and over? You don't need to do it! Usually macros will generate the code you want. Sometimes a query window or an Enterprise Guide task will write the code for you. There are other times when generating code requires more information than fits in parameters or task prompts. This pap er discusses techniques for those difficult cases. You can use the DATA STEP to accept any amount of information, with any special characters, without fear or worries. The DATA STEP has two methods of generating code. First, it can create a text file of SAS statements and execute the file with %INCLUDE. Second, it can use CALL EXECUTE to add statements to the program stack for execution after the step. Examples include applying externally supplied labels to variables and generating data validation reports based on rules in a spreadsheet call execute, dictionary tables, macro facility, txt, proc step, put statement, macro definition, sas enterprise guide, label statement, macro variable, proc sql, excel, data cleaning 16
67 LOG CHECKING: What to check and why? Sridhar R. Dodlapati,
Kiran K. Karidi,
Mahipal R. Vanam
Not all the messages in the log that pose potential problems get enough emphas is from all the programmers. Every SAS programmer need to know th e significance of some of the important messages in the log to avoid potential danger of ignoring them. After executing our SAS programs, it is obvious that we all check the corresponding log files to see if it has "ERROR" and/ or "WARNING" messages listed in the l og, as these are considered serious problems. However there are many other important messages that are listed in "NOTE" section that could pose potential issues such as "Uninitialized", "MERGE statement has more than one dataset with repeats of BY values" … etc, but many programmers ignore them, not realizing the m agnitude of the problems that can be caused, if these messages were not taken care off merge statement, data step, input statement, missing value, error message, macro variable, sas programmer, proc step 5
68 Macro - How and Why H. Ian Whitlock Time does not allow for a complete macro course; however, the student is provided with a complete course to finish at home. The course assumes that the student is familiar with some basic SAS (elementary DATA steps, PROC PRINT, etc.) and how to operate interactively with the display manager, but it does not assume any knowledge of macro. Some basic macro programming will be introduced during the hands on workshop. We begin with the idea of macro as a parameter driven unit of SAS code. The main example is drawn from a macro that generates SAS code for making test prints. Various features are added throughout the lecture with the student implementing and/or testing some of them to end up with a fairly useful little macro that also illustrates what macro is all about. If you complete the course you will end up having macros getting help from other macros to solve significant problems. Quentin McMullen has been a great help in developing and preparing an earlier version of the course macro loop, macro variable, proc print, proc step, put statement, macro put, macro definition, proc sql, %if-%then-%else, macro function 4
69 Macro for Computing Complier-Average Causal Effect of Treatment (CACE) Using Instrumental Variable Method Patricia R. Houck,
Sati Mazumdar,
Benoit H. Mulsant
It is common in clinical research to experience mis sing observations in a longitudinal trial due to dropout and nonadherence. The treatment effect from these trials may be biased. The complier-average causal effect of treatment (CACE) is considered to be a measure that corrects for this bias. Instrument al variables from a latent class model can be used to improve CACE (Dunn, Maracy, Tomenson, 2005). A SAS macro is developed and applied to a randomized clinical trial for the treatment of depression in the elderly (Mulsant et al, 2001) clinical trial, treatment effect, instrumental variables, randomization 3
70 Macros and Conventional Macro Variables: Effective Tools for Customizing Tabular Output in SAS ODS Perry Watts While it is understood that macro variables are referenced in ODS by using MVAR and NMVAR statements, macro programs can also play a vital role in ODS. To show how they work, the TABLETEMPLATE macro that generates a customized table in ODS is reviewed in depth. Looping in the macro eliminates the need for hard coding, and multiple ampersand macro variables (&&f&i) are used to insert data dependent text strings into a table. Pre and Post macro versions of the code are presented to emphasize the role played by macro programs in ODS macro variable, proc template, proc step 7
71 Make it robust and easier to maintain Mindy Wang In clinical trials and many other research fie lds, repetitive statements happen very often. This paper illustrates how to deal with the same task with three different approaches. The first approach uses simple copy and paste any SAS beginner can do. The second approach uses a simple macro program to make the task more efficient, and reduce the length of the program. To further improve the program and to make the program more adaptable to other projects, the third approach uses variable -dependent macros which minimize tedious typing, eliminate possible human errors, and ensure the accuracy of data macro variable, macro put 8
72 Making an RTF file Out of a Text File, With a Single Datastep David W. Franklin When converting a text file to an RTF file there are many solutions -- these usually involve either running SAS ODS RTF or a Microsoft Office VBA macro. This paper brings yet another solution in the form of a SAS macro where the text file is read in and output in a single SAS datastep, with relevant RTF codes added, the advant age being that the solution is often quicker than other methods txt, macro definition 3
73 Measuring Nursing Home Quality - The Five-Star Rating System Christianna S. Williams,
Louise S. Hadden,
Edward Mortimore,
Frank Nagy,
Michael Plotzke,
Alan White
Since 1998, the U.S. Centers for Medicare and Medicaid Services (CMS) has maintained a website, Nursing Home Compare, which provides detailed quality information about every certified nursing home in the country. In December 2008, CMS greatly enhanced the usability of the website by adding an easy -to-understand 5-star rating. Each nursing home receives one to five stars based on performance in each of three key qualit y domains (health inspections, reported staffing levels, and quality measures derived from mandated assessments of resident health and well -being) plus an overall quality rating. Calculation of ratings requires integration of information from both facility and resident -level data sources. SAS was used extensively in analysis to support the development of the rating system, and it is currently used to process data to refresh the ratings each month, based on newly collected data in each domain dataset, macro variable 12
74 Misquoting Jane Austen in the Name of Quality Assurance Deborah Posner It is a truth universally acknowledged, that a SAS programming task skillfully programmed, must be in search of proper quality assurance. - Misquoted from Pride and Prejudice A proficient programmer may not be an eager code checker. Have you ever heard a programmer announce that a task was completed, followed by someone else finding errors in the log, unexpected results, or (horrors!) no results at all? Have you ever been that programmer? The reality is that no matter how many times we say checking your work is part of the job, the tasks of programming and checking are intrinsically distinct. Virtuous programmers and their vigilant managers must determine the best way to accomplish the quality assurance task with regard to thoroughness and expedience. This paper outlines specific quality assurance tasks for programmers to include in their standard workflow missing value, proc step, character variable, numeric variable, create table, data step, proc format, quality assurance, full join, inner join, proc sql, sample 12
75 Modeling healthcare expenditures using PROC QUANTREG Klaus Lemke Provides an introduction to modeling healthcare expenditures using PROC QUANTREG. PROC QUANTREG is applied to person-level analytic files that are derived from healthcare claims data, and a model based on patient demographic and clinical characteristics is used to predict future healthcare ex- penditures. Also shows how to perform regression diagnostics with PROC QUANT REG. Concludes with an example of evaluating quantile regression model performance for high cost patients proc quantreg, regression analysis, proc step, estimate, sample, proc reg 7
76 Modifying Datasets and Documenting Changes in SAS Girish K. Narayandas There are instances when you want to modify some or all of the observations in a SAS dataset without entirely replacing the dataset. This can be conveniently done using the MODIFY statement. The MODIFY statement can not only change but can also replace, delete or append records in an existing dataset. As you modify a dataset, an audit trail created by the DATASETS procedure can prove to be very useful to track and document changes made to the original dataset audit trail, modify statement, transaction data, proc print, dataset, proc step 7
77 Modifying Insurance Rating Territories via Clustering Quncai Zou,
Ryan Diehl
In the United States, most property and casualty lines of insurances use territories to incorporate the geographical risk into their rating structures. The geographical rating territories in theory are based on homogeneous groupings of geographical areas. Based on expected levels of lo ss per exposure for each grouping, a rate can be determined. For many insurance companies, territory relativities are frequently updated because of loss experience or competitive market forc es; however, often territory boundaries have not changed significantly over the years. This is a problem of cluster analysis. Several procedures in SAS can be used to create a more homogeneous territory definition which is more commensurate with t he company's own experience. However, these clustering procedures do not naturally produce contiguous grouping s (i.e. groupings that only in clude geographic units that are adjacent to each other) pure premium, cluster analysis, macro function, macro definition, expected loss, insurer, property and casualty, sample, loss cost 13
78 Monitoring Dataset Quality Using Proc Format and A Reference File Hanadi Eltahir This paper describes how to identify the number and value of invalid or unexpected values in your dataset by using PROC FORMAT and a reference file to create a user -defined format. Creating a user -defined format from an ex- isting file is efficient in both reducing time and preventing errors associated with manually coding PROC FO RMAT statements. You may also use these formats to display your data with any of the SAS reporting procedures. Us- ing formats ensures that the dataset agrees with the reference file proc format, proc step 3
79 Multinomial and ordinal logistic regression using SAS Peter L. Flom Logistic regression may be useful when we are trying to model a categorical dependent variable (DV) as a function of one or more independent variables. This paper reviews the case when the DV has more than two levels, either ordered or not, gives and explains SAS R⃝ code for these methods, and illustrates them with examples. Keywords: Ordinal Multinomial Logistic logistic distribution, logistic regression, regression analysis, ordinal logistic regression, estimate, confidence interval, proc logistic, proc step 12
80 Multiple Methods in JMP to Interact with R Matthew J. Flynn This paper presents examples and discusses multiple methods to interact with the statistical package R from within JMP with increasing levels of complexity. Topics include: batch-file-based communication, Windows OLE/COM communications, socket communications, and using the "Load DLL" functionality within JMP 8+ to call base R functions as well as functions from within R packages. The new (fall 2009) JMP version 9 is expected to enable greatly increased functionality for accessing R beta distribution, probability distribution, sample 18
81 Non Printable & Special Characters: Problems and how to overcome them Sridhar R. Dodlapati,
Praveen Lakkaraju,
Naresh Tulluru,
Zemin Zeng
Non printable & special characters in clinical trial data create potential problems in producing quality deliverables. There could be major issues such as incorrect statistics / counts in the deliverables, or minor ones such as incorrect line breaks, page breaks or appearance of strange symbols in the reports. Identifying and deleting these issues could pose challenges. When faced with this issue in the Pharmaceutical & Biotech industries, it is imperative to clean them up. We need to understand the underlying cause and use various techniques to identify and handle them compress function, clinical data, clinical trial, data governance, character variable, options statement, macro definition, proc freq 13
82 Normalizing SAS Datasets Using User Defined Formats David D. Chapman Normalization is a database concept used to eliminate redundant data, increase computational efficiency and minimize data storage space. This paper discusses the normalization of data and how to do it with user defined formats and SAS datasets. Normalization and its characteristics are reviewed together with the basics of creating user defined formats. Examples are given that show applying user define formats to achieve the results associated with normalizing data normalization, foreign key, dataset, proc format, put statement, key, proc step 7
83 ODS Layout for RTF - A custom tagset Richard A. DeVenezia /g1/g2/g3/g4/g5/g6/g7/g1/g8/g9/g4/g10/g11/g4/g12/g4/g13/g14/g15/g13/g14/g16/g17/g18/g19/g20/g10/g16/g21/g4/g22/g15/g12/g20/g18/g14/g15/g4/g10/g21/g4/g3/g6/g3/g23/g4/g24/g25/g26/g4/g20/g27/g14/g16/g18/g28/g27/g4/g3/g6/g3/g4/g24/g25/g29/g25/g4/g4/g30/g14/g15/g13/g14/g16/g17/g18/g19/g20/g10/g16/g21/g4/g31/g15/g12/g21/g11/g4/g10/g20/g4/g10/g11/g4/g21/g16/g20/g4/g16/g22/g22/g10/g19/g10/g12/g32/g32/g33/g4 /g11/g18/g13/g13/g16/g14/g20/g15/g17/g4/g21/g16/g14/g4/g22/g18/g32/g32/g33/g4/g17/g15/g34/g15/g32/g16/g13/g15/g17/g25/g4/g4/g35/g15/g28/g12/g14/g17/g32/g15/g11/g11/g4/g16/g22/g4/g10/g20/g11/g4/g11/g20/g12/g20/g18/g11/g36/g4/g5/g6/g7/g1/g8/g9/g4/g10/g11/g4/g12/g4/g13/g16/g37/g15/g14/g22/g18/g32/g4/g20/g16/g16/g32/g4/g22/g16/g14/g4/g20/g27/g15/g4/g30/g35/g38/g39/g9/g40/g35/g4/g12/g21/g17/g4/g30/g2/g41/g4 /g17/g15/g11/g20/g10/g21/g12/g20/g10/g16/g21/g25/g4/g4/g38/g20/g4/g37/g10/g32/g32/g4/g32/g15/g20/g4/g33/g16/g18/g4/g42/g15/g12/g11/g10/g32/g33/g4/g31/g10/g43/g4/g28/g14/g12/g13/g27/g10/g19/g1 8
84 Ordering PROC FREQ around Jonathan Kerman PROC FREQ is one of the most widely used SAS procedures. The default output of PROC FREQ can compact- ly summarize large data distributions in one -dimensional, two-dimensional or multi -dimensional frequency tables. Yet the less er-known ORDER= option gives the user added flexibility in con trolling the order of the output . This paper will demonstrate use of the ORDER= option and its four sub -options, showing how yo u can order PROC FREQ to print the way you want proc freq, proc step 9
85 Outsourced Data Integration Project with CDISC SDTM and ADaM Deliverables Margaret M. Coughlin,
Christine S Teng
The Clinical Data Interchange Standards Consortium (CDISC) has established platform-independent data standards that enable information systems interoperability to improve clinical research and related areas of healthcare. Many pharmaceutical companies have started implementing CDISC clinical trial data models such as the Study Data Tabulation Model (SDTM) and the Analysis Data Model (ADaM). The purpose of this paper is to discuss some experience gained from working with a CRO on a data integration project that converts several studies into a common SDTM structure in support of eCTD and Integrated Summary of Safety analyses. As this is a relatively early project working with a CRO on SDTM integration, processes of working with CROs in this area are still evolving. This paper briefly describes important components that are recommended to be provided to a CRO in order to facilitate the process of mapping data to the CDISC data models adam dataset, sdtm domain, length statement, data cleaning, cdisc 11
86 Passing date ranges to Oracle made simple using SAS picture formats Santosh Kothamasu,
Jonas V. Bilenas
Passing date partitions to Oracle, using SAS date quoting functions and/or Oracle TO_DATE functions, can be confusing. A simple alternative is to leverage user-defined PICTURE FORMATS that utilize special data/time directives. Examples will show how easy and efficient this methodology is to pull data for single and multiple months from a date partitioned database table proc sql, proc step, create table, macro definition, sysdate9, macro quoting function, date variable, macro variable 3
87 Please Don't Lag Behind LAG ! Anjan Matlapudi,
James D. Knapp
A programmer may often overlook simple and useful functions and instead try to manipulate SAS code in different ways to solve a problem. One such function we use at PerformRx is the LAG function. LAG is an analytical function that can be used to get the value of an attribute of the previous row. This paper will discuss the appropriate usage of the LAG function and includes sample code. Additionally, this paper briefly covers the LEAD, INTCK, and DIF functions as well as the RETAIN statement and the EXPAND procedure lag function, proc step, proc sql, dif function, datepart, missing value, retain 12
88 Portfolio Backtesting: Using SAS to Generate Randomly Populated Portfolios for Investment Strategy Testing Xuan Liu,
Mark Keintz
One of the most regularly used SAS programs at our business school is to assess the investment returns from a randomly populated set of portfolios covering a student-specified historic period, rebalancing frequency, portfolio count, size, and type. The SAS program demonstrates how to deal with dynamically changing conditions, including periodic rebalancing, replacement of delisted stock, and shifting of stocks from one type of portfolio to another. The application is a good example of the effective use of hash tables, especially for tracking holdings, investment returns. 1. What is Backtesting and how does it work? Backtesting is the process of applying an investment strategy to historical financial information to asses the results (i.e. change in value). That is, it answers the question "what if I had applied investment strategy X during the period Y? hash table, proc means, proc step 7
89 Presentation Quality Bulleted Lists Using ODS in SAS 9.2 Karl M. Kilgore Business reports frequently include bulleted lists of items: summary conclusions from a larger detailed report, a list of next steps, listings of "Other" responses to coded response items, etc. Even when the bulk of an analytical report is produced by reporting tools in SAS, the bulleted lists and surrounding explanatory text are typically produced using another tool (e.g., Microsoft Word) and then combined with the quantitative report after the fact. This paper describes a simple yet powerful method for incorporating publication quality bulleted lists directly into SAS output using Output Delivery System (ODS) styles. Specifically, this method: 1) indents variable text after a bullet symbol and wraps multiple lines of text within a list item to the indentation point; 2) allows for an arbitrary number of indentation levels, using either consistent bullet symbols or symbols which vary by indentation level; 3) has the capability for blocks of normal text (i.e., without bullets) for, e.g proc report, sas output, proc step, macro variable, macro quoting function 8
90 PROC COMPARE - Worth Another Look! Christianna S. Williams PROC COMPARE is one of those work horse procedures in the Base SAS closet that deserves to be dusted off, tuned up and pressed into service again! With well-c hosen PROC COMPARE options and statements, you can compare pairs of SAS datasets at mult iple levels without the need for DA TA step MERGEs or SQL JOINs. Specifically, you can identify differenc es and similarities across SAS data sets with respect to: data set attributes; variable existence and attributes; existence of matching observations; and variable values (at user-specified levels of precision). This handy PROC can even be used to compar e values of one variable to another within a dataset. Additionally, several different reporting options are avail able and can be customized to project needs proc compare, proc step, missing value, character variable, dataset, numeric variable, sas base 26
91 PROC PRESENT: Write Your Presentation in SAS in as Few as Five Easy Steps Louise S. Hadden There is no reason to wait for SAS Version 9.3 and ODS PPT to create your presentations in SAS. Harness the power of ODS PDF, PROC TEMPLATE and PROC REPORT (as well as any graphic producing procedure) in SAS 9.2 to create eye-popping and easy presentations, without ever leaving your SAS program! The presentation of the paper will be written in SAS proc step, proc template 6
92 PROC SQL: Tips and Translations Gail Jorgensen,
Susan P. Marcella
SAS has always been an extremely powerful data manipulation language. The inclusion of PROC SQL in the SAS pack- age made a very powerful addition to the SAS programmer's repertoire of tools. However, for those of us who learned SAS before the addition of PROC SQL, the terminology and very different syntax of this procedure may be enough to prevent us from taking advantage of its flexibility and usefulness. There are several books that teach the concepts of queries, joins, and relational databases to instruct the novice user. This paper, however, is aimed at providing a clear explanation of the PROC SQL query by comparing it to the already-familiar DATA STEP, and will offer some tips and techniques for the types of situa- tions when PROC SQL can be particularly effective and useful proc sql, proc step, out=, select, sample, macro variable, full join, in=, right join, inner join, proc freq, missing value, create table, dictionary tables, if-then-else, where statement 23
93 PROC TABULATE - Building Tables With Style Michael G. Eberhart This paper describes how to build and customize tables using PROC TABULATE. Beginning with the code for a basic table, step by step instructions will be provided to expand and enhance any table with PROC TABULATE options and style elements. Topics discussed include the basic concepts of PROC TABULATE, classes and class levels, class data sets, row and column expressions, page expressions, formatting and style elements. Additional topics will include TABULATE statements to control keywords, labels, and analysis variables. Statistics that are available in PROC TABULATE, such as SUM, COLPCTN and ROWPCTN, and where they can be applied will also be discussed. Examples of PROC TEMPLATE code will be provided to modify existing SAS styles, and picture formats will be used to enhance table output. Steps to save enhanced tables in various formats using the Output Delivery System (ODS) will also be described class variable, proc step, proc tabulate, missing value, proc template, numeric variable, proc format, output delivery system, proc freq, format statement 17
94 Process Monitoring and Control of Semiconductor Production Tools Using JMP Peter Frankwicz,
Don Scipione,
Steven Coleman,
John Devlin
This paper will present data manipulation and statistical analysis across multiple data- base types and architectures using JMP. These methodologies generate advanced statistical process control strategies to detect and rectify semiconductor production tool deterioration. Examples of data analysis and presentation via JMP will be used to highlight the importance of comprehendible statistical analysis to high yield semiconductor manufacturing data science, proc step 10
95 Producing Listings and Reports Using SAS and Crystal Reports Krishna (Balakrishna) Dandamudi The SAS Institute has a long history of commitment to openness and ease of use in sharing data between SAS software and other systems. The software industry at large has seen a shift towards a more open data exchange; driven by the ease and low cost of data analysis and reporting tools such as Crystal Reports. The name "Crystal Reports" is a we ll-known name for many developers using the Microsoft Platform. Crystal Re- ports belongs to a class of programs that package formats and data into a report object. Programmers can set up a library of reports that clients can select and run. Some prepackaged reports prompt users for parameter values. A typical report generator builds queries of one or more databases. Changes in database contents change the overall result of the queries, and thus leadi ng to a change in the contents of the reports. This paper will demonstrate how listings and reports can easily be gene rated out of SAS datasets using Crystal Reports medical history, dataset, proc sql 18
96 Put Off By Writing Tedious PUT Statements? Automate It! Let SAS Do It For You. Daniel R. Bretheim dataset, txt 11
97 Quality Control: How to Analyze and Verify Financial Data Michelle M. Duan As SAS programmers dealing with massive financial data fr om a variety of data vendors, one major challenge w e are facing is effective and efficient quality contr ol. With data sources ranging from plain text files to SQL databases, from a few megabytes to several hundred gigabytes, it is critical for us to make sure the data we prov ide for our end users is consistent, reliable and up-to-date. This paper will provide an overview of techniques for an alyzing and validating financial data products, including check ing for uniqueness of key data items such as Compan y IDs, verifying if missing values or duplicate data entri es were introduced during the converting process, c omparing and confirming that any data addition, removal or chang es between vintages are within normal range, etc. D ifferent data steps and procedures will be used date variable, missing value, proc step, proc sql, sample, create table, raw data, proc sort, data cleaning 5
98 Reading MORE 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 include several case studies using SAS I/O functions and CALL EXECUTE. 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 raw data, column input, character variable, input statement, call execute, dataset, txt, attrib statement, filename statement, infile statement, list input 9
99 Revealing the Structure of Item Dependency with SAS CLUSTER and TREE Procedures in Educational Testing and Measurement Yung-Chen Hsu In the development of large-scale educational or psychological tests, identifying potentially dependent items is one of the essential tasks before further item treatments or additional psychometric procedures can be per- formed. For fast screening, several indices have been proposed to quantify the pair-wise dependency for each item pair. Items with relative strong dependency are flagged for further examination by content expe rts. How- ever, managing this practice is still time consuming, especially when many test forms are developed si multane- ously. This paper introduces the use of the CLUSTER and TREE procedures to reveal the dependency struc- tures. The graphical tree structure helps test development practitioners to lessen the ambiguity of inconsistence among different indices and to further reduce the number of flagged item pairs proc tree, proc step, proc cluster, proc freq, correlation 6
100 SAS Abbreviations Are Your Friends; Use a Template Method to Code! Elizabeth Ceranowski Often, coders find themselves using the same procedures or sequence of procedures over and over again. It would be very useful to create a "shell" of a procedure or program that can be used to cut down on repetitive typing. (For example, to submit the generic code "PROC PRINT; run;"). This quick demonstration will show how to create/edit/use SAS abbreviations to quickly interject code into the Enhanced Editor window in SAS for Windows or in the code node in SAS Enterprise Guide . This technique can be easily used by any level of SAS user from beginning to expert! sas enterprise guide, proc report, tranwrd function, proc step 11
101 SAS and open source tools for CDISC SDTM compliance checks for regulatory submissions Sandeep Kottam,
Peter Loonan,
Sree Lakshmi Kalyani Tripuraneni
Implementing CDISC SDTM standards to convert raw data for FDA submissions has become one of the main goals for pharmaceutical companies. Compliance checks of the CDISC SDTM data is also an important step in validating the conversion. Compliance checks are done using lines of SAS code and Metadata files to support this process. Compliance checks for custom domains can become a very tedious process to implement, requiring more information for metadata files used for compliance checks. This paper will discuss the benefits of using a third party tool and how it can be customized to both check the compliance of custom SDTM domains created using SAS and set up specific study or company based checks sdtm domain, data cleaning, cdisc 4
102 SAS Beyond Measure James Baker Your "work life" is a journey with diverging and converging pathways that require decisions about your career direction each step of the way. My journey includes the enlightenment discovered through others, through expanded learning, and through personal pathways of various degrees of difficulties. Multiple leadership characteristics and attributes require development and acknowledgement in order to become a successful manager and leader. In a quantitative world, it is easy to ignore the "softer" attributes required that are nearly impossible to define by metrics. This paper shares some of my experience transitioning from a series of technical programming positions through various levels of middle management to executive management. Primarily my career path followed a course in SAS programming-focused groups and departments in the pharmaceutical and biotechnology industries sas programmer, sas programming 7
103 SAS Code and Macros: How They Interact Bruce F. Gilsen macro variable, macro loop, do loop, macro facility, macro definition, proc step, rename statement, sas log, macro flow control, put statement, %if-%then-%else, &variable, proc sql, automatic macro variable, proc datasets, dictionary tables, macro put 10
104 SAS Email Data Driven Application Wenjie Wang,
Jade Huang,
Simon Lin
In the business world, emails are a common and relied upon method of communication. For people who work with SAS, the SAS EMAIL access method offers a convenient way to distribute a query result via email. This paper presents a useful technique on how to dynamically create the query report for the corresponding recipient and automate sending of a message with the attached file to numerous addressees on a regular basis. The targeted audiences are intermediate or advanced users of SAS. SAS Version 8.2 or 9.1, Windows XP Key Words: SAS, DATA STEP, FILENAME statement, EMAIL access method data step, filename statement, put statement, in=, macro definition 9
105 SAS Enhanced Editor: Efficient Techniques Kathleen J. Harkins Whether you are a novice or experienced SAS programmer, this paper will highlight time saving functionality available in the SAS Enhanced Editor. The focus of this paper is to provide an overview of keyboard functions and commands for efficient program creation and review. Keyboard short-cuts and SAS Abbreviations will be introduced as well as techniques for finding coding errors utilizing customized features of the Enhanced Editor proc step, proc sort 15
106 SAS Enterprise Guide: It's for Programmers Too! Rupinder Dhillon,
Marje Fecht
Have you been programming in SAS for a while and just aren't sure how Enterprise Guide can help you? It isn't just a pretty face! This presentation will demonstrate how SAS programmers can use SAS Enterprise Guide as their primary interface to the SAS system while maintaining the flexibility of writing their own customized code. We will look at navigating the views and menus using SAS Enterprise Guide to access your existing programs and enhance your processing leveraging the more complex built-in capabilities ava ilable in SAS Enterprise Guide to further enhance the information you deliver using Report Builder (new to Vers ion 4.2 of SAS Enterprise Guide) * adding Project Prompts and dynamic pr ompts, to generalize the usability of your programs and processes. We will also share best practices for working in a server environment. Version 4.2 of SAS Enterprise Guide will be used sas enterprise guide, bar chart, sas programmer, excel, dataset, sas log, proc print, macro variable, work library, proc step, temporary dataset 19
107 SAS Style Templates: Always in Fashion Cynthia L. Zender The syntax for style templates changed in SAS 9.2 and became much easier to use. With the new CLASS statement, there is no need to debate the use of the STYLE statement versus the now defunct REPLACE statement. Yes, the REPLACE statement has gone away, and now we have the CLASS statement. In addition, you can import a CSS file into a SAS style template. All of these exciting new changes add up to stylish and fashionable output using ODS style templates. This paper provides an introduction into the use of style templates in SAS 9.2. Methods of determining the correct style elements will be shown along with several concrete examples of making style template changes. The use of the IMPORT statement will also be demonstrated. In addition to these topics, a job aid will be provided that outlines the most commonly used style elements and their attributes proc step, output delivery system, proc freq, proc report, title statement, ods pdf, proc template, ods html, options statement 22
108 SAS System Options: The True Heroes of Macro Debugging Kevin Russell,
Russ Tyndall
It is not uncommon for the first draft of any macro application to contain errors. However, without debugging options, it is almost impossible to locate and correct all the errors in an application. Therefore, the first step in writing a macro application is to turn on the debugging options. This paper is intended for programmers at all levels who write macro code, and it concentrates primarily on three SAS system options that you can use to debug macros: MLOGIC, SYMBOLGEN, and MPRINT (our superheroes). In addition, this paper includes some less common options (the superhero sidekicks) that also display valuable information in the SAS log. These options can help you determine the source of many errors that can occur when you program with the macro language macro variable, %if-%then-%else, options statement, macro loop, sas log, do loop, autocall macro, macro put, cpu time, macro facility, macro function, put statement, character functions, sample, data step, if-then-else, macro definition, macro quoting function 12
109 SAS/GRAPH for the Absolute Beginner - and Hockey Fans! Jonathan Bartlett,
George Obsekov
title statement, proc step 17
110 Scheduling Programming Activities and Johnson's Algorithm Allan Glaser,
Meenal (Mona) Sinha
Scheduling is important. Much of our daily work requires us to juggle multiple activities in order to maximize productivi ty. In general, we strive to minimize the overall time required to complete a series of related tasks. Although this is a very complex topic, there are certain situations that lend themselves to closed form solutions. Johnson's algorithm is one approach that can often be applied. The algorithm is easily stated and understood, and can be readily implemented in SAS . In addition to directly helping with scheduling, the programming illustrates some interesting SAS capabilities, and the final code is very simple and straightforward data cleaning, elapsed time 7
111 See All, Know All: Using PROC DOCUMENT to Produce Integrated Data Set Documentation Jyothi Pabbaraju Most SAS programmers recognize the importance of documenting the data sets that are used in their projects. While SAS software has always provided a variety of procedures to document various data set characteristics and statistics, it has not been very easy to combine the various pieces of output into a single easy-to-use report. This paper describes a macro -based syste m for data set documentation that takes advantage of the ODS Document destination and PROC DOCUMENT to produce an integrated, bookmarked PDF report file that is useful, compact, and readable. The system provides several options to control the output produced, such as the number of observations to be printed for each data set. In addition, the system reports variables with missing labels, missing values and other data anomalies proc step, sample, proc freq, numeric variable, proc print, proc contents, missing value, macro conditional 17
112 Sensitivity, Specificity, Accuracy, Associated Confidence Interval And ROC Analysis With Practical SAS Implementations Ning Wang,
Nancy N. Zeng,
Wen Zhu
roc curve, confidence interval, type i error, data step, type ii error, sample 9
113 SGPANEL: Telling the Story Better Charles D. Kincaid SAS has a new set of graphics procedures called Statistical Graphics. They are built upon the Graphics Template Language (GTL) in order to make the powerful GTL easily available to the user. SGPANEL is one of the procedures that can be used to produce powerful graphics that used to require a lot of work. This upgrade is similar to the ease - of-use upgrade in output manipulation when ODS was first published. This paper will intro duce the reader to PROC SGPANEL and the new capabilities it provides beyond the standard plot. By using these new capabilities, any user can tell the story better proc step, numeric variable, proc format, proc sgpanel 17
114 Simulating Time Series Analysis Using SAS, Part III: Error Correction Model (ECM) Ismail E. Mohamed The purpose of this series of articles is to present a simplified discussion and SAS programming techniques specifically designed to simulate various steps in time series data analysis. Part I of this series discussed in detail the Augmented Dickey-Fuller (ADF) test of time series variables, a test for a time series' stationarity in a time series sample. Part II continued the discussion beyond the ADF and examined the concept of cointegration, a powerful econometric technique for investigating trends in time series and a sound methodology for modeling both the long and short run dynamics in a time series system. Each part presented simple SAS techniques that could be used to perform and accomplish these tests time series analysis, regression analysis, response variable, time series data, proc reg, proc step 7
115 Standardization of Reporting Digits: Significant Vs. Rounding Vikash Jain In clinical reporting one of the key components to standardiz e them is to make sure the digits values are presented with outlined formats as per specification documents on digits reporting and the mock shells. In order to achieve this objective various SAS methodological techniques are incorporated in our reporting algorithms which are dictated by digits rounding rules define in your specification document. As such this paper outlines such rules for significant digits reporting, rounding and further presents various scenarios case by case to differentiate between act ual value Vs. transformed value after we apply the specific digits rules for various reporting needs such as Summary Reports and Listings incorporating SAS9 functions and techniques within our programming algorithms to achieve this reporting objective. RO UND function is used to round a numeric variable to the nearest round -off unit. Based on the round -off unit, only the integer or decimal part can be rounded sample, numeric variable 7
116 Super Simple Macros to Make a Statistician's Life Simpler Peter L. Flom Macros can be a very complex topic, but some very simple macros can make life easier for a data analyst or statistician. I give a very basic introduction to macros from the perspective of a data analyst, and present some macros I have found useful. I include only certain types of macros, deliberately choosing the options I find easiest to understand and use. Again, this is a paper intended for statisticians and data analysts, not programmers. I am following the KISS principle: Keep It Simple, Statistician! Keywords: Macros Simple Statistics keyword parameter, %macro parameters 5
117 Survey Analysis: Options for Missing Data Paul Gorrell A common situation researchers working with survey data face is the analysis of missing data, often due to nonresponse. In addition to missing values for analysis variables, SAS excludes observations if the weight of any of the design va- riables (strata, cluster, domain) have missing values. This paper discusses two options available with the SAS survey procedures (e.g. SURVEYFREQ, SURVEYMEANS): the MISSING option and the NOMCAR option. The MISSING option is used with categorical variables to instruct SAS to treat missing values as a valid category. The NOMCAR op- tion (new with version 9.2) is used when the default assumption that missing values for analysis variables are missing completely at random (i.e. the group of non-respondents do not differ in any relevant respect from the group of respon- dents) is not appropriate. Use of the NOMCAR option instructs SAS to perform a domain analysis of missing and non- missing values missing value, proc calis, missing completely at random, sample, standard deviation, nominal variable, proc surveymeans, proc step 10
118 Table Lookup in SAS Weili Yang,
Fang K. Chen,
Liping Zhang,
Wenyu Hu
Table lookup or searching is a common task performed in SAS. Base SAS Version 8, as well as earlier versions, offer many lookup methods such as SET with KEY=, arrays, SQL joins, formats, and MERGE with a BY statement. SAS Version 9 introduced the DATA STEP hash object, which provides additional ways to perform table lookups without the need for sorting or indexing. This paper analyzes the programming details of the various table lookup methods and compares the advantages and disadvantages of each approach. The comparisons shown in this paper will aid programmers in selecting the optimal table lookup method to use, as dictated by their specific situation. Keywords: Table Lookup, Set with KEY=, Array, Merge, SQL, Hash, Formats lookup, hash table, set statement, proc sql, proc step, by group processing, composite key 7
119 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 conceptuall y 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
120 Take a Whirlwind Tour Around SAS 9.2 Diane Hatcher,
Robert Craige
The term "productivity" can mean a number of different things and can be realized in a number of different ways. The bottom line is that you are able to do your job well in the most efficient manner. SAS helps you to be productive in a number of ways, including fast performance, flexible capabilities, and powerful algorithms. But, for the end user, that's just one side of the story. The other side of the story is being able to ask the questions with the confidence to get the right answers when you need them. This means providing user interfaces that allow you to quickly access the power of SAS business analytics in a self-service manner. This paper takes you on a whirlwind tour of the client applications that help you be more productive. It's not possible to go into detail here of everything that is new in SAS 9, but it will give you a taste of what you can expect sas enterprise guide, sas management console, line chart, data mining 8
121 Techniques for Managing Projects Outsourced to Offshore CRO Margaret M. Coughlin,
Hong Qi
Outsourcing projects to Contract Research Organizations (CRO) overseas has become common practice in the pharmaceutical industry in recent years. This brings new challenges to project and resource management due to various circumstances uncommon to in-house studies or studies outsourced to domestic CROs. These circumstances include differences in skill sets, work experience, communication style, time zones, cultural norms, etc. In this paper, the authors discuss several techniques being used for functionally outsourced projects where the sponsor's process and procedures are required for the success of the project when working with an offshore pharmaceutical industry, clinical data 4
122 The 5 Biggest Challenges of ADaM Terek J. Peterson,
David C. Izard
Electronic submission of clinical trial documents and data continues to be a challenge for many companies. Legacy systems and processes, which work well and are efficient, have to be retooled to meet the needs of FDA and ICH requirements. While the implementation of the eCTD is maturing and the implementation of CDISC SDTM is now beginning to mature, the CDISC ADaM standard is still in the adoption stage for many companies. With many pharmaceutical and biotechnology companies making the business decision to wait until ADaM is more widely adopted or have analysis data in company specific standardized legacy formats, service providers and CROs are fully embracing the CDISC ADaM standard as the de facto analysis data standard in lieu of another analysis data standard and because of the seamless use of SDTM as the data source adam dataset, sdtm domain, raw data, metadata management, service provider, clinical trial, cdisc 11
123 The 5 Most Important Clinical SAS Programming Validation Steps Brian C. Shilling data cleaning, clinical trial, proc means, proc step, clinical data 6
124 The Next Generation: SAS/STAT 9.22 Maura E. Stokes,
Robert N. Rodriguez,
Robert Cohen
Caught up with SAS/STAT 9.2? Want to add even more statistical tools to your arsenal? Then get ready for the 9.22 release of SAS/STAT software. New functionality for postprocessing equips many linear modeling procedures with comparable capabilities, including the latest techniques for testing complex research hypotheses. The new SURVEYPHREG procedure fits Cox regression models to survey data. The EFFECTPLOT statement uses ODS Graphics to create plots of effects from models produced by the GENMOD, LOGISTIC, and ORTHOREG procedures. Exact Poisson regression is one of several new exact methods for categorical data analysis. Other new features include updated spatial analysis capabilities, classification variable support in the ROBUSTREG procedure, and model averaging in the GLMSELECT procedure. This talk provides an overview of these exciting new enhancements to SAS/STAT regression analysis, poisson regression, likelihood function, maximum likelihood estimation, estimate, poisson distribution, proc step, proc genmod, predictor variable, proc glmselect, binomial distribution, logistic distribution, proc mixed, negative binomial regression, sample, response variable, proc robustreg, proc phreg, proc calis, proc freq 20
125 The Nitty-Gritty of FDA Electronic Submission: A Programmer's Perspective Sandeep N. Beniwal Electronic submissions to the FDA (Food and Drug Administration) include critical elements like data, its description, data collection forms and statistical review material in the desired form. This activity in today's environment is done following the guidelines from CDISC (Clinical Data Interchange Standards Consortium) and FDA. This paper presents a few critical aspects of such a submission with diligent methods that can be adopted from a programmer's perspective in such a submission process. The paper describes simple but essential development and review techniques to make a submission fully compliant with the requirements of the regulatory agency. The objective is to provide to FDA the data and the information to understand it in the simplest manner following the largely acceptable and practiced standards prevailing in the industry. The content of the paper also covers conversion of information from one form to another, using Base SAS software proc step, dataset, proc compare, proc freq, raw data, do loop, proc copy, clinical research, clinical trial, data transformation, cdisc 9
126 The Past, Present, and Future of Clinical Data Standards Chris Decker One of Albert Einstein's many great quotes during his life included the following: ""The distinction between past, present and future is only a stubbornly persistent illusion". This quote is a perfect microcosm for data standards in the clinical research industry. Over the last decade the clinical research industry has attempted to work toward a common data standard with the goal of accelerating drug development by improving the data collection, transformation, analysis, and submission process. The adoption of industry wide standards has been lethargic and led to a plethora of challenges. This paper will provide a history of clinical data standards, the role of SAS in these standards, and a forward view on how standards might evolve over the next decade data standard, clinical data, clinical research, clinical trial, sas programmer, adverse events, data cleaning 10
127 The Philadelphia Story (Or the LUG at the RUG) John J. Cohen,
Robert Schechter
PhilaSUG (the Philadelphia Area SAS Users Group) has been called the best local user group in the most successful regional user group. This is most flattering, but we'll settle for being in the 95th percentile. Attendance at one time of 75 to 150 members at each of our three -times yearly meetings certainly suggests that we are doing something right. Is it our location (in the City of Brotherly Love, fourth largest media market in the nation, of Rocky and Ben, home of the Iggles and the Broad Street Bullies), the quality of our meeting speakers and topics, of our additional program components (web site, newsletter, e -newsletter, low annual dues, the gourmet lunches, or the dedication of our volunteers? And what doesn't work as well for us, what are our challenges and the issues that keep our President up at night? We will share with you ou r successes and failures and hope to both offer you insight as well as an opportunity for you to help contribute to our continued success sas base, logistic distribution 13
128 The Quest for Causation: An Introduction to Correlation and Regression Analysis Ian Stockwell SAS has many tools that can be used for data analysis. From Freqs and Means to Tabulates and Univariates, SAS can present a synopsis of data values relatively easily. However, there is a difference between what the data are, and what the data mean. In order to take this next step, I would like to introduce correlation and hypothesis testing using regression models and discuss how these methods can be used in evidence-based decision making. A brief statistical background will be included, along with coding examples for correlation and linear regression correlation, regression analysis, numeric variable, response variable, predictor variable, null hypothesis, estimate, anova, proc step, pearson correlation, proc corr, proc reg, standard deviation 9
129 The SAS Programming Experience in the SAS Drug Development (SAS DD) Environment - Comparing with the Regular SAS Programming Environment Amos Shu Average SAS programmers should be familiar with the regular SAS programming environment regardless of the Windows, UNIX, or z/OS (OS/390) Mainframe operating environments. SAS Drug Development (SAS DD) is a relatively new SAS system that is designed especially for managing, analyzing, reporting, and reviewing clinical research information. SAS DD resides on the UNIX operating environment, which is maintained by SAS Institute in Cary, NC. Its SAS program code editor is provided within the Process Editor, which is a Java application. Performing SAS programming work on the Java powered interface is very different from the regular SAS environment. This paper discusses the differences in all programming aspects (such as macro facility, flexibility, stability, and time consumption) between the regular SAS programming environment and SAS DD sas programming, macro variable, clinical research, sas programmer, macro definition, proc step 3
130 The Systems Development Life Cycle (SDLC) as a Standard: Beyond the Documentation Dianne Louise Rhodes Has your company adopted the Systems Development Life Cycle (SDLC) as a standard for benchmarking progress on a project? Have they developed Word and other templates for documents created during SDLC? In three of my most recent positions, the stress was put on completing the documents according to schedule, rather than emphasizing the work. The work involved cataloguing requirements, analyzing them and developing a good design document, and thoroughly testing the resulting code. When I first started programming in SAS, I was lucky to get any users requirements at all; it was always "I'll know it when I see it." But with the emphasis on the documentation, and not on the analytical work behind them, the project still falls behind schedule because of missed requirements excel, data cleaning 5
131 The Tips and Tricks: Using Greek Font and Hexadecimal code to get Special Characters in SAS/Graph Output in RTF Amos Shu Both Greek font and Hexadecimal code can be used to produce special characters. However, sometimes you may see unexpected results when using Greek font to get special characters with the default font type -Swiss. This paper discusses the tips and tricks of using the Greek font and Hexadecimal code to produce special characters in SAS graphic output 5
132 Tick-Tock, Watch the Clock: How Long Will This Take to Run? (aka. Making Information Maps and Web Report Studio Projects More Efficient) Fazal Davood,
Susan M. Jumper
Eager to use the new tools we'd been given, we quickly realized that carefully preparing our data for use in Information Maps and Web Report Studio was the key to maximizing efficiency and minimizing frustration. In an attempt to satisfy both our SAS administrators and our customers, our goal was to provide the most flexibility that Information Maps and Web Report Studio had to offer with the caveat that the project also return cpu time, time variable 12
133 Tips of Efficient Programming for Integrated Summary of Safety and Efficacy Changhong Shi,
Qing Xue
The Integrated Summary of Safety (ISS) and Integrated Summary of Efficacy (ISE) are essential components of a successful submission. In legacy studies where different types of data are frequently collected through diverse systems by various vendors, programming ISS and ISE analysis can be a daunting job because all study data need to be converted and harmonized to the same format before programming and analysis work can begin. Studies that utilize the Electronic Data Capture (EDC) system have similar structured views which can greatly ease the harmonization process. However, even though harmonization is limited there remain many unique challenges to be addressed by programmers in multi-study data integration for ISS and ISE. This paper discusses specific tips and techniques to efficiently program integrated analyses which focus on the following areas: (1) data source checking, (2) "spread and convene" programming approach, and (3) consistent data and folder structure proc freq, missing value 6
134 Tiptoe through the Templates Cynthia L. Zender Are you confused about the difference between style templates, table templates, tagset templates, and graph templates? Do you wonder how they're all used with ODS? This paper provides an overview of all the different template types and how they're used with the Output Delivery System. From style and table templates, that first appeared with SAS 7 to the newest graph templates that appeared with SAS 9.2, this paper will provide an overview and several concrete examples for each template type. Along the way, we'll also discuss the template garden (SASHELP.TMPLMST) where all the templates live, how to transplant your templates to a different garden, how to come up with your own new variety of templates (PROC TEMPLATE), and how to find your way to the new template garden (ODS PATH). New features of PROC TEMPLATE syntax (such as the IMPORT statement) will be highlighted proc step, proc freq, proc template, proc means, ods html, proc print, proc report, sas log, ascii, ods pdf, sas output, txt, output delivery system, sas enterprise guide 27
135 To FREQ, Perchance to MEANS Christopher J. Bost Should you run PROC FREQ or PROC MEANS on a vari able-that is the question. This paper shows how to use the PROC FREQ option NLEVELS to determine the number of levels of each variable and then, based on a user-supplied cutoff, run either PROC FREQ or PROC MEANS. The Output Delivery System and macro variables created with PROC SQL are used to automate the process proc step, proc freq, macro variable, dataset, proc sql, proc means, output delivery system, character variable, proc print, where statement, nominal variable, interval variable, numeric variable, create table, select, macro put, sample 11
136 TRACKING DATASET DEPENDENCIES IN CLINICAL TRIALS REPORTING Binoy Varghese,
Satyanarayana Mogallapu
Most clinical trials study reporting involves creation of analysis datasets from raw data. Analysis datasets function as an intermediate point where complex computations ar e performed on raw data and stored for later use in tables, listings and graphs. Depending on the complexity of the study and the endpoints being analyzed, these datasets may have to be created using not only raw data but also other analysis datasets. If there are a large number of analysis datasets in a st udy, it is not only time consumi ng to manually document dependencies but may also present an area where human errors may lead to se vere consequences. The purpose of this paper is to present a technique that will enable to automatically store meta information about datasets including their de- pendencies that can be used to ensure quality control checks. Some such checks are: output dataset has a time stamp later than input datasets being used for creation, datasets do not have circular dependency, etc adam dataset, macro call, create table, libname statement, sample, proc print, in=, out=, proc step, raw data 10
137 Traffic Lighting Your Multi-Sheet Microsoft Excel Workbooks the Easy Way with SAS Vincent DelGobbo "Traffic lighting" is the process of applying visual formatting to data. This paper explains how to use Base SAS 9 software to create multi-sheet Microsoft EXCEL workbooks (for EXCEL versions 2002 and later), and then traffic light the values that lie outside a range. You will learn step-by-step techniques for quickly and easily creating attractive, multi-sheet EXCEL workbooks that contain your SAS output using the ExcelXP ODS tagset. 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! Creating and delivering your workbooks on-demand and in real time using SAS server technology is also discussed. Although the title is similar to previous papers by this author, this paper contains new and revised material not previously presented excel, xls, date variable, proc report, output delivery system, sas output, proc template, proc step, sas base, sysdate9, proc print, dataset, by group processing, format statement, ods xml, sample, clinical trial 28
138 Two Steps to LIBNAME-Free Coding: Use of Macro Parameters and AUTOEXEC.SAS Zhengyi Fang,
Paul Gorrell
Through the creation of a set of macro parameters, and the addition of an %INCLUDE statement in your AUTO- EXEC.SAS , you can automatically read SAS data files without looking up the dataset name and path, and without including any LIBNAME statements in your SAS programs. You can also automatically call common formats and variables. Once you have set up the tool described below, other staff members can use it to refer to those data files, formats, and variables. This tool not only saves programmers' time, but it also can en- hance quality control by enforcing version control. This ensures that each staff member uses only specified versions of data files, variables, and formats macro variable, libname statement, dataset, macro parameter, sample 5
139 U.S. Energy Information Administration: The Move to SAS 9.2 Michael Bretz The U.S. Energy Information Administration (EIA) is currently using the following SAS 9.1.3 solutions SAS Foundation SAS Enterprise BI Server SAS Forecast Server This paper discusses the migration strategy implemented at EIA and the move to the SAS 9.2 platform. An over- view of the hardware and software architecture will be discussed and our experiences migrating from SAS 9.1.3 to SAS 9.2 in the following areas: Installation, configuration and maintenance upgrades of SAS 9.2 software An overview of the security model changes from SAS 9.1.3 to SAS 9.2 Migration of SAS artifacts from SAS 9.1.3 to SAS 9.2 sas management console, sas enterprise guide, sas administrator, access control, sas library, sas enterprise guide project, web service, data cleaning 11
140 US Army Personnel Friction Analysis Jose A. Ramirez,
Mark Zais
In this paper we develop a methodology to define, measure, and predict personnel friction in the US Army. Personnel friction represents the number of Soldiers misaligned by grade, military occupation specialty ( MOS), and/or location (brigade level) plus any additional Soldiers unavailable for training or deployment . Previous studies have referred to th e concept of friction as the "cost of doing business" for organizations that have numerous specialties, ranks , and locations. However, it is in the Army's interest to provide a personnel inventory that is truly sufficient for accomplishing its missions while minimizing inefficiency . Quantifying and predicting the components of personnel friction should facilitate the development of policies to reduce the cost of doing business. In this study, our goal is to develop a methodology to analyze personnel friction levels based on data and modeling resource s that are available to the Army G -1 and Human Resources Command (HRC) sas programming, data mining 12
141 Using %SYMEXIST for eliminating repetitive words in a SAS macro string - no data steps, no procedures. Alexander M. Feigin The presented utility macro NONREP, which does not include any data or procedure steps, can be easily used for cleaning repeated words from long macro strings (without changing the original order of words), for identifying duplicated, triplicate, or quadruplicated words and creating the relevant lists of these words without redundant repetitions inside each of these lists. Starting from the first word, it checks one by one all words in a macro string , figuring out whether the macro variable with the name identical to the checked word already exists (SAS macro function %SYMEXIST does this particular job). If the relevant macro variable does not exist yet, the program creates it and also: i) creates another macro variable with a value equal to the c hecked word; ii) concatenates this word with the previously checked chain of distinct words, thus, making finally a new macro variable containing all distinct words from the original string placed in the original order without duplications macro variable, macro loop 6
142 Using A DATA Step to Create Bar Charts: The ODS Report Writing Interface Randy D. Herbison Introduced in SAS 9.0, the ODS Report Writing Interface is an object-oriented addition to the DATA STEP. The ODS Report Writing Interface brings the full power of the Output Delivery System to the rich DATA STEP programming environment. Many SAS programmers know that the ODS Report Writing Interface can be used to create tables and text. It is less well-known that the ODS Report Writing Interface can also be used to create certain types of graphics. This paper will explain how the ODS Report Writing Interface can be used to create horizontal bar charts. It will cover how to use text formatting methods to display text, how to use table methods to create horizontal bars, and how to use gridded and absolute layout methods to manage the entire arrangement. This paper is suitable for intermediate and advanced SAS programmers bar chart, horizontal bar chart 18
143 Using Data Set Labels and Format Descriptions to Simplify Application Debugging Robert L. Russell Hansel and Gretel left breadcrumbs as they wandered through the forest to leave themselves a trail back home. This paper will show you simple ways to leave pointers for yourself in SAS data sets and SAS formats that will help you "get back home" when you are trying to trace a problem back through various programs. The advantage of these pointers vs. breadcrumbs is that these pointers won't be eaten by birds proc step, dataset, proc catalog, format statement, proc format, proc sort, proc sql, options statement 9
144 Using Fillable PDF together with SAS for Questionnaire Data Donald Evans dataset, excel 9
145 Using Generalized Additive Models in Marketing Mix Modeling Patralekha Bhattacharya Marketing professionals have always struggled to accurately measure the carry over effects of their ma rketing efforts. While it is widely accepted that campaigns impact sales over several time periods, adding mul tiple lagged terms in an attempt to model them, greatly increases the collinearity among variables, and increases t he variance of the estimated coefficients. To compound the problem, the non-linear nature of the relationship often leads to incorrect model specifications and may result in irrelevant lagged terms showing up as significant in the model. We propose a generalized additive model (using PROC GAM) to estimate the lagged effects of advertising efforts in simulated models. The GAM procedure is better able to handle multi-collinearity than other procedures. Be- sides, the flexibility of the functional form allowed leads to more accurate estimates of the duration of the lag proc gam, lag function, marketing mix, proc step, monte carlo, regression analysis 8
146 Using Google to Solve SAS Problems Michael Todd SAS has a long history as the language for statistical programming in the pharmaceutical industry. In the past 30+ years, most, if not all, of the problems statistical programmers face on a day-to-day basis have been solved by somebody. Usually there is a paper somewhere on the Internet about it. Using Google queries, statistical pro- grammers can leverage the vast SAS knowledge base on the Internet, and get quick answers to a variety of prob- lems proc step, confidence interval, lag function, proc sql, proc univariate, error message, pharmaceutical industry, proc template, data cleaning 13
147 Using PROC RANK and PROC UNIVARIATE to Rank or Decile Variables Jonas V. Bilenas In direct marketing applications prospects are often ranked by scores that predict response, risk and/or profitabili- ty. Justification is to evaluate lifts in performance by soliciting the most profitable individuals as defined by score ranking. Many programmers write complicated code using PROC SORT, MACRO calls, and DATA STEPS to rank or decile these scores. These programs often don't handle score ties which can result when 2 or more pros- pects with the same score end up in 2 or more ranks. We will show how using PROC RANK will provide a quick and simple way to rank or decile individuals that will handle ties with the PROC RANK TIES option. We will look at the syntax of PROC RANK with a number of examples and applications. Since PROC RANK does not have a WEIGHT statement to handle weighted samples we will show how to handle weights using PROC UNIVARIATE and PROC FORMAT to perform a weighted ranking proc step, proc rank, sample, proc print, proc univariate, numeric variable, proc freq, proc format, proc sort, proc npar1way 15
148 Using Recursion to Trace Lineages in the SAS ODS Styles.Default Template Perry Watts As a first step towards learning how to generate customized tables in ODS, it is recommended that the Styles.Default template be written out to the SAS LOG. What greets you in 9.1.3 SAS is a 700 -line listing of default values for attributes that are buildi ng blocks for 150+ style elements . That the template listing is overwhelming is an under s- tatement. You still don't have a clue about how style templates generally work in ODS, but you realize that a compre- hensive guide can only be found in the output you are looking at. To translate the ODS Styles.Default template into something useful, inheritance has t o be fully exp ressed. Whole lineages of style elements can then be traced and presented alongside their associated attributes. With the newly formatted guide, you can easily learn what is available when ODS-generated tables require a new appearance. Inheritance falls out when recursion is applied to the Styles.Default template proc sql, proc step, proc report 10
149 Using RTF codes in ODS RTF outputs Vardhan Rachabattulasriharsha ODS RTF is a powerful tool. It is capable of directing the output results produced by SAS procedures to an RTF file by converting the output results in Rich Text Format (RTF) that are compatible to view in various word processing packages including Microsoft Word and WordPerfect. But not all output results produced by SAS procedures are ready for viewing in word processing packages in the format that we want so to help create Rich Text Format PROC TEMPLATE and STYLE statements are often used. In addition to PROC TEMPLATE and STYLE statements, RTF codes can also be used; but how, what and where about RTF codes are not often known to all SAS programmers. In this paper, tips learned from experiences will be presented to help SAS programmers in understanding the RTF codes and creating ODS RTF output results in Rich Text Format using RTF codes with and without in conjunction with PROC TEMPLATE and STYLE statements. All techniques were developed and tested under SAS System Version 9.1 proc step, ods rtf, proc report, proc template, output delivery system 8
150 Using SAS Enterprise Guide to Create Standalone Programs Michael Todd Enterprise Guide (EG) is a visually oriented SAS pr ogramming environment that enabl es programmers to create diagrams linking objects that EG turns into SAS code. T he object-oriented tasks in EG write SQL-based code. By incorporating an automated post- processor, EG offers a way to standardize programming style. This is particularly useful for SAS code submitted to r egulatory agencies, or SAS code included as project deliverables from CROs. Limitations and cautions for Enterprise Guide are also discussed in this paper sas enterprise guide, proc sql, proc step, create table, macro definition, sas log, macro variable, mprint, txt, data cleaning 10
151 Using SAS for Design of Experiments: An Unbalanced Incomplete Block Design Burhan Ogut Traditionally, statistical software is used in the analysis phase of a study. However, design is a very im portant step in any experimental study. This paper demonstrates how SAS could be employed for designing exper i- ments. This exercise is performed to solve an applied experimental issue. For the purposes of the actual study, a set of items have to be rated o n several survey questi ons. There are 100 test items from 2 different sources (5 0 from each), and a total of 17 rate rs. In order to decrease within -rater variability, each item has to be rated by 7 raters. Additionally, to facilitate engagement and decrease burden each rater rates no more than 42 items. Finally, it is also desired that raters receive compar able numbers of items from the 2 sources. The purpose of the design, therefore, is to construct booklets of items that satisfy all three condit ions liste d above- hence, the unbalanced incomplete block design if-then-else, randomization, conditional do loop 7
152 Using SAS Output Delivery System (ODS) Markup to Generate Custom Pivot Tables and Pivot Charts Chevell T. Parker This paper illustrates how to use ODS markup to create PivotTable and PivotChart reports. You can use these reports to help your organization with business requirements such as analyzing expense trends over time or planning for inventory. Users of all experience levels will learn how to specify options in ODS statements that enable them to perform the following tasks: customize PivotTable layouts customize cell format specify statistics for the analysis modify the display of the analysis generate a PivotTable report and a PivotChart report for each worksheet format tables that you create * customize worksheets excel, output delivery system, raw data 24
153 Using SAS/AF to Create an Interactive Interface for Entering and Analyzing Data William 'Gui' Zupko II Although SAS/AF is old and clunky judging by today's technological interfaces, it is a highly effective tool for users who only have Base SAS knowledge or skills. One of the advantages of SAS/AF is the ability to allow users with no SAS ability to manipulate and analyze data. SAS/AF can create a graphical user interface(GUI) on a network drive to allow skilled programmers to share their programming abilities with their coworkers. This paper shows how to allow users to enter data, create samples of that entered data, and produce interactive graphs of the users' choice sample, data science, sas base, catalog entry 22
154 Using SAS/GRAPH Annotate and ODS to Create Customized Control Charts Sailesh Vezzu The Annotate facility in SAS/GRAPH is a very powerful tool to generate customized plots. This paper is a direct result of one of my projects at work, where I had more than one observation at the same point in the plot. In this paper I will introduce a creative way to represent multiple numbers of observations at various points in the plot and show how to implement this using SAS Annotate. I will also show how to use SAS Annotate to add a custom note for some points in the plot and to make some outlying observations stand out in the plot by using a different color or symbol proc step, proc gplot 5
155 Using Simple Code to Enter Complex Data from Base SAS to SAS/AF William 'Gui' Zupko II When data comes from many sources, programmers must decide how to capture that data. However, with the DATA STEP of PC Base SAS code, we can make an application that is so user-friendly that even people not experienced with SAS can use it. We can create different options to help our users enter data. First, we will enter data into in the DATA STEP. Then, we will show how that same program works with macros with only slight alterations. Next, we will demonstrate the effectiveness of %window, using it as a tool for users with no SAS experience. Finally, we will finish with SAS/AF and how that application can be employed so that users with no SAS experience can use it sas base, data science, macro variable 16
156 Using the SAS Explorer Window Nat H. Wooding Jr. The SAS Explorer window is a feature of the SAS Display Manager used in installations on computers eq uipped with Microsoft Windows operating systems. It offe rs the user quick access both to the contents of SA S data sets and catalogs as well as to their metadata. Format o ptions can be explored on the fly. If the SAS/ACCES S Software for Microsoft EXCEL, etc., modules are licensed , the user may view external files from within SAS. The window is not a replacement for PROC CONTENTS but is a highly useful alternative dataset, proc step, excel 15
157 Using the WinZip Command Line Utility in SAS Kenneth W. Borowiak,
Mike Kwee
A tidy way to send, receive and archive project materials is to put them in a zip file. For ad hoc tasks, manually adding materials to and extracti ng from a zip file is not unusual. However, a 'hands-free' approach for repetitive zipping and unzipping is desirable. This paper explores using the WinZip Command Line utility in SAS programs to streamline common tasks sas log, sysrc 7
158 Variable List Short-Cuts in PROC SQL Kenneth W. Borowiak PROC SQL queries require the SELECT statement to specify the variable s to be included in the output destination. You have the option to explicitly state which variables to keep or use the wildcard as a shortcut to select all fields from some or all tables involved in the query. Have you ever encountered the problem of having to choose between typing in a long list of variables to keep or use the to select more variables than are actually needed? Have you ever wanted to select all the fields from a table except for one or two fields? Using the DROP and KEEP data set op tions are particularly useful for alleviating these conundrums. Moreover, these data set options allow you to use variable list shortcuts that are not available in the SELECT statement proc sql, proc step, select, create table, variable list, file statement, numbered range list 4
159 Visualizing Bi-partite Network Data using SAS Visualization Tools John Zheng Bipartite networks refer to the networks created from affiliation relationships, such as patient-provider relationships in healthcare data. Analyzing such networks allows us to gain additional insights on groups that share the same member and members that belong to the same group. This paper develops methods to visualize bipartite network data in healthcare using the Annotate facility. Link analysis is used to explore the connections between healthcare providers and patients, and hence connections between peer providers. In addition, this paper also takes advantage of the spatial information in the patient-provider data to gain additional insights. In particular, the connections between providers are projected on a Google map using Google Map Generator proc step, network data, proc mds, social network analysis, proc iml, proc sql 10
160 Wallet and Share of Wallet Estimation: A Flexible Methodology Shira Guil Witelson In this paper, we will demonstrate how Wallet and Share of Wallet estimation, widely used in the credit card industry for marketing and sales strategy, can be applied in a range of industries. The methodology presented consists of a series of steps, beginning with primary research, and progressing to the use of SAS-enabled unsupervised learning method, predictive modeling and statistical test techniques. The result is a flexible means for estimating the most realistically attainable Wallet of a customer and thereby calculating the customer's Share of Wallet. Definitions: Internal Spend: The dollar amount the customer spends on the company's products and services. External Spend: The dollar amount the customer spends on other providers' products and services. Wallet: The Total Spend (Internal and External) made by the customer with the company and other providers, so long as the company provides one of the services purchased proc step, proc fastclus, proc glm, correlation, sample, proc genmod, regression analysis 15
161 What Drives the Consumer Price Index? Joshua Klick The Consumer Price Index (CPI) is widely referenced as a measure of health for the US economy. Users frequently cite rising or falling consumer prices a s indicated by the All Urban Consumers CPI-U index. Price change for an aggregate index is driven by pr ice change from component indexes. This paper evaluates aggregate and component index series for consumer prices. A secondary purpose of this paper is to visualize the relationship between the aggregate and component consumer price indexes using JMP software. JMP Tree Maps are used to pr ovide perspective about the components. Second, JMP Bar Charts from Graph Builder highligh t which components have the greatest impact on the All Items index. Lastly, a JMP Bubble Plot di splays month-to-month price change of the components relative to the aggregate bubble plot, line chart, correlation 7
162 What Were We Talking About at Those SAS Conferences, or Let's Make Some Tag Clouds Chang Y. Chung,
John Henry King
A tag cloud is a bunch of tags or words displayed nice ly. More popular or important words are highlighted using different colors or font sizes. Popularized by Flickr an d other Web 2.0 web sites, ta g clouds can be informative and useful. This paper demonstrates making tag clouds using nothing but Base SAS. The keywords come from the titles of all papers presented at two internationa l SAS conferences: the 25th SAS Users Group International Conference in 2000 (SUGI 25) and the SAS Global Forum 2010 proc freq, sas base, lookup, proc step 6
163 While You Were Sleeping, SAS Was Hard At Work Andrea Wainwright-Zimmerman Automating and scheduling SAS code to run over night has m any advantages, but there are also many pitfalls to be aware of. This paper will discuss how to make sure you save the log, get e-mail messages at critical points, as well as other recommendations and considerations on how to make it all work exception handling, proc printto 9
164 Windows Application Using .NET and SAS to Produce Custom Rater Reliability Reports Sailesh Vezzu Some of the common measures used to monitor rater reliability of constructed response items include Percent Exact Agreement, Percent Adjacent Agreement, Simple Kappa Coefficient, Weighted (Cicchetti -Allison, Fleiss- Cohen) Kappa Coefficient, Pearson Correlation Coefficient, Mean Difference, Standardized Mean Difference , and Matched-Pair T-Test. This paper discusses the development of a Windows application using Visual C#.NET and SAS to calculate various measures of rater reliability and produce custom reports. Users can select which measures to include in their reports and set threshold values to flag item s with low rater reliability values proc step, in=, sas log, proc freq, weighted kappa, pearson correlation, standard deviation, macro definition, correlation, out=, paired t-test, %if-%then-%else, temporary dataset 14
165 You Want the Program to Run on the PC in New York, Unix in London, and That Nutty System in Manchester, without Modification?? David W. Franklin Today, with offices in many parts of the US, and indeed the world, SAS programmers are being asked more and more to write SAS programs in one environment to run on many others, including different versions of SAS and different operating systems. The underlying arc hitecture of SAS allows SAS programmers to do this easily, with a little bit of planning. This paper introduces a few techniques and uses a number of SAS environment variables, including SYSSCPL, SYSSITE and SYSVER, to make that program run in multiple environments with no modification macro variable, libname statement, proc sort 6
166 ZIP Code 411: Decoding SASHELP.ZIPCODE and Other SAS Maps Online Mysteries Louise S. Hadden,
Michael S. Zdeb
SAS provides a very useful file called SASHELP.ZIPCODE. This file is relatively unknown and under-utilized. This paper explores current and potential uses of the file, as well as how to update the file on a quarterly basis by accessing SAS MAPS ONLINE. The authors also provide a walk-through of several programming projects that they have recently conducted. Data and programming resources provided by SAS and other sources are highlighted macro variable, sample 13

Back to Conf go 2011 go 2009

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.