1st Edition

SAS Programming The One-Day Course

By Neil H. Spencer Copyright 2004
    208 Pages 22 B/W Illustrations
    by Chapman & Hall

    208 Pages
    by Chapman & Hall

    Aimed at researchers and students , SAS Programming: The One-Day Course provides an introduction to the SAS programming language. It gives the reader a start in SAS programming and the basic data manipulations and statistical summaries that are available through SAS. The book has its origins in material prepared by the author for a one-day course in SAS programming, and the fact that it has been developed from a training course is reflected in the concise nature of the presentation.

    Unlike other introductory competitors on the market, this is a pocket-sized reference that does not clutter the programming techniques presented by trying to teach statistical techniques at the same time. Strong on explanations of how to carry out data manipulations that real-life data often call for, each programming technique is supported by tasks to develop skills and confidence. It also contains "tasks" for the reader, complete with solutions. Datasets and the programming code are available to download from www.crcpress.com/e_products/downloads.

    Once readers have mastered the topics covered in the book, they will be well placed to learn further aspects of SAS programming.

    INTRODUCING SAS
    Operating SAS
    Operating SAS with Microsoft Windows
    READING DATA INTO SAS
    What Is Plain Text?
    Tumour Necrosis Factor (TNF) Data
    Giving Labels to Variables
    Category Labels
    Using Simple Arithmetic to Create a New Variable
    PROC IMPORT
    Reading Dates and Times
    Tasks
    SAVING AND OUTPUT OF SAS DATASETS
    Permanent Datasets
    Data Manipulation, Permanent Datasets and the SET Statement
    PROC Report
    PUT
    PROC EXPORT
    Tasks
    MANIPULATING DATASETS
    Merging Datasets
    Concatenating Datasets
    Merging and Concatenating in One Program
    Further Manipulating of Datasets
    Tasks
    RESTRUCTURING DATASETS
    Splitting One Row of Data into Several Rows
    Combining Several Rows of Data into One Row
    Tasks
    SUMMARISING DATA
    PROC MEANS
    PROC UNIVARIATE
    PROC FREQ
    Tasks
    TABULATING DATA
    PROC MEANS
    PROC TABULATE for Summarising Data
    PROC TABULATE for Cross-tabulations
    Tasks
    FORMAT AND SAVING OF SAS OUTPUT
    Output Delivery System
    Saving SAS Output as a SAS Dataset
    Tasks
    GRAPHICS IN SAS
    Los Angeles Depression Data
    Histogram of CESD Score
    Bar Chart of Marital Status
    Bar Chart of Religion Grouped by Marital Status
    Pie Chart of Marital Status
    Plot of CESD Score Against Age
    Tasks
    AN INTRODUCTION TO MACROS
    Example of a Macro to Print Datasets
    Example of a Macro to Create and Format a Histogram
    Tasks
    APPENDICES
    Appendix A: Nurses' Glove Use Data
    Appendix B: Los Angeles Depression Data
    Appendix C: Solution Programs for Tasks

    Biography

    Neil H. Spencer

    "If you know little about SAS and desire a brief but detailed task-oriented overview of basic SAS commands, this is the book for you…this book is an excellent introduction to SAS. Many new SAS users will appreciate the wealth of SAS program files and data sets. Spencer has clearly documented every one of his programs, it is up to the diligent student to simply follow along."
    Journal of Statistical Software, Vol. 11, 2004

    "…beginning (and more experienced) users of SAS will still find this book very valuable as the issues it addresses are precisely those likely to be found most difficult with the language…The style of the text is concise but clear; example programs, with accompanying explanations, are included throughout the text and sets of exercises, with full solutions, are provided…it's small size and systematic coverage of the basics make it a useful brief reference book. I shall have it close to hand when using SAS in the future."
    Significance, Vol. 1(2)