𝔖 Scriptorium
✦   LIBER   ✦

📁

Statistical programing in SAS

✍ Scribed by A. John Bailer


Year
2020
Tongue
English
Leaves
379
Edition
Second
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Table of Contents


Cover
Half Title
Title Page
Copyright Page
Table of Contents
Preface
Acknowledgments
Author
1: Structuring, Implementing, and Debugging Programs to Learn about Data
1.1 Statistical Programming
1.2 Learning from Constructed, Artificial Data
Processing a Particular Data Set—Extracting Variable Names from a Column of an Input Data Set
Learning More about Unfamiliar Statistical Methods—Linear Mixed Effects Models
Improving Your Intuition about Statistical Theory— Sampling Distribution of Means
1.3 Good Programming Practice
Document Your Programs!
Use Meaningful Variable Names
Use a Variety of CaSeS in Program Statements
Indent Program Statements That Naturally Go Together
1.4 SAS Program Structure
1.5 What Is a SAS Data Set?
1.6 Internally Documenting SAS Programs
1.7 Basic Debugging
1.8 Getting Help
Using Help in SAS
Getting Help from a Web Browser Search
1.9 Exercises
2: Reading, Creating, and Formatting Data Sets
2.1 What Does a SAS DATA Step Do?
2.2 Reading Data from External Files
Reading Data Directly as Part of a Program—Anyone for Datalines?
Reading Data Sets Saved as Text—INFILE Can Be Your Friend (PROC IMPORT Too!)
Sometimes, Variables Are in Particular Columns or in Particular Formats
2.3 Reading CSV, Excel, and TEXT Files
2.4 Temporary versus Permanent Status of Data Sets
2.5 Formatting and Labeling Variables
Using Formats to Read and Display Variable Values
Internal Representations and Output Displays
Character, Numeric, Time, and Date Formats
2.6 User-Defined Formatting
Saving Formats for Later Use
2.7 Recoding and Transforming Variables in a DATA Step
Indicator Variables
2.8 Writing Out a File or Making a Simple Report
Simple Report Generation
Exporting a File
2.9 Exercises
3: Programming a DATA Step
3.1 Writing Programs by Subdividing Tasks
Estimate the Probability That a Randomly Selected 30- to 39-Year-Old Male Is Taller than a Randomly Selected Female of the Same Age
Conditional Execution
Looping to Repeat a Task
Returning to the Height Probability Simulation
3.2 Ordering How Tasks Are Done
Missing Data in Functions
3.3 Indexable Lists of Variables (Also Known as Arrays)
Defining Values in the Variable List
Inputting Values in the Variable List
Reassign Missing Value Codes for Numeric Variables “.”
Recoding Missing Values for All Numeric and Character Variables
3.4 Functions Associated with Statistical Distributions
3.5 Generating Variables Using Random Number Generators
3.6 Remembering Variable Values across Observations
Processing Multiple Observations for a Single Observation
3.7 Case Study 1: Is the Two-Sample t-Test Robust to Violations of the Heterogeneous Variance Assumption?
Case Study 1 (Revisited with DATA Step Programming)
3.8 Efficiency Considerations—How Long Does It Take?
3.9 Case Study 2: Monte Carlo Integration to Estimate an Integral
3.10 Case Study 3: Simple Percentile-Based Bootstrap
3.11 Case Study 4: Randomization Test for the Equality of Two Populations
3.12 Exercises
4: Combining, Extracting, and Reshaping Data
4.1 Adding Observations by SET-ing Data Sets
4.2 Adding Variables by MERGE-ing Data Sets
4.3 Working with Tables in PROC SQL
4.4 Converting Wide to Long Formats
4.5 Converting Long to Wide Formats
4.6 Case Study: Reshaping a World Bank Data Set
4.7 Building Training and Validation Data Sets
4.8 Exercises
4.9 Self-study Lab
5: Macro Programming
5.1 What Is a Macro and Why Would You Use It?
5.2 Motivation for Macros: Numerical Integration to Determine P(0 < Z < 1.645)
5.3 Processing Macros
5.4 Macro Variables, Parameters, and Functions
5.5 Conditional Execution, Looping, and Macros
More Complicated Macro Variable Construction
Changing Locations in a Macro during Execution
5.6 Debugging Macro Code and Programs
Write Out Values of Macro Variables
Useful SAS Options for Debugging Macros
5.7 Saving Macros
5.8 Functions and Routines for Macros
5.9 Case Study: Macro for Constructing Training and Test Data Set for Model Comparison
5.10 Case Study: Processing Multiple Data Sets
5.11 Exercises
6: Customizing Output and Generating Data Visualizations
6.1 Using the Output Delivery System
Basic Ideas
Destinations—RTF, HTML, PDF, and More!
What’s Produced and How to Select It
Another Destination That Stat Programmers Should Visit—OUTPUT
6.2 Graphics in SAS
6.3 ODS Statistical Graphics
6.4 Modifying Graphics Using the ODS Graphics Editor
6.5 Graphing with Styles and Templates
6.6 Statistical Graphics—Entering the Land of SG Procedures
SGPLOT
SGPANEL
SGSCATTER
6.7 Case Study: Using the SG Procedures
6.8 Enhancing SG Displays—Options with SG Procedure Statements
6.9 Using Annotate Data Sets to Enhance SG Displays
6.10 Using Attribute Maps to Enhance SG Displays
6.11 Exercises
7: Processing Text
7.1 Cleaning and Processing Text Data
7.2 Starting with Character Functions
7.3 Processing Text
7.4 Case Study: Sentiment in State of the Union Addresses
7.5 Case Study: Reading Text from a Web Page
7.6 Regular Expressions
7.7 Case Study (Revisited)—Applying Regular Expressions
7.8 Exercises
8: Programming with Matrices and Vectors
8.1 Defining a Matrix and Subscripting
8.2 Using Diagonal Matrices and Stacking Matrices
8.3 Using Elementwise Operations, Repeating, and Multiplying Matrices
8.4 Importing a Data Set into SAS/IML and Exporting Matrices from SAS/IML to a Data Set
Creating Matrices from SAS Data Sets and Vice Versa
8.5 Case Study 1: Monte Carlo Integration to Estimate π
8.6 Case Study 2: Bisection Root Finder
8.7 Case Study 3: Randomization Test Using Matrices Imported from PROC PLAN
8.8 Case Study 4: SAS/IML Module to Implement Monte Carlo Integration to Estimate π
8.9 Storing and Loading SAS/IML Modules
8.10 SAS/IML and R
8.11 Exercises
References
Index


