𝔖 Scriptorium
✦   LIBER   ✦

📁

SAS Coding Primer and Reference Guide

✍ Scribed by Connie Tang


Publisher
Auerbach Publications
Year
2020
Tongue
English
Leaves
297
Edition
1
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Although the web and online SAS(R) communities can provide volumes of information for programmers, these resources are often overwhelming and lack a simple path to guide coding SAS. This reference, however, does provide such a path from a data user's standpoint vs. seeing things as a code writer. Written by an experienced SAS programmer, this book lets SAS coders easily find explanations and clarification to typical programming problems. This book presents practical real-world data analysis steps encountered by analysts in the field. These steps include the following:



Getting to know raw data



Understanding variables



Getting data into SAS



Creating new data variables



Performing data manipulations, including sorting, ranking, grouping, subtotal, total, and percentage



Statistical testing under a broad range of logical and conditional settings



Data visualization

Throughout this book, statements and codes are accompanied by thorough annotation. Line-by-line explanations ensure that all terms are clearly explained. Code examples and sample codes have broad usages. All the examples are related to highway transportation where the use of big data is exploding and presenting new challenges and opportunities for growth.

Clear and precise practical introductory material on statistics is integrated into the relevant SAS procedures to bolster users' confidence in applying such methods to their own work.

Comprehensive and foundational coverage, systematic introduction of programming topics, thoroughly annotated code examples, and real-world code samples combine to makeSAS(R) Coding Primer and Reference Guidean indispensable reference for beginners and experienced programmers.

✦ Table of Contents


Cover......Page 1
Half Title......Page 2
Title Page......Page 4
Copyright Page......Page 5
Table of Contents......Page 6
Preface......Page 10
Author......Page 12
1.1.1 SAS Code File......Page 14
1.1.4 SAS Output File......Page 15
1.2.1 Syntax......Page 16
1.2.2 Basic SAS Grammar......Page 17
1.3 SAS Data Directory and Storage......Page 18
1.4 Types of SAS Variables, INFORMAT and FORMAT......Page 19
1.5.1 Naming SAS Code Files......Page 20
1.5.2 Naming SAS Data Variables......Page 21
2.1 Running SAS in Windows Environment......Page 22
2.2 Understanding SAS Data Existence, Storage, and Directory Structure......Page 27
3.1 Preparing Data for Analysis......Page 30
3.2.1 Character Variables......Page 31
3.2.2 Numeric Data......Page 36
3.2.3 Date/Time/Datetime......Page 44
3.2.4 Missing Value......Page 49
3.2.5 SAS Date......Page 50
3.2.6 Summary......Page 51
3.3 Embedding Your Data with Your Code File......Page 52
3.4 Inputting Data from an External Data File to SAS......Page 54
3.4.2 Reading a Comma (,)-Separated Text File (.csv)......Page 55
3.4.4 Reading a Vertical Bar Symbol (|)-Separated Text File (.txt)......Page 56
3.5 Importing Data to SAS......Page 57
3.5.2 Importing a Comma (,)-Separated Data File......Page 58
3.5.4 Importing a Period (.)-Delimited File......Page 59
3.5.6 Importing an SPSS Data File......Page 60
3.6 Reading Other Less Structured Data......Page 61
3.7 Listing Input Variables Alternatively......Page 63
4.1.1 Exporting a SAS Data File (.sas7bdat) to a Comma-Delimited File......Page 64
4.1.2 Exporting a SAS Data File (.sas7bdat) to an Excel File......Page 65
4.2.1 Dividing a SAS Data File by Number of Rows......Page 66
4.2.2 Dividing a SAS Data File Based on Data Attributes......Page 70
4.3.1 Joining Data Files with Identical Variables (Columns)......Page 72
4.3.2 Joining Files Having Different Variables (Columns)......Page 78
4.4.1 One-to-One Merge......Page 81
4.4.2 One-to-Many Join......Page 85
4.4.3 Tracking Source of Data when Merging by Using the “IN=” Statement......Page 89
4.5 Variables – Drop, Keep, and Rename......Page 94
4.6.1 Simple Assignment......Page 97
4.6.2 SAS Functions......Page 101
4.6.3 If-Then, If-Then-Else, and Where......Page 103
4.6.4 Concatenation – CAT, CATS, CATT, and CATX......Page 105
4.6.5 Substring (Substr) and Length......Page 108
4.6.6 ANY Functions – Locating the Starting Point of a Substring......Page 112
5.1 Using the by Statement to Group and Sort Data......Page 116
5.2 Understanding FIRST.variable and LAST.variable......Page 119
5.3.1 Repeated (Identical) Rows – NODUP......Page 122
5.3.2 Customized Duplicate Criteria – NODUPKEY......Page 124
5.3.3 Using FIRST.var and LAST.var for Duplicate Identification......Page 126
5.4 Using FIRST.variable and LAST.variable to Count and Quantify......Page 129
5.5 Using PROC SQL for Subtotals and Percentages......Page 134
5.6 Computing Moving Average by Using LAG and LAGn......Page 159
5.7 Producing Total for Each BY-group Variable......Page 161
5.8 Retaining Previous Values and Sum with Original Data......Page 165
5.9 Collapsing Observations with New Output Data......Page 168
6.1.1 p Value......Page 172
6.1.2 p Value Interpretation......Page 173
6.2 Data Distribution and Descriptive Statistics – PROC Univariate......Page 174
6.3 Mean and Descriptive Statistics – PROC MEANS......Page 182
6.4 Determining the Difference between Two Means: PROC TTEST......Page 188
6.5 Correlation Determination – PROC CORR......Page 198
6.6 Regression Analysis – PROC REG......Page 202
6.7 Performing the General Linear Modeling – PROC GLM......Page 211
6.8 Analysis of Variance – PROC ANOVA......Page 217
7.1 Overview......Page 224
7.1.2 Axis......Page 225
7.1.3 Legend......Page 227
7.1.4 Pattern......Page 228
7.2 PROC GPLOT......Page 229
7.3 PROC GCHART......Page 252
8.1 Output Delivery System (ODS)......Page 272
8.2 Title and Footnote......Page 283
Chapter 9 Behind the Scenes Logic on Data Reading......Page 288
Index......Page 292


