全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学
1251 1
2016-04-02
Contents
List of Programs xv
Preface xxix
Acknowledgments xxxi
Part 1 Getting Started 1
Chapter 1 What Is SAS? 3
1.1 Introduction 3
1.2 Getting Data into SAS 4
1.3 A Sample SAS Program 4
1.4 SAS Names 7
1.5 SAS Data Sets and SAS Data Types 8
1.6 The SAS Display Manager and SAS Enterprise Guide 9
1.7 Problems 9
Chapter 2 Writing Your First SAS Program 11
2.1 A Simple Program to Read Raw Data and Produce a
Report 11
2.2 Enhancing the Program 18
2.3 More on Comment Statements 20
2.4 How SAS Works (a Look Inside the “Black Box”) 22
2.5 Problems 25
Part 2 DATA Step Processing 27
Chapter 3 Reading Raw Data from External Files 29
3.1 Introduction 30
3.2 Reading Data Values Separated by Blanks 30
3.3 Specifying Missing Values with List Input 32
3.4 Reading Data Values Separated by Commas (CSV Files) 33
3.5 Using an Alternative Method to Specify an External File 34
3.6 Reading Data Values Separated by Delimiters Other Than
Blanks or Commas 34
3.7 Placing Data Lines Directly in Your Program (the DATALINES
Statement) 36
3.8 Specifying INFILE Options with the DATALINES Statement 37
3.9 Reading Raw Data from Fixed Columns—Method 1: Column
Input 37
3.10 Reading Raw Data from Fixed Columns—Method 2: Formatted
Input 39
3.11 Using a FORMAT Statement in a DATA Step versus in a
Procedure 43
3.12 Using Informats with List Input 43
3.13 Supplying an INFORMAT Statement with List Input 45
3.14 Using List Input with Embedded Delimiters 46
3.15 Problems 47
Chapter 4 Creating Permanent SAS Data Sets 53
4.1 Introduction 54
4.2 SAS Libraries—The LIBNAME Statement 54
4.3 Why Create Permanent SAS Data Sets? 55
4.4 Examining the Descriptor Portion of a SAS Data Set Using
PROC CONTENTS 56
4.5 Listing All the SAS Data Sets in a SAS Library Using
PROC CONTENTS 59
4.6 Viewing the Descriptor Portion of a SAS Data Set Using the
SAS Explorer 60
4.7 Viewing the Data Portion of a SAS Data Set Using PROC
PRINT 63
4.8 Viewing the Data Portion of a SAS Data Set Using the SAS
VIEWTABLE Window 64
4.9 Using a SAS Data Set as Input to a DATA Step 65
4.10 DATA _NULL_: A Data Set That Isn’t 67
4.11 Problems 68
Chapter 5 Creating Formats and Labels 71
5.1 Adding Labels to Your Variables 71
5.2 Using Formats to Enhance Your Output 73
5.3 Regrouping Values Using Formats 76
5.4 More on Format Ranges 78
5.5 Storing Your Formats in a Format Library 79
5.6 Permanent Data Set Attributes 80
5.7 Accessing a Permanent SAS Data Set with User-Defined
Formats 82
5.8 Displaying Your Format Definitions 83
5.9 Problems 84
Chapter 6 Reading and Writing Data from an Excel
Spreadsheet 87
6.1 Introduction 87
6.2 Using the Import Wizard to Convert a Spreadsheet to a SAS
Data Set 88
6.3 Creating an Excel Spreadsheet from a SAS Data Set 93
6.4 Using an Engine to Read an Excel Spreadsheet 95
6.5 Using the SAS Output Delivery System to Convert a SAS Data
Set to an Excel Spreadsheet 96
6.6 Problems 98
Chapter 7 Performing Conditional Processing 101
7.1 Introduction 102
7.2 The IF and ELSE IF Statements 102
7.3 The Subsetting IF Statement 105
7.4 The IN Operator 107
7.5 Using a SELECT Statement for Logical Tests 108
7.6 Using Boolean Logic (AND, OR, and NOT Operators) 109
7.7 A Caution When Using Multiple OR Operators 111
7.8 The WHERE Statement 112
7.9 Some Useful WHERE Operators 113
7.10 Problems 114
Chapter 8 Performing Iterative Processing: Looping 117
8.1 Introduction 117
8.2 DO Groups 118
8.3 The Sum Statement 120
8.4 The Iterative DO Loop 125
8.5 Other Forms of an Iterative DO Loop 129
8.6 DO WHILE and DO UNTIL Statements 131
8.7 A Caution When Using DO UNTIL Statements 134
8.8 LEAVE and CONTINUE Statements 135
8.9 Problems 137
Chapter 9 Working with Dates 141
9.1 Introduction 142
9.2 How SAS Stores Dates 142
9.3 Reading Date Values from Raw Data 143
9.4 Computing the Number of Years between Two Dates 146
9.5 Demonstrating a Date Constant 147
9.6 Computing the Current Date 148
9.7 Extracting the Day of the Week, Day of the Month, Month, and
Year from a SAS Date 149
9.8 Creating a SAS Date from Month, Day, and Year Values 150
9.9 Substituting the 15th of the Month when the Day Value Is
Missing 151
9.10 Using Date Interval Functions 152
9.11 Problems 157
Chapter 10 Subsetting and Combining SAS Data Sets 161
10.1 Introduction 162
10.2 Subsetting a SAS Data Set 162
10.3 Creating More Than One Subset Data Set in One DATA
Step 163
10.4 Adding Observations to a SAS Data Set 164
10.5 Interleaving Data Sets 167
10.6 Combining Detail and Summary Data 168
10.7 Merging Two Data Sets 170
10.8 Omitting the BY Statement in a Merge 172
10.9 Controlling Observations in a Merged Data Set 173
10.10 More Uses for IN= Variables 175
10.11 When Does a DATA Step End? 176
10.12 Merging Two Data Sets with Different BY Variable Names 177
10.13 Merging Two Data Sets with Different BY Variable Data
Types 179
10.14 One-to-One, One-to-Many, and Many-to-Many Merges 181
10.15 Updating a Master File from a Transaction File 183
10.16 Problems 185
Chapter 11 Working with Numeric Functions 189
11.1 Introduction 190
11.2 Functions That Round and Truncate Numeric Values 190
11.3 Functions That Work with Missing Values 192
11.4 Setting Character and Numeric Values to Missing 193
11.5 Descriptive Statistics Functions 194
11.6 Computing Sums within an Observation 196
11.7 Mathematical Functions 197
11.8 Computing Some Useful Constants 198
11.9 Generating Random Numbers 199
11.10 Special Functions 201
11.11 Functions That Return Values from Previous
Observations 204
11.12 Problems 207
Chapter 12 Working with Character Functions 211
12.1 Introduction 212
12.2 Determining the Length of a Character Value 212
12.3 Changing the Case of Characters 213
12.4 Removing Characters from Strings 214
12.5 Joining Two or More Strings Together 215
12.6 Removing Leading or Trailing Blanks 217
12.7 Using the COMPRESS Function to Remove Characters from a
String 218
12.8 Searching for Characters 220
12.9 Searching for Individual Characters 223
12.10 Searching for Words in a String 223
12.11 Searching for Character Classes 225
12.12 Using the NOT Functions for Data Cleaning 226
12.13 Describing a Real Blockbuster Data Cleaning Function 227
12.14 Extracting Part of a String 228
12.15 Dividing Strings into Words 230
12.16 Comparing Strings 232
12.17 Performing a Fuzzy Match 234
12.18 Substituting Characters or Words 235
12.19 Problems 238
Chapter 13 Working with Arrays 243
13.1 Introduction 244
13.2 Setting Values of 999 to a SAS Missing Value for Several
Numeric Variables 244
13.3 Setting Values of NA and ? to a Missing Character Value 247
13.4 Converting All Character Values to Lowercase 248
13.5 Using an Array to Create New Variables 249
13.6 Changing the Array Bounds 250
13.7 Temporary Arrays 251
13.8 Loading the Initial Values of a Temporary Array from a Raw
Data File 253
13.9 Using a Multidimensional Array for Table Lookup 254
13.10 Problems 257
.....
Learning.SAS.by.Example.zip
大小:(2.91 MB)

只需: 2 个论坛币  马上下载

本附件包括:

  • Learning.SAS.by.Example.pdf



二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2016-4-5 14:07:56
很早就有的一本书,现在还上传?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群