The Little SAS Book: A Primer, 3/e
暫譯: 小型 SAS 書籍:入門指南,第 3 版

Lora D. Delwiche, Susan J. Slaughter

  • 出版商: SAS Press
  • 出版日期: 2003-10-15
  • 售價: $1,720
  • 貴賓價: 9.5$1,634
  • 語言: 英文
  • 頁數: 360
  • 裝訂: Paperback
  • ISBN: 1590473337
  • ISBN-13: 9781590473337
  • 已絕版

買這商品的人也買了...

相關主題

商品描述

Description  

Getting started with SAS is easy with The Little SAS Book. This friendly, easy-to-read guide gently introduces you to the most commonly used features of SAS software plus a whole lot more! The book has been revised to include concepts of the Output Delivery System; the STYLE= option in the PRINT, REPORT, and TABULATE procedures; ODS HTML, RTF, PRINTER, and OUTPUT destinations; PROC REPORT; more on PROC TABULATE; exporting data; and the colon modifier for informats. You'll find clear and concise explanations of basic SAS concepts (such as DATA and PROC steps), inputting data, modifying and combining data sets, summarizing and presenting data, basic statistical procedures, and debugging SAS programs. Each topic is presented in a self-contained, two-page layout complete with examples and graphics. This format enables new users to get up and running quickly, while the examples allow you to type in the program and see it work!

 

 

Table of contents

Acknowledgments ix
Introducing SAS Software x
About This Book xi
Whats New xiv

Chapter 1 Getting Started Using SAS?Software

1.1 The SAS Language 2
1.2 SAS Data Sets 4
1.3 The Two Parts of a SAS Program 6
1.4 The DATA Steps Built-in Loop 8
1.5 Choosing a Mode for Submitting SAS Programs 10
1.6 Windows and Commands in the SAS Windowing Environment 12
1.7 Submitting a Program in the SAS Windowing Environment 14
1.8 Reading the SAS Log 16
1.9 Viewing Your Results in the Output Window 18
1.10 Creating HTML Output 20
1.11 SAS Data Libraries 22
1.12 Viewing Data Sets with SAS Explorer 24
1.13 Using SAS System Options 26

Chapter 2 Getting Your Data into SAS?/h4>
2.1 Methods for Getting Your Data into SAS 30
2.2 Entering Data with the Viewtable Window 32
2.3 Reading Files with the Import Wizard 34
2.4 Telling SAS Where to Find Your Raw Data 36
2.5 Reading Raw Data Separated by Spaces 38
2.6 Reading Raw Data Arranged in Columns 40
2.7 Reading Raw Data Not in Standard Format 42
2.8 Selected Informats 44
2.9 Mixing Input Styles 46
2.10 Reading Messy Raw Data 48
2.11 Reading Multiple Lines of Raw Data per Observation 50
2.12 Reading Multiple Observations per Line of Raw Data 52
2.13 Reading Part of a Raw Data File 54
2.14 Controlling Input with Options in the INFILE Statement 56
2.15 Reading Delimited Files with the DATA Step 58
2.16 Reading Delimited Files with the IMPORT Procedure 60
2.17 Reading PC Files with the IMPORT Procedure 62
2.18 Reading PC Files with DDE 64
2.19 Temporary versus Permanent SAS Data Sets 66
2.20 Using Permanent SAS Data Sets with LIBNAME Statements 68
2.21 Using Permanent SAS Data Sets by Direct Referencing 70
2.22 Listing the Contents of a SAS Data Set 72

Chapter 3 Working with Your Data

3.1 Creating and Redefining Variables 76
3.2 Using SAS Functions 78
3.3 Selected SAS Functions 80
3.4 Using IF-THEN Statements 82
3.5 Grouping Observations with IF-THEN/ELSE Statements 84
3.6 Subsetting Your Data 86
3.7 Working with SAS Dates 88
3.8 Selected Date Informats, Functions, and Formats 90
3.9 Using the RETAIN and Sum Statements 92
3.10 Simplifying Programs with Arrays 94
3.11 Using Shortcuts for Lists of Variable Names 96

Chapter 4 Sorting, Printing, and Summarizing Your Data

