The MCHP SAS PC Tutorial

The SAS system provides a way of creating and/or accessing a variety of data sets, with techniques for manipulating the data to obtain output ranging from simple frequency tables to complex three-dimensional graphs. SAS software is available from the University of Manitoba for employees and students; more detailed information regarding SAS is available from the SAS Website.

The goal of the MCHP online SAS tutorial is to provide the new user with enough knowledge of SAS to translate basic research questions into SAS code, enabling completion of the research project required by the Epidemiology of Health Care course at the University of Manitoba. Additional "intermediate" training material has been developed for new users of the MCHP data bases; this documentation covers arrays, do loops, first/last by-group processing, retain statements, and how to work with dates. (Complete SAS Institute manual documentation is available online under Academic Software References, Vendor Reference Materials, on the Software Team Resources Page, recognized with University of Manitoba IP addresses.)

A printable version of the manual is available in pdf format (manual.pdf).

The MCHP online SAS tutorial is best viewed using at least Version 3 of Netscape or Internet Explorer, with a minimum setting on an SVGA monitor of 256 colours, 800x600 pixels. It was developed for use with SAS Release 9.1 (Windows 95/98 or Windows NT operating system). In addition to the usual system Help menu, this version of SAS provides additional information to licenses under the Help headings of "SAS OnlineDoc" and "Online Tutor".


As a self-guided tutorial, it is suggested that the user review the general guidelines and SAS program syntax first. The remaining material might then be followed sequentially: how to prepare a data set, how to view the data, how to explore and manipulate the data, how to add observations and variables to a data set, and how to process the data. (If the user runs SAS and the browser simultaneously, example code can be copied from the browser to the Program Editor window in SAS.)

Several sample data sets are referenced:

  1. Height/weight - is used throughout for illustrative purposes.
  2. Simulated clinical - can be created by the user to complete the questions found at the end of the sections on viewing, exploring, manipulating, adding variables and observations, and processingthe data (with links to how the program, log, and output should look).
  3. Simulated Manitoba Health - the data set used by students of the Epidemiology of Health Care course to complete the required assignments, only obtainable from MCHP, not from this tutorial. Additional questions are included here, for use with this data set, complete with links to the program, log, and output.

SAS has improved its interface to the point where a lot of analysis can be simply and quickly carried out using menus, examples of which are provided in the alternatives to programming section. It is often desirable, however, for users to have a basic understanding of SAS programming. Knowledge of SAS programming facilitates not only spotting some of the pitfalls inherent in processing data, but also maintaining more complete documentation of all the steps required to produce any given output. It is all too frequently necessary, in the course of carrying out research, to reproduce results which may have required a complex series of data processing steps.

It is important to recognize that there is often no one "right" way of obtaining accurate results. For simplification and continuity, this document reflects one style of writing SAS code. There are other more or less efficient ways of constructing SAS code, however, all of which may produce identical results. Where alternatives exist for generating results, a legitimate, and often preferred, choice is code that the user understands.

Resources, References and Acknowledgements