Return to UOCC HomeComputing News Home
Header bar

What's New in SAS Version 9?

The latest version of SAS includes some welcome additions...

Robin High
Statistical Programmer and Consultant
robinh@uoregon.edu

As you may know, thanks to our site license agreement, all University of Oregon students, faculty, and staff may install the statistical software package SAS on their personal computers at no cost. In recent years the PC version of SAS has become much more versatile, powerful, and convenient to run both small and large data analysis projects. The most recent and most advanced version of SAS, 9.1.3, is now available from the Computing Center documents room (175 McKenzie ).

Most new SAS users should install Version 9. If you already have version 8.2 and decide to upgrade, you'll need to go through a completely new installation process, as described at http://ssil.uoregon.edu/sas/ This site also contains registration and license renewal information.

Documentation

Online documentation for version 8.2 will continue to be available to UOnet users at http://sas.uoregon.edu/sashtml/main.htm Documentation for Version 9.1.3 is available in two formats from the SAS support website. The first website (http://support.sas.com/onlinedoc/913/docMainpage.jsp) is recommended for slower connection speeds. It allows you to search the table of contents for specific topics and select a link for further information.

A second website (requiring a high-speed connection and Adobe Acrobat Reader 6.0 or later) provides links to the contents of the SAS manuals in PDF format (http://support.sas.com/documentation/onlinedoc/91pdf/index_913.html) Although it's possible to download these manuals for viewing or printing, please note that the entire contents of each manual are placed into one PDF document. Some of these manuals are thousands of pages long (the STAT manual alone is over 5000 pages!) so print only the pages you need. Another alternative is to buy individual manuals by clicking the "purchase book" link next to each title on the site.

What's New in SAS 9?

You'll find a complete description of what's new in Version 9 at http://support.sas.com/documentation/onlinedoc/91pdf/sasdoc_913/whatnew_8350.pdf This document is 270 pages long, so once again, be judicious when printing.

Much of what you may already know about SAS has not changed. Since SAS is backward-compatible for the most part, the great majority of programs written for Version 8.2 (and earlier) will continue to work in 9.1.3 with few or no modifications. However, SAS has added many new features in its latest version, including functions for the DATA step, options for statistical programs, and specialized data analysis procedures not previously available. This article summarizes just a few of the most helpful tools SAS has added to its arsenal.

New Functions

New SAS functions include mathematical and statistical applications. In particular, these new functions enable you to work more effectively with date and character-string data:

DATA places;
LENGTH city $10 state $12 ;
FORMAT visit_date mmddyy10. ;
INPUT visit_date anydtdte10. city state;
location=CATX(", ",city,state); concatenate
DATALINES;
12/10/2004 Ashland Oregon
16JUL2004 Bertrand Nebraska

;

PROC PRINT DATA=places NOobs; RUN;

city state visit_date location
Ashland Oregon 12/10/2004 Ashland, Oregon
Bertrand Nebraska 07/16/2004 Bertrand, Nebraska

New functions for descriptive statistics allow you to identify the smallest, largest, or the range of data from a specified list of variables contained in the same row (observation). Like previously available functions which compute the mean or the number of missing values for a list of variables, the new MEDIAN function allows you to compute the median of a set of non-missing variables from each observation. Compare the behavior of the ORDINAL function with the new SMALLEST function in this example to see how they work with missing data.

DATA example;
INPUT a b c d e ;
MISSING b z;
min_r1 = ORDINAL(1,a,b,c,d,e);
min_row = SMALLEST(1,a,b,c,d,e);
mean_row = MEAN(a,b,c,d,e);
median_row = MEDIAN(a,b,c,d,e);
max_row = LARGEST(1,a,b,c,d,e);
nmiss_row = NMISS(a,b,c,d,e);
DATALINES;
3 2 z 4 5
13 12 34 34 35
9 . 5 3 1
2 5 99 z b
;

PROC PRINT DATA=example NOobs;
VAR min_r1 min_row median_row mean_row max_row nmiss_row ;
RUN;

min_r1 min_row mean_row median_row max_row nmiss_row
Z 2 3.5 3.5000 5 1
12 12 34.0 25.6000 35 0
. 1 4.0 4.5000 9 1
B 2 5.0 35.3333 99 2

Study tip: Ron Cody's book SAS Functions by Example, which is available from the catalog at http://www.sas.com/apps/pubscat/welcome.jsp, is a comprehensive resource for descriptions and applications of SAS functions.

Longer Format Names

SAS formats allow you to enter descriptive labels for data stored as numbers or short alphabetic codes. In version 9, the maximum length for character format names has been extended to 31, and the maximum length for format names for numerical data is 32. This enables you to provide format names that are more descriptive.

PROC FORMAT;
VALUE $gender_respondent "F"="Female" "M"="Male";
RUN;
PROC PRINT DATA=sashelp.class;
VAR name sex age height weight;
FORMAT sex $gender_respondent. ;
RUN;

PROC FORMAT now allows you to define multilabel formats for the same value. These formats may be written and applied with the procedures MEANS, SUMMARY, and TABULATE. They allow you to compute summary statistics for individual values or multiple ranges. You may read about this new feature at http://support.sas.com/onlinedoc/912/getDoc/proc.hlp/a002473472.htm

ODS for Statistical Graphics

The Output Delivery System (ODS), which first appeared in Version 8, places the results printed to the output file or to an output window directly into SAS datasets. Version 9 includes a new experimental extension of the ODS which automatically produces a variety of graphical outputs. The ODS for Statistical Graphics provides common displays, including scatter plots, histograms, box-and-whisker plots, and contour plots. Familiarity with ODS for tables is assumed since many ODS features, such as destination statements, apply to graphics. Among the approximately 30 procedures that support statistical graphics in Version 9.1.3 are CORR, ANOVA, GENMOD, GLM, LOGISTIC, MIXED, REG, ROBUSTREG, ARIMA, and AUTOREG.

You do not need to know how to apply the complex SAS/GRAPH commands since graphs from the procedures that support ODS graphics are produced separately. However, note that all data placed in any of these graphs can be retrieved with ODS and analyzed with SAS/GRAPH, giving you more control over their layout and format.

The ODS graphics capability remains ‘experimental' since this software is not yet officially part of the SAS System. Although these experimental procedures have been extensively tested, they have not received the level of testing that SAS Institute requires for its software to be deemed ‘production' level. You'll find a brief introduction to ODS and ODS graphics at http://darkwing.uoregon.edu/~robinh/110_ods.txt More information is available from SAS's support page at http://support.sas.com/rnd/base/topics/statgraph/

New Statistical Procedures

The following statistical procedures are new in SAS 9:

Robust Regression: The new ROBUSTREG procedure computes stable regression results in the presence of outliers by limiting their influence. Two of the most commonly employed methods found here are Huber's M estimation and LTS estimation.

Power and Sample Size Analysis: PROC POWER and PROC GLMPOWER procedures perform prospective power analyses and sample size computations for a variety of statistical models with the following goals:

Another new feature is the Power and Sample Size application, which brings power calculations into a windows interface. It also lists the SAS statements you can run with PROC POWER or GLMPOWER, allowing you to produce the same or similar analyses at a future time. These calculations can be saved to a dataset with the ODS, which can be graphed with the SAS GRAPH module. (Note that although it is part of SAS/STAT software, the Power and Sample Size application needs to be installed separately from the Mid Tier CD in the set of installation disks.)

New SURVEY Analysis Procedures

If your data are sampled from a population with a known finite size or collected with a sampling design, as is often the case with surveys, statistical procedures such as MEANS, FREQ, and REG will not calculate the estimates and their variances properly, especially if the sample data include a substantial proportion of subjects from the entire population. Analyses of survey data which do not consider the sample design and the population size may lead to incorrect statistical inferences.

SAS 9.1 introduces several new procedures for the analysis of survey data. Your data analyses will likely be improved with PROC SURVEYMEANS instead of PROC MEANS, PROC SURVEYREG instead of PROC REG, or PROC SURVEYLOGISTIC instead of PROC LOGISTIC.

To learn more about survey sampling procedures, see Chapter 10 of the SAS/STAT manual.


Winter 2005 Computing News | Computing Center Home Page