📜 SIMILAR VOLUMES


The Seismic Analysis Code: A Primer and
✍ Helffrich G., Wookey J., Bastow I. 📂 Library 📅 2013 🏛 Cambridge University Press 🌐 English

The Seismic Analysis Code (SAC) is one of the most widely used analysis packages for regional and teleseismic seismic data. For the first time, this book provides users at introductory and advanced levels with a complete guide to SAC. It leads new users of SAC through the steps of learning basic com

Basic Statistics Using SAS Enterprise Gu
✍ Geoff Der, Brian S. Everitt 📂 Library 📅 2007 🌐 English

Now it's easy to perform many of the most common statistical techniques when you use the SAS Enterprise Guide point-and-click interface to access the power of SAS. Emphasizing the practical aspects of the analysis, this example-rich guide shows you how to conduct a wide range of statistical analyses

Basic Statistics Using SAS Enterprise Gu
✍ Der G., Everitt B.S. 📂 Library 📅 2007 🏛 SAS Pub. 🌐 English

Now it's easy to perform many of the most common statistical techniques when you use the SAS Enterprise Guide point-and-click interface to access the power of SAS. Emphasizing the practical aspects of the analysis, this example-rich guide shows you how to conduct a wide range of statistical analyses

The Complete Rust Programming Reference
✍ Rahul Sharma; Vesa Kaihlavirta; Claus Matzinger 📂 Library 📅 2019 🏛 Packt Publishing 🌐 English

Design and implement professional-level programs by leveraging modern data structures and algorithms in Rust<br />Key Features<br /><br />Improve your productivity by writing more simple and easy code in Rust<br />Discover the functional and reactive implementations of traditional data structures<br

Projektovanje seizmički otpornih armiran
✍ Vanja Alendar 📂 Library 📅 2004 🏛 Građevinski fakultet Univerziteta u Beogradu 🌐 Serbian

Vanja Alendar Projektovanje seizmički otpornih armiranobetonskih konstrukcija kroz primere : Deo B - Primeri sa komentarima Vežbe u okviru kursa : Projektovanje i građenje betonskih konstrukcija 2 na IX semestru odseka za konstrukcije školske 2004/2005 godine Građevinski fakultet Univerziteta u