HOME QUICK SEARCH AUTHORS KEYWORDS HELP BUGS

NESUG 2005 Papers - Index

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

# Title
×
Authors
×
Abstract
×
Keywords
×
Extras Pages
1 "LAG With a WHERE" and Other DATA Step Stories Neil H. Howard This tutorial illustrates the importance of understanding the internals of DATA STEP processing, particularly when you invoke functions such as LAG, code RETAIN statements, rely on WHERE constructs, and start combining various features of the DATA STEP language and performing conditional execution of certain functions. This anthology includes such spellbinding stories as: "LAG With a WHERE", "To LAG or to LEAD", "A DIFferent LAG", "When RETAIN Doesn't Retain", "Don't Order My Variables Around", and "The Case of the Missing Values" lag function, proc step, missing value, dataset, proc contents, proc print, retain, where statement 14
2 %DIAGNOS: a Macro for a Quick Look Into the Inside of Your Data Set Yin You Data diagnostics is an essential step in statistical programming and analysis, as well as data edit checking. This paper will introduce one simple SAS macro for statistical programmers and statisticians to have a quick look into the data of interest. This macro was written to provide list s of frequency counts for categorical variables and to summarize stat istics for continuous variables f or the entire or the selected variables of a data set. Also, the macro can identify numeric variables as categorical variables based on a given criteria. The macro output can display the variables according to their order in the input data set proc step, nominal variable, interval variable, proc univariate, proc freq 3
3 %htmlForm: An HTML Form and SAS/IntrNet Code Generator Don Boudreaux SAS Web Applications typically involve HTML forms that provide a front-end for SAS programming code. The forms involved could be created with 2nd party web page development tools (ex. FrontPage or Dreamweaver) or by directly hand-coding HTML form tags. In any case, these forms will generate name/value pair output that will need to be handled by SAS code. This paper presents a SAS macro that helps automate the process of developing the necessary SAS code. By using a document containing an html form as input, this macro will generate a code template of SAS macros for handling any potential name/value pair output for use within either a SAS/INTRNET or a SAS9 Stored Process Web Application dataset, macro definition, binary variable, proc print 8
4 (In)Formats (In)Decently Exposed Harry Droogendyk If you've pulled data into SAS or pushed it out the other end you have used SAS informats and formats, really. Didn't hurt a bit did it? There's nothing to be afraid of, formats are really quite helpful little beasts. If you've been intimidated or confused by SAS formats, come along for a revealing ride as the shadowy side of data formatting is decently exposed. Learn how many data conversion and presentation issues are easily handled, whether the data be dates, times, numbers or strings. Don't avert your eyes, discover the power, efficiency and freedom of SAS formats, you'll never be the same user-defined format, proc print, date variable, sysdate9, data step, dataset, proc step, format statement, input statement, proc format, put statement, e., numeric variable, excel, proc sql 16
5 A Data Comparison Utility George P. Sharrard As more and more legacy applications are being recoded and ported to servers, there is a critical need to validate the data produced by the recoded, server based application; does it match what is produced by the legacy application? Comparing thousands of variables, across hundreds of file is a tedious, error prone task. It really doesn't matter if the legacy data is stored in mainframe VSAM files (can you spell EBCDIC?) and the final repository for the data is DB2 or ORACLE - create SAS datasets and your project just got a whole lot simpler. PROC COMPARE is a good starting point. But don't stop there! Using PROC SQL, a little macro code, and a couple of data steps with PUT statements you can build an automated dataset comparison program. PROC FREQ and PROC CORR are used to display how well the new datasets match the legacy system. Here is the business case. XYZ Corp is re-platforming all of its customer processing from a centralized mainframe to a server based system proc step, proc freq, correlation, macro definition, proc sql 11
6 A Macro to Create Data Definition Documents Aileen L. Yam Data Definition documents are one of the requirements for NDA submissions. This paper contains a macro to automate the creation of the two parts of a Data Definition document: a Table of Contents and a set of Data Description tables. The macro has the flexibility to create Data Definiti on documents based on either Item 11 of the Guidance document of 1999, or the current CDISC data structures and terminology. Solutions to three major challenges in preparing Data Definition documents are provided. The challenges are: 1. Comments and derivation rules imported from a Statistical Analysis Plan or a standards document contain carriage return ('OD'x) and line feed ('OA'x) characters that split the comments and derivation rules into more than one column in SAS ; 2. Long comments or derivation rules output into RTF files do not automatically flow from one page onto the next page, thus the long text gets truncated and the next page begins with a new variable; 3 dataset, label statement, cdisc 6
7 A Painless Approach to Convert SAS Statistical Outputs to Presentations Hongwei Zhang SAS statistical output is usually not ready for presentations or writing reports. It is painful a nd time-consuming to type the statistical data one by one. With the help of Output Delivery System (ODS), this task becomes easy. ODS can extract the statistics as desired and output them into data sets. The data can further be manipulated suitable fo r presentation. In this report, the application for LIFETEST will be illustrated as an example and sample codes will be given. When we write reports or present data in a journal or at a conference, we usually do not di splay the SAS output. The data are summarized as desired and are frequently presented in tables. To present descriptive statistics, for example, mean and standard deviation are used for numer ous variables and frequency distribution is used for character variables. P values are commonly provided when more complicated analytic approaches are applied proc step, sample, log-rank test, median survival, rank test, p-value, proc freq 3
8 A Programming Pattern for Differences Calculation in Clinical Data Analysis Lei Zhang,
Chang Y. Chung
It is very common in the clinical data analysis to calculate various kinds of changes or differences. Despite the varied statistical objects and the quantities involved, there is a common programming pattern underlying these calculations. We make the common programming pattern explicit in order to help understand, communicate, and execute these calculations correctly, clearly, and easily. We demonstrate a straightforward way of implementing this pattern with versatile SAS PROC SQL treatment period, proc sql, proc step, full join, right join, clinical data 8
9 A Quick Look at Change in a Longitudinal Study Virginia Towle Prior to a more detailed statis tical analysis of longitudinal data, one may be interested in having a general impres- sion of whether individuals are changing their response to a question over time. The program described in this paper summarizes those changes as 'no change', 'an increase in value', 'a decrease in value' and 'fluctuating or variable'. Furthermore, the initial val ue is retained so that the change can be view ed relative to the individual's baseline value proc step, proc freq 3
10 A Quick Tour of SAS ETL Studio to Build a Data Mart Kari Richardson This hands-on workshop will give users a basic tour through the functionality of SAS ETL Studio to help build a small data mart. The participants in this workshop will use SAS ETL Studio to define necessary library definitions, in addition to source and target tables definitions. Partici pants will create a process flow diagram using a simple transformation and load the target table. In the last step, participants will create two reports using the target table data mart, proc freq, data merging, proc sql 20
11 A SAS Macro to Standardize Graphics Swarna Ramanjulu Among the many buzz words in today's FDA regulated pharmaceutical industry are "standards", "compliance" and "reproducibility". A lot of time is spent standardizing our tables and listings, but are your graphics standardized and presentable? Because graphs are like pieces of art, it is difficult not to have the programmer's personal taste influence each graph. Thus, we end up with a variety of graphics. In an effort to standardize the appearance and streamline the production of graphics within our company, the decision was made to have one method of creating the graphical environment for all graphics via a SAS macro. A graphics macro was developed which incorporated uniform font, font size, a limited color palette for certain types of graphics, re-mapping of colors, and error checking. It also features the flexibility to produce outputs in various formats and is user-friendly. This paper will outline the features of the graphics macro including examples of code and output pharmaceutical industry, macro variable 4
12 A SAS Programmer's Guide to Project - and Program-Level Quality Control Paul Gorrell The focus of this paper is how to save time and money (and reduce frustration!) by (1) including intelligent and informative input and output checks in SAS programs, (2) generating quality-control information for program modules and projects, and (3) using SAS to create program and project documentation. At both the project and program level, the focus will be on quality control as data analysis. This approach is uniquely suited to using the numerous SAS procedures and reporting mechanisms (including programmer-specified LOG messages) to provide the programmer and project manager with the necessary information for verifying the correctness of program output and deliverables proc step, sas programmer, quality control, proc compare, proc sql, dictionary tables, proc contents, length statement, create table, data science, excel, by group processing, sas programming, error message, sas output, missing value, proc freq 15
13 A SASautos Companion: Reusing Macros Ronald J. Fehd Reusable SAS R⃝ programs come in two forms: macros or %includes. This paper reviews the stan- dard SAS environment and examines the options used to customize a session or batch program for reuse of macros stored in the project directory . Expected audience is intermediate to advanced pro- grammers and macro users. Keywords: autocall compile macro masking MautoSource mStored program reuse SASautos SASmStore source store. When viewing with Adobe Acrobat Press Here to View: Fit Width Contents stored macro, macro quoting function 12
14 A Time Machine: Using SAS Macros Adel Fahmy Times of events are used in many databases. When extracted into SAS datasets, times could be in different shapes. The different methods for data entry are usually adopted for accuracy. Based on the original database design, the extracted files may contain the time in 3 separate fields for Hours, Minutes and Seconds, or in one field that contains the whole time variable. In the one-field time, the colon ":" separator may not always be present. The time fields may follow a 24-hour or 12- hour convention with another field identifying whether it is AM or PM. In either case, the field type may be Numeric or Character. We usually end up with too many macros; each handles one type of data entry style. Modifying those macros constantly for each new project defeats the idea of generic macros. The macro presented here handles most of the commonly used time fields producing a Full Numeric Time (used in calculating duration of events) and a Full Character Time (used for accurate reporting) proc print, macro function, proc step, time variable, macro quoting function, %if-%then-%else, macro loop, macro definition, missing value, macro variable, stored macro, time, data cleaning, sample 13
15 A Tool to Reduce the Time Used in the Preparation of the Statistical Review Aid Used for Electronic Submission Eunice Ndungu Statistical programmers in the pharmaceutical industry are usually faced with tight timelines within which to prepare SRA (Statistical Review Aids) that reflect the information submitted to the FDA through the CSR (Clinical Study Report). One can manually identify and copy all files needed in the submission, to a submission folder, running them from the destination folder to make sure they run correctly and accurately reproduce outputs in the CSR. This manual process, however, can be time-consuming. The programmer is faced with the task of identifying all the data sets accessed by the SAS macros. This is done by scrolling through SAS code to identify transport files invoked by the macros, or painfully scanning through the logs from the macro runs for error messages of data sets that the macro is looking for but cannot find. To eliminate the necessity for this manual drudgery, the %copy macro was developed macro variable, txt, keyword parameter, %macro parameters, macro parameter, sample, macro definition 6
16 Across the Great Divide: Creating PC-Ready Formatted Output Using Base SAS Output Delivery System on the Mainframe Barbara Lockley It may have seemed as if the mainframe programmer was left out of t he OUTPUT DELIVERY SYSTEM (ODS) explosion. It may have seemed that by using the SAS System for MVS you could not exploit the more powerful capabilities of ODS. Well in fact, beginning with Version 7, the full power of ODS can be harnessed within the SAS System MVS Operating System environment. This paper will demonstrate, through the use of examples and sample code, how to create output files which can be rendered via a web browser (i.e. HTML, XML, CSS, etc.) and are compatible with the suite of Micro soft (MS) Office products, i.e. .xls, .doc, etc. You can use the power of BASE SAS ODS to create and format output data once, and then use that data to generate mainframe print, as well as personal computer or server ready output macro variable, sas base, sample, output delivery system, sas log, proc step, proc template, ods html, excel 6
17 Adopting New Techniques: Statistical Procedures to Determine the Agreement between two Laboratory Methods Ashley Peterson,
Larry W. Douglass
As laboratory technologies advance, it is inevitable that new procedures will be adopted to replace older, perhaps more tedious techniques. These new techniques are more automated or more precise than the out-of-date counterpart. Prior to adoption of a new technique, it is necessary to ensure that the new technique agrees adequately with the old one. As suggested by Bland and Altman (1986), the use of a correlation coefficient is inadequate to determine agreement, therefore, a set of steps to evaluate agreement was proposed. This paper will illu strate the use of SAS and JMP to evaluate agreement. The example used will include the ev aluation of agreement on data collected under different conditions (e.g. treatment, genetic strains, tissues, etc.). To evaluate agreement, an acceptable difference must first be established. This is the maximum amount that observations from two techniques can differ and still be considered in agreement sample, regression analysis, least squares mean, proc mixed, fixed effects, prediction interval, correlation, proc model, data science, anova, proc reg 13
18 Algorithm and Software for Yield Analysis Igor Mandel,
Victor Kamensky
Yield analysis is a method designed to estimate the inference coefficients on each unit of the population, as opposed to regression and other techniques that estimate the inference fo r the population as a whole. Yield analysis has a great analytical potential, which has been proven in several marketing case studies for large companies. It allows for creation of good models even in situations when traditional analysis fails (e,g. when all correlations are very weak or there is a high multicollinearity). Technically, it could be rooted in random regression coefficients models by Hildreth and Houck (1964), but goes much further. The heuristic algorithm of individual "yields" estimation is presented, which is based on Monte Carlo simulation and bears some convenient analytical features. It is fully controllable by the user. Some details of SAS code are gi ven; the possibility of using this software for practical application is discussed regression analysis, correlation, proc mixed, monte carlo, response variable, sample, confidence interval, normal distribution, standard deviation, nominal variable 16
19 An Animated Guide: Hashing in V9.1 Russell M. Lavery hash table, lookup, data step, sysrc, sas programmer, hashing function 13
20 An Animated Guide: PROC TRANSPOSE Russell M. Lavery If one can think about a SAS data set as being made up of columns and rows one can say PROC TRANSPOSE flips the columns of data into rows of data -and the reverse. The ability to "flip" data is necessary because some SAS Procs want data to "be in rows" and some Procs want the data to "be in columns". Complex manipulations of the shape of the data (tall & thin data sets into wide and short data sets and reverse) can be quickly performed with PROC TRANSPOSE. The trick in using PROC TRANSPOSE is to recognize that the statements in your code do not completely determine the output you get. Output is determined by your individual coded statements, the interaction between coded statements, the shape of the input data set and also by actions that PROC TRANSPOSE takes by default proc transpose, proc step, by group processing, proc means, raw data 9
21 An Introduction to the Simplicity and Power of SAS/GRAPH Daniel E. Bruns bar chart, proc freq, vertical bar chart, proc step, proc gchart, proc gplot 19
22 An Introduction to Wavelet Analysis with SAS Michael Lane Wavelet analysis is a mathematical technique used to represent data or functions. The wavelets used in the analysis are func- tions that possess certain mathematical properties, and break the data down into different scales or resolutions. Wavelets are better able to handle spikes and discontinuities than traditional Fourier analysis making them a perfect tool to de-noise noisy data. Traditional applications of wavelets have focused on image compression and analysis, but they are also being used to analyze time series, biological processes, spectroscopic data of chemical compounds, seismic signals for earthquake prediction, and atmospheric data for weather prediction. SAS began introducing tools to perform wavelet analysis in version 8.2. This paper introduces some of the basic concepts of wavelet analysis, and how to perform wavelet analysis with SAS IML proc freq, macro variable, time series analysis 10
23 Another Factorial File Compression Experiment Using SAS and UNIX Compression Algorithms Adeline J. Wilcox Continuing experimental work on SAS data set compression presented at NESUG in 2004, I designed another two-factor factorial experiment. My first factor compares the three kinds of data set compression offered by SAS on UNIX; the SAS DATA set OPTIONS COMPRESS=CHAR, COMPRESS=BINARY and SAS sequential format files created with the V9TAPE engine, three UNIX file compression algorithms; compress, gzip, and bzip2 and a control without any file compression. My second factor compares four kinds of SAS data sets; all character variables, all numeric variables, half character and half numeric, and all numeric in which LENGTHs shorter than 8 were used for smaller values. bzip2 minimized compressed file size for all four control SAS data sets. Only the three SAS file compression methods can be used to give other SAS users read access to compressed SAS data sets without giving them write permission to these files character variable, dataset, numeric variable, sample, anova 10
24 Array Programming Basics John J. Cohen Using arrays offers a wonderful extension to your SAS programming toolkit. Whenever iterative processing is called for they can make programming easier and programs easier to maintain. You will need to learn some new syntax, but we will explain several of the key components such as indexing and subscripts, temporary and multi-dimensional arrays, determining array dimension, and a few special tricks data step, temporary array, missing value, proc transpose, error message, variable list, proc step 11
25 Array Tutorial (2) $ Beginning Intermediate; Ian Stockwell,
Marge Scerbo
Arrays are powerful tools, but may prove intimidating to new users. This hands-on workshop presents the basics of array statements and provides insight into their usage. Arrays are SAS DATA STEP statements that allow clever programmers to do a great deal of work with little code. Arrays process identified variables as a group rather than individually, therefore saving both machine and programmer time. This workshop will walk the attendees through basic array programming data step, do loop, numeric variable, dataset 10
26 Automated Conversion of Medicare Data Files into SAS Data Sets Stephanie Raymond,
Jia Lan,
David Shamlin
Turning health-care data files (such as Medicare data) into SAS data sets can be a compl ex and cumbersome process. To f acilitate the processing of Medica re data, the Cente r for Medi care and Me dicaid Services (CMS) provides documentation (generally referred to a s record layouts) that define s the stru cture and content of CMS data files. Alt hough this metadata documentation has a clearly defined structure, it can be somewhat irregular. Regardless of this, SAS can PROC ess these metadata files and translate the health-care data files into SAS data sets. This paper presents a technique for using the capabilities of Perl Regular Expressions in the SAS9 version of Base SAS to programmatically perform an extract, transform, and load (ETL) process that is based on the CMS record layouts. This ETL process turns CMS data files into SAS data sets insurance claims, dataset, sample, macro variable, input statement, class variable, macro facility 7
27 Beyond FORMAT Basics Michael S. Zdeb Beginning and even intermediate level SAS users sometimes never venture beyond the basics in using formats. They may be content with writing formats for substituting labels for the values of variables or for grouping observations based on the values of variables. This paper goes beyond these basics and shows you: how to create single and multiple formats from SAS data sets with CNTLIN data sets; when to use the PUTN and PUTC functions as alternatives to the PUT function; how to use formats as an alternative to DATA STEP matched-merges and PROC SQL when selecting records from a file or when combining information from multiple files or data sets; how to create nested (or recursive) formats; how to use pre-loaded formats to force zero count value ranges into procedure results; how to create and use multi-label formats (formats with overlapping value ranges); how to create user-written informats to clean data as it is read from raw data files proc step, proc format, put statement, proc report, character variable, putc, data step, numeric variable, char., lookup, dataset, putn, length statement, proc print, select, format statement, proc means, proc sql, sas log, label statement, raw data, filtering, output, flat file, proc catalog, input statement, retain, work library, missing value 20
28 CEDA - The Invisible Hand Bruce F. Gilsen proc step, dataset, proc contents, sas library, proc append, libname statement, sas log, data dictionary, proc copy, sas base, dictionary tables, modify statement, proc sql, proc cimport, options statement, output delivery system 10
29 Crafting Your Own Index: Why, When, How Paul M. Dorfman,
Lessia S. Shajenko
A SAS index is a search file associated with a data file. Given a key, the file is searched and, if the key is found, its record ID is returned and used to retrieve the data file record. For many practical tasks, this works sufficiently fast. But fast is never fast enough - SAS indexes are disk-resident and so leave much room for acceleration. SAS auto- maintains its indexes, which is splendid. But oftentimes the trade-off is programmatic rigidity. When either overweighs the pain to program, the indexing scheme suddenly appears to virtually lend itself to custom crafting. Being no longer tied to a particular search algorithm or storage medium, you can let your programming fancy fly, the power of the SAS language being at your disposal. The pain disappears. The disk-resident index file yields to a memory-based look-up returning a file pointer. B-trees are defenestrated in favor of search algorithms chosen for speed and/or to fit a particular key structure index, cpu time, hash table, lookup, dataset, memory usage, unique key, proc sql 10
30 Creating a Publication-Quality Report Using SAS, XML and Open-Source Tools John Fahey,
Barry Campbell
Our organization wanted to produce an 80-page report that we could publish in print, and on our website, in a format other than Microsoft Word. This would allow us to reach a wider audience and avoid Visual Basic. Content for the report included graphs and tables generated in SAS, as well as narrative text: preamble, commentary, and appendix material. We wanted a push-button process to automatically assemble these elements into a professional-looking report complete with table of contents, running headers and footers, and a consistent look and feel throughout. To develop this process, we combined output from SAS, with the XML-based technologies: XSL (XML Stylesheet Language), XSLT (XSL Transformations), and XSL-FO (XSL Formatting Objects). We had SAS generate graphics (as GIF files) and PROC TABULATE results, which were routed via the XML output destination. Narrative content was stored in simple XML text documents proc step, ods xml, file statement 12
31 Creating A User Interface Using the SAS Macro Window George P. Sharrard The best part of writing reusable code is when you effect a hand-off to the end user. There is no good reason to have a highly skilled programmer running a program that any junior marketing analyst could run. Using a series of %LETs for all the parameters in the program makes it 'marketing' proof. Except, of course, when they can't re-run the code without trying to make it better. So, you hide the code in a macro and just give them the syntax for the macro call. But, this too, will fail the 'finance department' stress test when parameters are entered incorrectly - dooming the user to long waits for bogus output. What you need is a user interface, a parameter entry screen, which will validate the parameters entered before any programs are run. Do the input files exist? Do the requested variables exist on the datasets? Add in an option for creating a random sample or check-off boxes for various types of outputs. Base SAS includes all the tools needed to make this happen error message, macro variable, in=, %if-%then-%else 13
32 Creating bar charts and scatter plots on the same page, deciphering SAS ANNOTATE in PROC GPLOT. Rita Tsang The SAS GPLOT and GCHART procedures are powerful tools for generating graphical displays of clinical data, as they are usually employed to create scatter plots and bar charts respectively. However, we often need to display both a scatter plot and a bar chart within the same graph. The GCHART procedure cannot generate scatter plots and it does not have the ability to superimpose graphical displays. How do we get around this limitation? Previously, my approach to the problem was to use a combination of the SAS DATA STEP and GPLOT procedure (Tsang, 2005). This paper graduates from the DATA STEP by demonstrating how the powerful SAS ANNOTATE can be used to easily accomplish the same task. As a bonus, this paper will also explore the functionality of the new SAS version 9 PROC GBARLINE, which, was created to tackle the limitation of GCHART (SAS Institute, 2005) bar chart, scatter plot, data visualization, proc step, proc gplot, proc gchart 8
33 Creating Zillions of Labels (and Other Documents) the Easy Way with ODS and Microsoft Word Vincent DelGobbo This paper provides a quick and easy way to generate address labels or other data-driven documents from your SAS data. The first step is to use the SAS Output Delivery System (ODS) to convert your data into a format that Microsoft Word can import. Then you use Word's Mail Merge Wizard to guide you through the steps to create your document. The technique is easy, requires only Base SAS version 8 or later, and will work on any platform where SAS is installed (even if SAS is installed on a mainframe). This technique can also be used with SAS version 6 by using the SAS HTML Formatting Tools instead of ODS dataset, sample 5
34 Custom Tagsets to Create Custom HTML Lori Maiwald Custom TAGSETS can be developed to overcome html-, tag- or style-restrictions of a large web-site. A web-master may require all HTML documents destined for their site to have specific paired tags orphaned, no frames, no styles and the insertion of additional lines to assist in site-wide substitution of header, meta data and footer. Custom TAGSETS can relieve the SAS programmer of the maintenance burden of data/job-specific html coding. If you know your DATA STEP and procedures as well as have a clear idea of the html that you require as an end result, you can create your own TAGSETS to get that result and stop 'put'-ting the HTML in each program you write proc step, proc report, proc tabulate, macro variable, class variable 10
35 Data Step Hieroglyphics Harry Droogendyk Have you found that most SAS DATA STEP code is quite readable? SAS statements, functions, keywords and SI supplied routines are most often given meaningful names. If the developer has been even somewhat verbose while naming DATA STEP variables, the final product can "read" quite easily. Sure it reads easy …, until you encounter the {*&%~(.:@|? special characters littered throughout the code!! What in the world do those things mean? Do we really need the funny characters? This paper will examine 10 implementations of special characters, each of them specially placed in the SAS language for your coding pleasure. Special characters, properly utilized, allow you to write code more quickly, more efficiently, and, believe or not, more simply data step, macro variable, input statement, &variable, character variable, do over, macro definition, options statement, trailing @ 10
36 Database ACCESS Basics: SQL and Data Step Interface to Relational Databases Ashley Sanders SAS/ACCESS provides virtually seamless interacti on with relational databases such as DB2 . The SQL pass- through facility gives direct access to the database, but r equires knowledge of the native SQL syntax. Alternately, the LIBNAME statement can be used to assign SAS library references to database objects, allowing database ta- bles to be used like SAS data sets. SAS SQL functions ar e available that cannot be used with the pass-through facility. For DATA STEP diehards, database tables can be treated (almost) just like indexed SAS data sets. SAS sta- tistical procedures can also reference database tables directly using the libref name. This paper covers the basics of accessing database data from SAS using SQL and DATA STEP language, using the database with SAS proce- dures, and getting information about the database delivered through SAS proc sql, libname statement, data step, where statement, proc step, dataset, set statement, create table, relational database, by group processing, automatic variable 8
37 Delivering Dynamic Content with the SAS Stored Process Web Application Frederick E. Pratter Many Web developers have been moving away from th e CGI technology that was the basis for SAS/INTRNET toward Microsoft .NET or cross-platform Java Web applications. The SAS Stored Process Web Application , new in Version 9, can be used by developers with little or no Java programming experien ce; under some circumstances it can be used as a replacement for SAS/INTRNET. This paper will introduce SAS Stored Processes, show how they may be accessed from another application, such as Enterprise Guide and the Stored Process Web Application, and demonstrate a sample Web Application sas enterprise guide, sas management console, sample 17
38 Dude, Where's My Zero? Using DDE to Read Microsoft Excel Files Containing Leading Zeros Kevin Dietz Programmers who use SAS as a database management tool frequently import data from Microsoft EXCEL files. PROC IMPORT is a commonly used and well documented method to do this in SAS versions 8 and 9. However, a lesser known but potentially more powerful approach is to take advantage of the dynamic data exchange (DDE) capabilitie s of SAS. In parti cular, DDE can be superior to PROC IMPORT when importing EXCEL files that con- tain numeric fields with leading zeros, such as zip codes, Social Security numbers and other ID information. In some cases, de- pending on how the data is entered and formatted in EXCEL, lead- ing zeros that appear on screen in the EXCEL file are lost when importing into SAS with PROC IMPORT. The DDE facility can be used to ensure that these fields are imported as character fields, thus retaining any leading zeros proc import, excel, proc step, informat statement 2
39 Enterprise Guide & the WIK - SAS paying for itself Philip A. Mason Enterprise Guide provides an easy to use interface to SAS software for users to create reports from data. It can be used with the SAS 9 client/server architecture to produce stored processes defined in metadata. These can easily be run by others. By using the WIK (Web Infrastructure Kit) you can make these stored processes available to be run from a standard web browser and more. This paper describes how to do this sas enterprise guide, sas management console 6
40 Error Handling: An Approach for a Robust Production Environment Sandeep Gaudana,
Burak Sezek
Error handling is one of the most important ingredients of a good program. Timely detection and handling of error can save time and resources and prevent potentially many other problems down the road. This paper focuses on detection of errors, determining steps to be taken based on its severity and finally communicating the occu rrence of error to the concerned people. SAS e-mail feature is used as a means of communication. Macros used by us as part of the Error Handling Framework are included exception handling, error, macro definition, data step, macro variable, error message, macro loop, proc step, %if-%then-%else 14
41 Fast and Easy Ways to Check Your Work: Using PROC MEANS to Confirm Continuous Variable Categorizations Richard M. Mitchell The purpose of this paper is to present a process where a SAS programmer may utilize PROC MEANS t o c h e c k one's work after taking a continuous variable and creating a new variable with discrete categories. While variable coding may often appear to be simple enough not to warrant extensive checking of a program, the integration of such an approach in to standard checking procedures can not only help ease the mind of the SAS programmer, but also help provide proof to the requestor that a task has been done correctly. This process is also beneficial in identifying potential outliers of data and in servi ng as a test to confirm just how good a set of specifications are for a given variable. By taking advantage of basic procedures such as PROC MEANS, one can avoid making the same variable categorization mistakes that have tripped up even the best of programmers proc step, interval variable, proc means 2
42 Freq n' Means Marge Scerbo,
Michael S. Lajiness
Procs FREQ and MEANS have literally been part of SAS for over 30 years and are probably THE most used of the SAS analytical procedures. They provide useful information directly and indirectly and are easy to use, so people run them daily without thinking about them. These procedures can facilitate the construction of many useful statistics and data views that are not readily evident from the documentation. This paper will discuss different forms of the procedures and provide you with ideas on where they may be most useful in your organization and should expand your horizons on these two procedures proc step, proc freq, class variable, out=, numeric variable, dataset, proc format, label statement, exact test, missing value, output, proc means, binomial distribution, sample, by group processing, chi-square test, proc print, standard deviation 19
43 From 500 Spreadsheets to One SAS Data Set in Three Easy Steps: Driving IMPORT with Data-Driven Macro Variables Christianna S. Williams In a clinical trial, we had sleep data on 90 study participants over 30 one-week study periods. These data were originally stored in EXCEL spreadsheets, with separate workbooks for each study period and a separate worksheet within those workbooks for each participant. Additionally complicating matters, not all subjects participated in all study periods, so the number and the "identities" of the worksheets varied among study periods. Thoughtful and systematic naming of workbook files and the worksheets they contained, along with construction of a "control" SAS data set indicating which people took part in which study periods, facilitated the development of a few fairly simple SAS macros to automate the IMPORTation of more than 500 spreadsheets and the concatenation of these into a single file for statistical analysis macro variable, macro call, macro loop, do loop, excel, dataset, call symput, proc step, proc import, sas log, macro definition 10
44 Fun With Functions Marje Fecht Functions can be fun (and useful) if you know when, how, and why to use them. Functions can be frustrating if you do not know the tricks behind them. In this presentation, we will explore the most commonly used functions to streamline data processing and reduce your programming effort. You will learn how to use summary functions, string functions, conversion functions, and date functions. We will also explore some of the 60 functions added to SAS 9. This presentation will also help you understand WHERE to use functions, since they are not "just for the DATA STEP" sas 9, missing value, proc step, character functions 5
45 Getting Data into SAS: INFILE and INPUT Andrew T. Kuligowski The SAS System has numerous capabilities to store, analyze, rep ort, and p resent data. Ho wever, tho se features are useless unless that data is stored in, or can be access ed by, the SAS Sy stem. This presentation includes a n i ntroduction t o the I NPUT and INFILE statements, which combine to provide a simple, yet p owerful, method to pa ss data into the SAS Sys tem. Matters to be address ed are reading fixed and variable len gth files, .CSV files, in-strea m data, informats, and more input statement, infile statement, proc step, proc copy, character variable, proc sql, dataset, filename statement, libname statement, column input, list input, variable, named input, length statement 8
46 Handling Different Rules for the Imputation of Missing Data Using an LOCF Approach Mark Keese missing value, last observation carried forward 5
47 HIRE POWER Neil H. Howard "The best thing you can do for your competition is to select poor quality staff." VP Recruitment, Microsoft You are interviewing a candidate in a sharp navy suit, with an im pressive resume and ten years of SAS experience. But, how do you tell if this ten years of experience is really ten years, or the same year over and over again? If, indeed, past behavior or past job performance is the best indicator of future performance, how is the SAS community probi ng for the facts? What are our assessment criteria? The author developed a survey tool adminis tered to selected SAS programmers, analysts, trainers, human resource experts, and managers as a reality check into our per formance as interviewers and our experienc e as interviewees sas programmer, data cleaning 11
48 HOLY MACRO! An Intuitive Approach to Understanding the Macro Facility Michael J. Molter The macro facility allows us to write macro code that instructs SAS how to generate the more familiar open code found in DATA steps and PROCs. With such a tool, we can consolidate families of related programs, execute the same piece of code repetitively, and develop applications for others to use. This replaces error-prone, high- maintenance jobs such as saving multiple versions of essentially the same program (with slight differences depending on the task) or excessive typing or copying and pasting. The best part is that most of the code is similar to what we find in open code. The key to understanding how the macro processor works is in understanding the differences - both in the code itself, and in the way the two types of code are processed. This theme will be emphasized throughout the paper. Discussion begins with macro variables, beginning with initialization and referencing, followed by other subjects such as functions, quoting, and combinations macro variable, macro facility, macro definition, &variable, do loop, proc step, call symput, output, keyword parameter, %macro parameters, macro function, macro loop, macro conditional, title statement, proc sql, macro put, macro quoting function, set statement, macro parameter, if-then-else, subsetting if, footnote statement, numeric variable, proc tabulate, put statement, end, proc means 20
49 How SAS Thinks Neil H. Howard The DATA STEP is the most powerful t ool in the SAS system. Understanding the internals of DATA STEP processing, what is happening and why, is crucial in mastering code and output. Concepts covered: Logical Program Data Vector (LPDV or PDV), automatic SAS variables and how they are used, the importance of underst anding the internals of DATA STEP processing, what happens at program compile time, what's happening at execution time, how variable attributes are captured and stored, and * handling processing defaults, data conversions, and missing values. This workshop focuses on techniques that capitalize on the power of the DATA STEP and working with (and around) the default actions. By understanding DATA STEP processing, you can debug your programs and interpret your dataset, missing value, proc step, automatic variable, retain, input statement, set statement, by group processing, merge statement, proc print, proc contents, character functions 19
50 How to Recognize and Use Calendar Dates. Melvin Tooker A frequent concern of beginning SAS programmers is how to make SAS recognize different calendar date formats. For example, September, Sept., SEP, 9, 09, /9, and /09 are all valid representations for the month of September. Although a program may currently read a date correctly, a new challenge arises when the data provider alters date formats or new users remotely enter data sysdate9, date variable 2
51 Implementing a Hospital Balanced Scorecard Peter Chingos,
Rocket Wong
The balanced scorecard concept, introduced by Kaplan & Norton, aims to measure (and manage) performance across multiple perspectives: financial, customer, internal business process, and learning and growth. MMC embraced this approach as it is particularly helpful to an enterprise that needs to be financially viable, satisfy its patients; fine tune its internal capacity, and keep up its flexibility to staff and meet new challenges. MMC began by producing a high level, institutional scorecard manually. The structure and content were conceptualized during a facilitated executive retreat. The output of the retreat was a set of performance measures that reflected MMC's strategic objectives. MMC staff aggregated data; calculated metrics and graphics using MS EXCEL and then transferred this onto a template for printing excel, data warehouse 4
52 Improve Your Dating: The INTNX Function Alignment Value SAMEDAY Bruce F. Gilsen date variable, sysdate9 2
53 In Deepwater with Activity Based Management Sherman Lacey,
Greg Cohen
The Integrated Deepwater System has answered the quandary of how to acquire affordable assets and systems through the notion of total ownership cost. Total ownership cost estimates the cost to acquire and operate every asset within the Deepwater System. Deepwater then compares actual expenditures against the total ownership cost estimate to evaluate actual cost performance. From this comparison, future estimates are refined and restated as necessary. In order to gather actual expenditures for the comparison to the estimated total ownership cost, the Deepwater staff chose to convert legacy cost data into SAS Activity Based Management models. This paper will explore the challenges that faced the Coast Guard in converting the legacy cost models to ABM; the depth of the resulting data that could be examined; and the technical triumph and growing managerial crisis of forcing a legacy cost model beyond its intended scope and purpose control total, business intelligence 9
54 In Search of the LOST CARD Andrew T. Kuligowski "Everyone who's not here, rai se you r hand." It's an old jo ke, b ut it point s o ut the difficul ty of identifying persons or things that are not present. T he SAS System has its own version of this chestnut, the SASLOG message indicating that there are one or more gaps in one's input data input statement, infile statement, sample, numeric variable, missing value 9
55 Interactive Graphs from the SAS System Shi-Tao Yeh An interactive graph is a dynamic graph interface that allows viewers interaction. The SAS System provides the following interactive features: /g135By an ActiveX control - (pop-up data tips, drill-down links, and interactive menus) /g135By a Java applet - (pop-up data tips, drill-down links, and interactive menus) /g135By a Metaview applet - (data tips, drill-down links, or some interactivity such as zooming, panning, and slide shows). /g135By Static Images - (data tips, and drill-down links, or animation). /g135By Graphical Template Language(GTL) - (data tips). /g135By ODS features of bookmarks and hyperlinks. This paper illustrates interactive graph features provided by the SAS System. The SAS version 9.1 products used in this paper are SAS BASE ,S A S / S T A T, and SAS/GRAPH o naP C Windows platform output delivery system, data step 10
56 Interface With SAS Using this .NET Class Matthew Campbell Situations often arise where having the ability to interface with SAS in .NET is extremely valuable. For instance, applications can be built with windows interfaces that utilize SAS code to generate reports. This paper will present a Visual Basic class, a symbolic representation of a programming object, which has been used to work with the SAS system in many projects. This will include VB.NET code to open SAS, submit SAS code, and read data stored in permanent SAS datasets. In addition, an example of how this SAS class works with a .NET Windows application will be presented dataset, if-then-else, conditional do loop, sas output 20
57 Introducing the GLIMMIX Procedure for Generalized Linear Mixed Models Oliver Schabenberger This paper describes a new SAS/ST A T procedure for fitting models to non-normal or normal data with correlations or nonconstant variability . The GLIMMIX procedure is an add-on for the SAS/ST A T product in SAS 9.1 on the Windows platform. PROC GLIMMIX extends the SAS mixed model tools in a number of ways. For example, it models data from non-Gaussian distributions implements low-rank smoothing based on mixed models provides new features for LS-means comparisons and display enables you to use SAS programming statements to compute model effects, or to define link and variance functions * fits models to multivariate data in which observations do not all have the same distribution or link Applications of the GLIMMIX procedure include estimating trends in disease rates, modeling counts or proportions over time in a clinical trial, predicting probability of occurrence in time series and spatial data, and joint modeling of correlated binary and continuous data proc glimmix, proc mixed, proc step, likelihood function, binomial distribution, covariance, response variable, poisson distribution, covariance structure, fixed effects, logistic regression, normal distribution, proc calis, estimate, correlation 20
58 Introduction to Experimental Design using SAS Jonas V. Bilenas We will look at how to design experiments using SAS/QC. Examples will come from experiments testing consumer preference for direct mail credit card offers. Discussion will focus on designs of experiments using PROC OPTEX, sample size requirements, and response surface models using PROC LOGISTIC and PROC GENMOD. We will discuss what to do with design results, focusing on simulation and optimization. AnalysisNESUG 18 proc step, sample size, sample, main effect, proc power, logistic distribution, credit card, proc logistic, regression analysis, confidence interval, proc genmod, randomization 13
59 Introduction to SAS Enterprise Guide 3.0 for Statistical Analysis Charles B. Hallahan,
Linda P. Atkinson
The workshop begins with a quick tour through the layout of Enterprise Guide (EG) 3.0 as a menu-based interface to SAS procedures. Emphasis in this workshop will be on the statistical capabilities of EG. In particular, a set of data will serve as a case study for performing exploratory data analysis, estimating a multiple regression model, and examining graphical diagnostics for the model fit. The workshop will show how code generated by EG can be customized, stored, and rerun, and custom reports saved with the Document Builder sas enterprise guide, regression analysis, proc reg, predictor variable, dataset, proc step, correlation, response variable, estimate, scatter plot, data science, sample, outlier 20
60 Join, Merge or Lookup? Expanding your toolkit Judy Loren,
Sandeep Gaudana
People who are learning SAS often ask: Is the DATA STEP or PROC SQL better? The answer depends on several factors. This paper will provide guidance to help new-to-intermediate users make an informed choice in merge/join situations. The syntax and the theory underlying 5 different techniques for bringing together data from 2 (or more) datasets will be covered. The techniques to be included are: sort and merge; SQL; user-defined formats; hash tables; and indexed lookup. The methods will be compared for suitability in a variety of specific merge scenarios, and benchmarks of resource use will be shown. A macro that can be used to develop similar benchmarks at any site on any data is included . This should be a handy resource for anyone who is often faced with new merge challenges proc sql, proc step, hash table, sample, user-defined format, proc sort, set statement, create table, date variable 15
61 Large Scale Standard Macros - A Methodical Approach to Development and Implementation Jeremy Gratt,
John H. Adams
Much of the analysis for clinical trials in the pharmaceutical industry is done with very large standard macros. The use of these macros facilitates the goal of standardizing and accelerating the production of clinical reports within a company. Each standard macro is typically specialized to analyze and report on a specific type of data such as efficacy, safety, drug interactions, or demographics. The challenges encountered during the development of large scale SAS macros and the development process adopted at Boehringer-Ingelheim will be described. This methodical approach improves development efficiency and maintainability. Essential elements of the approach that will be covered include the software development life cycle, macro storage and versioning, modular program structure, program documentation, and common macro tools. Introduction The development and implementation process for large scale SAS macros in company-wide applications can quickly become unmanageable macro parameter, sample, in=, out=, macro call, macro variable, proc step, adverse events 18
62 Literally Minded: the Use of SAS Literals and Why They Are Still Felevant! Stanley E. Fogleman Many people are unaware that there are SAS literals that can be used to store dates, hexadecimals and even SAS variable names directly instead of going through time-consuming and error-prone conversion steps sysdate9, excel 4
63 Loans, Mortgages & Refinance: What if Scenarios Adel Fahmy Financing any major purchase (house, car, education, business or appliances) requires borrowing a substantial amount of money. Loan Officers work for ban ks using software that serve their purpose, selling you the loan. They present you with a sheet of scheduled payments. This sheet has two main points that help their purpose, not yours. First, you receive it on or after closing date, not before making your decision. Second, it shows only their main target for loan repayment, ignoring your own concerns about Closing Costs/Points, and in case of a mortgage, Property Tax and Home Insurance, which all have to come out of your hard-earned money. This paper presents a SASprogram that calculates all of the above factors, including the Variable Rate nightmare. You can run it with different scenarios of Amount Borrowed, Interest Rate, and Loan Duration. In addition, it helps to decide whether an Advance Payment is worth it interest rate, macro definition, stored macro 17
64 Logistic Regression: Ordinal and Nominal Outcomes Peter L. Flom Logistic regression may be useful when we are trying to model a categorical dependent variable (DV) as a function of one or more independent variables. This paper reviews the case when the DV has more than two levels, either ordered or not, gives and explains SAS R⃝ code for these methods, and illustrates them with examples. Keywords: Ordinal Multinomial Logistic logistic distribution, logistic regression, regression analysis, estimate, ordinal logistic regression, confidence interval, proc logistic, proc step 9
65 Long to Wide Transformation---A More Flexible Approach Using SAS/IML Liang Xie In one nursing research project, each record from the original data set contains information either about the household or about the individuals under the household. The research fellow requires that the two-layer structure data be transposed into a WIDE format in that all records from the same household and associated individuals form just one record. The difficulties with this manipulation include: 1. Finish the manipulation on a million-record database in a reasonable time; 2. Process large number of heterogeneous variables' names in a neat and automatic way; 3. Allow flexibility in handling different data sets with similar structure. One approach utilizes the matrix manipulat ion power of SAS/IML. This approach is natural and easy to implement, but it does not have adequate efficiency. The other approach takes advantage of the efficiency of DATA STEP and flexibility of SAS/MACRO. The gain in efficiency is enormous while maintains flexibility macro variable, macro facility, sample 8
66 Loop-Do-Loop Around Arrays Wendi L. Wright Have you ever noticed your DATA STEP repeats the same code over and over? And then thought … there must be a b etter way. Sure, you coul d use a ma cro, but macros ca n gene rate many lines of cod e. Arrays, on the other hand, can do the same job in only a fe w lines. Many SAS programmers avoid arrays thinking they are difficult, but the truth is they are not only easy to use, but make your work easier. Arrays are SAS DATA STEP statements that allow iterative processing of variables and text. We will lo ok at many exampl es, in cluding 1) i nput a nd output of fil es usin g arrays, 2) doin g the same cal culation on multiple vari ables, and 3) creating multiple record s with on e o bservation. T his tutori al will pre sent the basics of using array statements and demonstrate several examples of usage do loop, array, temporary array, data step, array bounds, character variable, if-then-else, conditional do loop, numeric variable, proc means, sas function, missing value, numeric functions 16
67 Macro Bugs - How to Control Them H. Ian Whitlock The process to control the production of macro bugs is far more significant in creating successful programs than the process of eliminating a bug once you have produced it. This paper will concentrate on the conditions that cause a bug to develop. However some time will be spent discussing the system tools most fruitful for locating bugs. The reader may be relatively new to writing macros, but he/she should bring some SAS and some macro experience to the lecture for it is hard to pick up all the background even when all terms are explained. This discussion of bugs should be relevant to anyone interested in writing code and the quality of that code. The material for this talk has been developed on the PC under Windows using SAS 8.2 and 9.1.2. However, all operating systems and platforms that can execute SAS are relevant proc step, macro variable, call execute, proc sql, %if-%then-%else, macro definition 15
68 Mainframe Files On Your Windows Desktop with SAS/CONNECT Michael G. Sadof Since it is common to have data residing across several platforms, it is important to utilize the strengths of each computer system. SAS/CONNECT Software enables you to view and update your data on multiple platforms from any one connected computer. This paper provides some quick and easy code to get your SAS/CONNECT applications up and running smoothly. This paper will focus on mainframe to Windows connectivity. With only a few simple statements you can manipulate your mainframe based data from your familiar SAS windows environment. The SAS/CONNECT software must be installed on each platform. This paper will describe some tweaks for the standard SAS connection script used to connect to mainframe and describe a simple template for your SAS/CONNECT sessions. SAS/CONNECT features Remote Library Services, Remote Transfer Services, and Remote Compute Services enabling us to harness the power of the mainframe without resorting to the archaic JCL syntax proc step, libname statement, sample, proc download, proc upload, macro variable 5
69 Making Remote Processing Less Remote Chris Moriak Remote processing can be an extremely efficient macro variable, proc step, libname statement, work library, data step, proc format, catalog entry, stored macro, proc upload 7
70 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 understanding the syntax of PROC TABULATE and tend to avoid using the procedure. This tutorial will explain the syntax of PROC TABULATE and, with examples, show how to grasp the power of PROC TABULATE. The data used in this paper represents simulated consumer credit card usage data and the code was developed using SAS 9. This updates the paper presented at NESUG in 2001 with the same title. Data PresentationNESUG 18 proc step, proc tabulate, proc format, class variable, sample, credit card, excel, proc freq 15
71 MDMAP - An innovative application utilized in the management of clinical trial metadata Gregory Ridge,
Neeru Bhardwaj
Since 1999, Sanofi -Synthelabo has delivered all of its Item 11 components for a new dru g application to the FDA in electronic format. While the product delivered was compliant with the guidance set forth by the agency, the technologies and methodologies used by the company varied from project to project. In 2003, a diverse working group was formed to standardize the method used by the Biostatistics organization when producing an electronic submission. This group's primary goals were the standardization and automation of the processes that Biostatistics used worldwide to capture, manage and ma intain the clinical trial metadata. After extensive development and validation, MDMAP (Meta Data Management and Publishing) was deployed to the users worldwide. This application, developed in SAS/INTRNET and the J2EE framework, has streamlined the sometimes-cumbersome activity of collecting and managing clinical trial metadata audit trail, clinical trial, adam dataset, oracle, format statement, proc step, cdisc 9
72 Moving Data and Analytical Results between SAS and Microsoft Office Vincent DelGobbo Transferring data between SAS and Microsoft Office can be difficult, especially when SAS is not installed on a Windows platform. This paper discusses using the HTML and XML support in Base SAS software to move data between SAS and Microsoft Office (versions 2002 and later). You can use the techniques described here regardless of the platform on which SAS software is installed excel, dataset, sas output, xls, ods html, ods xml, adverse events, macro definition, sample, proc template, proc step, sas base, libname engine, work library 20
73 Obtaining Path and File Names of Submitted Programs in an Interactive SAS Session: V8 and V9 Solutions Perry Watts Up to now, it has been a struggle to label SAS output generat ed in an interactive sessi on with footnotes contain- ing source code identification. This paper describes a macro, FULLPATH, that together with the Microsoft SAVE command (^S) solves the problem in Version 8 SAS. Be sides describing FULLPATH in detail, incremental output from DICTIONARY.EXTFILES supporting the V8 solution sh ows how user-selection is tracked during an interac- tive SAS session. Next, a one-step solution in Versio n 9 SAS is demonstrated by replacing FULLPATH (and its sister-macro PROGNAME) with environmental variables, SAS_EXECFILEPATH and SAS_EXECFILENAME. Re- port generation for program-stamped output is also discus sed along with enhanced editor abbreviations that sup- port the development of reliable source code. Problem Definition An interactive SAS session in Microsoft Windows reflects a work environment where multitasking is the norm macro variable, sas output 11
74 ODS HTML Meets Real World Requirements Lisa Eckler,
Robert W. Simmonds
This paper describes a customized information delivery system using ODS HTML. The challenge that spawned this was to automate delivery of a number of static SAS-generated reports via a corporate intranet. ODS HTML appeared to be the obvious solution, yet -- as is often the case with obvious solutions -- it failed to address many of our business requirements. These requirements included compliance with existing standards for the look and feel of reports, control over who had access to various levels of reports, and print and export functionality. We took advantage of PROC TEMPLATE, ODS HTML, PROC REPORT and the creation of an EXCEL spreadsheet containing an external Table of Contents to accommodate these requirements. In doing so, we developed a highly customized but fully automated report delivery application ods html, output delivery system, proc step, proc template, excel, proc report, proc print 11
75 ODS Step by Step Wendi L. Wright The Outp ut Delivery Syst em (O DS) was d eveloped by SAS to cre ate p rofessional lo oking output reports. Thi s paper introduces the b eginning ODS user to th e basic concepts needed to create vario us types of files and datasets. Included in this paper: Creating RTF, HTML, and PDF files and some tips and tricks with each. Using the ExcelXP tagset Using ODS to create SAS datasets (ODS TRACE and ODS OUTPUT) Using PROC TEMPLATE to change colors, fonts and some of the table cell parameters excel, proc step, ods html, proc freq, proc print, proc template 19
76 Optimize Your Data Columns - A Space Consideration Jacksen Lou A raw data set from a robust database sometimes is generally not suitable for a particular project or a processing software package, such as SAS . Some data sets may contain character columns that are hardly workable due to a column width consideration. It is prudent or even necessary, therefore, to preprocess a data set so that it can be used in a less awkward way. The main task of such a preprocessing step is to truncate the excessive column space and to optimize column attributes so that both data columns and data size are ideally compact. Key Words: data, preprocess, character column, truncate proc print, sample 8
77 Performing Macro Iteration on Consecutive Lines of a Dataset Using Proc SQL Syloke Soong You have a dataset where each line is to be consecutively extracted and its fields used as arguments or values for a repeated set of operations. There are two techniques based on PROC SQL to identify, and progress to, the next row of a dataset within a macro. One is an invasive technique and the other non-invasive. The non-invasive technique does not require modifying the dataset used for iteration. While the invasive technique requires the adjoining of an _N_ column. As each row progresses, the SELECT INTO phrase becomes useful to extract values of fields to be used as arguments to any operation within the macro loop. Both methods are discussed as well as when each method is appropriate. The techniques to identify and treat first and last records in the examples should be noted proc sql, macro definition, proc step, macro variable, composite key, call symput, macro loop, %if-%then-%else 5
78 Personalizing Mailings and Driving Sales Using SAS/GRAPH James P. Shields Personalizing marketing messages to the individual customer is an effective method for increasing response and driving sales. This paper will walk through using SAS/GRAPH to create personalized maps showing the incidences of Lyme in relation to where a veterinary clinic is located. The presentation will cover all the steps that were involved in building an actual direct marketing promotion. Included will be the use of PROC GMAP, Annotate, a touch of trig, changing graph resolution, and formatting the output to better suit the printers needs macro variable, proc gmap, proc step, missing value 10
79 Predictive Modeling Using Survival Analysis Vadim Pliner In some applications of survival analysis, there is a need for extrapolation of survival function beyond the time window of available data. Two approaches to this problem are discussed: a parametric analysis based on PROC LIFEREG and a discrete-time logistic- hazard model using PROC LOGISTIC. The issue of selecting the best model among the parametric classes allowed by PROC LIFEREG is also addressed, and SAS macros for implementing the both approaches are presented proc lifereg, logistic distribution, proc step, likelihood function, survival analysis, proc logistic, nominal variable, probability distribution, hazard function, survival function, regression analysis 10
80 Pretty Dates All in a Row Dianne Louise Rhodes macro variable, sysdate9, proc format, call symput, datepart, macro function, sas function, proc step 5
81 PROC SQL for DATA Step Die-Hards Christianna S. Williams PROC SQL can be rather intimidating for those who have learned SAS data management techniques exclusively using the DATA STEP. However, when it comes to data manipulation, SAS often provides more than one method to achieve the same result, and SQL provides another valuable tool to have in one's repertoire. Further, Struc- tured Query Language is implemented in many widely used relational database systems with which SAS may in- terface, so it is a worthwhile skill to have from that perspective as well. This tutorial will present a series of increasingly complex examples. In each case I will demonstrate the DATA STEP method with which users are probably already familiar, followed by SQL code that will accomplish the same data manipulation proc sql, proc step, create table, group by, order by, inner join, where statement, filtering, subsetting if, by group processing, proc means, outlier 20
82 PROC SURVEYMEANS Roger L. Goodwin This presentation shows how to sum marize "closed and weighted" estim ates of the area frame data using PROC SURVEYMEANS in SAS . We compared results from PROC SURVEYMEANS with results f rom the surv ey summary package used by the agency. Results were surprisingly close. Since the list f rame uses sim ilar estim ators, this presentation can be extended to estimate those items also. However, the expansion factors will be inherently dif ferent. In the area f rame, expansion f actors are based on segm ents, whereas, in the list fram e, expansion f actors are based on farm operators. For documentation on extrem ely com plex SAS so ftware for calculating weights, see Goodwin (2001, 2001, 2002). The stratified estimators and the rationale be hind using them have been docum ented for use in the June Surveys (Housem an, 1975; Kott, 1988; Kott, 1990). The SAS m acro %QAS is used to calculate totals and standa rd errors at NASS. It has been m odified several times proc calis, proc surveymeans, proc step, by group processing, sample, proc surveyselect, dataset 8
83 PROC SURVEYSELECT: A Simply Serpentine Solution for Complex Sample Designs Louise S. Hadden SAS programmers are frequently called upon to draw a statistically defensible sample for surveys. Many of us have become adept at various DATA STEP sampling techniques over the years. However, SAS's relatively new suite of SURVEY procedures has made our lives much easier. Stratification? No problem. Systematic random sampling? No problem. Proportional sampling? No problem. All in the same design? Yes! This paper will demon- strate the use of PROC SURVEYSELECT to facilitate the drawing of a valid, stratified, random, proportional sam- ple. The examples presented were run on a mainframe computer (OS/390) running SAS V8.2, and on a PC (WIN2K PRO) using SAS 9.1.2 sample, proc surveyselect, proc step, random sampling, systematic sampling, binary variable, sample size, data step, cpu time 8
84 Question: How do I find out what _TYPE_ is from my PROC MEANS?Answer: the FINDTYPE macro Daniel E. Bruns Have you ever been really confused by the _TYPE_ variable with PROC MEANS or PROC SUMMARY? Have you ever had trouble determining the values of _TYPE_? The FINDTYPE macro is your answer! Accepts variable names as parameters and returns the corresponding _TYPE_ value. A tip worth ten minutes of your valuable conference time! macro variable, macro loop, macro function, %if-%then-%else, macro definition, proc step, end, macro flow control 4
85 Reading a File of Questionable Lineage James Zeitler How, when confronted with an unintelligible file and sketchy information about the file's origins and contents, I used s ome SAS informats , previous k nowledge of lik ely relat ed databas es, experie nce on different types of computers, and, finally, the SAS support line to decipher the file dataset, character variable 6
86 Really 'Cool' Graphics with SAS/GRAPH - Plotting and Embedding Likert Scales in Your Reports Richard M. Mitchell The use of Likert scales can be a very effective approach in reporting one's data. While this type of scale is commonly used across a wide-range of professions to show where a given measure fits within a predefined scale, references on how to generate this as a high-quality professional looking graphic in SAS are rare at best. This paper will discuss an approach t o generating Likert scale graphics that is unique, yet basic. By utilizing PROC GPLOT within SAS/GRAPH along with a few nifty ODS features, a SAS programmer can easily plot and embed his or her own Likert scales into reports. Users of this approach will undoubtedly get a "Wow, those are really cool graphics!" reaction from their coworkers sas programmer, ods html 10
87 Recruiter ... Friend or Foe? Shelley J. Muhs Mention the word "recruiter," and depending on the most recent use of one, reactions can be very positive and glowing or extremely negative and disappointing. I'd like to show you how to turn a possible "foe" into a "friend" when it comes to recruiter assistance; whether you're hiring professionals or seeking that new career opportunity. Recruiters come in all shapes and sizes and support a variety of roles for organizations. There are corporate recruiters that work exclusively for one company recruiting for multiple positions within that firm. There are contingency recruiters that are hired by those corporate recruiters and the managers they serve. The latter is what we'll concentrate on, and the one I feel is best positioned to meet your career objectives sas consultant, business intelligence 3
88 Reporting and Interacting with Excel Spreadsheets with ODS and DDE Steven H. Feder By now everyone knows SAS can direct output to HTML files, which can be viewed by a browser. But EXCEL can also open HTML files, with some of the appearance features available. In addition, by using relative cell references to pass in formulas, programmers can also create spreadsheets that serve as applications. The application can display data in a user-friendly format which also allows the user to modify values. By reading and writing to the EXCEL file through DDE, the full functionality of SAS is available interactively. This is ideal for applications in which the user considers the data and tries out the results of various manual adjustments to specific variables excel, proc report, proc step, macro variable 9
89 Right Time Right Place: An Application of Arrays Len Zangwill Many industries are keenly interes ted in upselling their customers additional products. In the credit card indus try, the ac tive cardholder is generally d eemed initially elig ible for a wide variety of additio nal of fers. However, it is of ten n ot f easible to presen t to an account all the sales offers they m ight qualif y for. This is quite relevant if an accountholder calls into to the custom er service call center, wher e realistically one or maybe two offers can be presented. Another application f or this is direct m ail, which usually focuses on one or two offers to highlight in a given mailing. Which offer is the best one for the custom er service rep to pres ent? SAS ARRAY processing provides an efficient way to determine which specific offer is the best for the rep to sell. Assuming prepped data, the array can prioritize a group of offers to determ ine the all-important "best offer". The net resu lt is that the cus tomer has the Right Offer at the Right Time array, proc transpose, credit card, proc step 5
90 SAS 9 Programming Enhancements Marje Fecht Performance improvements are the well-publicized enhancement to SAS 9, but what else has changed that impacts your "SAS programs"? This Hands On Workshop explores many new SAS 9 features including: ƒ new functions that may eliminate the need for complex expressions ƒ changes and additions to informats and formats ƒ interface additions and improvements ƒ new Export capabilities ƒ procedure enhancements ƒ and more. . . This workshop is beneficial for Version 8 SAS users who are getting started with SAS 9 sas 9, macro variable, character functions, proc step, excel 5
91 SAS BI on Steroids Florio Arguillas,
Kevin Huddleston
In order to test whether, and how well, SAS Enterprise BI Server (SAS BI) would work using a 32-bit SAS Metadata Server and a 64-bit SAS Worksp ace Server, we created 5 test environments and compared processing times for each. We wanted to demonstrate how users with very large statistical problems (data and analysis) who needed the power of 64-bit architecture could port their processes to one of our 64-bit systems from their desktop, vi a a 32-bit metadata server. We succeeded in demonstrating that SAS BI can work very well acr oss architectures, and, as expected, the processing time for large volumes of data was significantly redu ced by use of the 64-bit system. We concluded that using SAS BI in this manner could be very useful in the right environment. We also discuss the features of SAS BI that might be useful for an academic research environment such as ours sas enterprise guide, sas base, cpu time, proc iml, proc step, dataset 9
92 SAS Comments - How Straightforward Are They? Jacksen Lou SAS comment statements typically use conventional symbols, '', '%', '/ … /'. Most programmers regard SAS commenting as a straightforward technique and are not fully aware of the difficulties that can arise from an improper use of comments. Occasionally, a misuse of comments can lead to program mistakes which are extremely difficult to find. This paper investigates how the SAS system processes comments and suggests a method to trouble-shoot some commonly seen commenting mistakes. Key Words: S A S ,C o m m e n t s , ,% ,/ a n d / macro put, macro definition, %if-%then-%else 8
93 SAS Explorer: Use and Customization Richard A. DeVenezia This paper describes the functioning of the SAS Explorer window, the details of customization and strategies for managing customizations. Explorer The Explorer motif is one with which almost everyone is familiar; a left hand panel contains a tree view, and a right hand panel contains a list view. The tree view contains nodes that can be opened and closed. The list view contains items corresponding to the node actively selected in the tree view. The items can be displayed as icons or as details, and they can be sorted. The tree view panel can be turned off when focus needs to be concentrated on the items. This motif is the basis of the SAS Explorer Window. A wide variety of interaction with SAS tables, catalogs, and applications is only a point and click away. SAS Environment The root of the SAS Explorer is the SAS Environment. This node may contain six components: Libraries, File Shortcuts, Favorite Folders, My Computer, Results and Metadata Servers catalog entry, proc step, sas base, dataset 13
94 SAS in the Office - IT Works Peter W. Eberhardt No matter how sophisticated your data warehousing solution may be you will still get the question "Can I have that in EXCEL?" The Microsoft Office suite is ubiquitous in most large organizations these days. And regardless of how and where the enterprise intelligence computing goes on, the suit e of Office products needs to be able integrate w ith this enterprise intelligence, or the time and energy you spend on ensuring data quality can be quickly lost with a sloppy cut and paste into EXCEL or WORD, or subject to the vagaries of DDE transfers. With the release of v8, SAS introduced Integration T echnologies, allow ing t he unrivalled analy tical and business intelligence capabilities of SAS to talk directly w ith the Microsoft Office suite. With the release of SAS v9 came the Add-In for Office w hich took the integration with Microsoft a step further. But like many generic user interfaces, the user experience can be somewhat less than ideal excel, dataset, sas log, proc step, format statement, sas library 12
95 SAS Pros and Cons Gary M. McQuown 9
96 SAS Tips & Techniques from SAS 9 Philip A. Mason Here is a collection of SAS Tips & Techniques from my 20 years experience as a SAS programmer. You can read about some of them in my book "In the Know: SAS Tips & Techniques from around the globe", which is available from SAS Institute and amazon.com. Others are from my second book which is currently being finalized, and there are also a few extras. Create a pivot table from SAS A colleague and I were looking at the best way to automatically create a pivot table in EXCEL automatically from SAS. We considered solutions such as ODS with MSO XML directives, straight XML, DDE, and so on - but these were all very complex. He finally came up with the following simple method. We use a SAS program to create a spreadsheet and then call a Visual Basic Script cpu time, proc step, data step, macro put, macro facility, proc sql, %if-%then-%else 8
97 SAS/CONNECT Simply Stated James C. Stokes Most of us today are required to process data on more than one computer platform (e.g. Mainframe, UNIX, Windows, etc.). The term "distributed processing" might be used to describe this scenario. Wouldn't it be great if there was a way to easily move SAS datasets between computer platforms? Wouldn't it be great to submit SAS jobs from a local platform to run on a remote platform? Wouldn't it be great to be able to have local access to a SAS dataset stored on a remote platform? If you've answered yes to any or all of these questions, then SAS/CONNECT is something you really need. SAS/CONNECT will allow you to greatly simplify some of the more challenging aspects related to distributed processing. This paper will define what SAS/CONNECT is, what you need to get started, and explore the three main features of SAS/CONNECT namely: Data Transfer Services, Remote Compute Services, and Remote Library Services dataset, proc step, distributed processing, proc download 2
98 Setting Uniform Spacing Between Columns for Table/Listings Lily Yu In the PROC REPORT procedure, character variables may cause unpleasant spacing between columns in table/listings because of their varyin g lengths. Some programmers determine a column width based on an estimated maximum variable length for the column. Any variables with text exceeding such column width will be truncated. Contrarily, overly estimated column width leaves a large spacing between the columns. Others set a fixed column width and rely on the "FLOW" option in the DEFINE statement to break the variab le text into subsequent line(s). The breaking action may cause undesirable results. For example, a word could be broken in two separate lines, or for indented text, the second line (wrapped line) wouldn't be indented, etc. The Ideal way to display variables with long text in table/listing is to show the whole text in one line macro variable, proc step, adverse events 4
99 SHOW-AND-TELL: How to Use MS Office Products to Help With SAS Applications Myra A. Oltsik Do you hate to type? I do. Over the years I've found ways to use other programs to help me develop SAS applications. This presentation will show you ways to use MS Word, MS EXCEL, and other products to help "write" SAS code, no matter what your level of SAS experience excel, proc sql 7
100 Simple Methods to Pull the Diagonal out of a Correlation Matrix. Laura Thornton When using large data sets with many variables, it is often necessary to find how the variables are correlated. However, many times, the cross-correlations among all the variables are not as important as the diagonal of a correlation matrix where both the var and with clauses are invoked. A simple and effective use of macro variable references can be employed to display only the diagonal using the noprint option for the PROC CORR and a single dataset step. While the simple statistics are not printed prior to the diagonal of the matrix, they can be obtained using a PROC MEANS prior to the invocation to the CORRELATION procedure. The methodology for two ways of extraction of singular pieces from the matrix and various adaptations are presented correlation, proc step 2
101 Skinning the Cat This Way and That: Using ODS to Create Word Documents That Work for You Elizabeth Axelrod,
David Shamlin
By supporting formats like Rich Text Format (RTF) and HyperText Markup Language (HTML), the SAS Output Delivery System (ODS) makes turning SAS output into Word documents easy. Tabular output from SAS procedures can be sent directly to a file that Word can read. However, the resulting Word document might fall short of your expected results. For example, we needed to create a Word document that would serve as a user guide (or codebook), describing over 400 variables in a survey study. The body of the document needed to include detailed information for each variable. The Table of Contents needed to list the page numbers for the sections including the detailed information for each variable. As a result, we experienced several formatting challenges. Long values in section titles did not wrap correctly, and there was too much white space between sections, to name a few title statement, ods html, sas output, output delivery system, proc step, ods rtf, label statement, proc print, sas batch, macro variable, proc freq, proc template, proc sql 9
102 Stop! Wait! Go! Look What Traffic Lighting Can Do For You! Louise S. Hadden The Output Delivery System in conjunction with three SAS procedures that have procedure level styles make "traffic lighting" or the highlighting of various output items easy to accomplish. Traffic lighting can allow you to make your tables and reporting really stand out in the crowd! This paper will demonstrate various forms of traffic lighting in PROC TABULATE, PROC REPORT, and PROC PRINT to add interest to YOUR SAS output! proc step, proc tabulate, proc report, proc print, proc format, user-defined format 9
103 Stretching the Bounds of SAS/GRAPH Software Michael S. Zdeb,
Robert E. Allison
This hands-on session will teach you how create graphics that you never imagined you could produce with SAS/GRAPH. You will learn some little-known, but very powerful, SAS/GRAPH tricks that you can use to create unique, custom, one-of-a-kind graphics. Some of the areas covered during this hands-on workshop are: using PROC GMAP to create custom 'maps' that do not represent geographical areas (silicon wafer 'maps', calendar charts, floor plans, textile fabrics, company logos, data grids); using the new device=JAVAMETA graphics device to produce animated charts and slide shows (the person viewing the output can stop, start, and control the speed of the animation to help explore the data in detail, not possible with old-style gif animations); using the Annotate facility in non-standard fashions (to put 'shadows' behind maps, emphasize 2-level of borders around regions in maps, fake transparent/shadow effects in maps); using the HTML= option to add custom CHARTTIPS (sometimes referred to as proc step, proc gmap, proc greplay, data step, macro variable, outlier, ods html, %if-%then-%else 20
104 SYMPLIFY Your Data Set Transposition with SYMPUT and Make It Data-Driven Too! Christianna S. Williams I frequently need to convert a SAS data set with multiple observations per subject into one with a single observation per subject with multiple variables to hold information that had been stored as single variables - in other words "de- normalize" the data. This is often the case with longitudi- nal data, where information is collected on individuals re- peatedly over time. To successfully complete this transposition, one needs to know how many records there are for each subject in the input data to determine how many variables are needed in the output data. This can be complicated when there are variable numbers of records among subjects and/or this number of records can change over time. Basically, to prevent loss of information in the transposed file, one needs to know the maximum number of observations that any one subject has in the input data set proc transpose, proc step 3
105 Systematic SAS Development [or A Discipline of SAS Development] John W. Davison Jr. This paper presents my systematic approach to SAS application design, based on nearly thirty years' experience in SAS development and maintenance. Without setting forth a rigid framework some broad guidelines are offered embodying the author's own rules that have served him well and may help others to develop their own. They represent a step toward formulation of a disciplined approach to more rapid development of more robust and maintainable applications and more reusable code proc step, sas enterprise guide, macro variable, sample 7
106 Table Templates and DATA _NULL_ Cynthia L. Zender Are you a DATA STEP programmer? Do you want to route DATA _NULL_ output to the Output Delivery System (ODS)? Do you want to convert classic DATA _NULL_ and FILE PRINT programs to take advantage of the ODS? This paper explains how to create and use a custom TABLE template with a DATA _NULL_ program. Through the use of concrete examples, you will learn how to become a power user of custom TABLE templates and DATA _NULL_. Topics covered include defining a new template, defining headers and footers, using GENERIC columns, and performing traffic-lighting based on data cell values macro variable, proc step, put statement, proc template, ods html, output delivery system, proc sql 19
107 Taking Almost Raw Lab Data and Turning it into Data Fit to be Analyzed Jeff Magouirk The purpose of the Data Coordinating Center at National Jewish Medical and Research Center is to collect data for patient, drug and medical device studies. These studies examine compliance issues, qua lity of life measures and clinical trials. Usually, the increase in workload for a new study, especially a clinical trial, means that the workload placed upon the human resources available is gr eater than a proportional increase of just adding one study. As a method to use these s carce resources in a more efficient manner, processes that previously taken human intervention were automated. A process that needed automation was the test results from the Pulmonary Function Test (PFT) or Spirometry data. This test measures different types of lung volumes. Before this process was automated, the data was hand entered onto a paper case report form (CRF). The paper forms were scanned and made into electronic images proc sql, clinical trial 7
108 The Big Four: Analyzing Complex Sample Survey Data Using SAS, SPSS, STATA, and SUDAAN Arlene B. Siller,
Linda Tompkins
The National Center for Health Statistics conducts surveys with probability-based complex sample designs to produce estimates of person health conditions, vital statistics, medical establishment characteristics, disparities in health status and use of health care by race/ethnicity, socio-economic status, and other population traits in the United States. Researchers usually present descriptive statistics such as means, totals, and their standard errors. However, in order to make statistically valid population inferences from sample data, standard errors must be computed using procedures that take into account the complex nature of the sample design. This paper compares estimates produced with four statistical packages (SAS, SPSS, STATA and SUDAAN) using data from two of the many surveys conducted by the Center sample, proc calis, regression analysis, proc step, confidence interval, proc reg, logistic regression, odds ratio, statistical software, logistic distribution 7
109 The INPUT Statement: Where It's @ Ronald P. Cody input statement, infile statement, sas log, trailing @, dataset, variable list, character variable, error message, missing value, proc step, date variable, numeric variable 13
110 The Plot Thickens from PLOT to GPLOT Wendi L. Wright This paper starts with a lo ok at basi c plotting using PROC PLOT. A dataset with the daily number of h its on three websites i s u sed. The p resentation continue s with exam ples of ho w to create m ore info rmative an d professional looking plots by adding titles, footnotes, and reference lines and changing the symbols, legends and axes. This is done in a step by step approach with examples of how the plot changes at each step. A look at PROC GPLO T is next using the same Web example. The final plot create d using PROC PL OT is compared with the same program run in the PROC GPLOT procedure. Further improvements are made in the same step b y step fashi on usin g vario us SAS Graph state ments. The first cha nge i s to the Titles and Footnotes. Then, one at a time, changes are made to the symbols (SYMBOL statement), the legend (LEGEND statement), and the axes (AXIS statement) proc step, proc gplot, title statement 20
111 The Power of PROC FORMAT Updated for SAS9. Jonas V. Bilenas The FORMAT procedure in SAS is a very powerful and productive tool, yet many beginning programmers rarely make use of it. The FORMAT procedure provides a convenient way to do a table lookup in SAS. User generated Formats can be used to assign descriptive labels to data vales, create new variables and find unexpected values. PROC FORMAT can also be used to generate data extracts and to merge data sets. This paper will provide an introductory look at PROC FORMAT for the beginning user and provide sample code that will illustrate the power of PROC FORMAT in a number of applications. This paper updates the paper presented at NESUG 2000 titled "The Power of PROC FORMAT". Programming & ManipulationNESUG 18 proc format, proc step, proc freq, missing value, proc tabulate, dataset, flat file, format statement 8
112 The Survey Data Book an Easy Read via Proc Tabulate and the ODS RTF Destination Electra Small The intake period for a lengthy survey was over. The next step was to create a nicely formatted "preliminary results book." The concept of the survey data book was that it would mirror the initial questionnaire in design. It was also to report the total number who responded to each question and the percentage who gave each response. This paper steps through the use of SAS PROC TABULATE, PROC FORMAT, PROC TEMPLATE, the ODS RTF destination, and the macro language accomplish this project proc tabulate, proc step, class variable, sample size, sample, proc format, proc template, missing value, label statement 11
113 Tips and Tricks: Using SAS/GRAPH Effectively A. Darrell Massengill SAS/GRAPH is a powerful data visualization tool. This paper examines the powerful components of SAS/GRAPH and highlights techniques for harnessing that power to create effective and attention-grabbing graphs. The components examined include the SAS/GRAPH procedures, gr aphical global statements, the Output Delivery System (ODS), graph styles, client-rendered graphs, and the Annotate facility. Complete programs using these components and techniques are provided and examined in detail proc step, proc gplot, catalog entry, proc gchart, output delivery system 15
114 Tips for Using SQL: When to Use and How? Ying Feng As a data analyst who did Oracle and SQL Server Database programming before diving into the SAS world, I'm thrilled to find SAS also provides its own version of Structured Query Language (SQL). Sure, the DATA STEP can do a lot of work, but sometimes PROC SQL can accomplish the same work more efficiently and with fewer steps. At the very least, it provides a nice alternate to the DATA STEP. In this paper, some scenarios will be identified and PROC SQL will be used to demonstrate them proc sql, proc step 6
115 To Right Click or Left Click: Choices in SAS-Produced Presentation Graphics Louise S. Hadden SAS provides us with the capability of producing many different types of graphic objects using BASE SAS and SAS/STAT procedures and SAS/GRAPH. Such graphic objects include JAVA enabled graphics (JAVA, JAVAIMG), Active-X enabled graphics (ACTIVEX, ACTXIMG), static HTML graphics, PDF files, and drill-down or animated HTML graphics. In addition to the ability to publish these graphics on intranets and the internet, these graphic objects may be downloaded, uploaded, and/or incorporated into documents, spreadsheets, etc., sometimes without losing their special capabilities. Examples using the PC-Windows platform and SAS V9.1.3 will be presented and discussed. Many of the options are also available in SAS V8.2 and have been tested on both the PC-Windows platform and AIX UNIX platform. Presentation graphics contained in HTML, XML and PDF files are static and require only an internet browser and/or Adobe Reader to view proc sgplot, output delivery system 11
116 Traffic Lighting: Easier Than You Think Michael L. Davis This presentation will show how traffic lighting (high lighting cells based upon pre-determined criteria) can be eas- ily implemented in PROC REPORT. PROC REPORT was chosen because of a problem when combining in-line formatting with PROC PRINT. While the author im plemented this technique as part of a SAS/INTRNET application, it can be used in both interactive and batch SAS programs to draw attention to significant values proc step, proc print, proc report 4
117 Transforming Variables for Normality and Linearity - When, How, Why and Why Not's Steven M. LaLonde Power transformations are o ften suggested as a means to "normalize" univariate data which may be skewed left or right, or as a way to "straighten out" a bivariate curvilinear relationship in a regression model. This talk will focus on identifying when transformations are appro- priate and how to choose the proper transformations using SAS and new features of the ODS. There is also a discussion of why, or why not, you may choose the "optimal" transformation identified by SAS predictor variable, proc step, regression analysis, response variable, scatter plot, proc iml, histogram 8
118 Using Data Set Options in PROC SQL Kenneth W. Borowiak Data set options are an often over-looked feature when querying and manipulating SAS data sets with PROC SQL. This paper explores using the data set options DROP, KEEP, LABEL, SORTEDBY, WHERE, and RENAME in the FROM clause and CREATE TABLE statement of PROC SQL. These options can help facilitate more succinct and efficient code and to create parsimonious and well-labeled data sets proc sql, proc step, create table, where statement, colon modifier, create view, sample, select 9
119 Using DDE to connect SAS Results with Excel Rebecca Symes excel, filename statement, sample 7
120 Using DS2TREE Macro to Create Interactive Treeview Diagrams for Clinical Adverse Experiences Records Shi-Tao Yeh The SAS DS2TREE macro uses the Treeview applet to generate an interactive node or link diagrams for hierarchical data. The applet is designed to visualize large hierarchical data, focusing on some of specific nodes of interest while retaining the context of the data hierarchy. The applet places the root node at the center of the view and the successive level of child nodes around the root node in circles of increasing radius. This is useful because some data sets collected from clinical trials are in hierarchical structures. These types of data are well-suited for the Treeview display. This paper discusses the application of the DS2TREE macro to clinical AE data and illustrates the interactive graph features provided by the Treeview applet. The SAS products used in this paper are SAS BASE /g163and SAS/GRAPH/g1639.1 on a PC Windows platform macro definition, clinical trial, macro call 17
121 Using GRADAR Procedure to Display Clinical Data Shi-Tao Yeh A radar or star chart graphically shows the size of the target num eric variable among categories. On a radar chart, the chart statistics are displayed along spokes from the center of th e chart. The GRADAR procedure in SAS/GRAPH 9.1 creates radar chart. The GRADAR procedure provides five star types with interactive features. The interactive features are: /g135By an ActiveX control - (pop-up data tips, drill-down links, and interactive menus) /g135By a Metaview applet - (data tips, drill-down links, or some interactivity such as zooming, panning, and slide shows). /g135By Static Images - (data tips, and drill-down links, or animation) adverse events, clinical trial 13
122 Using Metadata to Generate an Automated SAS Program Terry L. Pennington Metadata can be harnessed to create an automated SAS program that will read or manipulate ASCII files or SAS datasets. For ASCII files with similar file layouts received on a regular basis, we might create a SAS dataset containing the field names and field lengths, and run a generic SAS program that automatically writes a program to read and manipulate the ASCII file based upon the identifying metadata. Economic survey programs conducted by the Census Bureau utilize a generalized system called the Standardized Economic Processing System (StEPS) to process and analyze survey data. Edit definitions and instructions for treating missing data within StEPS are stored in SAS datasets. An initial generic SAS program was written which generates a customized automated SAS program to check the syntax and logic of the edit definitions file statement, macro definition 11
123 Using SAS for Cointegration and Error Correction Mechanism Approaches: Estimating a Capital Asset Pricing Model for House Price Returns Ismail E. Mohamed,
Theresa R. DiVenti
Many researchers erroneously use the framework of linear regression models to analyze time series data when predicting changes over time or when extrapolating from present conditions to future conditions. Caution is needed when interpreting the results of these regression models. Granger and Newbold (1974) discovered the existence of 'spurious regressions' that can occur when the variables in a regression are nonstationary. While these regressions appear to look good in terms of having a high R 2 and significant t-statistics, the results are meaningless. Both analysis and modeling of time series data require knowledge about the mathematical model of the process. This paper introduces a methodology that utilizes the power of the SAS DATA STEP, and PROC X12 and REG procedures. The DATA STEP uses the SAS LAG and DIF functions to manipulate the data and create an additional set of variables including Home Price Index Returns (HPI_R1), first differenced, and lagged first differenced time series analysis, regression analysis, first difference, unit root, time series data, anova, proc step, null hypothesis, label statement, response variable, proc x12, seasonal adjustment, data step, dif function, proc reg, estimate, sas output, covariance 14
124 Using SAS to Perform Maintenance Tasks on ASCII Files Chris Moriak The ability of SAS to read and write ASCII files makes it a good application for performing maintenance tasks on ASCII files. For example, when co pying and modifying programs, often there is specific text, like a trial number, that needs to be changed in all programs. It would be great if there were a utility to make such global changes to all programs within a directory. Another example is comparing two directories of ASCII output to identify any differences between them and to document the differences. SAS programmers dread comparing two SAS outputs to find what, if anything has changed between program runs. The manual process of dredging thro ugh page after page is both inefficient and tedious. This paper will discuss how SAS can help accomplish both these tasks. The platform used in this paper is UNIX, but one can modify it to use on other platforms. The files need to be in ASCII format (e.g. SAS or LST files) proc step, proc sql, macro variable, macro loop, filename statement, macro definition, macro parameter, %if-%then-%else, file statement 10
125 Using the Oracle LIBNAME Engine and Oracle Hints to Reduce the Time it Takes to Extract Data from an Oracle Database David D. Chapman,
Selva Sridharma
This paper reviews the ORACLE LIBNAME engine and shows how to use it to extract data from an ORACLE Da- tabase. Common parameters for the ORAC LE LIBNAME engine are illustrated. We discuss issues related to re- porting resource usage. ORACLE hints are described and explained as a way to reduce the time it takes to ex- tract data from an ORACLE table and to improve processing. Several examples of ORAC LE hints are given. The paper discusses the use of ORACLE indexes as a way to improve efficiency and avoiding sorting. Examples are given of the use of the DBKEY option to efficiently extract part of an ORACLE table libname engine, cpu time, oracle, dataset, proc sql, proc step, macro variable, proc contents, sample, sas library 13
126 Using XML Mapper to Create An XML Map Shi-Tao Yeh The SAS System provides several ways to write an XML document. The users can use SAS CDISC procedure, several graphical macros, data _NULL_ statements, ODS XML destination, and XML LIBNAME engine to convert SAS datasets to XML files. Some non-rectangular XML files are not directly readable from SAS XML LIBNAME engine. SAS Institute has added additional support and tools recently for reading and writing XML files under SAS Version 9.1.3. SAS XML Mapper is one of these tools. SAS XML Mapper is a Java-based Graphical User Interface (GUI) application that allows users to generate an XML Map by drag-and-drop interface. XML Mapper is an XMLMap support tool to generate and modify XML Maps for use by the XML LIBNAME engine and other vendors' applications. In addition to XML Map, SAS XML Mapper also provides SAS code sample, table view and contents. This paper illustrates how to use the XML Mapper to create an XML Map. The SAS products used in this paper are SAS BASE /g1639.1.3 and SAS/GRAPH 9 libname engine, dataset 10

Back to Conf go 2006 go 2004

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.