📜 SIMILAR VOLUMES


Statistical Programming in SAS
✍ A. John Bailer PhD 📂 Library 📅 2010 🏛 SAS Institute 🌐 English

In <i>Statistical Programming in SAS</i>, author A. John Bailer integrates SAS tools with interesting statistical applications and uses SAS 9.2 as a platform to introduce programming ideas for statistical analysis, data management, and data display and simulation. Written using a reader-friendly and

Statistical Programming with SAS/IML Sof
✍ Rick Wicklin 📂 Library 🏛 SAS Press 🌐 English

SAS/IML software is a powerful tool for data analysts because it enables implementation of statistical algorithms that are not available in any SAS procedure. Rick Wicklin's Statistical Programming with SAS/IML Software is the first book to provide a comprehensive description of the software and how

Applied Statistics and the SAS Programmi
✍ Ronald P. Cody, Jeffrey K. Smith 📂 Library 📅 1997 🏛 Prentice Hall 🌐 English

This book is intended to provide the applied researcher with the capacity to perform statistical analyses with SAS software without wading through pages of technical documentation. The researcher is provided with the necessary SAS statements to run programs for most of the commonly used statistics,

Applied statistics and the SAS programmi
✍ Ronald P. Cody, Jeffrey K. Smith 📂 Library 📅 1997 🏛 Prentice Hall 🌐 English

This book is intended to provide the applied researcher with the capacity to perform statistical analyses with SAS software without wading through pages of technical documentation. The researcher is provided with the necessary SAS statements to run programs for most of the commonly used statistics,