Why SAS?

If you have any questions on SAS at Urban reach out to Jessica Kelly (jkelly@urban.org) or Sybil Mendonca (smendonca@urban.org) or join the Slack group at #sas-users-group. For more resources visit the SAS Users Group page on the intranet.

Most of the research that takes place at the Urban Institute is empirical, that is, it involves the use of data. To analyze data, whether it comes from the U.S. Census or a small-scale survey, it is necessary to organize it into one or more data sets. A data set is a simple method of organizing data: Think of a 2-dimensional table of numbers or characters organized into rows and columns. Usually, each row represents a separate observation (e.g., a person, a family, or a city) and each column represents a variable (e.g., age, income, or population). Now, suppose you want to learn something from the data, such as the mean age of the individuals in your data set; or suppose you want to look only at a subset of your data set, such as only those persons over age 18. If you had only a few observations, you might perform these tasks by hand. For a hundred or so observations, you might use a spreadsheet. But for larger data sets, such tasks are much more efficiently handled using SAS.

The “SAS System,” or just plain “SAS,” is produced by the SAS Institute. First and foremost, SAS provides a means of storing and manipulating data. By writing a series of SAS commands into a program, you can read data into SAS, create variables, select certain observations for analysis, and ultimately apply statistical procedures to analyze the data. But to be able to use SAS to carry out these operations you must first be acquainted with the language and grammar of SAS.

Resources at Urban

There is an incredible Urban Institute Guide to SAS on the intranet to introduce the beginning SAS user to basic grammatical rules and common commands in SAS. The topics covered are:

The primary purpose of this guide is to provide basic coding tools to enable you to begin writing programs in the SAS System, and to explain the proper procedures for using SAS at the Urban Institute. It is intended only to be a starting point. Rather than being a replacement for the manuals written by the SAS Institute, this document is an accessible guide that can save beginning users several hours of searching through those more cumbersome, albeit thorough, manuals. In addition, this guide can serve as a reference for more advanced users, especially those who have not used SAS for some time and need a quick refresher.

Where to go for more help

While the Urban Institute Guide to SAS provides a basic introduction to many of the more frequently used SAS commands it is not intended to be a complete and exhaustive reference. The SAS Institute produces extensive documentation on various parts of the SAS System that you should be aware of. Starting with version 8, the complete set of SAS documentation is available in an interactive electronic format called SAS OnlineDoc.

In addition to the official SAS manuals, there are many good books about SAS programming written by people outside of the SAS Institute. Some of these may actually be more helpful than the official SAS publications. One useful book is SAS Programming by Example, by Ron Cody and Ray Pass. Intended for beginning and intermediate users, this book provides a series of annotated examples to lead you from basic tasks to more complex ones. It is useful both as a tutorial for learning programming and as a convenient quick reference for solving programming problems. Among the clearly explained examples are models that show you how to build SAS data sets, use SAS functions for data translation, program more efficiently, relate information from multiple sources, and chart and plot data. It also illustrates how to use SAS date values, to produce descriptive and summary statistics, and to write reports.

Another informative publication is Mastering the SAS System, by Jay A. Jaffe, which discusses most features of the SAS Base system. It provides good explanations of SAS programming techniques, including the data step and SAS procedures, by group processing, where and if subsetting, missing values, and the SAS Macro Language.

Finally, SAS users can take advantage of the resources provided by the Urban Institute SAS Users Group (UISUG). UISUG provides a forum for SAS users at the Institute to share information and tips on using SAS. UISUG also sponsors brown bag seminars on introductory and advanced SAS topics.