4.1 Using SAS Procedures 100
4.2 Subsetting in Procedures with the WHERE Statement 102
4.3 Sorting Your Data with PROC SORT 104
4.4 Printing Your Data with PROC PRINT 106
4.5 Changing the Appearance of Printed Values with Formats 108
4.6 Selected Standard Formats 110
4.7 Creating Your Own Formats Using PROC FORMAT 112
4.8 Writing Simple Custom Reports 114
4.9 Summarizing Your Data Using PROC MEANS 116
4.10 Writing Summary Statistics to a SAS Data Set 118
4.11 Counting Your Data with PROC FREQ 120
4.12 Producing Tabular Reports with PROC TABULATE 122
4.13 Adding Statistics to PROC TABULATE Output 124
4.14 Enhancing the Appearance of PROC TABULATE Output 126
4.15 Changing Headers in PROC TABULATE Output 128
4.16 Specifying Multiple Formats for Data Cells in PROC TABULATE Output 130
4.17 Producing Simple Output with PROC REPORT 132
4.18 Using DEFINE Statements in PROC REPORT 134
4.19 Creating Summary Reports with PROC REPORT 136
4.20 Adding Summary Breaks to PROC REPORT Output 138
4.21 Adding Statistics to PROC REPORT Output 140

Chapter 5 Enhancing Your Output with ODS

5.1 Concepts of the Output Delivery System 144
5.2 Tracing and Selecting Procedure Output 146
5.3 Creating SAS Data Sets from Procedure Output 148
5.4 Using ODS Statements to Create HTML Output 150
5.5 Using ODS Statements to Create RTF Output 152
5.6 Using ODS Statements to Create PRINTER Output 154
5.7 Customizing Titles and Footnotes 156
5.8 Customizing PROC PRINT Output with the STYLE= Option 158
5.9 Customizing PROC REPORT Output with the STYLE= Option 160
5.10 Customizing PROC TABULATE Output with the STYLE= Option 162
5.11 Adding Traffic-Lighting to Your Output 164
5.12 Selected Style Attributes 166

Chapter 6 Modifying and Combining SAS?Data Sets

6.1 Modifying a Data Set Using the SET Statement 170
6.2 Stacking Data Sets Using the SET Statement 172
6.3 Interleaving Data Sets Using the SET Statement 174
6.4 Combining Data Sets Using a One-to-One Match Merge 176
6.5 Combining Data Sets Using a One-to-Many Match Merge 178
6.6 Merging Summary Statistics with the Original Data 180
6.7 Combining a Grand Total with the Original Data 182
6.8 Updating a Master Data Set with Transactions 184
6.9 Using SAS Data Set Options 186
6.10 Tracking and Selecting Observations with the IN= Option 188
6.11 Writing Multiple Data Sets Using the OUTPUT Statement 190
6.12 Making Several Observations from One Using the OUTPUT Statement 192
6.13 Changing Observations to Variables Using PROC TRANSPOSE 194
6.14 Using SAS Automatic Variables 196

Chapter 7 Writing Flexible Code with the SAS?Macro Facility

7.1 Macro Concepts 200
7.2 Substituting Text with Macro Variables 202
7.3 Creating Modular Code with Macros 204
7.4 Adding Parameters to Macros 206
7.5 Writing Macros with Conditional Logic 208
7.6 Writing Data-Driven Programs with CALL SYMPUT 210
7.7 Debugging Macro Errors 212

Chapter 8 Using Basic Statistical Procedures

8.1 Examining the Distribution of Data with PROC UNIVARIATE 216
8.2 Producing Statistics with PROC MEANS 218
8.3 Testing Categorical Data with PROC FREQ 220
8.4 Examining Correlations with PROC CORR 222
8.5 Using PROC REG for Simple Regression Analysis 224
8.6 Reading the Output of PROC REG 226
8.7 Using PROC ANOVA for One-Way Analysis of Variance 228
8.8 Reading the Output of PROC ANOVA 230
8.9 Graphical Interfaces for Statistical Analysis 232

Chapter 9 Exporting Your Data

9.1 Methods for Exporting Your Data 236
9.2 Writing Files Using the Export Wizard 238
9.3 Writing Delimited Files with the EXPORT Procedure 240
9.4 Writing PC Files with the EXPORT Procedure 242
9.5 Writing Raw Data Files with the DATA Step 244
9.6 Writing Delimited and HTML Files using ODS 246
9.7 Sharing SAS Data Sets with Other Types of Computers 248

Chapter 10 Debugging Your SAS?Programs

10.1 Writing SAS Programs That Work 252
10.2 Fixing Programs That Dont Work 254
10.3 Searching for the Missing Semicolon 256
10.4 Note: INPUT Statement Reached Past the End of the Line 258
10.5 Note: Lost Card 260
10.6 Note: Invalid Data 262
10.7 Note: Missing Values Were Generated 264
10.8 Note: Numeric Values Have Been Converted to Character (or Vice Versa) 266
10.9 DATA Step Produces Wrong Results but No Error Message 268
10.10 The DATA Step Debugger 270
10.11 Error: Invalid Option, Error: The Option Is Not Recognized, or Error: Statement Is Not Valid 272
10.12 Note: Variable Is Uninitialized or Error: Variable Not Found 274
10.13 SAS Truncates a Character Variable 276
10.14 SAS Stops in the Middle of a Job 278
10.15 SAS Runs Out of Memory or Disk Space 280

