SAS Programming and Data Visualization Techniques: A Power User’s Guide

Book description

SAS Programming and Data Visualization Techniques: A Power User’s Guide brings together a wealth of ideas about strategic and tactical solutions to everyday situations experienced when transferring, extracting, processing, analyzing, and reporting the valuable data you have at your fingertips. Best, you can achieve most of the solutions using the SAS components you already license, meaning that this book’s insights can keep you from throwing money at problems needlessly.

Author Philip R. Holland advises a broad range of clients throughout Europe and the United States as an independent consultant and founder of Holland Numerics Ltd, a SAS technical consultancy. In this book he explains techniques—through code samples and example—that will enable you to increase your knowledge of all aspects of SAS programming, improve your coding productivity, and interface SAS with other programs.

He also provides an expert’s overview of Graph Templates, which was recently moved into Base SAS. You will learn to create attractive, standardized, reusable, and platform-independent graphs—both statistical and non-statistical—to help you and your business users explore, visualize, and capitalize on your company’s data. In addition, you will find many examples and cases pertaining to healthcare, finance, retail, and other industries.

Among other things, SAS Programming and Data Visualization Techniques will show you how to:

  • Write efficient and reusable SAS code
  • Combine look-up data sets with larger data sets effectively
  • Run R and Perl from SAS
  • Run SAS programs from SAS Studio and Enterprise Guide
  • Output data into insightful, valuable charts and graphs
  • SAS Programming and Data Visualization Techniques prepares you to make better use of your existing SAS components by learning to use the newest features, improve your coding efficiency, help you develop applications that are easier to maintain, and make data analysis easier. In other words, it will save you time, money, and effort—and make you a more valuable member of the development team.

    Table of contents

    1. Cover
    2. Title
    3. Copyright
    4. Dedication
    5. Contents at a Glance
    6. Contents
    7. About the Author
    8. About the Techincal reviewer
    9. Acknowledgments
    10. Introduction
    11. Part I: Programming Efficiency Techniques
      1. Overview
      2. Chapter 1: The Basics of Efficient SAS Coding
        1. Is the SAS Programming World “Back to Front”?
        2. Speed and Low Maintenance
        3. Speed or Low Maintenance: Part 1
        4. Speed or Low Maintenance: Part 2
        5. Personal Preferences
        6. Reducing Maintenance: Part 1
        7. Reducing Maintenance: Part 2
        8. Conclusions
        9. References
      3. Chapter 2: How to Use Lookup Tables Effectively
        1. Sample Data Sets
        2. DATA Step Merge
        3. SQL Join
        4. Generated SAS Formats
        5. Generated If .. Then .. Else
        6. Generated Select .. When .. Otherwise
        7. DATA Step Hash
        8. Conclusions
        9. Reference
      4. Chapter 3: Case: SAS Skills in Epidemiology
        1. Size Really Is Important!
        2. Working with Longitudinal Databases
        3. Needing to Clean the Data
        4. Choosing a Suitable Database
        5. Programming Techniques
          1. Sample Data Sets
          2. Sample SAS Code
          3. Performance Results
        6. Summary
        7. Some Thoughts for Managers
    12. Part II: External Interfaces
      1. Overview
      2. Chapter 4: SAS to R to SAS
        1. Software Environment
        2. Program Flow
          1. SAS Activity to Prepare the Data
          2. R Activity
          3. SAS Activity to Create the ODS Report
        3. Coding Issues
        4. Character-Based Reports
        5. Conclusions
        6. Software Resources and Further Reading
      3. Chapter 5: Knit Perl and SAS Software for DIY Web Applications
        1. HTML Programming
        2. System Requirements
        3. SAS Programming
        4. Perl Programming and Operational Details
        5. Conclusions
        6. References
      4. Chapter 6: Running SAS Programs in Enterprise Guide
        1. Environment Setup
        2. Changes to the Automatic Initialization Program
        3. Limitations of Enterprise Guide Software
        4. Accessing Local SAS Installations
        5. Accessing Server-Based SAS Installations
        6. Why You Cannot Use Autoexec.sas
        7. Why Do Platform-Specific System Commands Fail?
        8. Changing the Current Directory
        9. Generating SAS Code Using Enterprise Guide Tasks
        10. Automatically Saving Logs to Disk
        11. Conclusions
        12. References
      5. Chapter 7: Running SAS Programs in SAS Studio or Enterprise Guide
        1. Platform-Specific Users
          1. Windows Users
          2. Unix or Linux Users
          3. MAC Users
        2. Role-Specific Users
          1. Academic Users
          2. Non-Programming Data Analysts
          3. Novice and Intermediate Programmers
          4. Power Users
          5. Interface and Task Developers
        3. Conclusions
        4. References
      6. Chapter 8: Everyday Uses for SAS Output Delivery System (ODS)
        1. Disguising a Web Page
          1. Uses
          2. Code
          3. Drawbacks
        2. Creating Reports in Parallel
          1. Uses
          2. Code
          3. Drawbacks
        3. Saving Reports for Later
          1. Uses
          2. Code
          3. Drawbacks
        4. Packaging Reports into Zip Files
          1. Uses
          2. Code
          3. Drawbacks
        5. Conclusions
    13. Part III: Data Visualization
      1. Overview
      2. Chapter 9: Introduction to Graph Templates and ODS Graphics Procedures
        1. Coming Up
        2. Introduction to ODS Graphics Procedures
          1. PROC SGPLOT
          2. PROC SGPANEL
          3. PROC SGSCATTER
        3. Conclusions
      3. Chapter 10: Generating Graph Templates
        1. ODS Graphics Designer
          1. How to Start the ODS Graphics Designer
          2. Using the Gallery to Create Simple Templates
          3. Saving the Template as a Designer File (*.sgd)
          4. Saving the Template as a SAS Program (*.sas)
        2. Graph Template Usage
          1. Preparing Data for Graph Templates
          2. Displaying Graph Templates
        3. Conclusions
      4. Chapter 11: Converting SAS/GRAPH Plots to ODS Graphics
        1. Scatter Plots
          1. SAS/GRAPH from SAS 9.2
          2. ODS Graphics from SAS 9.2 (Easy)
        2. Line Plots
          1. SAS/GRAPH from SAS 9.2
          2. ODS Graphics from SAS 9.2 (Easy)
        3. Regression Plots
          1. SAS/GRAPH from SAS 9.2
          2. ODS Graphics from SAS 9.2 (Easy)
        4. Error Bar Plots
          1. SAS/GRAPH from SAS 9.2
          2. ODS Graphics from SAS 9.2 (Easy)
        5. Box Plots
          1. SAS/GRAPH from SAS 9.2
          2. ODS Graphics from SAS 9.2 (Easy)
        6. Vertical Bar Charts
          1. SAS/GRAPH from SAS 9.2
          2. ODS Graphics from SAS 9.2 (Easy)
          3. ODS Graphics from SAS 9.3 (Easy)
        7. Horizontal Bar Charts
          1. SAS/GRAPH from SAS 9.2
          2. ODS Graphics from SAS 9.2 (Easy)
          3. ODS Graphics from SAS 9.3 (Easy)
          4. ODS Graphics from SAS 9.4 (Difficult and Impossible)
        8. 2D Pie Charts
          1. SAS/GRAPH from SAS 9.2
          2. ODS Graphics in SAS 9.2 (Impossible)
          3. ODS Graphics as of SAS 9.3 (Difficult)
        9. 3D Pie Charts
          1. ODS Graphics in SAS 9.2, 9.3, and 9.4 (Impossible)
        10. Conclusions
        11. Recommended Reading
      5. Chapter 12: Converting SAS/GRAPH Annotate to ODS Graphics
        1. Error Bars
          1. SAS/GRAPH from SAS 9.2
          2. ODS Graphics from SAS 9.2 (Easy)
        2. Point Labels
          1. SAS/GRAPH from SAS 9.2
          2. ODS Graphics from SAS 9.2 (Easy)
        3. Bar Labels
          1. SAS/GRAPH from SAS 9.2
          2. ODS Graphics from SAS 9.3 (Easy)
          3. ODS Graphics from SAS 9.4 (Easy)
        4. Information Boxes
          1. SAS/GRAPH from SAS 9.2
          2. ODS Graphics from SAS 9.3 (Difficult)
          3. ODS Graphics from SAS 9.2 (Difficult)
          4. ODS Graphics from SAS 9.2 (Easy)
        5. Conclusions
      6. Chapter 13: Customizing Graph Templates
        1. Structure and Syntax
          1. Structure
          2. Template Syntax
        2. Creating Your Own Templates
          1. Customizing PROC SGSCATTER Graphs
          2. Customizing PROC SGPLOT Templates
          3. Graph Template Contents
        3. Conclusions
      7. Chapter 14: ODS GRAPHICS Statement
        1. ODS GRAPHICS Statement
        2. ODS Graphics Output Destinations
          1. SAS 9.2
          2. SAS 9.3
          3. SAS 9.4
          4. EMF Output Files
        3. Conclusions
    14. Index

    Product information

    • Title: SAS Programming and Data Visualization Techniques: A Power User’s Guide
    • Author(s):
    • Release date: August 2015
    • Publisher(s): Apress
    • ISBN: 9781484205686