简介
Summary:
Publisher Summary 1
Cody, a retired professor from the Robert Wood Johnson Medical School, introduces the data management and programming tools provided in Base SAS. While also serving as a reference, the tutorial explains DATA step processing, customized and tabular reports, reading unstructured data, and using the multilabel and embedded formats. A few problems round out each chapter with answers to odd-numbered problems located in the back of the book. The CD-ROM contains example SAS code in PDF format. Annotation 漏2007 Book News, Inc., Portland, OR (booknews.com)
Publisher Summary 2
Learn to program SAS by example! If you like learning by example, then this straightforward book makes it easy to learn SAS programming. In an instructive and conversational tone, author Ron Cody clearly explains each programming technique and then illustrates it with one or more real-life examples, followed by a detailed description of how the program works. The text is divided into four major sections: Getting Started; DATA Step Processing; Presenting and Summarizing Your Data; and Advanced Topics. Subjects addressed include: Reading data from external sources Learning details of DATA step programming Subsetting and combining SAS data sets Understanding SAS functions and working with arrays Creating reports with PROC REPORT and PROC TABULATE Learning to use the SAS Output Delivery System Getting started with the SAS macro language Introducing PROC SQL You can test your knowledge and hone your skills by solving the problems at the end of each chapter. (Solutions to odd-numbered problems are located at the back of this book. Solutions to all problems are available to instructors by visiting the book's companion Web site for details.) This book is intended for beginners and intermediate users.Readers should know how to enter and submit a SAS program from their operating system.Includes a free CD-ROM with the example code, data sets, and solutions to odd-numbered problems.
目录
Copyright
Praise from the Experts
List of Programs
Preface
Acknowledgments
Part 1:聽Getting Started Download Chapter
1 Token Chapter 1.聽What Is SAS? Section 1.1.聽Introduction
Section 1.2.聽Getting Data into SAS
Section 1.3.聽A Sample SAS Program
Section 1.4.聽SAS Names
Section 1.5.聽SAS Data Sets and SAS Data Types
Section 1.6.聽The SAS Display Manager and SAS Enterprise Guide
Section 1.7.聽Problems
Download Chapter
1 Token Chapter 2.聽Writing Your First SAS Program Section 2.1.聽A Simple Program to Read Raw Data and Produce a Report
Section 2.2.聽Enhancing the Program
Section 2.3.聽More on Comment Statements
Section 2.4.聽How SAS Works (a Look Inside the 鈥淏lack Box鈥?
Section 2.5.聽Problems
Part 2:聽DATA Step Processing Download Chapter
1 Token Chapter 3.聽Reading Raw Data from External Files Section 3.1.聽Introduction
Section 3.2.聽Reading Data Values Separated by Blanks
Section 3.3.聽Specifying Missing Values with List Input
Section 3.4.聽Reading Data Values Separated by Commas (CSV Files)
Section 3.5.聽Using an Alternative Method to Specify an External File
Section 3.6.聽Reading Data Values Separated by Delimiters Other Than Blanks or Commas
Section 3.7.聽Placing Data Lines Directly in Your Program (the DATALINES Statement)
Section 3.8.聽Specifying INFILE Options with the DATALINES Statement
Section 3.9.聽Reading Raw Data from Fixed Columns鈥擬ethod 1: Column Input
Section 3.10.聽Reading Raw Data from Fixed Columns鈥擬ethod 2: Formatted Input
Section 3.11.聽Using a FORMAT Statement in a DATA Step versus in a Procedure
Section 3.12.聽Using Informats with List Input
Section 3.13.聽Supplying an INFORMAT Statement with List Input
Section 3.14.聽Using List Input with Embedded Delimiters
Section 3.15.聽Problems
Download Chapter
1 Token Chapter 4.聽Creating Permanent SAS Data Sets Section 4.1.聽Introduction
Section 4.2.聽SAS Libraries鈥擳he LIBNAME Statement
Section 4.3.聽Why Create Permanent SAS Data Sets?
Section 4.4.聽Examining the Descriptor Portion of a SAS Data Set Using PROC CONTENTS
Section 4.5.聽Listing All the SAS Data Sets in a SAS Library Using PROC CONTENTS
Section 4.6.聽Viewing the Descriptor Portion of a SAS Data Set Using the SAS Explorer
Section 4.7.聽Viewing the Data Portion of a SAS Data Set Using PROC PRINT
Section 4.8.聽Viewing the Data Portion of a SAS Data Set Using the SAS VIEWTABLE Window
Section 4.9.聽Using a SAS Data Set as Input to a DATA Step
Section 4.10.聽DATA _NULL_: A Data Set That Isn鈥檛
Section 4.11.聽Problems
Download Chapter
1 Token Chapter 5.聽Creating Formats and Labels Section 5.1.聽Adding Labels to Your Variables
Section 5.2.聽Using Formats to Enhance Your Output
Section 5.3.聽Regrouping Values Using Formats
Section 5.4.聽More on Format Ranges
Section 5.5.聽Storing Your Formats in a Format Library
Section 5.6.聽Permanent Data Set Attributes
Section 5.7.聽Accessing a Permanent SAS Data Set with User-Defined Formats
Section 5.8.聽Displaying Your Format Definitions
Section 5.9.聽Problems
Download Chapter
1 Token Chapter 6.聽Reading and Writing Data from an Excel Spreadsheet Section 6.1.聽Introduction
Section 6.2.聽Using the Import Wizard to Convert a Spreadsheet to a SAS Data Set
Section 6.3.聽Creating an Excel Spreadsheet from a SAS Data Set
Section 6.4.聽Using an Engine to Read an Excel Spreadsheet
Section 6.5.聽Using the SAS Output Delivery System to Convert a SAS Data Set to an Excel Spreadsheet
Section 6.6.聽Problems
Download Chapter
1 Token Chapter 7.聽Performing Conditional Processing Section 7.1.聽Introduction
Section 7.2.聽The IF and ELSE IF Statements
Section 7.3.聽The Subsetting IF Statement
Section 7.4.聽The IN Operator
Section 7.5.聽Using a SELECT Statement for Logical Tests
Section 7.6.聽Using Boolean Logic (AND, OR, and NOT Operators)
Section 7.7.聽A Caution When Using Multiple OR Operators
Section 7.8.聽The WHERE Statement
Section 7.9.聽Some Useful WHERE Operators
Section 7.10.聽Problems
Download Chapter
1 Token Chapter 8.聽Performing Iterative Processing: Looping Section 8.1.聽Introduction
Section 8.2.聽DO Groups
Section 8.3.聽The Sum Statement
Section 8.4.聽The Iterative DO Loop
Section 8.5.聽Other Forms of an Iterative DO Loop
Section 8.6.聽DO WHILE and DO UNTIL Statements
Section 8.7.聽A Caution When Using DO UNTIL Statements
Section 8.8.聽LEAVE and CONTINUE Statements
Section 8.9.聽Problems
Download Chapter
1 Token Chapter 9.聽Working with Dates Section 9.1.聽Introduction
Section 9.2.聽How SAS Stores Dates
Section 9.3.聽Reading Date Values from Raw Data
Section 9.4.聽Computing the Number of Years between Two Dates
Section 9.5.聽Demonstrating a Date Constant
Section 9.6.聽Computing the Current Date
Section 9.7.聽Extracting the Day of the Week, Day of the Month, Month, and Year from a SAS Date
Section 9.8.聽Creating a SAS Date from Month, Day, and Year Values
Section 9.9.聽Substituting the 15th of the Month when the Day Value Is Missing
Section 9.10.聽Using Date Interval Functions
Section 9.11.聽Problems
Download Chapter
1 Token Chapter 10.聽Subsetting and Combining SAS Data Sets Section 10.1.聽Introduction
Section 10.2.聽Subsetting a SAS Data Set
Section 10.3.聽Creating More Than One Subset Data Set in One DATA Step
Section 10.4.聽Adding Observations to a SAS Data Set
Section 10.5.聽Interleaving Data Sets
Section 10.6.聽Combining Detail and Summary Data
Section 10.7.聽Merging Two Data Sets
Section 10.8.聽Omitting the BY Statement in a Merge
Section 10.9.聽Controlling Observations in a Merged Data Set
Section 10.10.聽More Uses for IN= Variables
Section 10.11.聽When Does a DATA Step End?
Section 10.12.聽Merging Two Data Sets with Different BY Variable Names
Section 10.13.聽Merging Two Data Sets with Different BY Variable Data Types
Section 10.14.聽One-to-One, One-to-Many, and Many-to-Many Merges
Section 10.15.聽Updating a Master File from a Transaction File
Section 10.16.聽Problems
Download Chapter
1 Token Chapter 11.聽Working with Numeric Functions Section 11.1.聽Introduction
Section 11.2.聽Functions That Round and Truncate Numeric Values
Section 11.3.聽Functions That Work with Missing Values
Section 11.4.聽Setting Character and Numeric Values to Missing
Section 11.5.聽Descriptive Statistics Functions
Section 11.6.聽Computing Sums within an Observation
Section 11.7.聽Mathematical Functions
Section 11.8.聽Computing Some Useful Constants
Section 11.9.聽Generating Random Numbers
Section 11.10.聽Special Functions
Section 11.11.聽Functions That Return Values from Previous Observations
Section 11.12.聽Problems
Download Chapter
1 Token Chapter 12.聽Working with Character Functions Section 12.1.聽Introduction
Section 12.2.聽Determining the Length of a Character Value
Section 12.3.聽Changing the Case of Characters
Section 12.4.聽Removing Characters from Strings
Section 12.5.聽Joining Two or More Strings Together
Section 12.6.聽Removing Leading or Trailing Blanks
Section 12.7.聽Using the COMPRESS Function to Remove Characters from a String
Section 12.8.聽Searching for Characters
Section 12.9.聽Searching for Individual Characters
Section 12.10.聽Searching for Words in a String
Section 12.11.聽Searching for Character Classes
Section 12.12.聽Using the NOT Functions for Data Cleaning
Section 12.13.聽Describing a Real Blockbuster Data Cleaning Function
Section 12.14.聽Extracting Part of a String
Section 12.15.聽Dividing Strings into Words
Section 12.16.聽Comparing Strings
Section 12.17.聽Performing a Fuzzy Match
Section 12.18.聽Substituting Characters or Words
Section 12.19.聽Problems
Download Chapter
1 Token Chapter 13.聽Working with Arrays Section 13.1.聽Introduction
Section 13.2.聽Setting Values of 999 to a SAS Missing Value for Several Numeric Variables
Section 13.3.聽Setting Values of NA and ? to a Missing Character Value
Section 13.4.聽Converting All Character Values to Lowercase
Section 13.5.聽Using an Array to Create New Variables
Section 13.6.聽Changing the Array Bounds
Section 13.7.聽Temporary Arrays
Section 13.8.聽Loading the Initial Values of a Temporary Array from a Raw Data File
Section 13.9.聽Using a Multidimensional Array for Table Lookup
Section 13.10.聽Problems
Part 3:聽Presenting and Summarizing Your Data Download Chapter
1 Token Chapter 14.聽Displaying Your Data Section 14.1.聽Introduction
Section 14.2.聽The Basics
Section 14.3.聽Changing the Appearance of Your Listing
Section 14.4.聽Changing the Appearance of Values
Section 14.5.聽Controlling the Observations That Appear in Your Listing
Section 14.6.聽Adding Additional Titles and Footnotes to Your Listing
Section 14.7.聽Changing the Order of Your Listing
Section 14.8.聽Sorting by More Than One Variable
Section 14.9.聽Labeling Your Column Headings
Section 14.10.聽Adding Subtotals and Totals to Your Listing
Section 14.11.聽Making Your Listing Easier to Read
Section 14.12.聽Adding the Number of Observations to Your Listing
Section 14.13.聽Double-Spacing Your Listing
Section 14.14.聽Listing the First n Observations of Your Data Set
Section 14.15.聽Problems
Download Chapter
1 Token Chapter 15.聽Creating Customized Reports Section 15.1.聽Introduction
Section 15.2.聽Using PROC REPORT
Section 15.3.聽Selecting the Variables to Include in Your Report
Section 15.4.聽Comparing Detail and Summary Reports
Section 15.5.聽Producing a Summary Report
Section 15.6.聽Demonstrating the FLOW Option of PROC REPORT
Section 15.7.聽Using Two Grouping Variables
Section 15.8.聽Changing the Order of Variables in the COLUMN Statement
Section 15.9.聽Changing the Order of Rows in a Report
Section 15.10.聽Applying the ORDER Usage to Two Variables
Section 15.11.聽Creating a Multi-Column Report
Section 15.12.聽Producing Report Breaks
Section 15.13.聽Using a Nonprinting Variable to Order a Report
Section 15.14.聽Computing a New Variable with PROC REPORT
Section 15.15.聽Computing a Character Variable in a COMPUTE Block
Section 15.16.聽Creating an ACROSS Variable with PROC REPORT
Section 15.17.聽Modifying the Column Label for an ACROSS Variable
Section 15.18.聽Using an ACROSS Usage to Display Statistics
Section 15.19.聽Problems
Download Chapter
1 Token Chapter 16.聽Summarizing Your Data Section 16.1.聽Introduction
Section 16.2.聽PROC MEANS鈥擲tarting from the Beginning
Section 16.3.聽Adding a BY Statement to PROC MEANS
Section 16.4.聽Using a CLASS Statement with PROC MEANS
Section 16.5.聽Applying a Format to a CLASS Variable
Section 16.6.聽Deciding between a BY Statement and a CLASS Statement
Section 16.7.聽Creating Summary Data Sets Using PROC MEANS
Section 16.8.聽Outputting Other Descriptive Statistics with PROC MEANS
Section 16.9.聽Asking SAS to Name the Variables in the Output Data Set
Section 16.10.聽Outputting a Summary Data Set: Including a BY Statement
Section 16.11.聽Outputting a Summary Data Set: Including a CLASS Statement
Section 16.12.聽Using Two CLASS Variables with PROC MEANS
Section 16.13.聽Selecting Different Statistics for Each Variable
Section 16.14.聽Problems
Download Chapter
1 Token Chapter 17.聽Counting Frequencies Section 17.1.聽Introduction
Section 17.2.聽Counting Frequencies
Section 17.3.聽Selecting Variables for PROC FREQ
Section 17.4.聽Using Formats to Label the Output
Section 17.5.聽Using Formats to Group Values
Section 17.6.聽Problems Grouping Values with PROC FREQ
Section 17.7.聽Displaying Missing Values in the Frequency Table
Section 17.8.聽Changing the Order of Values in PROC FREQ
Section 17.9.聽Producing Two-Way Tables
Section 17.10.聽Requesting Multiple Two-Way Tables
Section 17.11.聽Producing Three-Way Tables
Section 17.12.聽Problems
Download Chapter
1 Token Chapter 18.聽Creating Tabular Reports Section 18.1.聽Introduction
Section 18.2.聽A Simple PROC TABULATE Table
Section 18.3.聽Describing the Three PROC TABULATE Operators
Section 18.4.聽Using the Keyword ALL
Section 18.5.聽Producing Descriptive Statistics
Section 18.6.聽Combining CLASS and Analysis Variables in a Table
Section 18.7.聽Customizing Your Table
Section 18.8.聽Demonstrating a More Complex Table
Section 18.9.聽Computing Row and Column Percentages
Section 18.10.聽Displaying Percentages in a Two-Dimensional Table
Section 18.11.聽Computing Column Percentages
Section 18.12.聽Computing Percentages on Numeric Variables
Section 18.13.聽Understanding How Missing Values Affect PROC TABULATE Output
Section 18.14.聽Problems
Download Chapter
1 Token Chapter 19.聽Introducing the Output Delivery System Section 19.1.聽Introduction
Section 19.2.聽Sending SAS Output to an HTML File
Section 19.3.聽Creating a Table of Contents
Section 19.4.聽Selecting a Different HTML Style
Section 19.5.聽Choosing Other ODS Destinations
Section 19.6.聽Selecting or Excluding Portions of SAS Output
Section 19.7.聽Sending Output to a SAS Data Set
Section 19.8.聽Problems
Download Chapter
1 Token Chapter 20.聽Generating High-Quality Graphics Section 20.1.聽Introduction
Section 20.2.聽Some Basic Concepts
Section 20.3.聽Producing Simple Bar Charts Using PROC GCHART
Section 20.4.聽Creating Pie Charts
Section 20.5.聽Creating Bar Charts for a Continuous Variable
Section 20.6.聽Creating Charts with Values Representing Categories
Section 20.7.聽Creating Bar Charts Representing Sums
Section 20.8.聽Creating Bar Charts Representing Means
Section 20.9.聽Adding Another Variable to the Chart
Section 20.10.聽Producing Scatter Plots
Section 20.11.聽Connecting Points
Section 20.12.聽Connecting Points with a Smooth Line
Section 20.13.聽Problems
Part 4:聽Advanced Topics Download Chapter
1 Token Chapter 21.聽Using Advanced INPUT Techniques Section 21.1.聽Introduction
Section 21.2.聽Handling Missing Values at the End of a Line
Section 21.3.聽Reading Short Data Lines
Section 21.4.聽Reading External Files with Lines Longer Than 256 Characters
Section 21.5.聽Detecting the End of the File
Section 21.6.聽Reading a Portion of a Raw Data File
Section 21.7.聽Reading Data from Multiple Files
Section 21.8.聽Reading Data from Multiple Files Using a FILENAME Statement
Section 21.9.聽Reading External Filenames from a Data File
Section 21.10.聽Reading Multiple Lines of Data to Form One Observation
Section 21.11.聽Reading Data Conditionally (the Single Trailing @ Sign)
Section 21.12.聽More Examples of the Single Trailing @ Sign
Section 21.13.聽Creating Multiple Observations from One Line of Input
Section 21.14.聽Using Variable and Informat Lists
Section 21.15.聽Using Relative Column Pointers to Read a Complex Data Structure Efficiently
Section 21.16.聽Problems
Download Chapter
1 Token Chapter 22.聽Using Advanced Features of User-Defined Formats and Informats Section 22.1.聽Introduction
Section 22.2.聽Using Formats to Recode Variables
Section 22.3.聽Using Formats with a PUT Function to Create New Variables
Section 22.4.聽Creating User-Defined Informats
Section 22.5.聽Reading Character and Numeric Data in One Step
Section 22.6.聽Using Formats (and Informats) to Perform Table Lookup
Section 22.7.聽Using a SAS Data Set to Create a Format
Section 22.8.聽Updating and Maintaining Your Formats
Section 22.9.聽Using Formats within Formats
Section 22.10.聽Multilabel Formats
Section 22.11.聽Using the INPUTN Function to Perform a More Complicated Table Lookup
Section 22.12.聽Problems
Download Chapter
1 Token Chapter 23.聽Restructuring SAS Data Sets Section 23.1.聽Introduction
Section 23.2.聽Converting a Data Set with One Observation per Subject to a Data Set with Several Observations per Subject: Using a DATA Step
Section 23.3.聽Converting a Data Set with Several Observations per Subject to a Data Set with One Observation per Subject: Using a DATA Step
Section 23.4.聽Converting a Data Set with One Observation per Subject to a Data Set with Several Observations per Subject: Using PROC TRANSPOSE
Section 23.5.聽Converting a Data Set with Several Observations per Subject to a Data Set with One Observation per Subject: Using PROC TRANSPOSE
Section 23.6.聽Problems
Download Chapter
1 Token Chapter 24.聽Working with Multiple Observations per Subject Section 24.1.聽Introduction
Section 24.2.聽Identifying the First or Last Observation in a Group
Section 24.3.聽Counting the Number of Visits Using PROC FREQ
Section 24.4.聽Counting the Number of Visits Using PROC MEANS
Section 24.5.聽Computing Differences between Observations
Section 24.6.聽Computing Differences between the First and Last Observation in a BY Group Using the LAG Function
Section 24.7.聽Computing Differences between the First and Last Observation in a BY Group Using a RETAIN Statement
Section 24.8.聽Using a Retained Variable to 鈥淩emember鈥?a Previous Value
Section 24.9.聽Problems
Download Chapter
1 Token Chapter 25.聽Introducing the SAS Macro Language Section 25.1.聽Introduction
Section 25.2.聽Macro Variables: What Are They?
Section 25.3.聽Some Built-In Macro Variables
Section 25.4.聽Assigning Values to Macro Variables with a %LET Statement
Section 25.5.聽Demonstrating a Simple Macro
Section 25.6.聽A Word about Tokens
Section 25.7.聽Another Example of Using a Macro Variable as a Prefix
Section 25.8.聽Using a Macro Variable to Transfer a Value between DATA Steps
Section 25.9.聽Problems
Download Chapter
1 Token Chapter 26.聽Introducing the Structured Query Language Section 26.1.聽Introduction
Section 26.2.聽Some Basics
Section 26.3.聽Joining Two Tables (Merge)
Section 26.4.聽Left, Right, and Full Joins
Section 26.5.聽Concatenating Data Sets
Section 26.6.聽Using Summary Functions
Section 26.7.聽Demonstrating an ORDER Clause
Section 26.8.聽An Example of Fuzzy Matching
Section 26.9.聽Problems
Download Chapter
1 Token Solutions to Odd-Numbered Problems Chapter 1 Solutions
Chapter 2 Solutions
Chapter 3 Solutions
Chapter 4 Solutions
Chapter 5 Solutions
Chapter 6 Solutions
Chapter 7 Solutions
Chapter 8 Solutions
Chapter 9 Solutions
Chapter 10 Solutions
Chapter 11 Solutions
Chapter 12 Solutions
Chapter 13 Solutions
Chapter 14 Solutions
Chapter 15 Solutions
Chapter 16 Solutions
Chapter 17 Solutions
Chapter 18 Solutions
Chapter 19 Solutions
Chapter 20 Solutions
Chapter 21 Solutions
Chapter 22 Solutions
Chapter 23 Solutions
Chapter 24 Solutions
Chapter 25 Solutions
Chapter 26 Solutions
Download Chapter
1 Token Books Available from SAS Press JMP庐 Books
Index
Praise from the Experts
List of Programs
Preface
Acknowledgments
Part 1:聽Getting Started Download Chapter
1 Token Chapter 1.聽What Is SAS? Section 1.1.聽Introduction
Section 1.2.聽Getting Data into SAS
Section 1.3.聽A Sample SAS Program
Section 1.4.聽SAS Names
Section 1.5.聽SAS Data Sets and SAS Data Types
Section 1.6.聽The SAS Display Manager and SAS Enterprise Guide
Section 1.7.聽Problems
Download Chapter
1 Token Chapter 2.聽Writing Your First SAS Program Section 2.1.聽A Simple Program to Read Raw Data and Produce a Report
Section 2.2.聽Enhancing the Program
Section 2.3.聽More on Comment Statements
Section 2.4.聽How SAS Works (a Look Inside the 鈥淏lack Box鈥?
Section 2.5.聽Problems
Part 2:聽DATA Step Processing Download Chapter
1 Token Chapter 3.聽Reading Raw Data from External Files Section 3.1.聽Introduction
Section 3.2.聽Reading Data Values Separated by Blanks
Section 3.3.聽Specifying Missing Values with List Input
Section 3.4.聽Reading Data Values Separated by Commas (CSV Files)
Section 3.5.聽Using an Alternative Method to Specify an External File
Section 3.6.聽Reading Data Values Separated by Delimiters Other Than Blanks or Commas
Section 3.7.聽Placing Data Lines Directly in Your Program (the DATALINES Statement)
Section 3.8.聽Specifying INFILE Options with the DATALINES Statement
Section 3.9.聽Reading Raw Data from Fixed Columns鈥擬ethod 1: Column Input
Section 3.10.聽Reading Raw Data from Fixed Columns鈥擬ethod 2: Formatted Input
Section 3.11.聽Using a FORMAT Statement in a DATA Step versus in a Procedure
Section 3.12.聽Using Informats with List Input
Section 3.13.聽Supplying an INFORMAT Statement with List Input
Section 3.14.聽Using List Input with Embedded Delimiters
Section 3.15.聽Problems
Download Chapter
1 Token Chapter 4.聽Creating Permanent SAS Data Sets Section 4.1.聽Introduction
Section 4.2.聽SAS Libraries鈥擳he LIBNAME Statement
Section 4.3.聽Why Create Permanent SAS Data Sets?
Section 4.4.聽Examining the Descriptor Portion of a SAS Data Set Using PROC CONTENTS
Section 4.5.聽Listing All the SAS Data Sets in a SAS Library Using PROC CONTENTS
Section 4.6.聽Viewing the Descriptor Portion of a SAS Data Set Using the SAS Explorer
Section 4.7.聽Viewing the Data Portion of a SAS Data Set Using PROC PRINT
Section 4.8.聽Viewing the Data Portion of a SAS Data Set Using the SAS VIEWTABLE Window
Section 4.9.聽Using a SAS Data Set as Input to a DATA Step
Section 4.10.聽DATA _NULL_: A Data Set That Isn鈥檛
Section 4.11.聽Problems
Download Chapter
1 Token Chapter 5.聽Creating Formats and Labels Section 5.1.聽Adding Labels to Your Variables
Section 5.2.聽Using Formats to Enhance Your Output
Section 5.3.聽Regrouping Values Using Formats
Section 5.4.聽More on Format Ranges
Section 5.5.聽Storing Your Formats in a Format Library
Section 5.6.聽Permanent Data Set Attributes
Section 5.7.聽Accessing a Permanent SAS Data Set with User-Defined Formats
Section 5.8.聽Displaying Your Format Definitions
Section 5.9.聽Problems
Download Chapter
1 Token Chapter 6.聽Reading and Writing Data from an Excel Spreadsheet Section 6.1.聽Introduction
Section 6.2.聽Using the Import Wizard to Convert a Spreadsheet to a SAS Data Set
Section 6.3.聽Creating an Excel Spreadsheet from a SAS Data Set
Section 6.4.聽Using an Engine to Read an Excel Spreadsheet
Section 6.5.聽Using the SAS Output Delivery System to Convert a SAS Data Set to an Excel Spreadsheet
Section 6.6.聽Problems
Download Chapter
1 Token Chapter 7.聽Performing Conditional Processing Section 7.1.聽Introduction
Section 7.2.聽The IF and ELSE IF Statements
Section 7.3.聽The Subsetting IF Statement
Section 7.4.聽The IN Operator
Section 7.5.聽Using a SELECT Statement for Logical Tests
Section 7.6.聽Using Boolean Logic (AND, OR, and NOT Operators)
Section 7.7.聽A Caution When Using Multiple OR Operators
Section 7.8.聽The WHERE Statement
Section 7.9.聽Some Useful WHERE Operators
Section 7.10.聽Problems
Download Chapter
1 Token Chapter 8.聽Performing Iterative Processing: Looping Section 8.1.聽Introduction
Section 8.2.聽DO Groups
Section 8.3.聽The Sum Statement
Section 8.4.聽The Iterative DO Loop
Section 8.5.聽Other Forms of an Iterative DO Loop
Section 8.6.聽DO WHILE and DO UNTIL Statements
Section 8.7.聽A Caution When Using DO UNTIL Statements
Section 8.8.聽LEAVE and CONTINUE Statements
Section 8.9.聽Problems
Download Chapter
1 Token Chapter 9.聽Working with Dates Section 9.1.聽Introduction
Section 9.2.聽How SAS Stores Dates
Section 9.3.聽Reading Date Values from Raw Data
Section 9.4.聽Computing the Number of Years between Two Dates
Section 9.5.聽Demonstrating a Date Constant
Section 9.6.聽Computing the Current Date
Section 9.7.聽Extracting the Day of the Week, Day of the Month, Month, and Year from a SAS Date
Section 9.8.聽Creating a SAS Date from Month, Day, and Year Values
Section 9.9.聽Substituting the 15th of the Month when the Day Value Is Missing
Section 9.10.聽Using Date Interval Functions
Section 9.11.聽Problems
Download Chapter
1 Token Chapter 10.聽Subsetting and Combining SAS Data Sets Section 10.1.聽Introduction
Section 10.2.聽Subsetting a SAS Data Set
Section 10.3.聽Creating More Than One Subset Data Set in One DATA Step
Section 10.4.聽Adding Observations to a SAS Data Set
Section 10.5.聽Interleaving Data Sets
Section 10.6.聽Combining Detail and Summary Data
Section 10.7.聽Merging Two Data Sets
Section 10.8.聽Omitting the BY Statement in a Merge
Section 10.9.聽Controlling Observations in a Merged Data Set
Section 10.10.聽More Uses for IN= Variables
Section 10.11.聽When Does a DATA Step End?
Section 10.12.聽Merging Two Data Sets with Different BY Variable Names
Section 10.13.聽Merging Two Data Sets with Different BY Variable Data Types
Section 10.14.聽One-to-One, One-to-Many, and Many-to-Many Merges
Section 10.15.聽Updating a Master File from a Transaction File
Section 10.16.聽Problems
Download Chapter
1 Token Chapter 11.聽Working with Numeric Functions Section 11.1.聽Introduction
Section 11.2.聽Functions That Round and Truncate Numeric Values
Section 11.3.聽Functions That Work with Missing Values
Section 11.4.聽Setting Character and Numeric Values to Missing
Section 11.5.聽Descriptive Statistics Functions
Section 11.6.聽Computing Sums within an Observation
Section 11.7.聽Mathematical Functions
Section 11.8.聽Computing Some Useful Constants
Section 11.9.聽Generating Random Numbers
Section 11.10.聽Special Functions
Section 11.11.聽Functions That Return Values from Previous Observations
Section 11.12.聽Problems
Download Chapter
1 Token Chapter 12.聽Working with Character Functions Section 12.1.聽Introduction
Section 12.2.聽Determining the Length of a Character Value
Section 12.3.聽Changing the Case of Characters
Section 12.4.聽Removing Characters from Strings
Section 12.5.聽Joining Two or More Strings Together
Section 12.6.聽Removing Leading or Trailing Blanks
Section 12.7.聽Using the COMPRESS Function to Remove Characters from a String
Section 12.8.聽Searching for Characters
Section 12.9.聽Searching for Individual Characters
Section 12.10.聽Searching for Words in a String
Section 12.11.聽Searching for Character Classes
Section 12.12.聽Using the NOT Functions for Data Cleaning
Section 12.13.聽Describing a Real Blockbuster Data Cleaning Function
Section 12.14.聽Extracting Part of a String
Section 12.15.聽Dividing Strings into Words
Section 12.16.聽Comparing Strings
Section 12.17.聽Performing a Fuzzy Match
Section 12.18.聽Substituting Characters or Words
Section 12.19.聽Problems
Download Chapter
1 Token Chapter 13.聽Working with Arrays Section 13.1.聽Introduction
Section 13.2.聽Setting Values of 999 to a SAS Missing Value for Several Numeric Variables
Section 13.3.聽Setting Values of NA and ? to a Missing Character Value
Section 13.4.聽Converting All Character Values to Lowercase
Section 13.5.聽Using an Array to Create New Variables
Section 13.6.聽Changing the Array Bounds
Section 13.7.聽Temporary Arrays
Section 13.8.聽Loading the Initial Values of a Temporary Array from a Raw Data File
Section 13.9.聽Using a Multidimensional Array for Table Lookup
Section 13.10.聽Problems
Part 3:聽Presenting and Summarizing Your Data Download Chapter
1 Token Chapter 14.聽Displaying Your Data Section 14.1.聽Introduction
Section 14.2.聽The Basics
Section 14.3.聽Changing the Appearance of Your Listing
Section 14.4.聽Changing the Appearance of Values
Section 14.5.聽Controlling the Observations That Appear in Your Listing
Section 14.6.聽Adding Additional Titles and Footnotes to Your Listing
Section 14.7.聽Changing the Order of Your Listing
Section 14.8.聽Sorting by More Than One Variable
Section 14.9.聽Labeling Your Column Headings
Section 14.10.聽Adding Subtotals and Totals to Your Listing
Section 14.11.聽Making Your Listing Easier to Read
Section 14.12.聽Adding the Number of Observations to Your Listing
Section 14.13.聽Double-Spacing Your Listing
Section 14.14.聽Listing the First n Observations of Your Data Set
Section 14.15.聽Problems
Download Chapter
1 Token Chapter 15.聽Creating Customized Reports Section 15.1.聽Introduction
Section 15.2.聽Using PROC REPORT
Section 15.3.聽Selecting the Variables to Include in Your Report
Section 15.4.聽Comparing Detail and Summary Reports
Section 15.5.聽Producing a Summary Report
Section 15.6.聽Demonstrating the FLOW Option of PROC REPORT
Section 15.7.聽Using Two Grouping Variables
Section 15.8.聽Changing the Order of Variables in the COLUMN Statement
Section 15.9.聽Changing the Order of Rows in a Report
Section 15.10.聽Applying the ORDER Usage to Two Variables
Section 15.11.聽Creating a Multi-Column Report
Section 15.12.聽Producing Report Breaks
Section 15.13.聽Using a Nonprinting Variable to Order a Report
Section 15.14.聽Computing a New Variable with PROC REPORT
Section 15.15.聽Computing a Character Variable in a COMPUTE Block
Section 15.16.聽Creating an ACROSS Variable with PROC REPORT
Section 15.17.聽Modifying the Column Label for an ACROSS Variable
Section 15.18.聽Using an ACROSS Usage to Display Statistics
Section 15.19.聽Problems
Download Chapter
1 Token Chapter 16.聽Summarizing Your Data Section 16.1.聽Introduction
Section 16.2.聽PROC MEANS鈥擲tarting from the Beginning
Section 16.3.聽Adding a BY Statement to PROC MEANS
Section 16.4.聽Using a CLASS Statement with PROC MEANS
Section 16.5.聽Applying a Format to a CLASS Variable
Section 16.6.聽Deciding between a BY Statement and a CLASS Statement
Section 16.7.聽Creating Summary Data Sets Using PROC MEANS
Section 16.8.聽Outputting Other Descriptive Statistics with PROC MEANS
Section 16.9.聽Asking SAS to Name the Variables in the Output Data Set
Section 16.10.聽Outputting a Summary Data Set: Including a BY Statement
Section 16.11.聽Outputting a Summary Data Set: Including a CLASS Statement
Section 16.12.聽Using Two CLASS Variables with PROC MEANS
Section 16.13.聽Selecting Different Statistics for Each Variable
Section 16.14.聽Problems
Download Chapter
1 Token Chapter 17.聽Counting Frequencies Section 17.1.聽Introduction
Section 17.2.聽Counting Frequencies
Section 17.3.聽Selecting Variables for PROC FREQ
Section 17.4.聽Using Formats to Label the Output
Section 17.5.聽Using Formats to Group Values
Section 17.6.聽Problems Grouping Values with PROC FREQ
Section 17.7.聽Displaying Missing Values in the Frequency Table
Section 17.8.聽Changing the Order of Values in PROC FREQ
Section 17.9.聽Producing Two-Way Tables
Section 17.10.聽Requesting Multiple Two-Way Tables
Section 17.11.聽Producing Three-Way Tables
Section 17.12.聽Problems
Download Chapter
1 Token Chapter 18.聽Creating Tabular Reports Section 18.1.聽Introduction
Section 18.2.聽A Simple PROC TABULATE Table
Section 18.3.聽Describing the Three PROC TABULATE Operators
Section 18.4.聽Using the Keyword ALL
Section 18.5.聽Producing Descriptive Statistics
Section 18.6.聽Combining CLASS and Analysis Variables in a Table
Section 18.7.聽Customizing Your Table
Section 18.8.聽Demonstrating a More Complex Table
Section 18.9.聽Computing Row and Column Percentages
Section 18.10.聽Displaying Percentages in a Two-Dimensional Table
Section 18.11.聽Computing Column Percentages
Section 18.12.聽Computing Percentages on Numeric Variables
Section 18.13.聽Understanding How Missing Values Affect PROC TABULATE Output
Section 18.14.聽Problems
Download Chapter
1 Token Chapter 19.聽Introducing the Output Delivery System Section 19.1.聽Introduction
Section 19.2.聽Sending SAS Output to an HTML File
Section 19.3.聽Creating a Table of Contents
Section 19.4.聽Selecting a Different HTML Style
Section 19.5.聽Choosing Other ODS Destinations
Section 19.6.聽Selecting or Excluding Portions of SAS Output
Section 19.7.聽Sending Output to a SAS Data Set
Section 19.8.聽Problems
Download Chapter
1 Token Chapter 20.聽Generating High-Quality Graphics Section 20.1.聽Introduction
Section 20.2.聽Some Basic Concepts
Section 20.3.聽Producing Simple Bar Charts Using PROC GCHART
Section 20.4.聽Creating Pie Charts
Section 20.5.聽Creating Bar Charts for a Continuous Variable
Section 20.6.聽Creating Charts with Values Representing Categories
Section 20.7.聽Creating Bar Charts Representing Sums
Section 20.8.聽Creating Bar Charts Representing Means
Section 20.9.聽Adding Another Variable to the Chart
Section 20.10.聽Producing Scatter Plots
Section 20.11.聽Connecting Points
Section 20.12.聽Connecting Points with a Smooth Line
Section 20.13.聽Problems
Part 4:聽Advanced Topics Download Chapter
1 Token Chapter 21.聽Using Advanced INPUT Techniques Section 21.1.聽Introduction
Section 21.2.聽Handling Missing Values at the End of a Line
Section 21.3.聽Reading Short Data Lines
Section 21.4.聽Reading External Files with Lines Longer Than 256 Characters
Section 21.5.聽Detecting the End of the File
Section 21.6.聽Reading a Portion of a Raw Data File
Section 21.7.聽Reading Data from Multiple Files
Section 21.8.聽Reading Data from Multiple Files Using a FILENAME Statement
Section 21.9.聽Reading External Filenames from a Data File
Section 21.10.聽Reading Multiple Lines of Data to Form One Observation
Section 21.11.聽Reading Data Conditionally (the Single Trailing @ Sign)
Section 21.12.聽More Examples of the Single Trailing @ Sign
Section 21.13.聽Creating Multiple Observations from One Line of Input
Section 21.14.聽Using Variable and Informat Lists
Section 21.15.聽Using Relative Column Pointers to Read a Complex Data Structure Efficiently
Section 21.16.聽Problems
Download Chapter
1 Token Chapter 22.聽Using Advanced Features of User-Defined Formats and Informats Section 22.1.聽Introduction
Section 22.2.聽Using Formats to Recode Variables
Section 22.3.聽Using Formats with a PUT Function to Create New Variables
Section 22.4.聽Creating User-Defined Informats
Section 22.5.聽Reading Character and Numeric Data in One Step
Section 22.6.聽Using Formats (and Informats) to Perform Table Lookup
Section 22.7.聽Using a SAS Data Set to Create a Format
Section 22.8.聽Updating and Maintaining Your Formats
Section 22.9.聽Using Formats within Formats
Section 22.10.聽Multilabel Formats
Section 22.11.聽Using the INPUTN Function to Perform a More Complicated Table Lookup
Section 22.12.聽Problems
Download Chapter
1 Token Chapter 23.聽Restructuring SAS Data Sets Section 23.1.聽Introduction
Section 23.2.聽Converting a Data Set with One Observation per Subject to a Data Set with Several Observations per Subject: Using a DATA Step
Section 23.3.聽Converting a Data Set with Several Observations per Subject to a Data Set with One Observation per Subject: Using a DATA Step
Section 23.4.聽Converting a Data Set with One Observation per Subject to a Data Set with Several Observations per Subject: Using PROC TRANSPOSE
Section 23.5.聽Converting a Data Set with Several Observations per Subject to a Data Set with One Observation per Subject: Using PROC TRANSPOSE
Section 23.6.聽Problems
Download Chapter
1 Token Chapter 24.聽Working with Multiple Observations per Subject Section 24.1.聽Introduction
Section 24.2.聽Identifying the First or Last Observation in a Group
Section 24.3.聽Counting the Number of Visits Using PROC FREQ
Section 24.4.聽Counting the Number of Visits Using PROC MEANS
Section 24.5.聽Computing Differences between Observations
Section 24.6.聽Computing Differences between the First and Last Observation in a BY Group Using the LAG Function
Section 24.7.聽Computing Differences between the First and Last Observation in a BY Group Using a RETAIN Statement
Section 24.8.聽Using a Retained Variable to 鈥淩emember鈥?a Previous Value
Section 24.9.聽Problems
Download Chapter
1 Token Chapter 25.聽Introducing the SAS Macro Language Section 25.1.聽Introduction
Section 25.2.聽Macro Variables: What Are They?
Section 25.3.聽Some Built-In Macro Variables
Section 25.4.聽Assigning Values to Macro Variables with a %LET Statement
Section 25.5.聽Demonstrating a Simple Macro
Section 25.6.聽A Word about Tokens
Section 25.7.聽Another Example of Using a Macro Variable as a Prefix
Section 25.8.聽Using a Macro Variable to Transfer a Value between DATA Steps
Section 25.9.聽Problems
Download Chapter
1 Token Chapter 26.聽Introducing the Structured Query Language Section 26.1.聽Introduction
Section 26.2.聽Some Basics
Section 26.3.聽Joining Two Tables (Merge)
Section 26.4.聽Left, Right, and Full Joins
Section 26.5.聽Concatenating Data Sets
Section 26.6.聽Using Summary Functions
Section 26.7.聽Demonstrating an ORDER Clause
Section 26.8.聽An Example of Fuzzy Matching
Section 26.9.聽Problems
Download Chapter
1 Token Solutions to Odd-Numbered Problems Chapter 1 Solutions
Chapter 2 Solutions
Chapter 3 Solutions
Chapter 4 Solutions
Chapter 5 Solutions
Chapter 6 Solutions
Chapter 7 Solutions
Chapter 8 Solutions
Chapter 9 Solutions
Chapter 10 Solutions
Chapter 11 Solutions
Chapter 12 Solutions
Chapter 13 Solutions
Chapter 14 Solutions
Chapter 15 Solutions
Chapter 16 Solutions
Chapter 17 Solutions
Chapter 18 Solutions
Chapter 19 Solutions
Chapter 20 Solutions
Chapter 21 Solutions
Chapter 22 Solutions
Chapter 23 Solutions
Chapter 24 Solutions
Chapter 25 Solutions
Chapter 26 Solutions
Download Chapter
1 Token Books Available from SAS Press JMP庐 Books
Index
- 名称
- 类型
- 大小
光盘服务联系方式: 020-38250260 客服QQ:4006604884
云图客服:
用户发送的提问,这种方式就需要有位在线客服来回答用户的问题,这种 就属于对话式的,问题是这种提问是否需要用户登录才能提问
Video Player
×
Audio Player
×
pdf Player
×