Appendices

A Where to Go from Here 284
B Getting Help from SAS Technical Support 286
C An Overview of SAS Products 288
D Coming to SAS from SPSS 291
E Coming to SAS from a Programming Language 298
F Coming to SAS from SQL 302

Index 309

商品描述(中文翻譯)

描述
開始使用 SAS 非常簡單,這本《小型 SAS 書籍》將友好且易讀地向您介紹 SAS 軟體中最常用的功能以及更多內容!本書已修訂以包含輸出交付系統的概念;在 PRINT、REPORT 和 TABULATE 程序中的 STYLE= 選項;ODS HTML、RTF、PRINTER 和 OUTPUT 目的地;PROC REPORT;更多關於 PROC TABULATE 的內容;數據導出;以及 informats 的冒號修飾符。您將找到基本 SAS 概念(如 DATA 和 PROC 步驟)、輸入數據、修改和合併數據集、總結和呈現數據、基本統計程序以及調試 SAS 程序的清晰簡明解釋。每個主題都以自成一體的兩頁佈局呈現,並附有示例和圖形。這種格式使新用戶能夠快速上手,而示例則允許您輸入程序並查看其運行效果!

目錄
致謝 ix
介紹 SAS 軟體 x
關於本書 xi
新內容 xiv

第 1 章 開始使用 SAS 軟體
1.1 SAS 語言 2
1.2 SAS 數據集 4
1.3 SAS 程序的兩個部分 6
1.4 DATA 步驟內建循環 8
1.5 選擇提交 SAS 程序的模式 10
1.6 SAS 窗口環境中的窗口和命令 12
1.7 在 SAS 窗口環境中提交程序 14
1.8 閱讀 SAS 日誌 16
1.9 在輸出窗口中查看結果 18
1.10 創建 HTML 輸出 20
1.11 SAS 數據庫 22
1.12 使用 SAS Explorer 查看數據集 24
1.13 使用 SAS 系統選項 26

第 2 章 將數據導入 SAS
2.1 將數據導入 SAS 的方法 30
2.2 使用 Viewtable 窗口輸入數據 32
2.3 使用導入精靈讀取文件 34
2.4 告訴 SAS 在哪裡找到原始數據 36
2.5 讀取以空格分隔的原始數據 38
2.6 讀取按列排列的原始數據 40
2.7 讀取不符合標準格式的原始數據 42
2.8 選定的 informats 44
2.9 混合輸入樣式 46
2.10 讀取雜亂的原始數據 48
2.11 每個觀察讀取多行原始數據 50
2.12 每行原始數據讀取多個觀察 52
2.13 讀取原始數據文件的一部分 54
2.14 使用 INFILE 語句中的選項控制輸入 56
2.15 使用 DATA 步驟讀取分隔文件 58
2.16 使用 IMPORT 程序讀取分隔文件 60
2.17 使用 IMPORT 程序讀取 PC 文件 62
2.18 使用 DDE 讀取 PC 文件 64
2.19 臨時與永久 SAS 數據集 66
2.20 使用 LIBNAME 語句的永久 SAS 數據集 68
2.21 通過直接引用使用永久 SAS 數據集 70
2.22 列出 SAS 數據集的內容 72

第 3 章 處理您的數據
3.1 創建和重新定義變量 76
3.2 使用 SAS 函數 78
3.3 選定的 SAS 函數 80
3.4 使用 IF-THEN 語句 82
3.5 使用 IF-THEN/ELSE 語句對觀察進行分組 84
3.6 對數據進行子集化 86
3.7 處理 SAS 日期 88
3.8 選定的日期 informats、函數和格式 90
3.9 使用 RETAIN 和 Sum 語句 92
3.10 使用數組簡化程序 94
3.11 使用變量名稱列表的快捷方式 96

第 4 章 排序、打印和總結您的數據
4.1 使用 SAS 程序 100
4.2 在程序中使用 WHERE 語句進行子集化 102
4.3 使用 PROC SORT 排序數據 104
4.4 使用 PROC PRINT 打印數據 106
4.5 使用格式更改打印值的外觀 108
4.6 選定的標準格式 110
4.7 使用 PROC FORMAT 創建自己的格式 112
4.8 編寫簡單的自定義報告 114
4.9 使用 PROC MEANS 總結數據 116
4.10 將摘要統計寫入 SAS 數據集 118
4.11 使用 PROC FREQ 計數數據 120
4.12 使用 PROC TABULATE 生成表格報告 122
4.13 向 PROC TABULATE 輸出添加統計數據 124
4.14 增強 PROC TABULATE 輸出的外觀 126
4.15 更改 PROC TABULATE 輸出的標題 128
4.16 為 PROC TABULATE 輸出中的數據單元格指定多個格式 130
4.17 使用 PROC REPORT 生成簡單輸出 132
4.18 在 PROC REPORT 中使用 DEFINE 語句 134
4.19 使用 PROC REPORT 創建摘要報告 136
4.20 向 PROC REPORT 輸出添加摘要斷點 138
4.21 向 PROC REPORT 輸出添加統計數據 140

