HOME QUICK SEARCH AUTHORS KEYWORDS HELP BUGS

NESUG 2007 Papers - Index

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

# Title
×
Authors
×
Abstract
×
Keywords
×
Extras Pages
1 "S.A.S.A.D.M.I.N. ", Superhero Exposed !!! Fabian Robinson,
Shiva Srinivasan
sas administrator, key performance indicator 7
2 %DO Loop - A Simple Dynamic Programming Technique Yunchao (Susan) Tian Dynamic programming is an advanced macro topic. This paper presents a simple dynamic programming technique, the %DO loop. Included topics are: 1. Generating a list of variables, such as VAR1A - VAR50A, VAR1B - VAR50B. 2. Labeling a series of variables. 3. Running the same procedure against a series of data sets. 4. Using %IF- %THEN statement within %DO loop to provide logical branches. Each of the topics will be discussed along with examples. This paper is intended for SAS users with basic knowledge of macro language do loop, macro loop, label statement, %if-%then-%else 4
3 &Degrees. of Separation: Social Network Analysis Using The SAS System Shane L. Hornibrook Social Network Analysis, also known as Link Analysis, is a mathematical and graphical analysis highlighting the linkages between "persons of interest". This analytic approach has immense practical importance in fields such as epidemiology and fraud analysis. Social Network Analysis (SNA) tools provide spider web-like graphs indicating the strength and type of connections between entities. The SAS System combines the data extraction, manipulation, analytic, and visualization tools needed to distill massive databases into a visual representation of the most unusual set of linkages. This paper presents a brief overview of the SAS tools and methods the author has found useful in changing a sea of data into a graphical Social Network Analysis. SAS's parallel-processing methods (MP Connect) can greatly speed up elapsed time when extracting linkage data from large Database Management Systems, especially when data are pulled from separate databases social network analysis, link analysis, mp connect, data mining, proc step, proc sql 8
4 10 Things a Beginner Should Know Before Writing a SAS Program Lisa Eckler Writing and running one's first SAS program can be wonderfully quick and easy - or not. Either way, there's a long route with many lessons to be learne d between writing that first program and truly bein g a SAS programmer. This paper will address some of th e things your best friend would tell you about SAS before you tried it, if your best friend were an experienced SAS programmer. An early awareness of some of these ideas may help you avoid having to discover them in the face of a looming deadline, with a program that has gotten un manageably complicated and doesn't produce the desired result. This paper should be of value to b eginner programmers or those making a transition to SAS from some other programming language. It will include some fundamentals of programming, an introduction to some tips and techniques for unders tanding and working with SAS code, and pointers to some classic SAS papers and other resources for the beginner proc step, put statement, sample, sas programmer, proc format, where statement, proc contents, macro variable, macro definition 7
5 A Consolidated Macro for Iterative Hot Deck Imputation Bruce Ellis A commonly accepted method to deal with item nonres ponse is hot deck imputation, in which missing values are imputed from other records in the database that share attributes related to the incomplete variable. Sequential hot deck imputation uses related sort variables to impute nearest neighbor values from adjacent records ("nearest neighbors" ), and is particularly useful for variables missing 5% of values or less. Weighted sequential hot deck imputation retains the weighted distribution of data, and should be considered with missing data rates of 10% or more. A series of SAS macros was presented at SUGI (Iannacchione, 1982, Carlson, 1995) to implement these procedures. However, they involve separate execution of programs for specialized sorting, routines to insure in itial values are not missing, generally are designed to impute one variable at a time, and require a degree of subsequent programming to include imputation flags in a final output file imputation, missing value, macro variable, class variable, flag variable, sample, proc freq, response variable, macro definition, %if-%then-%else 15
6 A Hands-on Tour Inside the World of PROC SQL Kirk Paul Lafler Structured Query Language (PROC SQL) is a database language found in the base -SAS software. It enables access to data stored in SAS data sets or tables using a powerful assortment of statements, clauses, options, functions, and other language features. This hands -on workshop presents core concepts of this powerful language as well as its many applications, and is intended for SAS users who desire an overview of the capabilities of this exciting procedure. Attendees will explore the construction of SQL queries, ordering and grouping data, the application of case logic for data reclassification, the creation and use of views, and the construction of simple inner and outer joins proc sql, where statement, proc step, select, order by, inner join, index, data merging, view, right join, sas log, create view 18
7 A Lazy Programmer Case Study: Dynamic Macro Code to Deal with Changing Number of Variables over Time Suzanne M. Dorinski The U.S. Census Bureau performs an annual data collection for the National Center for Education Statistics. As part of the file documentation, the Census Bureau produces a summary table that shows the minimum, maximum, and mean value for each continuous variable, along with the number of records that have a value greater than or equal to zero, the number of records with missing values, and the number of records with "not applicable" values. The number of data items collected can change each year. A true lazy programmer will write code that can automatically accommodate such changes. This case study shows how we use the SASHELP.VCOLUMN view and CALL SYMPUTX to write a program that can be reused every year with minimal changes. This paper assumes that the reader has an intermediate understanding of SAS macros and the DATA STEP proc step, excel, do loop, missing value, macro variable, proc means, proc sql, binary variable, call symputx, label statement 14
8 A Legend Is Not Just a Legend Wendi L. Wright This intermediate level presentation will show the many ways to change the legend in a graph, to make it more meaningful and to make it stand out more clear ly on the plot. Using PROC GPLOT and the LEGEND statement, this paper demonstrates how; 1) l egends can be moved to different places on the graph; 2) labels of the legend values can be chang ed; 3) the shape of the legend can be made vertical rather than horizontal and; 4) adding color can emphasize your legend proc gplot, proc step 10
9 A SAS Constellation Diagram Has Many Faces Shi-Tao Yeh A constellation diagram is a represent ation of a two-dimensional x-y disp lay which converts the data into a nodes and links plot. Link lines are used to descr ibe the relationships among component nodes. The constellation diagram is a powerful tool for displaying clinical data. The SAS System provides a graphics macro in SAS/GRAPH called DS2CONST for users to create the constellation diagrams. The DS2CONST macro allows the users to specify the node's location in the x-y coordinates. From these, the users can design the diagr am layout to fit their needs. In this paper, different applications with different display layouts, such as tr ee structure, neural network diagram, interactive correlation matrix representation, and visualization of correlation matrix iteration processes, are discussed. The SAS constellation diagram also provides interactive features correlation, neural network, proc hpsplit, pearson correlation, sample, data mining pdf 17
10 A SAS Macro to Automate the Process of Pooling Sites Changhong Shi,
Lili Chen
In an international clinical trial, the patients are located in different geographic regions, such as US region, Asia- Pacific region, and other regions. In each region, the patients can be randomized to different sites, within different treatment groups. To minimize the difference in the number of patients between each site within the same region, we pool several small sites together to make a larger site called CENTER according to pre-specified criteria. A center, rather than individual small sites, can be used to test the stability of treatment effect of a drug using SAS Mixed model, that is commonly used in statistical analyses. This paper describes two approaches of applying sites/center(s) to fit the Mixed model. One is using an automatic macro call that pools small sites to create centers, another approach is considering the individual sites as the random effect without pooling treatment effect, proc mixed 6
11 A Tiptoe Through the Tagset Field Mike Molter The flexibility that the markup destination has added to ODS is comparable to the benefits ODS originally brought to SAS output, but it comes at a price known as the tagset. With ODS, we could display results in web pages without HTML knowledge; in W ord without RTF knowledge. D evelopers soon realized though that hav ing ODS do a ll the work wasn't always id eal; that on oc casion, users cou ld benefit from h aving some c ontrol ov er ho w markup was generated. Just as templates instruct ODS on display customization, TAGSETS instruct ODS on markup customization. The advantages are c lear - even more fle xibility in the g eneration of output. T he pri ce is s imilar to that p aid for display flexibility - more TEMPLATE procedure syntax, and an understanding of how ODS constructs files from these instructions. Great accomplishments often come from modest beginnings. This paper is your modest beginning proc step, put statement, sas output, proc freq, proc print, title statement, proc report, standard deviation, output delivery system, proc template, txt 23
12 Adding One Value to All Records in a SAS Data Set Anne Warren This paper reviews four techniques for adding one value, such as a summary statistic, to all observations in a SAS data set: "if _N_ = 1 then set datasetname"; PROC SQL INTO a macro variable; and CALL SYMPUTX to create a macro variable. Programmers can use these methods to avoid hard coding and to write more flexible code. Pros and cons of each technique are reviewed. This paper also discusses situations in which one method may be more useful than others. Real-life ex amples are provided for each technique. This paper re- quires a basic understanding of the DATA STEP, PROC SQL, and macro variables macro variable, proc sql, proc step, call symputx, proc means, into 6
13 Adding Ruby to Your SAS Toolbox Daniel Olguin With 3 relatively easy and painless steps you can add Ruby, a programmer friendly, Object -Oriented language, to your SAS Tool-Box 7
14 Additional Metadata for Common Catalog Entry Types Kenneth W. Borowiak Anyone who has worked with SAS has probably added descriptive attributes to entities such as v ariables (labels and format s), data sets (labels), reports (titles and footn otes), and programs (comments). Though not as well known, one can add descriptive labels to commonly used c atalog entr y t ypes, name ly for mats and macr os. T his p aper w ill demonstrate how to add, modify and retrieve this metadata. Keywords: format, macros, PROC CATALOG, metadata proc catalog, proc step, catalog entry, sas log 5
15 Advanced Techniques using SAS Add-In for Microsoft Office to Define Multiple File References Within Visual Basic Catherine Loveless-Schmitt This paper will describe how to submit SAS statements within Microsoft Access Visual Basic Modules. Visual Basic requires that variables and process modules need to be defined in order to operate correctly. First there will be a description of the minimum requirements for successful completion of a SAS program. Then there will be a full description of how to run a SAS program using multiple file references that includes the display of both the SAS log and SAS output sas log, sas output, filename statement, input statement, sas programming, macro definition, libname statement, if-then-else, macro variable, array, character variable, dataset 15
16 An Algorithm to Compute Exact Power of an Unordered RxC Contingency Table Vivek Pradhan,
Stian Lydersen
Chi-square, Likelihood Ratio and Fisher-Freeman-Halton test statistics are used to test the association of an unordered rxc. Although asymptotically all these statistics follow a chi-square distribution, an exact conditional test based on the permutation distribution is recommended for small samples. The exact power computation of such tests involves huge numbers of permutation tables, and as a result computation becomes infeasible. The asymptotic power computation of these methods can be done using a non-central chi-square test (see Agresti A, 2002: Categorical Data Analysis). However, to our knowledge, there is no algorithm/method available to compute the exact power. In this article we give an efficient algorithm and a SAS macro to compute exact power using Chi-square, Likelihood Ratio and Fisher-Freeman-Halton test statistics. The SAS macro also reports exact power for the Mid-P and the randomized versions of the tests sample, monte carlo, chi-square distribution, proc freq, sample size, likelihood function 8
17 An Automation Procedure for Oracle Data Extraction and Insertion Shiqun (Stan) Li,
David Wilcox
SAS software provides strong capability of extracting data from foreign databases such as Oracle tables. However, it would be very time-consuming if the database is very large. Even worse if the foreign databases cannot be accessed from the SAS programmers office, it would require them to make a trip to the client's site. In this paper, a real world application of downloading and uploading between SAS datasets and Oracle tables in a semi-automatic way will be presented. With such implementation, data retrieval becomes an easy routine task. Even for those with a very limited SAS knowledge, they can accomplish the data retrieval procedure sas log, sas programmer, macro definition, oracle, dataset, proc step, proc sql 8
18 An Introduction to SAS Stat Studio: A Programmable Successor to SAS/INSIGHT Rick Wicklin,
Peter Rowe
histogram, data science, exploratory data analysis, logistic distribution, line chart, dataset, logistic regression 18
19 An Introduction to SAS/GRAPH Step-by-Step Deb Cassidy SAS/GRAPH is an extremely powerful tool. In addition to producing common graphs like pie charts and line graphs, it has the power to create any custom graph that you could imagine. Another great benefit to SAS/GRAPH is its ability to programmatically create your graphs without adjustments. You may have a few daily or monthly graphs to create, hundreds or thousands of graphs by patient or customer or product, or on- demand graphs where someone specifies the subset criteria to get a standardized graph. However, before you can harness the real power, you need to know the basics. This workshop will walk you through the creation of a graph and exploring some of the many ways you can make a "picture worth a thousand words." You'll start simple using all the defaults. Then we'll explore some of the many options that can enhance a graph proc step, title statement 14
20 An RTF Document Index: Easier Than You Think Electra Small With the ODS (Output Delivery System) RTF destination, SAS users build tables that are opened directly in MS Word and other word-processing packages. A natural next step is to automate the creation of tables of contents and indexes for documents. The table of contents (TOC) and the index provide readers with road maps to find the tables of greatest interest to them. SAS does not yet build document indexes but there are RTF commands for building indexes. Further, SAS provides methods for embedding RTF commands in the Rich Text Format (RTF) documents it generates. This paper uses examples to clearly demonstrate how to mark words or phrases in SAS generated output for inclusion in an index in a RTF destination document proc step, title statement, proc tabulate, proc freq, label statement, ods rtf, proc print, proc report, output delivery system, proc format, macro trigger, proc template, sas output, sas syntax 10
21 Annotated SAS/GRAPH Plot of z/OS Goal Mode Performance Indexes Using Macros and MXG Software Neal Musitano Jr. This paper displays an annotated SAS/GRAPH plot of IBM z/OS Goal Mode workload service class performance indexes by using macros and MXG software. The graph is generated via a batch job using the SAS JCL procedure on an IBM mainframe server or Central Electronic Complex (CEC) using the z/OS platform. The SAS Output Delivery System (ODS) is used to output the plot written as GI F file to a UNIX hierarchical file system HFS on the z/OS system. The MXG software processes the IBM Resource Measurement Facility (R MF) workload activity record type seventy-two into a daily MXG comput er performance database (PDB) dataset on z/OS Goal Mode workload performance data, i.e. the MXG PD B goal mode member dataset, output delivery system, sas base, batch job, macro variable 11
22 Any Data Set to Excel, Dynamically Matthew Cohen There are many articles about how to take your existing report and send it to EXCEL. It's easy if you know exactly how wide to make each column and which format to apply. But what if you don't know what your data set loo ks like? What if every data set is different, and you want t hem all to go to EXCEL? This paper will present tw o methods of dynamically generating an EXCEL spreadsheet from any SAS data set. The Ouput Delivery System (ODS) and some macro code are used, but this paper is intended for all skill levels excel, proc step, e., output delivery system, proc print, macro variable, proc sql, missing value, macro definition, %if-%then-%else 14
23 Application of Ghosh, Grizzle and Sen's Nonparametric Methods in Longitudinal Studies Using SAS PROC GLM Chan Zeng,
Gary Zerbe
p-value, proc genmod, proc glm, regression analysis, proc step, response variable, sample, f distribution, permutation test, correlation, covariance 14
24 Automated Bulk Loading of Documentum Using XML Control Files Created with Base SAS John Booterbaugh,
Terek J. Peterson,
Kate Wilber
This presentation addresses t he use of Base SAS to write XML code to aut omate bulk file loading into Documentum, a document management system (DMS). Documentum with FirstDoc manages document attributes and has features such as check-in, check-out, version control, ownership, and access cont rol. Even when using the bulk loading utility of Documentum with FirstDoc, the user must manually enter ample document me tadata which can be monotonous and time consuming. Automating repetitive manual tasks are bes t handled with programming languages like SAS to eliminate tedious tasks. Benefits to the business include substantial timesaving and error reduction. Documentum with FirstDoc allows the use of XML control files to bulk load document objects. Base SAS can e ffectively be used to generate c ode in other languages like XML, especially when the other language has a consistent structure sas base, macro variable 9
25 Automated Real-Time Forecasting of Stream Conditions with SAS Samuel T. Croker,
Shane L. Hornibrook,
Tomonori Ishikawa
When you are a SAS R⃝ programmer planning a fishing trip on the Casselman River in Western Maryland, you want to know what river conditions to expect. One easy-to-run program, incorporating three criti- cal features of SAS, can generate reasonably-accurate, short-term forecasts of river level using real-time data provided online by the United States Geological Survey. First, using the URL access method of the FILENAME statement and basic DATA STEP techniques, you can import data from the online USGS water data repository. Second, you can analyze the resulting data set and produce forecasts with SAS High- Performance Forecasting procedures by choosing among models as diverse as ARIMA, ESM and UCM. Third, you can display effective graphs of the resulting forecasts with SAS/GRAPH R⃝. Y ou can easily apply these techniques to other data and analyses to provide a complete SAS-based solution from web-enabled ETL to automatic generation of forecasts to web publication of the results time series analysis, proc step, sample 10
26 Automatically Renaming Common Variables Before Merging Christopher J. Bost SAS merges observations based on values of a common BY variable. If there are additional common variables, SAS saves only the last values encountered. This paper shows how to automatically rename common variables with a user-specified prefix to pres erve the values of all variables. PROC SQL and DICTIONARY.COLUMNS are used to create a macro variable that stores renaming information proc sql, macro variable, proc step, create table, dictionary tables 7
27 Automation of Comparing SAS Program File Versions Located at Different Working Areas Sheng Zhang,
Junjie Lu
Version conflicts are quite common for SAS pr ogrammers. Ignorance of the existence of different versions of the same file developed by different people at different times and different locations could be costly. How are different versions of one file saved at different locations known? Besides using brute force to visually check the file version, an automated method is highly desirable due to its indisputable merit. The advantage is more apparent when working on a large number of programming files with multiple owners spread over the virtual world. The date stamp is the key indicator for file version change. If files bearing the same name have differe nt date stamps, furt her investigation is necessary. This paper will discuss the issues of comparing versions of SAS programming files saved in different directories txt, dataset, macro variable, macro definition, sas programmer 7
28 Because We Can: Using SAS System Tools to Help Our Less Fortunate Brethren John J. Cohen We may be called upon to provide data to developers -- frequently for production support -- who work in other programming environments. Ofte n external recipients, they may require files in specific formats and variable/column order, with proscribed delimiters, file -naming conventions, and the like. Our goal should be to achieve this as simply as possible, both for initial development and ease of maintainability. We will take advantage of several SAS tricks to achieve this goal dataset, proc step, retain, macro variable, proc contents, proc export, flat file, macro definition, macro facility 9
29 Before and After: Critical Event Analysis with Longitudinal Data Using SAS Robert Bauserman,
Douglas Thompson
In large samples followed over time, a "critical event " of interest may occur (such as pregnancy or disease diagnosis or movement of a measurement value past a th reshold). Analyses of su ch events, including their predictors, correlates, or sequelae, may require exam ining variables of interest based on when they occur relative to the critical event. However, the critical event may occur at different timepoints (such as study visits or ages) for different participants. This paper presents code and macros developed for a longitudinal research study that mark the timepoint at which the "critica l event" occurs and arrange repeated measurements for each subject in terms of the number of measurements before or after the critical event longitudinal data, dataset 12
30 Benefits of Using Excel File in CDISC SDTM Data Mapping Hong Wang proc sql, proc step, cdisc 8
31 Building a Better Bar Chart with SAS/Graph Software Perry Watts bar chart, proc gchart, proc step, raw data, class variable, response variable, proc freq 20
32 Butting Heads on Matched Cohort Analysis Using SAS Software Melvin T. Alexander Matched-pair cohort studies involve pairs of cases where outcomes of interest (e.g., mortality, morbidity, injury, etc.) among persons exposed to risk factors are compared with persons not exposed. Matched cohort studies have been used in traffic-crash research, for example, to compare the injury risk of drivers and passengers from the same crash or vehicle. Matching in cohort studies helps reduce bias and confounding effects that may exist in estimating risk or hazard ratios. Only the data where one or both of the paired cases with the outcome of interest are used, which is useful when little or no information is available regarding pairs in which cases did not have the outcome. For example, this technique could be used to analyze a registry of disease or trauma cases, since no information would be available on the number of cases that are disease or trauma free relative risk, confidence interval, regression analysis, poisson distribution, poisson regression, proc phreg, proc calis, proc step, proc genmod, estimate, cohort analysis, logistic distribution, likelihood function, proc freq, binomial distribution, output delivery system 12
33 Calculating the Quartile (Or Why Are My Quartile Answers Different?) David W. Franklin "Why is my first quartile number different from yours?" It was this question that led to a study of methods that can be used for calculating the first and third quartile for a set of data. SAS provides five methods for calculation of the quartile but other methods exist and are used in other common software packages. In this paper ten methods are discussed from the point of view of a SAS programmer and a macro presented that will calculate first and third quartiles for the five methods not provided in the Base SAS package sample, sas base 5
34 Charting the Basics with PROC GCHART Perry Watts The bar chart is one of the most frequently requested grap hs at all types of work sites: from banking to pharma- ceuticals. Nevertheless, the SAS/GRAPH GCHART procedure has a reputation for being c onfusing with the re- sult that many users turn to Microsoft EXCEL for a quick solution to their graphics problems. This tutorial presents the basic featur es of the GCHART procedure concentrating on the data structures that lend themselves to charting. Besides the V BAR statement with associated options fo r vertical bar charts, time will be spent on looking at how the PATTERN, AXIS, FORMAT and LEGEND statements can be used to build a good graph. Subgroup and Group charts are also discussed along with horizontal bar charts, pie, donut, and star charts. Even if you have minimal experience with SAS/GRAPH softw are, you should come away from this presentation knowing how to quickly create a polished bar chart with GCHART bar chart, proc gchart, proc step, proc freq, histogram, vertical bar chart, catalog entry, proc greplay 20
35 Color Your World - With SAS Louise S. Hadden,
Andrew Johnson,
Lauren Olsho
SAS provides programmers with many options to use color to enh ance SAS output. In addition, there are other valuable resources to aid color choices and specifications while using SAS procedures. Resources both inside and outside of SAS will be explored and results presented in living color. Examples will includ e maps produced using SAS/GRAPH and macros that demonstrate data -driven shading of geographic areas as well as the use of color in tabular output for both print and web applications. These techniques will be demonstrated using SAS 9.1.3 for Windows ; however, they are also applicable to earlier versions of SAS on different platforms unless specifically noted otherwise response variable, sample 11
36 Common Pitfalls in SAS Statistical Analysis Macros in a Mass Production Environment Huei-Ling Chen,
Aiming Yang
Four pitfalls are commonly encountered in the statistical analysis of clinical trials. The first pitfall can occur in a cross-over study when the McNemar's test is used to estimate the significance level of treatment group differences for a binary outcome result. The second pitfall concerns the ordering in PROC LOGISTIC. The third pitfall involves PROC GLM and its handling of character CLASS variables. The fourth pitfall relates to non-estimable issues with PROC GLM. In a massive clinical trial program production environment, we need to watch for these pitfalls when recycling, reusing, or creating macros. The four pitfalls are described in detail. Recommendations and SAS coding solutions are provided proc step, proc glm, clinical trial, proc logistic, adverse events, proc genmod, confidence interval, logistic distribution, class variable, response variable, character variable, proc freq, sas output, null hypothesis, numeric variable, output, significance level, data science, treatment effect 9
37 Comparing Values Across Observations: Be Careful Prafulla Girase There are several techniques that can be used to compare values across observations in SAS. It is important to understand how each technique works in order to pick the most appropriate technique and get correct results. This paper discusses three of the techniques that can be used. The techniques discussed in this paper include the LAG function, one-to-one reading, and one-to-one merging. To illustrate appropriate usage and highlight advantages of each technique, a business question is proposed and answered using all three techniques. After reading this paper, you will be better prepared to select the most appropriate method in instances where values must be compared across observations. The intended audience for this paper is someone with a basic understanding of BASE SAS lag function, set statement 4
38 Conditional Lags Don't Have to Be Treacherous Howard L. Schreier The LAG and DIF functions are useful, but they are often not well understood. In particular, their interactions with conditional processing have long been a source of confusion. In SAS9, new inline conditional functions (IFC and IFN) make it easier to use LAG and DIF functions appropriately lag function, missing value, ifn, if-then-else, ifc 10
39 Conquering the Fear of Shift Tables Monal Kohli Often people are intimidated by the word "Shift Tables" in any clinical trial P rogramming environment. Shift tables are actually pretty simple, they are just cross frequencies of one variable to another but presented in a different way .First It involves a thorough understanding of what is it that we will accomplish after having a shift table, why can't a simple table do what a shift table does? .Shift tables provides a better vision to data and encapsulates the changes in data from one point to another .Shift tables can get really interesting and challenging at the same time. This paper is an attempt to fight this fear which will help all of us get a better understanding of the anatomy of shift tables .It will help us understand the basics of why shift tables are created and a stepwise explanation of how to create them in a wink .Let's start shifting!! shift table, proc step, proc report, clinical trial, missing value, proc sort 11
40 Controlling SAS Datasets Using SAS System and Dataset Options David W. Franklin Keeping track of modifications to data in a SAS dataset is a very important task when reporting on that data. This is particularly so when databases are close to locked and are in the "Soft Lock" phase. This paper looks at a way that SAS provides of controlling who has access to the datasets for modification, and also looks at two alternatives for tracking changes, first through an audit trail and second using SAS dataset "versioning" dataset, audit trail, proc contents, proc compare, proc step, proc sql 7
41 Create Flowcharts Using Annotate Facility Priya Lakshmi Saradha,
Gurubaran Veeravel
With mounting significance to the graphical presentation of data in different forms in the pharmaceutical industry, as well as in other industries, the need to create non-traditional graphs (flowcharts, super-imposing different types of gra phs, et c.,) h as increased i n recent times. This paper will lay a strong fo undation for the creation of flowcharts with the help of the ANNOTATE facility by discussing the newly developed macro, FLOWAN. FLOWAN can create a highly-cu stomized flowchart with multiple levels usi ng ANNOTATE macros and functions. Using a dataset as input, FLOWAN can represent various populations in a study or any other type of data in the form of a flowchart. This macro uses very few p arameters like, t he number of tiers (levels), the n umber of boxe s in each level, the vari ables to display and the li nk or predecessor for ea ch of the boxes. The output from thi s macro will present the data in an in novative way in=, bar chart, line chart, disposition table, adverse events 6
42 Creating a Stored Macro Facility in 10 Minutes Erik S. Larsen Every SAS macro developer from time to time has sp ent countless hours writing, testing and perfecting code so that it can be used over and over by differ ent users on different platforms. There are certain situations where one needs to enhance the speed of the processing of SAS code, such as in a production environment or if there is a need to process large volumes of data. A SAS Stored Macro Facility consists of a library of SAS macros which are already compiled, that are available to users or processes at any ti me. These pre-compiled macros run immediately when called and do not use valuable CPU time while waiting for compilation. Some examples of where a stored ma cro facility would be useful are in production environments, where jobs may be scheduled to run on a certain day of the day, week, or month. Another would be a standard report which is being used for an FDA submission and needs to be in an exact forma t stored macro, macro facility, autocall macro, libname statement, options statement, cpu time, macro definition 3
43 Creating ActiveX Graphs for Presentations using SAS Enterprise Guide ... And Drill-Down Graphs Too Terek J. Peterson,
Robert Gordon
This paper introduces the SAS user to the basics of using SAS Enterprise Guide (EG) to create graphs. The example project will show how to pull data from ClinTrace Oracle tables to make datasets, how to subset and merge the datasets with the point and click EG interface, how to produce a 3D Active X HTML Graph, and how to insert the graph into a PowerPoint presentation. Using the ActiveX graph toolbar, it will be demonstrated how to pivot, size, and zoom the graph within PowerPoint or EXCEL. A discussion and illustration will explain some of the limitations of the EG graphing capabilities. Exporting the code generated fr om the example project in EG allows enhancements with SAS using the TEMPLATE procedure and SAS/GRAPH code to produce publication quality output. Lastly, the authors will show how to take advantage of the ODS HTML output destination to create a drill-down series of graphs of increasing detail, which end in an EXCEL spreadsheet of the data proc step, sas enterprise guide, ods html, proc template, output delivery system, adverse events, excel 10
44 Creating Multi-Sheet Excel Workbooks the Easy Way with SAS - Part 1 Vincent DelGobbo Transferring data and analytical results between SAS and Microsoft EXCEL can be difficult, especially when SAS is not installed on a Windows platform. This paper discusses using new XML support in Base SAS 9.1 software to move data between SAS and Microsoft EXCEL (versions 2002 and later). You will learn step-by-step techniques to quickly and easily create multi-sheet EXCEL workbooks containing your SAS output. You'll also learn about converting your own multi-sheet EXCEL workbooks to SAS tables. The techniques described here can be used regardless of the platform on which SAS software is installed, including a mainframe! The use of SAS server technology is also discussed excel, xls, dataset, proc print, proc tabulate, sas output, macro definition, sample, adverse events, sas base, by group processing, libname engine, proc step, work library, ods xml, proc template 20
45 Creating Multi-Sheet Excel Workbooks the Easy Way with SAS - Part 2 Vincent DelGobbo Transferring SAS data and analytical results between SAS and Microsoft EXCEL can be difficult, especially when SAS is not installed on a Windows platform. This paper discusses using the new XML support in Base SAS 9.1 software to create multi-sheet Microsoft EXCEL workbooks (versions 2002 and later). You will learn step-by-step techniques for quickly and easily creating attractive multi-sheet EXCEL workbooks that contain your SAS output. Tips and tricks with the ExcelXP ODS tagset will be divulged. Most importantly, the techniques that are presented in this paper can be used regardless of the platform on which SAS software is installed. You can even use them on a mainframe! The use of SAS server technology is also discussed. Although the title is similar to a paper presented at SUGI 31 (DelGobbo, 2006), this paper contains new and revised material not previously presented by this author excel, xls, proc print, sas output, proc report, sas base, change from baseline, adverse event summary, adverse events, sample, output delivery system, proc template, proc step, ods xml 19
46 Creating Multiple Cohorts Using the SAS Data Step Jonathan Steinberg The challenge of creating multiple cohorts of people within a data set, based on one or more common character- istics, is driven by the nature of the data that is collected and how it is structured. A major benefit of establishing such a data set is the ease and flexibility with which you can statistically examine differences among respondents using various indicator variables, such as test dates, particularly if there is consistency to the data layout over time. If not, the data analyst may need to spend additional time to create such a layout. A standardized test may have several administrations during the course of a calendar year. The SAS frequency procedure, PROC FREQ, could easily identify patterns in the data. However, while some candidates will take a test once, others may take the same test multiple times dataset, proc freq, sample size, sample, proc step, cohort analysis, calendar year, data analyst, frequency analysis 9
47 Customizing Output for Regression Analyses Using ODS and the Data Step Zhenyi Xue SAS default output for regression analyses usually includes detailed model fitting infor mation which statisticians and their clients don't want include in the final report. By using the Output Delivery System (ODS) and the DATA steps, this pap er presents several macros to generate a reader friendly output file for linear regression, logistic regression, and Cox regression (proportional hazard model) analyses. Both the univariate and m ultivariate models will be discussed. I n the repor t, it will on ly include th e sample size and/or the num ber of events, the regression coe fficient with their standard error, odds ratio or hazards ratio with its 9 5% confidence in tervals, a nd th e p -value. Thes e m acros can be eas ily further customized to include more statistics when desired regression analysis, logistic distribution, proc calis, output delivery system, logistic regression, model training, p-value, confidence interval, sample size, proc step, proc reg, null hypothesis, sample, nominal variable, response variable, predictor variable, proc phreg, proc logistic, proc print 11
48 Data Without (Step) Boundaries Felix Galbis-Reig This paper explores the use of data access functions to retrieve and manipulate data stored in a SAS data set, with the main goal being to demonstrate possible uses of this alternative access scheme. To this end I will moti- vate the use of these methods by providing some si mple examples. The reader should be familiar with basic DATA STEP concepts and have some experience with the SAS Macro facility set statement, macro variable, dataset, data step, raw data, macro definition 7
49 Dealing with Duplicates: Identify, Investigate and Purge Ying Feng The best way to deal with duplicates is to not generate them in the first place. This is easier to say than do. Sometimes it is out of our control since the data coming to us is already "contaminated". You certainly do not want a "Garbage in, Garbage out" scenario. Therefore, dealing with duplicates should be one of your first data-processing steps. Records can be categorized as exact or partial duplicates. Dealing with exact duplicates is easy, but how to define and deal with partial duplicates requires discretion. This paper will detail how to identify, investigate and purge exact and partial duplicates under the SAS environment. With the help of PROC SORT, PROC SQL and the SAS Macro language, a simple and generalized method is developed to help deal with duplicates proc step, proc sql, proc print, proc sort, macro variable 4
50 Differences in ODS formatting for HTML with PROC PRINT and PROC REPORT Laura Thornton While PROC PRINT is a terrific tool for data checki ng and data summary, PROC REPORT is similar to, but more powerful because it can do some basic calculations or statistics and data can be broken more effectively into manageable fields. The ODS procedure can produce HTML files from either procedure and formatting for output is slightly different for eac h. This presentation is meant to explore a few of the differences in the formatting applied by ODS to each procedure and methods to produce similar HTML output. It is not all inclusive, but this brief de monstration will deal specifically with id, class, and by statements within each for output to HTML by ODS proc step, proc print, proc report, by group processing 5
51 Does Your Application Have a Performance Problem? Put It in a SAS Pipe and Smoke It! (An Introduction to SAS Pipes) Robert L. Russell Traditional application design uses SAS WORK datasets to pass data between steps. There is a newer technique that uses a technology called piping. In piping, 2 steps are processing at the same time and data is passed from one step to the other through memory. This technique eliminates IO and can significantly compress the wa ll clock time that a series of steps takes to run. This paper will provide an introduction to this piping technique parallel processing, mp connect, elapsed time, out=, permanent dataset, proc step, cpu time, temporary dataset 11
52 Effective Forecast Visualization with SAS/GRAPH and ODS Samuel T. Croker confidence interval, proc step, sample, proc arima, proc gplot 11
53 Effective Presentations for SAS Training and More Christopher J. Bost This paper describes a five-step process for effective presentations: 1) assessing needs; 2) identifying key concepts and skills; 3) preparing materials; 4) practicing the presentation; and 5) delivering the presentation. This process is useful for people who develop SAS training classes and who make technical presentations 7
54 Evaluating Sample Code for an Interview Stephanie R. Thompson Requesting sample SAS code from job candidates before an interview is a good way to gauge their level of experience, ability, and style. Once you have reviewed the code, prepare your questions for the candidate. You want to make sure that they 1) wrote the code themselves, 2) understand what they wrote, and 3) are familiar enough with it to explain why things were done the way they were. This paper will provide you with some guidelines on how to get answers to these questions in an interview. Code samples that I have received over the last few years and the questions that arose will be used as examples. This is also a good time to ask if the candidate can think of another way to accomplish the same task using a different approach. Evaluating work samples can be a way to gain invaluable insight into your candidate's skills and this paper will help you get the most out of it that you can sample, proc step, if-then-else, cpu time, proc sql, macro facility 7
55 Everyone Needs "a Raise" (Arrays) Marge Scerbo Beginning SAS programmers often write much longer code just to avoid using arrays. Arrays have an aura of difficulty, but they are simply misunderstood and underutilized. This tutorial will introduce you to the basics of SAS Arrays and provide examples of different ways and times to use these DATA STEP statements. By utilizing arrays, you can process multiple variables in an efficient manner. Hopefully, you will feel confident enough when the talk is over to return to your office and put your new knowledge to use do loop, data step, array, character variable, numeric variable, calendar year, variable 11
56 Exploit SAS Enterprise BI Server to Manage Your Batch Scheduling Needs Troy B. Wolfe As someone responsible for maintaining over 40 nightly batch processes created in SAS Data Integration, the author has taken control and created a batch scheduler that utilizes basic SAS coding and the operating system's scheduler to manage the task. This paper will show how to implement such a scheduler that can be used in any SAS environment. The main purpose is to show how one c an exploit the EBI architecture in SAS to manage a batch process scheduler through the SAS Information Delivery Portal. Some of the advantages the author has found using this includes: - Complete control over scheduling including dependence on other processes - Ability to maintain and calculate many different statistics of interest including when and how long a process usually runs - Ease of use through incorporation into the SAS Portal - Complete integration into the SAS Metadata Repository including security - Flexible reporting with estimated time remain ing to run a particular process based on history macro variable, sas enterprise guide, batch job 13
57 Exploratory Visualization of Correlation Matrices Shi-Tao Yeh A correlation measures how two variables are related. A correlation matrix shows a table which lists the correlation coefficients of the columns and rows. This paper discusses the techniques for displaying correlation matrices and for depicting the patterns of relationships among variables. The purposes of the techniques described in this paper are: a) to display schematic scatter plots with ellipses, Loess, contours G3D and correlation coefficients with p-values, b) to create interactive correlation matrix graphs, c) to illustrate the correlation matrix iteration PROC ess with the creation of matrix maps, and d) to display multiple correlation matrices with interactive features on one page. The SAS version 9.1 products us ed in this paper are SAS BASE , SAS/STAT, and SAS/GRAPH on the PC Windows platform and on the UNIX environment correlation, scatter plot, sample, pearson correlation, proc corr, kendall correlation, spearman correlation, label statement, data visualization, hierarchical clustering, histogram, proc step, proc princomp 18
58 Exporting Access Databases with Indexes and Keys Roger S. Cohen SAS Access for Microsoft Office Applications allows SAS programs to import and export tables to Microsoft Access MDB files. SAS does not currently provide a means for exporting tables that contain keys or indexed fields. This paper explains hot to create a standalone Visual Basic application that may be used within SAS to provide this capacity by group processing, proc export 5
59 EZLID: A SAS Macro for Local Item Dependence Assessment Yung-Chen Hsu,
Tsung-hsun Tsai
In measurement applications based on item response theory, the impact of possible dependency between items is an important issue that should be examined. Using indices of local item dependence (LID) to flag potentially dependent items is a conceivable choice, especially when the measurement scale is large. This paper presents a SAS macro, EZLID, for assessing item dependency. EZLID is a convenient and effective tool for preliminary LID screening. This program is written in SAS/IML. LID indices are computed for users to identify items that are warrant attention proc freq, correlation, odds ratio, latent variable, macro definition 10
60 Finding Answers in the PROC SQL Documentation Howard L. Schreier SQL is more than another SAS procedure; it is a language, and one which was not designed by SAS develop- ers. As a consequence, the documentation for PROC SQL is different from what is familiar to most SAS users. This paper will present a series of tips designed to help SAS users find the answers they need in the PROC SQL documentation proc sql, proc step, select, create table, group by, order by, output delivery system, sas base, create view, macro variable, sas function, macro facility 12
61 Formats, Informats and How to Program with Them H. Ian Whitlock Formats tell how to display stored data and informats how to read them. In other words, they allow the separation of data from the values one works with. While most programming languages provide some sort of formatting capability, SAS provides an extensive system that comes to dominate how one works with SAS. This talk will review some of the supplied formats, show you how to make your own with code or data, and then supply programming examples for how to get the best use of this system proc format, proc step, character variable, format statement, proc freq, dataset, sysdate9 14
62 FreqLibname: A Data Review Routine For All Memnames in a Libname Ronald J. Fehd proc step, macro variable, call execute, proc freq, txt, proc append, proc sql 22
63 From Obscurity to Utility: ADDR, PEEK, POKE as DATA Step Programming Tools Lessia S. Shajenko,
Paul M. Dorfman
APP functions is an (unofficial) collective abbreviation for the SAS functions ADDR, PEEK, PEEKC, the CALL POKE routine, and their so-called LONG 64-bit counterparts - SAS tools designed to directly read from and write to the physical memory in the DATA STEP and SQL Procedure. APP functions have long been a SAS user dark horse. Firstly, the examples of APP usage in SAS documentation boil down to a few tidbits in a technical report, all intended for system programming tasks, with no hint how the functions could be used in plain data management SAS programming. Secondly, the note about the CALL POKE routine in the SAS documentation is so intimidating in tone that many a folk may have decided to avoid the potentially precarious route altogether numeric variable, character variable, sas programmer, temporary array, proc sql, length statement, data governance, variable list, dataset 20
64 Fuzzy Matching Using the COMPGED Function Paulette W. Staum Matching data sources based on imprecise text identifiers is much easier if you use the COMPGED function. COMPGED computes a "generalized edit distance" that summarizes the degree of difference between two text strings. Several additional techniques can be helpful. CALL COMPCOST can adjust the weighting algorithm used by COMPGED. Removing commonplace words and adjusting for the effect of different text string lengths can improve results. Also, eliminating implausible potential matches can improve efficiency sample, proc sql, proc step 10
65 Geocoding and PROC GMAP - Tools for Presenting Spatial Data Michael G. Eberhart This paper describes how to use SAS/GIS and PROC GMAP to create spatial databases, geocode address-level data and generate maps to display geographic trends in disease data. Topics discussed include the basic concepts of U.S. Census Bureau TIGER/Line files, importing TIGER/Line data to create spatial datasets using the SAS/GIS TIGER Import function, and storing spatial data in SAS. The basic steps of address data preparation and batch geocoding, creating traditional SAS datasets for map creation, using PROC GMAP to display map datasets in a variety of formats, and plotting geocoded cases using the Annotate Facility are also discussed. Additional topics include coordinate systems and map projections, projecting annotate data, choropleth maps, SAS/GRAPH output (ACTIVEX, ODS), creating map output files in HTML drill down for the web, loop processing with NULL datasets, and creating customized map legends proc gmap, proc step, dataset, proc print, out=, data step 17
66 Getting Something from Nothing: How to Produce a PROC TABULATE Table with All Zeros Marie Byrd Alexander,
Sharon Avrunin-Becker
The TABULATE procedure in SAS is frequently used to create appealing reports. However, there is currently no easy way in PROC TABULATE to produce a table showing all zeroes when the data set does not have any cases satisfying the WHERE statement. This paper demonstrates a technique that works around this limitation and enables you to produce the desired output whether or not any cases satisfy your filtering criteria proc tabulate, proc step, where statement 6
67 Great Expectations of PROC FORMAT - Applications All You Can Do with Formats in the SAS System John He,
Ram Valluru
The PROC FORMAT in SAS is something that everybody knows but most people know oblivi- ously. With simple VALUE/INVALUE, PICTURE, or MULTILABEL statement, you can build any user-defined format catalog to help develop a variety of applications you wanted. Of course, there are many other ways to achieve your goals, as you are surely a nimble programmer armed with powerful SAS system. However, PROC FORMAT can offer you additional convenience and robustness not only when you are developing but also maintaining the applications. This paper will not show you how to create formats/informats or format catalog since it is assum- ing that PROC FORMAT was every SAS programmer's first lesson. What I want to share with in this paper is to rediscover the Great Expectations of PROC FORMAT-the many potentials that PROC FORMAT can do for you-these Great Expectations might have been just twinkling along with other shinning features of SAS system proc format, proc step, system organ class, proc means, laboratory data, user-defined format, excel 8
68 Guido's Guide to PROC FREQ - A Tutorial for Beginners Using the SAS System Joseph J. Guido PROC FREQ is an essential procedure within BASE SAS used primarily for counting, displaying and analyzing categorical type data. It is such a powerful procedure that you will find it documented not only in BASE SAS but also in SAS/STAT documentation. This Beginning Tutorial will touch upon both the uses of PROC FREQ in BASE SAS and SAS/STAT. Don't worry, I promise that you do not need a statistical background to understand this procedure. This tutorial will teach you the basics of PROC FREQ and give you a framework to build upon and extend your knowledge of the SAS System proc freq, proc step, sas base 16
69 Handling Non-Date Dates in SAS Gary Seale,
Anna Watson
The SAS system provides numerous methods fo r handling date and time values. However, we often work with datasets that re present date values as either character or numeric fields, and we need the ability to perform date and time calculations on these values just as we would for SAS date values . Additionally, in much of our work we use VBA programs to call SAS stored process, where date and time values are passed as parameters from EXCEL into macro variables that must subsequently be evaluated by SAS in order to subset the data. This pape r demonstrates a few of the methods available in SAS for dealing quickly with these non-date variables. It shows how SAS can be used to take a single date macro value, convert it to a SAS date value, create new macro variables with the other required dates, and finally convert numeric date fields from a SAS dataset into SAS dates to perform calculations macro variable, sysdate9, datepart, net interest income, date variable, interest, net interest margin, excel 4
70 Hash Crash and Beyond Paul M. Dorfman,
Lessia S. Shajenko
In SAS Version 9.1, the hash table - the very first object introduced via the DATA STEP Component Interface in Version 9.0 - has finally become robust and syntactically stable. The philosophy and application style of the hash objects is quite different from any other structure ever used in the DATA STEP before. The most notable departure from the tradition is their run-time nature. The hash objects are instantiated, deleted, given memory, and updated - all at the run-time. It is intuitively clear that such traits should make for very inventive and flexible programming not ever seen in the DATA STEP code of yore. Both hash propaedeutics and material intended for SAS programmers already somewhat familiar with the basic hashigana. Live code examples are used to invite participants to explore a number of programming techniques, which would be utterly unthinkable before the advent of the canned hash objects in SAS. In other words, you are in for some intriguing SAS tunes from Hashville hash table, hash iterator, composite key, length statement 25
71 Histogram of Numeric Data Distribution from the UNIVARIATE Procedure Chauthi Nguyen The UNIVARIATE procedure from the Base SAS Software has been widely used for the descriptive statistic tables and reports. With the use of HISTOGRAM statement in PROC UNIVARIATE, we can have a fast and simple way to review the overall distribution of a quantitative variable in a graphical display. This will be help- ful for the interpretation of the statistic reports. The paper will demonstrate how to create a simple frequency histogram using PROC UNIVARIATE and the HISTOGRAM statement. Using the CLASS statement together with the HISTOGRAM statement will create comparative histograms. In clinical trials, the comparative histograms could be used to compare the treatment effects of a test drug against Placebo histogram, proc univariate, proc step, standard deviation 7
72 How to Maintain Happy SAS Users Margaret A. Crevar Today's SAS environment has high numbers of concurrent SAS pro cesses and ever-growing data volumes. It is imperative to proactively manage system resources a nd performance to keep your SAS community productiv e and happy. We have found that ensuring your SAS applic ations have the proper computer resources is the be st way to make sure your SAS users remain happy sas batch, batch job, dataset, proc sql, proc step 8
73 How To Produce Almost Perfect Excel Output Suzanne M. Dorinski The U.S. Census Bureau performs an annual data collection for the National Center for Education Statistics. As part of the file documentation, the Census Bureau produces a summary table that shows the minimum, maximum, and mean value for each continuous variable, along with the number of records that have a value greater than or equal to zero, the number of records with missing values, and the number of records with "not applicable" values. The data collection has more than 140 variables. The output can be easily produced as HTML, which can be read by Microsoft EXCEL, but we need to use a variety of tricks to produce beautifully formatted EXCEL output. The little tricks include modifying the printer style, using the MSOFFICE2K tagset, and using the Microsoft Office style properties to format numbers and cell widths. If we need the output to be a native EXCEL file, we can use dynamic data exchange commands to automate that task as well excel, proc step, proc print, ods excel, missing value, macro definition 15
74 How to QC Your Own Programs Kevin Lee This paper is intended for the Statistical SAS programmer who produces analysis SAS data sets, tables and listings. It will help the SAS programmer to minimize the possible errors in mapping and Clinical Study Report (CSR) programs by developing Quality Control (QC) procedures in his or her own programs. The QC procedures will be introduced as macros and simple methods in SAS code; both macros and methods are included in the programs dataset, sas programmer, sas log, proc step, sample, clinical trial 6
75 Hurray for Arrays that Handle Data from External Files Stephen J. Rhoades There are often times when arrays can make your code easier to understand, much less verbose and faster to both code and debug when reading in external files. OK, OK I hear the uninitiated saying that's great, but I don't have time to learn how to do this. And frankly I understand this, I often have projects and very short windows to deliver them and that means almost no time to learn any new skills. Here's what I propose, what if you get a "How To" guide that shows examples with input and output files, the code, an explanation of how it all works along with an accompanying file so you can just type Subm it and see it work at any time. And since there are variations for reading in arrays, this poster will provide some alternatives to see how to deal with some more complicated situations. It will also expl ain the concept of "column input", and how it works with reading in data using arrays input statement, do loop 14
76 I Cut my Processing Time by 90% Using Hash Tables - You Can Do It Too! Jennifer Warner-Freeman Hash tables are an exciting new feature in SAS 9. Their use can acheive great I/O efficiencies and enormous time savings when m erging tables with the DATA STEP. Besides that, they are easy to use! The motivation for writing this paper came when, after incorporating hash tables, a frequently run process went from taking two hours to complete to taking a mere el even minutes. This allows my team and I the luxury of doing more analysis in less time and the ability to ask and answer many more "what if" questions 15
77 Identify and Remove Any Variables, Character or Numeric, That Have Only Missing Values Wei Xu Have you ever identify and remove any variables, ch aracter or numeric that have only missing values? I f there are some variables that have only missing value, you will need to delete the variables per your analysis requests. This paper will describe a simple, straightforward way to use SAS SQL dictionary tables to create a list of character variables and a list of numeric variables from the data set and store the result in macro va riables CLIST (character) and NLIST (numeric). The count o f each type is also captured using PROC SQL of SAS , and in a DATA _NULL_ which creates an array for the character variables and an array for the numeric v ariables. The final step will create a macro that generates the list of variables to be dropped for the DROP statement missing value, macro variable, proc sql, character variable, numeric variable, drop statement, proc step, macro definition 3
78 Identifying Invalid Social Security Numbers Paulette W. Staum,
Sally Dai
Do you need to check whether Social Security numbers (SSNs) are invalid? An SSN consists of a three-digit area number, a two-digit group number and a four-digit serial number. A list of the valid group numbers for each area is available from a Social Security Administration web page that changes monthly. This paper demonstrates automatic downloading of the list of area and group codes, plus testing for out-of-range values and impossible combinations. The paper assumes knowledge of the DATA STEP and PROC SQL proc sql, sample, proc step, create table, txt, order by 10
79 Implementing Multiple Imputation in an Automatic Variable Selection Scenario Krishna Mehta,
Mayank Rustagi,
Saurabh Kohli,
Siddharth Tiwari
Missing data needs to be imputed before any analytical exercise can be performed on the dataset. Popular ways of handling missing data include imputing them with mean or median values of the vari able. While these are easy to understand and implement, these traditional methods reduce the variance of the dataset and hence, introduce bias into the analysis. Multiple Imputation (PROC MI), resolves this problem by imputing each missing field with multiple values, and in effect creating multiple datasets. However, this poses a problem for those using automatic variable selection methods available through PROC REG and PROC LOGISTIC. The problem manifests itself when the final set of variables varies across the datasets, making it hard to synthesize the results of the several models into a single set of coefficients. In this paper, we suggest a practical way for overcoming this problem. Our imputation, multiple imputation, missing value, feature selection, proc step, automatic variable, logistic distribution, sample, proc reg, proc calis, regression analysis, logistic regression, sample size, proc mi 4
80 Importance of WARNING and NOTE Messages from SAS Log Jyotheeswara Yellanki When you run any SAS code from any o perating system, the first and most important rule in debugging SAS programs is to always check the SAS log. Generally you will look for only ERROR messages in the log. If there are no ERROR messages in the log you think that it is good to go and expect that results are good. It is advisable to check the warning and note message also. But you need to check Warnings and some kind of NOTE messages. Warnings are less dire than errors. SAS prints relevant wa rnings message in the log and then goes ahead and runs the job anyway. Many people, including some professional programmers, try to ignore warnings. Some times these warnings are Harmless or hazardous. Similarly SAS writes lot of NOTE me ssages into the log. Some NOTE messages tell about reasons for inaccurate results. This paper will describe some of the frequently occurring warnings and notes that are indicative of inaccurate result s sas log, missing value, proc step, proc sql, input statement 5
81 IT Framework for the Implementation of Balanced Scorecard in Healthcare Systems Mahammad Asif Syed,
Christopher Bresson,
Mark Moskowitz
Hospitals operate in an environment demanding demonstration of excellent care in a challenging fiscal environment where markets for talented individuals are extremely competitive. This requires attention to multiple areas of clinical, financial, and operational performance. The Balanced Scorecard (BSC) has proven to be a useful strategic management and performance management tool in healthcare. The balanced scorecard (BSC) was developed by Kaplan and Norton to help organizations succeed by embedding a strategy of balanced focus and performance monitoring into the heart of organizational culture. Yale-New Haven Health System, a three hospital system whose anchor is a large tertiary care teaching hospital, implemented an electronic Balanced Scorecard using a commercial product, "S AS Strategic Performance Management for Healthcare". This paper aims to document the bala nced scorecard implementation process and the associated IT framework across the System sample, access control 12
82 Jazz Up Those Boring Reports by Using Nontraditional Fonts Sharon Avrunin-Becker,
Marie Byrd Alexander
Are you (or your clients) tired of using the same boring fonts for your reports? Tired of trying to decide between Arial and Times New Roman? The magic of ODS output and PROC TEMPLATE lets you take advantage of the many fabulous fonts that are now available. This paper demonstrates how to create SAS reports that use attractive fonts to maintain the look and feel of previously existing project reports proc template, proc step 5
83 Juxtaposition of Tables and Graphs Using SAS /GRAPH Procedures Suhas R. Sanjee,
Sheng Zhang
Graphs provide high-impact visuals that enable decision makers to gain a quick understanding of critical business issues. However, graphs do not always convey all the details the reviewer wants; hence a corresponding table needs to be provided. Having relevant t ables and annotations as part of a graph allows the reviewer to formulate appropriate decisions. The proposed me thod uses procedures in SAS/GRAPH to include tables as one of the panels of a multi-panel graph. Often it is required to create multiple graphs from the same data for different interpretations. While each graph by itself is useful, seeing all of the graphs on the same page is even more helpful. Multi-panel graphs enable review- ers to compare the performance of two treatment groups/ periods. This article starts by introducing PROC GRE- PLAY. PROC GREPLAY enables display of different graphs in a single page. Then, a method to convert a table to graph object using PROC GPRINT is presented correlation, proc step, proc greplay, pearson correlation, proc corr, proc tabulate, sample, in=, proc gplot, scatter plot, macro loop 7
84 List Processing Basics: Creating and Using Lists of Macro Variables Ronald J. Fehd,
Arthur L. Carpenter
macro put, macro variable, proc sql, proc step, macro call, call execute, macro loop, macro definition, %if-%then-%else, output delivery system, do loop, proc report, dictionary tables, data step, create table, proc sort, macro function 20
85 Low-Order Autoregressive Models in Early Detection of Epidemic Out-breaks and Explosive Behaviors in Economic and Financial Time Series Ernest S. Shtatland In our SUGI 2006 presentation, we suggested using low-order autoregressive models, AR(1) and AR(2), in biosurveillance and outbreak detection (PROC ARIMA, SAS/ETS). Our suggestion was based on empirical data. Here we propose a strong theoretical ground for this. Based on the workhorse model in epidemiology, a classic susceptible-infectious-recovered (SIR) model, we arrive at AR(1) models of epidemics. In this approach we need to estimate only one parameter, the first-order autoregressive coefficient. Its least squares estimate has a very simple epidemiological meaning. Note that in the vast majority of applications, AR and ARMA are used as purely empirical models, with no specific substance matter meaning for coefficients. The value of our first-order autoregressive coefficient less than one corresponds to a stationary, no-epidemic regime. If the parameter is greater than one, we have an explosive case (an outbreak of epidemic) confidence interval, time series analysis, unit root, autoregressive model, hypothesis testing, type ii error, normal distribution, ar(1), regression analysis 10
86 Macros: Data Listings with Power Daphne E. Ewing Displaying a variety of data in a consistent manner can be tedious and frustrating. Making adjustments to these displays, such as adding/moving/removing columns, can be time consuming and just as frustrating. This paper will show the user how to set up macros which work together to make data listings consistent, easy to follow, and easy to modify. I will define several SAS macros, show how they interact with each other and t he data, and give examples of input and output. Given these macros, I will also show how to modify displays easily put statement, macro variable, adverse events, proc print, macro call, macro definition 8
87 Making Sense of PROC TABULATE Jonas V. Bilenas The TABULATE procedure in SAS provides a flexible platform to generate tabular reports. Many beginning SAS programmers have a difficult time und erstanding the syntax of PROC TABULATE and tend to avoid using the procedure. This tutorial wi ll explain the syntax of PROC TABULATE and, with examples, show how to grasp the power of PROC TABUL ATE. The data used in this paper represents simulated consumer credit card usage data and the c ode was developed using SAS 9. This updates the paper presented at NESUG in 2001 with the same title proc step, proc tabulate, class variable, proc format, sample, excel, credit card, proc freq 17
88 Managing Professional Development Sharon Sutton In today's business climate, technical training and professional development often take a back seat to budget constraints and tight timelines. For instance, managers want to know how to get new hires up to speed quickly. What are the basic SAS courses needed for programmer development? What to do with programmers who are not novices but don't have the intermediate skill set yet? In today's market, not all programming is done by the classical programmer of the past. What is the most efficacious way to organize SAS training for multifunctional groups? When is it time to seek SAS training outside of the SAS Institute and use other vendors? How do you choose and evaluate a vendor objectively? Do surveys really accurately assess training needs? While a lot of programming can be learned from reading the manual and doing programming, formal instruction is sometimes necessary. This presentation will explore these issues and offer possible solutions proc step, macro facility, macro definition, sas programming, proc sql 5
89 Matching %DO-%END Pairs - A Macro Debugging Technique Zizhong (James) Fan When it comes to macro development and maint enance, matching %DO-%END pairs is a very important task. Sometimes it can be very tedious and time consuming. SAS enhanced editor provides ways of checking coding errors. One of features is matching DO-END pairs by pressing the 'Alt' key and the '[' key. This makes the cursor toggle between the DO-END pair that covers the code in between. But this feature is only supp orted in regular data steps. It is not designed to work within a macro. This paper introduces an easy solution to search and match %DO-%END pairs in macros. This technique can be used for macro maintenance and debugging. SAS product: Base SAS. Skill level: All levels. Keywords: Macro, %do-%end pair macro loop, macro definition 5
90 Measuring Days and Hours: An Introduction to the Handy Uses of the IN, END, LAG, FIRST and LAST Statements Catherine Loveless-Schmitt Using a simplified example from a real ACCESS data base that contains incomplete date and time information, this paper describes several helpful features in SAS that can be used in the DATA STEP. The DATA STEP processing has some handy features and the review of the SAS Log can provide very helpful information. Some comparisons using simple procedures will also be included sas log, proc step, conditional do loop, merge statement, proc freq, proc print 9
91 MedDRA Dictionary: Reporting Version Updates Using SAS and Excel Richard Zhou,
Denis Michel
MedDRA (Medical Dictionary for Regulatory Activities) is widely used to report adverse event data in clinical trials, as well as pharmaceutical post-marketing safety information. The dictionary is managed by the MSSO (Maintenance and Support Services Organization). New versions are released twice a year from the MSSO. The updated versions contain added records and modifications to previous records. A primary key variable, containing a unique code, is maintained across versions. Comparing older versions of MedDRA with newer versions, finding out and listing any new and important changes or additions is very useful to people who work in related fields. This paper presents a simple and efficient way to compare new and old versions of MedDRA. SAS code is used to create an EXCEL workbook containing formatted worksheets through automation excel, lowest level term, xls, key, libname engine 10
92 Metadata 101: A Beginner's Guide to Table-Driven Applications Programming Frank C. DiIorio macro variable, label statement, keep statement, adverse events, retain, proc contents, attrib statement, data cleaning 11
93 Navigating the SAS Training Experience Amy Peters Is your manager asking you to create a SAS training plan for the new guy? Do you have a group of folks that need to learn the latest new thing in SAS? Perhaps it's just the annoying neighbor who's trying to get a job and keeps asking you for the best way to learn SAS. There are a lot of reasons people need training, and SAS offers a bewildering array of classes and types of training. This paper presents the pros and cons of classroom versus live Web versus self-paced e-learning. What are the most common starting points and where do you go from there? How do the SAS Learning Edition and SAS Certification fit in? Where can you get more information and keep up-to-date? sas enterprise guide, data mining, sas programming, sas programmer, regression analysis 5
94 Nonlinear Programming for Maximum Likelihood Estimation Robert J. Gallop The NLP procedure offers a series of optimization techniques for minimizing or maximizing continuous nonlinear functions. In this paper, we consider using the Newton-Raphson technique to maximize likelihood functions based on assumed probabilistic distribution on observed data. This results in estimates of the unknown parame- ter referred to as maximum likelihood estimates (MLE). This paper illustrates to examples of using NLP to derive MLE's. Keywords: PROC NLP, likelihood function, Newton- Raphson, maximum likelihood estimation likelihood function, proc step, maximum likelihood estimation, proc mixed, covariance, binomial distribution 12
95 Numeric Length: Concepts and Consequences Paul Gorrell The LENGTH statement in SAS is simple to use, but what's going on behind the scenes is more complex, especially with respect to numeric variables. Understanding what happens when you specify the length of a numeric variable is essential for making informed decisions. SAS stores the value of all numeric variables in floating-point representation. This paper begins with a brief, practical, overview of floating-point representation and how it relates to programming questions regarding length, precision, and efficient use of disk space. We will discuss situations where numeric length should not be reduced, even if the range of integer values on the data set would appear to permit it. We'll argue, in particular, that decisions about numeric length require that you think outside the data set numeric variable, length statement, decimal, cpu time, dataset, proc step 11
96 ODS Markup, Tagsets, and Styles! Taming ODS Styles and Tagsets Eric A. Gebhart Find out how ODS styles can be used in new ways when they are combined with TAGSETS. Watch as a simple example grows into new ideas on how to use styles and TAGSETS. See how easy it is to create a new destination and style that do just what you need. Explore how these concepts have been applied to existing ODS Markup destinations, such as ExcelXP and HTML. Learn a few simple tools and tricks that will make styles easier to work with for any ODS destination. Understanding just a little about TAGSETS and styles can enable the creation of those special reports you've always wanted. This paper reveals how styles and TAGSETS work, and how to apply that knowledge to various ODS destinations, or to create new and versatile ODS destinations of your own design proc step, proc print, proc template, excel, ods html, output delivery system 27
97 ODS Options and SAS Stored Processes Cynthia L. Zender Are you using SAS Stored Processes in a SAS Intelligence Pl atform client-server environment? Do you want to convert existing SAS programs for use as SAS Stored Processes? This paper provides concrete examples of how to convert existing SAS programs to stored processes that can be executed from selected SAS Intelligence Platform client applications. Topics in this paper include: basic report program conversion, conversion of SAS/GRAPH programs, use of macro variables in program conversion, streaming versus transient output from stored processes, and permanent result packages. Specia l emphasis is given to showing code both before and after conversion- especially the use of Output Delivery System (ODS) options. SAS/GRAPH options are also illustrated with before- and-after examples. In addition, there is some discussion of how different client applications accept the options and render output macro variable, sas enterprise guide, macro definition, sas enterprise guide project, proc step, macro facility, output delivery system, spk file, macro parameter, ods html, global symbol table, proc report, symbol table, macro call, excel 25
98 ODS, An Introduction to Creating Output Data Sets Elisabeth Pyle Not using ODS yet in your SAS programs? This is a brief introduction to help you identify procedure output table names, find your procedure output data and manipulate the data for reporting. Examples will help beginners quickly adapt to using ODS generated output data sets from procedures in their programs sas output, anova, estimate, proc step, regression analysis, proc means, dataset, sas log, file statement, proc reg 7
99 Offset Techniques in Predictive Modeling for Insurance Matthew J. Flynn,
Jun Yan
This paper presents the "how-to" of the application of several "offset" techniques that can be used to build Generalized Linear Models. Modelers can use techniques to eliminate the impact of the variables that will not be included in the model but will influence modeling results. I n the paper, we give some detailed SAS codes for the techniques. More theoretical background and Insurance applications are discussed in a paper to be presented at the 2007 CAS Predictive Modeling Seminar and accepted for the 2009 Casualty Actuarial Society Ratemaking Discussion Paper Program proc step, likelihood function, poisson distribution, proc freq, proc genmod, in=, pure premium, regression analysis, binary variable 9
100 Oracle Clinical for the SAS Programmer Kevin Lee This paper is intended for SAS program mers who are inte rested in understanding the difference in the database structure between Oracle Clinical and SAS. It also helps SAS programmers to use SAS/ACCESS to extract raw data from Oracle Clinical. This paper will discuss the database structure of Oracle Clinical and its relationship with the extracted SAS data sas programmer, clinical database, raw data, sample, data cleaning 9
101 Outperforming SAS Indices for Sorted Datasets Mark Keintz,
Shuguang Zhang
Although the standard SAS index can speed up data retrieval, it is not optimized for datasets that are sorted and grouped on the index variable. In such cases it is possible to dramatically improve performance by reducing the number of pointers in the index file from NOBS (the number of records in the original dataset) to NIX (the number of unique index values). Depending on the ratio of NOBS/NIX, the result is an index file (in the form of a SAS da- taset) that minimizes disk space requirements and reduces CPU time and elapsed time by an order of magnitude. We will demonstrate, with sample DATA steps, how to create and use such an index. We will also show perfor- mance results compared to SAS indices. Other advantages such as precise prediction of the number of retrieved records will be discussed. This technique can be generalized to datasets sorted and grouped by multiple variables index, elapsed time, set statement, cpu time, dataset, sorted data 8
102 Partially Transforming Hierarchical Data Sets for Sequential Processing Using Arrays Richard L. Downs Jr.,
Pura A. Perez
This paper explains a simple framework for applying traditional sequential processes (reformat, edits, imputation, etc.) to a hierarchical group of SAS data sets. Using a series of macros, you define the data set hierarchy or a subset of that hierarchy. The macros transform all data sets under the top level of the hierarchy, creating top-level views of these data sets. Inside the process DATA STEP(s) another series of macros build the hierarchy-related portions of the DATA statement, all array statements referencing variables from transformed data sets, and the merge and output statements that reference the hierarchy data sets. After the processing DATA STEP(s) a final macro reverts the transformed data to its original format and updates the original data set(s) data step, merge statement, array, data statement, missing value, proc sql, proc step 9
103 Passing PARM Data from JCL to SAS Ron Hanson,
Ismail E. Mohamed
This poster is intended to illustrate ho w to execute SAS mainframe programs from a JCL Procedure. This JCL will also de monstrate how to manipulate SAS Macro variables in those programs by using a passed JCL symbolic to SAS Sysparm macro variable, macro definition 4
104 Performing Iterative Processes with the Macro Facility Katie Joseph,
Taylor Lewis
The most basic type of iterative pr ocess SAS offers is the BY statemen t, which nearly all PROCs support, that performs a separate analysis on a subset(s ) of previously sorted data. The st ructure of the dat a or task at hand, however, may not allow for this built-in form of iterative programming. For example, computer resource limitations or an externally-contingent nature of requirements could lend way to employing the macro facility to aid in the reporting process. Through brief but widely applicable samples of a %DO loop, a %SCAN routi ne, and the PROC SQL INTO command, users will take with them the added know-how of building simple iterative macros to accomplish a variety of tasks in the SAS system. You need not be an expert in SAS macro programming to make use of these powerful tools macro variable, proc step, macro loop, do loop, proc surveymeans, by group processing, macro function, macro facility, proc sql, put statement, proc calis, macro put, character functions, end, into, sample, macro definition 5
105 Planning and Implementation of Dynamic Training to SAS Programmers in a Global Environment Stephanie Christofides,
Mark Penniston
In the pharmaceutical industry, knowledgeable programmers and statisticians who understand the technical de- tails of the SAS programming language with its suite of products, the information that is being asked to be PROC- essed and the analysis and presentation of the materials requires training and development time. To ensure quality deliverables, learning via training is key to achieving the greatest acceleration towards producing out- standing SAS programmers. Through the use the Web based training integrated with SAS Enterprise Guide and real world working examples, the amount of time required by the trainer and mentor for the new employee or intern have reduced dramatically and department processes are learned and understood much faster. This has us to accurately predict the functional availability of new programming resources and normalized and enhanced the quality of work produced proc transpose, proc step, sas enterprise guide 8
106 Presentation and Handling of Clinical Laboratory Data -- From Test Tube to Table Randall Carlson,
Nate Freimark
clinical trial, crf, standard deviation 13
107 Print / Read Only the Relevant Pages Kamau Njuguna,
Hsiwei Yu
Most of us have the need to examine changes, if any, between the many old and new data sets produced by an upgrade in an application. It's easy to use PROC COMPARE, but labor is intensive for a person to read thr ough multiple output pages. We outline an intelligent utility that has been developed to store PROC COMPARE outputs to a document, review the macro return code (SYSINFO) from Compare and then selectively replay with PROC DOCUMENT only pages showing where differences are. This ad hoc utility reduces manual work and increases programmer productivity. It nicely illustrates how to use PROC DOCUMENT for st orage and retrieval, and how to decode the qualitative information contained in SYSINFO about comparison results proc step, proc compare, libname statement, sysrc, sample 7
108 PROC EXPAND to the Rescue! Premal Vora When analyzing a time series of data, a researcher frequently desires to output and analyze moving or rolling statistics such as moving averages, moving standard deviations, and rolling correlations. While it is possible to implement this in the DATA STEP, SAS provides some powerful features in PROC EXPAND (which is a component of SAS/ETS) that allow the researcher to output a variety of moving statistics with minimal effort. In this presentation, which is intended for basic to intermediate level SAS users, I will provide two examples of DATA STEP code that outputs the desired moving statistics and the equivalent code in PROC EXPAND and compare both to demonstrate the power of PROC EXPAND proc step, time series analysis, moving average, correlation, lag function, missing value 5
109 PROC LOGISTIC: The Logistics Behind Interpreting Categorical Variable Effects Taylor Lewis The goal of this paper is to demystify how SAS models (a.k.a, parameterizes) cat egorical variables in PROC LOGISTIC. Specifically, readers will beco me more familiar with the commonly used effect and reference parameterizations. In conjunction with these two paramete rizations and associated options, this paper touches on issues such as why SAS needs to create dummy variables fo r the k distinct categories a nd why the output displays estimates for only k - 1 parameters. At the conclusion of the paper, readers should feel more confident interpreting a categorical variable's effect on the response as well as test ing for significance, by way of the odds ratios computed from the output or via the CONTRAST statement. Discussion uses real-world data from the U.S. Office of Personnel Management, collected for a multiple logistic regression m odel project whereby the like lihood of a promotion for Federal civilian employees was modeled using personnel data odds ratio, binary variable, proc logistic, estimate, logistic distribution, likelihood function, proc step, maximum likelihood estimation, confidence interval, nominal variable, logistic regression, class variable, predictor variable, regression analysis 7
110 PROC SQL - A Powerful Tool in SAS Swetha Kongara,
Raja Panchumarthi
PROC SQL is a powerful tool in the SAS system that can be used in a variety of ways. Its uses include creating SAS datasets or data vi ews, macro variables and data listings. The power of SQL lies in its ability to com bine the f unctionality of the procedures in to one set of progr amming. You can combine the da ta f rom multiple da tasets, calculate and integrate multip le sum mary statis tics and so rt the r esulting data set in one step. This paper will explain you how to create SAS data sets or data views, m acro variables and data listings proc sql, proc step, macro variable, group by, order by, by group processing, create table, select, where statement, create view, sas function, sample, proc print 9
111 PROC SQL and Arrays: The Powerhouse Behind Data Processing Meera G. Kumar This paper attempts to explain the power behind the combined usage of PROC SQL and Arrays. The task at hand was to loop through all the datasets in two different directories and to identify common variables across datasets and to unify the attributes (variable label, type, length and format) of the common variables to ensure consistency in the data submitted to the FDA. Challenge: Conventional approach would require revisiting all labels already seen along with their formats and types. This could get very cumbersome, complex and time-consuming to code. Solution (problem redefinition): A variable comes with multiple labels, types and format definitions. But a variable when visited can have only two values: New or Old. If the visited variable is old (already visited) then inherit old label, type and format definitions. If variable is new (not visited before), make its label, type and format definitions the standard for future instances of this variable proc sql, proc step 3
112 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 well-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 leading to a change in the contents of the reports. This paper will demonstrate how listings and reports can easily be generated out of SAS datasets using Crystal Reports medical history, dataset, proc sql 18
113 Programming Rolling Regressions in SAS Michael Boldin SAS does not have an option for PROC REG (or any of its other equation estimation procedures) that will compute either recursive least squares or rolling regressions-i.e., econometric procedures in which the same linear equation is estimated multiple times using either a growing sample or partially overlapping subsamples. This paper shows how a macro subroutine can achieve the desired effect, and discusses possible extensions of this approach regression analysis, proc reg, proc step, sample, proc freq, date variable, sysdate9, macro definition 12
114 Put Down That Mouse! Daniel J. Boisvert The display manager is the most widely used inte rface in SAS. Understanding all it has to offer allows the programmer to write code more efficiently. This paper will present one trick to spark interest in using the Enhanced Editor and its keyboard shortcuts. New users and seasoned pros can all benefit from this trick 6
115 Quick and Dirty Survey Analysis to Assess Real-Time Requirements Joseph Caruso,
Salvatore Potenza
New web-based applications are developed every day in large corporations. Since the functionality required of these web-based applications far exceeds the standards of older legacy applications, there is often a trade-off between performance and function. To minimize the effect on performance, developers have recently been requiring that read-only users who do not require update capability go to an information warehouse (IW) to satisfy their data needs. This often creates conflict between end users and developers. End users who are familiar with real-time access to data are reluctant to accept data from an IW that is updated nightly. This paper describes the methodology used to assign users between a web-based system and the IW. A list of simple questions was developed and sent to users of the legacy system. This process was implemented using SAS. SAS code was written to randomize the legacy system active user list and generate e-mail addresses for 300 users sample, excel, proc step 6
116 Reinventing a Legacy System with SAS, the Web, and OLAP Reporting Andrew P. Ford,
Troy B. Wolfe,
Shiva Srinivasan
Generation adequacy calculations and assessments have been used at PJM since the early 1970s. The models and calculations are derived from statistical values, based on years of historic performance data. The applications implement probability theory to predict future PJM generation reserve requirements. Recently, the legacy systems based on Fortran and rudimentary database system s have been implemented using SAS and Java web applications. This paper describes our experience in inv enting new ways to implement the old legacy capabilities using new SAS code, SAS Tables, web interface and SAS Integration Technologies. Topics discussed include: Introduction and Summary Measurement of correct calculations Measuring code performance; arrays and modular design SAS Tables and Database Design and development of the web interface; inte raction of the web interface and SAS Integration Technologies Use of Futrix OLAP reporting in the process macro definition, macro variable, temporary array, excel, dataset, standard deviation, data cleaning 15
117 Relationships Between CDISC Variables Concerning Day and Date (CDISC Variable Relationships Part 2 of 3) Susan Fehrer,
Russell M. Lavery
This paper explores the relationships among the set of timing variables in CDISC domains. Many CDISC variables are related to each other and understanding relationships among variables helps both in programming and in edit checking. It is hoped that a discussion of relationships among variables, in the context of examples, will help people that are new to CDISC. This paper is one of a short series of example-focused papers devoted to exploring relationships among classes of CDISC variables. Timing variables are the set of variables that record "time related" characteristics associated with when an event happens. Examples of time-related characteristics are: the visit when the event happened, the date that an event happened, the duration of the event, the number of days between a time point (subject entering the study, etc.), and the date of the event study day, elapsed time, cdisc 10
118 Relationships Between CDISC Variables Linking Domains (relrec) (CDISC Variable Relationships Part 3 of 3) Susan Fehrer,
Russell M. Lavery
Many CDISC variables are related to each other and this paper is one of a short series of example-focused papers devoted to exploring relationships among CDISC variables. This paper focuses on using the RELREC domain to link or establish relationships among records in the AE and CM domains. RELREC is used for two purposes. First it can be used to establish relationships among observations in different data sets. The CDISC Implementation Guide (IG) says that one should use RELREC to establish those relationships collected on the CRF. This purpose will be illustrated in this paper. The second use of RELREC is to define relationships between whole domains/data sets. This is required when a sponsor has divided data into two data sets and needs to be able to examine the data, together as part of analysis. This use of RELREC will not be discussed in this paper study day, concomitant medications, adverse events, unique key, verbatim term, proc freq, cdisc 12
119 Relationships Between ORRES and Other CDISC Variables (CDISC Variable Relationships Part 1 of 3) Susan Fehrer,
Russell M. Lavery
Many CDISC variables are related to each other and understanding those relationships helps both programming and QC. This example-based paper concentrates on how changes in the circumstances/characteristics surrounding the collection of the - -ORRES variable (original results) affects other variables in the domain. The CDISC implementation guide gives rules and examples that focus on entering values into specific variables. The contribution of this paper is the study of the relationships among variables. Several characteristics of the - -ORRES variable start a logical cascade that affects how values are entered in other variables. First, the value to be entered in - -ORRES can be on the CRF or calculated programmatically (derived). Second, the value of interest, - -ORRES, is stored as character in the domain, but may be collected as character or numeric. If the value is collected as numeric, it will need to be programmatically converted to character numeric variable, char., cdisc 9
120 Reliability Analysis: Calculate and Compare Intraclass Correlation Coefficients (ICC) in SAS Li Lu,
Nawar Shara
Reliability stu dies are wi dely u sed to assess th e m easurement rep roducibility o f h uman ob servers, laboratory assays or diagnostic tests. For quantitative measures, intra-class correlation coefficient (ICC) is the principal measurement of reliability. In this paper, a SAS macro is provided to calculate the ICC and its confidence limits. Th e app lication of th e m acro is d emonstrated in a cli nical reliab ility case stud y, the comparison of two ICCs is discussed confidence interval, macro definition, correlation, cv, regression analysis 4
121 Rename and Modify Attributes of Variables Across All SAS Datasets in the Data Build Catalog Jay Garacani This paper illustrates step by step how to rename and modify attributes of variables using SAS 9.1. The main objectives are: 1) renaming variables; 2) modifying the attribute of variables (i.e. length, format and label); 3) assuming attribute of a variable in specific dataset and applying that to all other datasets. The result is new datasets with unique variable attribute for the same variable across all SAS datasets, all variables have the same value as before except when the length of them are modified (variables are truncated in length reduction) macro variable, hash table, call execute, %if-%then-%else 4
122 Resampling Census Data for Survey Data Analysis Adeline J. Wilcox Clustering of sample units can induce correlation among the response values from the sample units within the cluster. Along with weighting of the sample units, clustering due to the sample design can increase sampling error. Standard procedures such as PROC MEANS do not account for this clustering. For sample survey designs with clustering, special procedures like PROC SUR VEYMEANS are recommended. However, unlike other large surveys, the only clustering in the American Community Survey (ACS) design is the clustering of residents within the sampled living quarters. It is not clear that special procedures are required for analysis of ACS data. PROC SUR VEYSELECT is used to resample a census test site and census tracts within it, drawing samples identical in size to those drawn by the ACS correlation, sample, sample size, time series analysis, proc step 10
123 Revising Output from the TABULATE Procedure Michael F. Tuchman Many changes required in reports produced by the TABULATE procedure can be made without re-running the underlying analysis. This can be helpful in shortening the reviewing cycle on a reporting project. The first method is to re-run the procedure on the summary data set produced by the TABULATE procedure. The TABLE statement required is virtually identical, and the minor adjustments in nomenclature are reviewed. You will also learn how to interpret the structure of the summary table to make sev eral common changes to the shape of the tables produced without re-running the original data. Once the table is perfected, additional options for savi ng and managing the final report are new in version 9.1. In particular, the DOCUMENT destination and the DOCUM ENT procedure were introduced. The commands for managing an ODS DOCUMENT require a large learning curve. There is a new set of commands to master and a new data structure proc tabulate, macro variable, standard deviation, proc step, proc print, proc freq 18
124 SAS and Microsoft Office: Tales from the Trenches John W. Davison Jr. The popularity of Microsoft Office and especially EXCEL has stimulated interest in methods for moving data be- tween the two environments. This in turn has given rise to papers on the topic at recent SUGI/SGF and regional SUG meetings. These have treated various approaches in different contexts, and rely in general on the SAS Output Delivery System for reporting and SAS/ACCESS to access EXCEL workbooks as SAS libraries to move data in either direction. This paper reports the author's experience with these over the past six years; particularly in situations where the governing consideration was to use new SAS features to simplify applications developed using DDE and OLE while matching the appearance of existing results. It does not pretend to offer a unified ap- proach that meets all needs but presents several approaches that have worked together with the direction the au- thor is taking, and considerations for improving the methodology excel, xls, sas output, proc tabulate, proc step 4
125 SAS Dates, the Basics Steven Gorin,
Pitney Bowes
This paper presents the accumulation of many years work with converting external date variables into SAS Dates sysdate9, date variable 7
126 SAS Indexes: Faster Processing of Large Categorical Databases Like BRFSS Prashant Mittal The Index is an integral part of any book. Imagine trying to find a topic, article or a word in a book without having an index. You may have to look line by line from the first page until the last page , only if it happens to be the last word in the book. Converse ly, it is easy to locate quickly with the help of an index. SAS also has a simila r tool curiously called an Index, and just like the ones in book s, it also helps reduce the processing time of most pr ograms. Many programmers still run code without making use of an Index, which is sim ilar to finding a topic in a book without having any idea of its locati on. As a result, valuable computer processing time is wasted. Just like most other concepts, there are rules and conditions under which SAS Indexes optimize their performance. This paper is an introd uction to the "HOW TOs" and "WHENs" of an Index using data from the Behavioral Risk Factor Surveillance System (BRFSS) for examples index, by group processing, cpu time, proc sql, dataset, proc contents 8
127 SAS, Econometrics, and Computation Speed Michael Boldin This paper discusses how researchers can take advantage of SAS and the ever-growing power of personal computers (PCs). Due to previously unimaginable processing speeds and the overall capabilities of relatively inexpensive PCs, many procedures that were once considered computationally prohibitive are now within the reach of almost any one that desires to use a preferred econometric technique-and SAS is likely to have the desired capabilities. Still, there are cases where forcing any statistical package such as SAS to perform a task for which it is not well suited is not a good choice, simply because other easy-to-use econometrics tools are readily available regression analysis, proc step, time series analysis 12
128 SAS/GRAPH for the Timid Earl R. Westerlund SAS/GRAPH is one of the foundation products of SAS , and an invaluable tool for anybody who needs to see the information in the data. Its procedures work the same way as any other procedure. But the number of proce- dures, statements and options available are so numerous - and, in many cases, cryptic - that many peop le be- come intimidated. The purpose of this paper is to provide a gentle introduction to SAS/GRAPH, with numerous examples to show how the fundamentals work. It is based on the following premises: If you can create a crosstab in PROC FREQ, you c an create a plot in PROC GPLOT. If you can set a title or footnote, you can chan ge the appearance of a graph line. If you can change the linesize of a listing, you can change the color of the title text. This paper is intended for those who have not used SAS/GRAPH, or those who have tried and given up in frustra- tion proc gchart, proc gplot 14
129 Scientific Computing Using the MODEL Procedure and Macro Coding for General Physics Tsung-Hsun Tsai This paper introduces the use of the MODEL procedure for solving problems in general physics courses at college level. The merit of the MODEL procedure is that the models in the SAS statements are declared in the form of governing equations instead of coded and embedded in the algorithms. Because many problems in general physics can be modeled as nonlinear equations or differential equations, the MODEL procedure with some macro coding can solve more complex problems or the problems that require more computing steps. Progressively harder problems from general physics course are presented with solutions of these problems using the MODEL and IML procedures proc model, cross-sectional data 8
130 Search and Replace in SAS Data Sets Through GUI Edmond Cheng In managing data with SAS/BASE software, performing a search and replace is not a straight forward task (un- like when working within a word processor or spreadsheet program). Because time and productivity are valuable, a utility to search and replace data values would enable users to easily make repetitive modifications while work- ing with SAS data sets. This paper introduces a SAS program written in SAS/BASE, with a simple search and replace function through the use of a graphical user interface (GUI) in the SAS Display Manager environment. This program presents an intuitive way of searching through the contents of a SAS data set for specific character or numeric string patterns, with the option of replacing one string with another. In addition, the program also allows for various common search features such as 'column selection', 'work copy', and 'print result' macro variable, tranwrd function, dataset 6
131 Selecting the Appropriate Outlier Detection Technique for Common Industry Applications Kunal Tiwari,
Krishna Mehta,
Nitin Jain,
Ramandeep Tiwari,
Gaurav Kanda
1 Outlier detection and treatment is a very important part of any modeling exercise. A failure to detect outliers or their incorrect treatment can have serious ramifications on the validity of the inferences drawn from the exercise. There are a large number of techniques available to perform this task, and often selection of the most appropriate technique poses a big challenge to the practitioner. In making this selection, the sophistication of the technique needs to be balanced with the ease of im plementation and the impact on model performance. In this paper we focus on the impact some of these techniques have on the more common applications of modeli ng. We evaluate 5 different outlier detection and treatm ent techniques namely: Capping/Flooring, Sigma approach, Exponential Smoothing, Mahalanobis distance and the Robust Regression approach regression analysis, outlier, proc reg, logistic regression, mahalanobis distance, logistic distribution, cv, proc esm, proc robustreg 5
132 Sensitivity Training for PRXers Kenneth W. Borowiak Any SAS user who intends to use the Perl style regular expressions through the PRX family of fu nctions and c all r outines s hould be r equired t o g o t hrough s ensitivity t raining. I s t his because those who use PRX are mean and rude? Nay, but the regul ar expressions they write are case sensitive by default. This paper discusses the various ways to flip the case sensitivity switch for th e enti re or part of the regular expr ession, wh ich can ai d i n maki ng it more readable and succinct. Keywords: case sensitivity, alternation, character classes, modifiers, mode modified span proc step, proc print 7
133 Smooth Writing with In-Line Formatting Louise S. Hadden PROC TEMPLATE and ODS provide SAS programmers with the tools to create customized reports and tables that can be used multiple times, for multiple projects. For ad hoc reporting or the exploratory or design phase of creating custom reports and tables, SAS provides us with an easy option: in-line formatting. There will be a greater range of in-line formatting available in SAS 9.2, but the technique is still useful today in SAS versions 8.2 and 9.1, in a variety of procedures and output destinations. Several examples of in-line formatting will be presented, including formatting titles, footnotes and specific cells, bolding specified lines, shading specified lines, and publishing with a custom font proc step, proc report, proc tabulate, proc print pdf 11
134 So Now You're Using PROC REPORT. Is it Pretty and Automated? Daphne E. Ewing,
Ray Pass
PROC REPORT will display data. That's a given. That it is more powerful than the standard SAS reporting tool PROC PRINT is also becoming common knowledge. But what can PROC REPO RT really do? It is certainly more than a glorified PROC PRINT, but it does take some additional work beyond mastering some of the basics of the pr ocedure before it can be used to produce output that can rival t hat of a serious DATA _NULL_ step. This paper will discuss t he use of several customized macros that can work together with some PROC REPORT options, and standard SAS title and footnote stat ements, to make your PROC REPORT output really shine proc report, proc step, macro variable, footnote statement, options statement, sample, macro definition 14
135 So You're Still Not Using PROC REPORT. Why Not? Ray Pass,
Daphne E. Ewing
Everyone who can spell SAS knows how t o use PROC PRINT. Its primary use may be as a devel opment tool to help in debugging a long multi-step program, or as a simple report generator when all that is really needed is a quick look at the data, or even a basi c l ow-level fi nished report . However, i f a report generat ion/information del ivery t ool wi th powerful formatting, sum marizing and analysis feat ures is called fo r, th en PROC REPORT is th e so lution. PROC REPORT can provide the standard PROC PRINT fu nctionality, b ut in ad dition, can easily p erform m any o f th e task s th at yo u wo uld otherwise have to use the SORT, MEANS, FREQ and TABULATE procedures to accom plish. PROC REPORT is part of the Base SAS product, can run in both an interactive screen-painting mode or a bat ch mode, and should be the basic tool of choice when there is a need to produce powerful and productive reports from SAS data sets proc report, proc step, class variable, character variable, proc print, proc means, proc tabulate 13
136 So You're Still Not Using PROC REPORT. Why Not? (Hands-On Workshop) Ray Pass,
Daphne E. Ewing
Everyone who can spell SAS knows how t o use PROC PRINT. Its primary use may be as a devel opment tool to help in debugging a long multi-step program, or as a simple report generator when all that is really needed is a quick look at the data, or even a basi c l ow-level fi nished report . However, i f a report generat ion/information del ivery t ool wi th powerful formatting, sum marizing and analysis feat ures is called fo r, th en PROC REPORT is th e so lution. PROC REPORT can provide the standard PROC PRINT fu nctionality, b ut in ad dition, can easily p erform m any o f th e task s th at yo u wo uld otherwise have to use the SORT, MEANS, FREQ and TABULATE procedures to accom plish. PROC REPORT is part of the Base SAS product, can run in both an interactive screen-painting mode or a bat ch mode, and should be the basic tool of choice when there is a need to produce powerful and productive reports from SAS data sets proc report, proc step, class variable, character variable, proc print, proc means, proc tabulate 13
137 Sparklines for SAS and JMP Kate Davis Sparklines are intense word-sized graphics for use inline text or on a dashboard that condense table of numbers into elegant qu antitative visualizations. Dr. Edward Tufte introduced sparklines to the information visualization community in his book "Beautiful Eviden ce". This paper outlines constructing painfree sparklines for both SAS and JMP, including a complete introduction to their construct ion and the "bank to 45" and other construction rules. Examples in both JMP and SAS, including SAS macros, are presented macro definition, time series data 6
138 Standardized Data Set Transformations to Map a Tabular Output Table to a Data Set Frederick A. Cieri proc step, data cleaning 5
139 Stopping Stepwise: Why Stepwise and Similar Selection Methods Are Bad, and What You Should Use Peter Flom,
David L. Cassell
A common problem in regression analysis is that of variable selection. Often, you have a large number of potential independent variables, and wish to select among them, perhaps to create a 'best' model. One common method of dealing with this problem is some form of automated procedure, such as forward, backward, or stepwise selection. We show that these methods are not to be recommended, and present better alternatives using PROC GLMSELECT and other methods. Keywords: Regression selection forward backward stepwise glmselect regression analysis, data cleaning, stepwise selection, proc step 7
140 Summarizing the Power of Your Predictive Model with Receiver Operating Characteristic Curves Mithat Gonen Assessment of predictive accuracy is a critical aspect of evaluating and comparing models, algorithms or technologies that produce the pr edictions. In the field of medical diagnosis , receiver operating characteristic (ROC) curves have become the standard tool fo r this purpose and its use is becoming increasingly common in other fields such as finance, atmospheric science and machine learning. There are surprisi ngly few built-in options in SAS for ROC curves, but several procedures in SAS/STAT can be tailo red with little effort to produce a wide variety of ROC analyses. This talk will focus on the use of SAS/STAT procedures FREQ, LOGISTIC, MIXED and NLMIXED to perform ROC analyses, including estimation of sensitivity and specificity, estimation of an ROC curve and computing the area under the ROC curve. In additi on, several macros will be introduced to facilitate graphical presentation and complement existing statistical capabilities of SAS with regard to ROC curves roc curve, proc step, proc calis, type i error, auc, logistic distribution, confidence interval, proc freq, binomial distribution, type ii error, proc logistic, sample, histogram, regression analysis, normal distribution, null hypothesis, credit scoring, logistic regression 18
141 Summing with SAS Tatiana Homonoff This paper reviews methods used to sum data, including horizontal summation (summing data across variables), vertical summation (summing data across observations), and cumulative summation (s umming data across both observations and variables to create running totals). Techniques include the addition operator, the SUM function, PROC PRINT, PROC MEANS, PROC SQL, the RETAIN statement, FIRST./LAST. processing , and the SU M statement. Special attent ion is paid to how SAS handles missing values in each technique proc step, missing value, sum, proc sql, proc print, where statement, retain, by group processing, create table, variable list, group by, final analysis, proc means 12
142 Swap the DATA Step for PROC TRANSPOSE Katie Joseph Anyone who has spent an unspeakable amount of time using arrays and do loops in a DATA STEP to convert observations to variables or vice versa has certainly though t, "Isn't there an easier way to do this?" The answer is YES! SAS offers a convenient way of circ umventing these lengthy DATA steps with PROC TRANSPOSE. This paper presents an introduction to PROC TRANSPOSE, the useful SAS procedur e that rotates SAS datasets. Through examples, I will compare code t hat transposes data with the DATA st ep to much simpler code using PROC TRANSPOSE and discuss ways to name and shape variables in t he output dataset using the PREFIX= option, the ID statement, and BY processing proc transpose, proc step, by group processing, do loop, numeric variable, sample 5
143 Tabbing Through ODS Haibin Shu The author presents a signific ant approach to aligning multiple variables inside a cell by applying tabs to the ODS reporting process. Consequently what appeared to be one limitation in classi cal ODS reporting has been overcome. The technique makes it easy to adopt mixed patterns in pr esenting the result of PROC REPORT, w hich has become necessary under certain circumstances such as patient profile proc report, file statement, proc step, output delivery system 4
144 Take Control of Your Output: Discover Dynamic Data Exchange Matthew Taylor In many cases, end data users wish for output to be displayed in EXCEL due to their familiarity with the product. The first way most SAS users learn to do this is using a PROC EXPORT. While the EXPORT is handy, it can also be somewhat inflexible when attempting to automate reports. This paper is designed as a quick primer for Dynamic Data Exchange (DDE) which is a way for users to output SAS data into EXCEL with much more control on place- ment. It will explain the concept, illustrate the advantages of its use and provide a few quick examples of why it is effective excel, filename statement, missing value, proc step 7
145 Taming the PROC TRANSPOSE Matthew Taylor The PROC TRANSPOSE is often misunderstood and seldom used. SAS users are unsure of the results it will give and curious about syntax that is often not particularly intuitive. Many programmers resort to use of the DATA STEP to achieve transposition which they believe results in better control. This paper is intended to demystify the procedure, explaining the syntax and providing useful examples of how to utilize it proc step, proc freq, proc transpose 5
146 The Great Escape(char) Louise S. Hadden SAS provides programmers with many ways to enhance ODS output in addition to the use of both SAS-supplied and user-written ODS styles. In-line formatting of titles, footnotes, text fields and table cells and formatting of data using user-written formats and within the DATA STEP can be accomplished by using ODS ESCAPECHAR. A quick overview of syntax for some of the many possibilities for enhancing ODS output with ODS ESCAPECHAR currently available in SAS 8.2 and 9.1.3 will be presented, including underlines, pre and post images, special functions, line feeds and super and subscripts. Some new features available in SAS 9.2 will be discussed proc format, proc step, output delivery system 14
147 The LIBNAME Engine Compared to SQL Pass-Through Steven H. Feder Both the LIBNAME engine and SQL pass-through provide access to databases. SQL pass-through passes code directly to the database. Without pass-through, SAS generates an optimized database query. LIBNAME coding is simple and familiar, and the efficiency is optimized by SAS. Is there any reason for most users ever to use SQL pass-through? This paper will compare code and results for DB2 using SAS ON OS/390, and ODBC drivers to the same DB2 server on Windows SAS cpu time, proc sql, create table, sql pass-through, elapsed time 4
148 The Most Important Efficiency Techniques Robert Virgile proc step, data step, missing value, raw data, by group processing, proc sort, dataset 11
149 The Output Delivery System (ODS) from Scratch Darylene Hecht,
Kevin D. Smith
The Output Delivery System (ODS) is a great way to move beyond reports that just use the listing output. Using ODS, you can generate reports in formats such as HTML, XML, PDF, PostScript, RTF, and Microsoft EXCEL. This paper tells you what you need to know to generate reports with ODS, from scratch. You'll learn how to generate multiple output formats, simultaneously; how to change the look of your report using styles; how to add text passages; and other "neat" tips (that is, helpful information) proc step, output delivery system, proc template, proc contents, excel, sas output, sample, ods html, select, ods listing 14
150 The Plot Thickens from PLOT to GPLOT Wendi L. Wright This paper starts with a look at basic plotting usi ng PROC PLOT. A dataset with the daily number of h its on three websites is used. The presentation contin ues with examples of how to create more informative and professional looking plots by adding titles, fo otnotes, and reference lines and changing the symbo ls, legends and axes. This is done in a step by step a pproach with examples of how the plot changes at each step. A look at PROC GPLOT is next using the same Web exa mple. The final plot created using PROC PLOT is compared with the same program run in the PROC G PLOT procedure. Further improvements are made in the same step by step fashion using various SAS Graph statements. The first change is to the titles and tootnotes. Then, one at a time, changes are made to the symbols (SYMBOL statement), the legend (LEGEND statement), and the axes (AXIS state ment) proc step, proc gplot, title statement 22
151 The Power and the Trap of Automatic Retain Yunchao (Susan) Tian set statement, _n_, automatic variable, merge statement, dataset 6
152 The Program Data Vector As an Aid to DATA step Reasoning Marianne L. Whitlock The SAS DATA STEP is easy enough for beginners to produce results quickly. You can use a model from a manual or a colleague's program, and adapt it to your problems. Typically, you code a "SET" or "INPUT" statement and proceed with assignment statements etc. to produce a new file from a previous one. You can easily print the results, or put the data into a statistical procedure, without ever troubling yourself with the Program Data Vector (PDV). When you want to accomplish something more complex though, you find that familiarity with the typical DATA STEP pattern is not enough, and if you have not internalized the concept of the PDV, you are not well equipped to tell SAS what you want. Using increasingly complex problems, this talk will step through code from the PDV point of view. The goal will be to give confidence to try more manipulative programming put statement, input statement, set statement, _eof_, by group processing, dataset, output, subsetting if, temporary array, update statement, keep statement, do loop, automatic variable, retain 13
153 The SQL Procedure: Tricks and Techniques for Efficiency and Simplicity Sreekanth Reddy Middela,
Suhas R. Sanjee
This paper describes various techniques using PROC SQL to improve efficiency, performance and clarity of SAS programs. Programmers working on post marketing and sa les data are often presented with the challenge of summarizing datasets containing thousands of variables and millions of records. This can be accomplished by using arrays in conjunction with OF operator on some functions like SUM and NMISS in a DATA STEP. However, arrays and OF operators are not supported in select statement of PROC SQL which means all the variables in the dataset has to be listed in the summarizing function which is tedious and impractical when thousands of variables are involved. This paper starts with description of a technique which makes use of efficiency of PROC SQL without having to list all the variables. Then, a technique to convert correlated sub queries using PROC SQL into a left join and non correlated sub query using PROC SQL is presented proc sql, proc step, proc sort, data wrangling, data step, adverse events 4
154 Tips and Tricks for Creating the Reports Your Clients Need to See Mike Molter Advanced rep orting tools su ch as PROC REPORT have progressed by l eaps a nd bounds in ter ms of o ptions available to programmers for creating tables. Add to that the always-improving Output Delivery System (ODS) and it seems the sky is the limit for creating ready-for-delivery output straight from SAS. Just when we start believing this, reality exposes limitations. T emplates, or shells of tab les, including titles, footnotes, column headers, content, right down to the formatting, are designed to maximize readability, and to present the data in a way that allows the reader to make well-informed decisions - a nd without regard to programming challenges. Unfortunate ly for programmers, such tables can't always be generated with the basic tools everyone talks about proc step, proc report, p-value, numeric variable, output delivery system, demographics table, class variable, proc means, proc format, proc transpose, sas base, nominal variable, proc print, proc freq 13
155 Tips and Tricks in Creating Graphs Using PROC GPLOT Qin Lin SAS/GRAPH is a very powerful data analysis and presentatio n tool. Creating information-rich graphics facilitates understanding the underlying data. Creating these graphics in SAS can be time-consuming and challenging. This paper introduces some tips a nd tricks in using PROC GPLOT to generate plots from clinical data in ODS RTF format, including methods to: 1. Restructure data to create error bars using interpol=hiloctj option 2. Separate error bars that overlap at the same tick mark 3. Display irregular numeric data in x-axis with unequal intervals 4. Dynamically assign the y-axis ti ck marks with frequently updated data 5. Build a common reference line for a plot with two different y-axes 6. Control the position and alignment of legends for plots with two y-axes 7. Align the value of BY variables in the title of plot by using #BYVAL() 8 sample, proc gplot, proc step, title statement 7
156 Transposing Data Without PROC TRANSPOSE Christopher J. Bost This paper describes how to use one-, two-, and three-dimensional arrays to transpose data in the DATA STEP. Related groups of variables can be arranged in different dimensions of a multidimensional array to change the structure of a data set do loop, array, proc transpose, proc step 7
157 Undocumented and Hard-to-find PROC SQL Features Kirk Paul Lafler The SQL Procedure contains many powerful and elegant language features for SQL users. This paper presents SQL topics that will help users unlock the many hidden features, options, and other hard -to-find gems found in the SQL universe. Topics include CASE logic; the COALESCE function; SQL statement options _METHOD, _TREE, and other useful options; dictionary tables; the PROC SQL - macro interface; and performance tuning strategies proc sql, proc step, macro call, macro variable, sas library, missing value 11
158 Unleashing the Power of SPDE Under Windows Haibin Shu Practical issues or challenges in using effectively SAS Scalable Performance Data Engine (SPDE) under Windows environment will be presented in great details with novel approaches to unleashing the powerful capacity. The architectural differences of indexing between SPDE and traditional data engine will be presented as a solid technical foundation leading to the superiority of SPDE. Lessons and experience gained through real-life project in SPDE will be shared. Parallel batch jobs are designed to maximize the advantage of SPDE in a multi-CPU environment where statement, clinical trial 4
159 Use of ODS Technology in SAS Raja Panchumarthi,
Swetha Kongara
Output Delivery System (ODS) is a valuable enhancement in SAS using that we can generate reports in various formats such as HTML, XML, PDF, RTF, PostScript and Microsoft EXCEL. ODS gives y ou new formatting options and makes procedure output much more flexible. With ODS, you can easily create an output data set of procedure results and traditional SAS listing output. Also, ODS stores your output in its component parts (data and table definition). This paper will explain you how to create output in RTF, Postscript and HTML format, and selecting the procedures output tables output delivery system, sas log, sample, ods trace, ods html, excel 11
160 User-Written DATA Step Functions Jason Secosky For years, users have asked for the ability to write functions in DATA STEP syntax. The day has come when this is possible. In SAS9, the FCMP procedure provides the ability to write functions using DATA STEP syntax. In SAS 9.2, these functions can be called from a DATA STEP. This paper explains how to write functions with PROC FCMP and how these functions are invoked from a DATA STEP. It also contains caveats when calling PROC FCMP functions from a DATA STEP put statement, return, proc step, proc fcmp, file statement 9
161 Using CALL MODULE in SAS on Linux, or I Get By with a Little Help from My Friends Richard A. DeVenezia,
Judy Loren
An experienced SAS coder can tackle almost any situation. However, there are occasions when a dance, not a tackle, is in order. The CALL MODULE routine is a great dance partner. A prominent healthcare data analysis firm needed to assign Diagnostic Related Group codes (DRGs) to the claims in their data warehouse. Information and instructions on assigning DRG codes is publicly available, and the firm has SAS coders that could implement the metrics. But the most beneficial solution did not involve writing SAS code to assign the DRGs. Instead, a low-cost module (a C-callable shared object) was purchased from a third party provider in the DRG data processing marketplace. The CALL MODULE routine allowed SAS to use the methods in the object like a DATA STEP function. This paper will explain how to call an external module from SAS on the Linux platform, and will share the lessons learned in implementing the selected DRG grouper character variable, decimal 10
162 Using Data Integration Studio as a Computer Aided Software Engineering (CASE) Tool David M. Kiasi With SAS DI Studio, a SAS developer can now design his/her application, fully documenting it on the front end, in a stru ctured manner; then migrate that design to the application with minimal effort. DI Studio can, if used correctly, create a structured environment in a painless manner. This presentation will discuss the fundamentals of structured analysis and design, show how data flow diagrams and data dictionaries can be created with DI Studio, and show how easy it is to migrate that design to the application sas data integration studio, dataset, raw data, proc contents, proc step 16
163 Using Data Set Values and Variable Names Outside of the DATA Step Bruce F. Gilsen macro variable, proc sql, proc step, dictionary tables, numeric variable, sas log, macro put, call execute, select, call symput, dataset, macro parameter, macro loop, do loop, proc sort, put statement, macro facility, character variable, character functions, macro function 15
164 Using Dates and Times - A Tutorial Jonas V. Bilenas Using date and time constants and variables in SAS is sometimes difficult to grasp even for the advan ced SAS user. This tutorial will cover how to use date and time constants, INFORMATS, functions, usin g PICTURE format directives, how to set up date range s in user formats, and how to use the %SYSFUNC macr o function. We will also look at what is new in SAS9 for handling dates and times time variable, datetime variable, macro variable, macro function, datepart, proc format, date and time functions, sysdate9, proc step, data step 10
165 Using Macro and ODS to Overcome Limitations of SAS Procedures Wei (Lisa) Lin,
Jing Su
SAS users may face situations where some "powerful" options are only available in certain SAS procedures but not available in others. For example, the model selection options are available in PROC REG, LOGISTIC, PHREG, etc., but not in PROC GENMOD, CATMOD, MIXED, etc. "Manually" coding model selection steps for each specific task is often very labor intensive, and the code is lengthy and hard to maintain and reuse. As we all know, SAS programming productivity can be greatly improved when you know how and when to use SAS macros. This paper demonstrates how to use macro (nested macro call), %do %until loops and ODS (Output Delivery System) to create an automated backward model selection process for PROC GENMOD which does not come with model selection options. Our automated process uses ODS to output relevant summary statistics from each step which is then used in %do %until loop to perform backward selection proc genmod, feature selection, proc step, macro loop, predictor variable, logistic regression, logistic distribution, do loop, regression analysis, longitudinal data, main effect, macro parameter, repeated measures, response variable, macro definition, backward selection 7
166 Using Perl Regular Expression in SAS Shuguang Zhang Regular Expression (Regexp) enhance search and replace operations on text. In SAS, the INDEX, SCAN and SUBSTR functions along with concatenation (||) can be used for simple search and replace operations on static text. These functions lack flexibility and make searching dynamic text difficult, and involve more function calls. Regexp combines most, if not all, of these steps into one expression. This makes code less error prone, easier to maintain, clearer, and can improve performance. This paper will discuss three ways to use Perl Regular Expression in SAS: 1. Use SAS PRX functions; 2. Use Perl Regular Expression with FILENAME statement through a PIPE such as 'FILENAME fileref PIPE 'Perl programm'; 3. Use an X command such as 'X Perl_program'; Three typical uses of regular expressions will also be discussed and example(s) will be presented for each: 1. Test for a pattern of characters within a string; 2. Replace text; 3. Extract a substring filename statement, dataset 9
167 Using PROC GENMOD to Model Adverse Event Counts in a Healthcare Setting John Ulicny,
Thomas Klumpp
Statistical models for adverse events have been developed as part of a quality management initiative at the Fox Chase - Temple Bone Marrow Transplant Program in Philadelphia, PA. Their purpose is to enable the transplant team to compare recent adverse event counts to what should be expected based on the patient population currently under care by the team. The count of adverse events is the response variable in the regression models. Generalized Linear Modeling, as implemented in the PROC GENMOD procedure, is an effective tool for performing regression analysis on a response of this type. Unlike ordinary least squares (OLS) it can be applied to a wide range of non- normal responses as long as they come from the natural exponential family of distributions and meet certain other assumptions. The models in this paper were developed using Version 9.1.3 of SAS adverse events, regression analysis, response variable, proc step, proc genmod, poisson distribution, proc reg, multiple regression, binomial distribution, predictor variable, poisson regression 13
168 Using PROC PLS (Partial Least Squares) to Build a Gene Prognosis Profile Chenwei Liu In a t ypical clinical study based on a m icroarray gene expression experiment, there are often more genes than subject samples, and many genes are correlated. Pa rtial least square regression, though not originally designed for classification purposes, can be used to build a classifier to predict outcomes based on the high dimensional correlated gene expression data. In t his article, using a publ icly available breast cancer study data, we show the proces s of usi ng PROC PLS in SAS to construct a metastasis risk classifier from a training d ataset. Th e classifier is fu rther used to assi gn patients fro m a n ind ependent v alidation set in to high- and low- risk groups based on their gene e xpressions. The result confirms that patients in the two predicted risk groups show significant difference in their survival outcome data cleaning, validation set, training set, proc step, sample 5
169 Using SAS ODS to Extract and Merge Statistics from Multiple SAS Procedures into a Single Summary Report, a Detailed Methodology Stuart D. Long,
Jeffrey M. Abolafia,
Lawrence Park
SAS procedures often provide more statistical output than is needed for a given analysis. When an analysis involves iterative processing on numerous groups of variables using multiple procedures, the number of output pages to be reviewed may be quite massive. By using SAS ODS output datasets, one can extract only the desired statistics from a procedure. The ODS output datasets from numerous procedures can be merged together and used by the programmer to generate concise reports summarizing the results from the different SAS procedures.. This presentation provides a detailed blueprint for 1) generating ODS output datasets from multiple procedures, 2) retaining specific statistics in these datasets, and 3) merging them together to produce one summary dataset. This is an advanced tutorial intended for SAS programmers knowledgeable with BASE/SAS and the SAS Macro facility proc step, proc logistic, predictor variable, logistic distribution, proc freq, response variable, out=, proc print, logistic regression, proc means, macro variable, interval variable, macro definition, regression analysis, adam dataset, macro facility, output, sas log, proc append, dataset, nominal variable, file statement, macro flow control, %if-%then-%else, sas output, macro call 22
170 Using SAS to Measure Community Cohesion Desiree Alderson,
Lyndsay McDonough,
Emilio Rodriguez
Can you use SAS to measure community cohesion? Many social programs aim to create or enhance connections among individuals. For example, the Supporting Healthy Marriage project includes an effort to establish support groups for couples. The available data do not always cont ain variables that can unambiguously associate individuals (e.g., family name or zip code). However, they someti mes contain information about people's activities or locations. SAS programs can use people's frequent presence at the same time and place to identify groups and link individuals. This paper will review PROC SQL and DATA STEP techniques to detect and quantify non-obvious associations proc sql, proc step, do loop, group by, create table, where statement 9
171 Using the New SURVEY Procedures From a Modeling Perspective Jonas V. Bilenas An introduction to the use of PROC SURVEYSELECT, SU RVEYREG and SURVEYLOGISTIC to illustrate applications in modeling. We will show how efficien t it is to use SURVEYSELECT to generate BOOTSTRAP d ata that is far superior than having hold-out validatio n samples. A number of examples will be shown detai ling the SURVEYSELECT procedure. We will conclude with how t o use SURVEYREG and SURVEYLOGISTIC when you have sampled data to calculate the correct p-values for modeling coefficients sample, proc step, regression analysis, bootstrap, proc freq, proc surveyselect, logistic distribution, estimate, maximum likelihood estimation, random sampling, correlation, likelihood function, proc surveylogistic, proc surveyreg 13
172 Using the SAS DATA Step and PROC SQL to Create Macro Arrays Stuart D. Long,
Edward Heaton
Successful analysis in SAS often requires lengthy repetitive steps; the same code is executed on numerous data points. Iteration of SAS code is often easily achieved with the use of Macro Arrays. The programmer can employ numerous methods for creating these arrays, as well as choosing among differ ent structural designs. PROC SQL and the SAS DATA STEP can each provide clear advantages to the creation of these arrays. PROC SQL and the DATA STEP can take advantage of descriptive information that is available to the programmer in the data set header line. This paper will discuss the benefits of the assignment of values to macro-variable array elements using CALL SYMPUTX() in the DATA STEP and the SELECT INTO expression in PROC SQL. This paper is intended for SA S programmers who have a working knowledge of Base SAS and the SAS Macro Facility macro variable, proc step, proc sql, call symputx, proc freq, call symput, hash table, proc contents, proc logistic, set statement, macro loop, macro definition, logistic distribution, macro call, macro variable array 11
173 Variable Selection and Variable Transformations in SAS Enterprise Miner 5.2 Kattamuri S. Sarma feature selection, proc hpsplit, data mining, nominal variable, correlation, normal distribution, regression analysis, class variable, sample 12
174 Visualizing PROC TRANSPOSE Daniel J. Boisvert,
Shafi Chowdhury
PROC TRANSPOSE continues to confuse programmers. The ability to effectively transpose a data set is very important when working with different data structures and different data standards. This paper will provide a non technical approach to understanding the TRANSPOSE procedure by showing the programmer how to visualize the expected output. PROC TRANSPOSE will be deconstructed into three simple movements: what goes up, what goes down, and what goes into the middle. Programmers who have a hard time fully grasping PROC TRANSPOSE will benefit from this paper proc transpose, proc step 6
175 What's a "Senior" SAS Position? Deb Cassidy Are you a "junior" person looking to be promoted to a "senior" position? Are you a "senior" person looking to change positions or to help ensure you remain "senior"? Are you a manager looking for "senior" staff? Just what is a "senior" SAS position compared to a "junior"? Is it the number of years you have been using SAS? Is it having certain SAS competencies? Is it something else? Does it vary by industry? This paper will address those issues by using two methods. First, a sample of job postings on the website Monster.com will be reviewed. Second, informal interviews will be conducted with managers who have wanted to hire senior-level staff in recent months proc sql, clinical trial, proc report, sample, proc step 7
176 When Your PROC SQL and Oracle Joins Are Crushed by Data Monsters... Houliang Li To join two huge data sets containing millions of observations each, either in SAS software or an RDBMS product such as Oracle, we usually rely on the built-in query optimizations provided by the SAS SQL procedure or the RDBMS product. In most cases, the built-in optimizations successfully avoid a full Cartesian product join of the tables and accomplish the query efficiently. However, there are multiple conditions where the built-in optimizations become powerless. A cross-table between condition is one of them. This paper describes the Synchronized Join algorithm, or SyncJoin, which uses the SAS DATA STEP to implement a join equivalent to the SQL statement containing a cross-table between condition. The SyncJoin algorithm not only finishes the query in a tiny fraction of the time required by both PROC SQL and Oracle, but also consumes a minimal amount of system resources proc sql, proc step, cpu time, conditional do loop, cross join, sorted data, where statement, correlation, if-then-else, ansi sql, sas log, macro conditional, macro definition 17
177 Workforce Preparation: Equipping Undergraduates with SAS Knowledge Stephanie R. Thompson Knowledge of data structures, data quality, data cleaning, SAS programming, data analysis, technical report preparation, and the ability to pr esent analyses to management are all key skills needed by today's professionals. This presentation will describe an innovative new undergraduat e program at the University of Memphis that teaches these skills to undergraduates. The undergraduate ce rtificate in "Data Analysis and Programming Using SAS Software" is a first-of-its-kind pr ogram in the Americas and t he third in the world. The presentation will also share insi ghts into establishing this program as well as enrollment information for the first two semesters data cleaning, sas base 4
178 Working with Messy EXCEL Files Nat H. Wooding Jr. SAS offers a number of ways to import data from EXCEL spreadsheets but the nature of spreadsheets can make the reading of these data difficult. Spreadsheets may ha ve data elements scattered in different areas and there may be unseen hexadecimal characters embedded in cells. The SAS tools that can read these sheets directly must guess at what variables are called and the nature of these variables . Sometimes, SAS' guessing does not work well. When the SAS importing tools are not sufficient , the user is forced to use one or more of a number of other solutions to get the desired result excel, txt, proc import, proc step, macro variable 12
179 Working with Missing Values Edward Heaton,
Michelle Zhuang
SAS 9.1 provides a call routine - Call missing() - that sets values to missing for a collection of variables. We will look at some methods to determine if those values are missing. SAS 9.1 also provides some new concatenation functions. We will use these to test collections of values to see if they are all missing missing value, call missing, character variable, numeric variable, proc sql, if-then-else, proc step, variable list 3
180 Wow! You Did That Map with SAS/GRAPH? Robert E. Allison,
Louise S. Hadden,
Michael S. Zdeb
SAS/GRAPH and ODS provide SAS programmers with tools to create customized, full colo r maps for a variety of uses. The production of useful, impressi ve looking maps using SAS/GRAPH is surprisingly easy, with the promise of greater ease in SAS 9.2. This paper walks through the creation of a number of different maps using SAS 9.1 and 9.2 and shows some exciting new choices and possibilities in SAS 9.2 bar chart, proc step, proc gchart, proc gmap, macro variable, sample, ods pdf, sas programmer 19
181 Writing SAS Code in Excel Emmy V Pahmer There are a number of situations where you might wa nt to consider writing your SAS code in EXCEL. Exce l has useful functions and other capabilities that can be utilized to generate code. Client database specifi cations often come in spreadsheet format and can be used directly . This is a lot easier than macro programming for b eginners. EXCEL can also be used for macro calls where argume nts might be repeated or consecutive. Once you have created the text in EXCEL it can be easily copied and paste d into your program editor. This can help improve a ccuracy and reduce typing. A few examples will be shown and some limitations and disadvantages will also be discus sed excel, dataset 4
182 Writing Testing-Aware Programs that Self-Report when Testing Options are True Ronald J. Fehd macro variable, proc step, macro put, call execute, proc sql, proc print, %if-%then-%else, macro loop, macro definition, macro call 20
183 You've Just Bought a Data Warehouse. Now What? Stanley E. Fogleman One of the ways to get involved in implementing Data Warehouse technology (DI Studio) is to pick a pilot project, in this case, some SAS datasets supplied by an outside vendor which needed to be mapped to an existing Access database. At first, it appeared to be an example of using a sledgehammer to kill a fly. As the project progressed however, we realized that a number of peculiarities of Access databases (no native sup- port for formats, peculiar representation of dates and representing true/false/no answer) made DI Studio an ideal tool for identifying and resolving those issues sas data integration studio, dataset, data cleaning, sas function 4

Back to Conf go 2008 go 2006

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.