第 5 章 使用 ODS 增強輸出
5.1 輸出交付系統的概念 144
5.2 跟踪和選擇程序輸出 146
5.3 從程序輸出創建 SAS 數據集 148
5.4 使用 ODS 語句創建 HTML 輸出 150
5.5 使用 ODS 語句創建 RTF 輸出 152
5.6 使用 ODS 語句創建 PRINTER 輸出 154
5.7 自定義標題和註腳 156
5.8 使用 STYLE= 選項自定義 PROC PRINT 輸出 158
5.9 使用 STYLE= 選項自定義 PROC REPORT 輸出 160
5.10 使用 STYLE= 選項自定義 PROC TABULATE 輸出 162
5.11 向輸出添加交通燈效果 164
5.12 選定的樣式屬性 166

第 6 章 修改和合併 SAS 數據集
6.1 使用 SET 語句修改數據集 170
6.2 使用 SET 語句堆疊數據集 172
6.3 使用 SET 語句交錯數據集 174
6.4 使用一對一匹配合併合併數據集 176
6.5 使用一對多匹配合併合併數據集 178
6.6 將摘要統計與原始數據合併 180
6.7 將總計與原始數據合併 182
6.8 使用交易更新主數據集 184
6.9 使用 SAS 數據集選項 186
6.10 使用 IN= 選項跟踪和選擇觀察 188
6.11 使用 OUTPUT 語句寫入多個數據集 190
6.12 使用 OUTPUT 語句從一個觀察生成多個觀察 192
6.13 使用 PROC TRANSPOSE 將觀察更改為變量 194
6.14 使用 SAS 自動變量 196

第 7 章 使用 SAS 宏功能編寫靈活的代碼
7.1 宏概念 200
7.2 使用宏變量替換文本 202
7.3 使用宏創建模塊化代碼 204
7.4 向宏添加參數 206
7.5 使用條件邏輯編寫宏 208
7.6 使用 CALL SYMPUT 編寫數據驅動程序 210
7.7 調試宏錯誤 212

第 8 章 使用基本統計程序
8.1 使用 PROC UNIVARIATE 檢查數據分佈 216
8.2 使用 PROC MEANS 生成統計數據 218
8.3 使用 PROC FREQ 測試類別數據 220
8.4 使用 PROC CORR 檢查相關性 222
8.5 使用 PROC REG 進行簡單回歸分析 224
8.6 閱讀 PROC REG 的輸出 226
8.7 使用 PROC ANOVA 進行單向方差分析 228
8.8 閱讀 PROC ANOVA 的輸出 230
8.9 統計分析的圖形介面 232

第 9 章 將數據導出
9.1 將數據導出的方法 236
9.2 使用導出精靈寫入文件 238
9.3 使用 EXPORT 程序寫入分隔文件 240
9.4 使用 EXPORT 程序寫入 PC 文件 242
9.5 使用 DATA 步驟寫入原始數據文件 244
9.6 使用 ODS 寫入分隔和 HTML 文件 246
9.7 與其他類型的計算機共享 SAS 數據集 248

第 10 章 調試您的 SAS 程序
10.1 編寫有效的 SAS 程序 252
10.2 修復無法運行的程序 254
10.3 搜索缺失的分號 256
10.4 注意:INPUT 語句超過行尾 258
10.5 注意:丟失的卡片 260
10.6 注意:無效數據 262
10.7 注意:生成了缺失值 264
10.8 注意:數值已轉換為字符(或反之) 266
10.9 DATA 步驟產生錯誤結果但沒有錯誤消息 268
10.10 DATA 步驟調試器 270
10.11 錯誤:無效選項,錯誤:選項未被識別,或錯誤:語句無效 272
10.12 注意:變量未初始化或錯誤:找不到變量 274
10.13 SAS 截斷字符變量 276
10.14 SAS 在作業中途停止 278
10.15 SAS 用完內存或磁碟空間 280

附錄
A 從這裡開始的路徑 284
B 從 SAS 技術支持獲取幫助 286
C SAS 產品概述 288
D 從 SPSS 轉向 SAS 291
E 從編程語言轉向 SAS 298
F 從 SQL 轉向 SAS 302

索引 309