وبلاگ بلیان

SAS(R) programming by example

معرفی کتاب «SAS(R) programming by example» نوشتهٔ Ronald P. Cody, Ray Pass, Sas Institute، منتشرشده توسط نشر SAS Publishing در سال 1995. این کتاب در 20 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است. «SAS(R) programming by example» در دستهٔ بدون دسته‌بندی قرار دارد.

Develop and fine-tune your programming skills the easy way - by example! For beginning and intermediate users, SAS Programming by Example guides you, with a series of annotated examples, through basic tasks to more complex ones. Problems and solutions are provided to make the most of the programming tools available in base SAS software. Conversational in tone, this book is useful both as a tutorial for learning programming and as a convenient quick-reference filled with tips and strategies for solving your programming problems. Among the clearly explained examples are models that show you how to build SAS data sets, use SAS functions for data translation, program more efficiently, relate information from multiple sources, and chart and plot data. You will also learn to work with SAS date values, produce descriptive and summary statistics, and write reports. Supports releases 6.09E and higher of SAS software. Copyright Preface Acknowledgments Manipulating Data Chapter 1. INPUT and INFILE: Building a SAS Data Set from Raw Data Introduction Example 1: Reading Raw Data Separated by Spaces Example 2: Reading Data Values Separated by Commas or Other Delimiters Example 3: Applying an INFORMAT Statement to List Input Example 4: Reading Character Values That Contain Blanks Example 5: Reading Data Arranged in Columns Example 6: Reading Column Data That Require Informats Reading Multiple Lines of Data per Observation Example 7: Reading Two Lines (Records) per Observation Example 8: Reading Parts of Your Data More Than Once Example 9: Using Informat Lists and Relative Pointer Controls Example 10: Reading a Mixture of Record Types in One DATA Step Example 11: Holding the Data Line through Multiple Iterations of the DATA Step Example 12: Suppressing Error Messages Example 13: Reading Data from External Files Example 14: Reading in Parts of Raw Data Files Example 15: Reading Data from Multiple External Files Example 16: Reading Long Records from an External File Conclusion Problems Chapter 2. Data Recoding: Grouping Data Values Introduction Sample Data Example 1: Using IF-THEN/ELSE Statements to Recode a Variable Example 2: Using a SELECT Statement to Recode a Variable Example 3: Using Formats to Recode a Variable Example 4: Using a PUT Function to Create a New Variable Conclusion Problems Chapter 3. SET, MERGE, and UPDATE: Reading and Combining SAS Data Sets Introduction Example 1: Subsetting a SAS Data Set: Selecting Observations That Meet Certain Conditions Example 2: Combining SAS Data Sets by Adding Observations Example 3: Combining SAS Data Sets by Adding Variables Example 4: Adding Variables from One Data Set to Another Based on an Identifying Variable Example 5: Controlling Which Observations are Added to the Merged Data Set Example 6: Creating More Than One Data Set at a Time Example 7: Performing "Fuzzy" Merges Example 8: Updating a Master File from a Transaction File Conclusion Problems Chapter 4. Table Lookup Tools: Relating Information from Multiple Sources Introduction Example 1: Simple Table Lookup (Method 1 - Merging) Example 2: Simple Table Lookup (Method 2 - Formats) Example 3: Looking Up Two Variables (Method 1 - Merging) Example 4: Looking Up Two Variables (Method 2 - Formats) Example 5: A Two-way Lookup Table Conclusion Problems Chapter 5. SAS® Functions: Data Translation Tools Introduction Example 1: Mathematical Transformations of Numeric Variables Example 2: Choosing Every nth Observation from a SAS Data Set Example 3: Rounding and Truncating Numbers Example 4: Computing Means and Sums of Variables within an Observation. Counting the Number of Non-Missing Values in a List of Variables Example 5: Character-to-Numeric Conversion, Using the INPUT Function Example 6: Numeric-to-Character Conversion, Using the PUT Function Example 7: Computing a Moving Average Example 8: Taking Substrings Example 9: Taking Substrings, "Unpacking" a String Example 10: Reading Combinations of Numeric and Character Data Example 11: Validating Data Values Example 12: Translating One Set of Character Values to Another Example 13: Removing Blanks or Other Characters from a String Example 14: Joining (Concatenating) Two Strings Conclusion Problems Chapter 6. SAS® Dates: Reading, Writing, and 'Rithmetic with Date Values Introduction Example 1: Reading a Date from Raw Data Example 2: Creating a SAS Date from Month, Day, and Year Example 3: Computing Age Example 4: Extracting Day of Week and Day of Month from a SAS Date Example 5: Extracting Month and Year from a SAS Date Example 6: Counting the Number of Years, Months, and so on, from a Given Date Example 7: Computing Exact Age in Years Example 8: Computing the Date after a Number of Intervals Conclusion Problems Programming Tips and Techniques Chapter 7. SAS® Arrays: Avoiding Repetitious DATA Step Coding Introduction Example 1: Substituting One Value for Another in a Group of Variables Example 2: Substituting One Value for Another in All Numeric Variables Example 3: Substituting One Value for Another in All Character Variables Example 4: Restructuring a SAS Data Set: Creating Multiple Observations from a Single Observation Example 5: Restructuring a SAS Data Set: Creating Multiple Observations from a Single Observation (Multidimensional Example) Example 6: Restructuring a SAS Data Set: Creating a Single Observation from Multiple Observations Conclusion Problems Chapter 8. RETAIN: "Remembering" Values from Previous Observations Introduction Example 1: Creating a Subject Number in the DATA Step: A Common Mistake Example 2: Creating a Subject Number in the DATA Step Using RETAIN Example 3: Explicit versus Implicit Retaining of Values Example 4: Scoring a Multiple-Choice Test Using RETAIN Example 5: Using Caution When Coding with RETAIN Example 6: Checking for a New Subject Number Using a LAG Function Example 7: Checking for a New Subject Number Using a LAG Function and a Trailing @ Conclusion Problems Presenting Your Data Chapter 9. PROC PRINT: Writing Simple Reports Introduction Example 1: Creating a Simple "Bare-Bones" Report Example 2: Dropping Observation Numbers Example 3: Increasing Readability Example 4: Adding Column Totals and Subtotals, Observation Counts, and Footnotes Example 5: Using the WIDTH=FULL Option Example 6: Using the WIDTH=MINIMUM Option Conclusion Problems Chapter 10. PROC MEANS and PROC UNIVARIATE: Producing Descriptive Statistics and Summary Data Sets Introduction Example 1: Computing Totals and Using PROC MEANS to Create a Summary Data Set Example 2: Computing More Than One Statistic Example 3: Creating Unweighted Summary Statistics (Step 1) Example 4: Creating Unweighted Summary Statistics (Step 2) Example 5: Producing a Formatted Summary Report Example 6: Computing Values as Percentages of All Observations Example 7: Creating a Summary Data Set That Contains a Median Conclusion Problems Chapter 11. PROC FORMAT: Using and Creating Formatting Tools Introduction Example 1: Formatting Values in a Questionnaire Example 2: Encountering a Subtle Problem with Missing Values, Formats, and PROC FREQ Example 3: Resolving the Subtle Problem Example 4: Checking for Invalid Values: A DATA Step Approach (Setting Invalid Values to Missing) Example 5: Checking for Invalid Values: A DATA Step Approach (Separating Invalid and Missing Values) Example 6: Using a User-Created Informat to Filter Input Data (Setting Invalid Values to Missing) Example 7: Using a User-Created INFORMAT to Filter Input Data (Separating Invalid and Missing Values) Example 8: Checking Ranges for Numeric Variables Example 9: Using Different Missing Values to Keep Track of High and Low Values Example 10: Creating and Using an Enhanced Numeric Informat Example 11: Using a SAS Data Set to Create a Character Format Example 12: Using a SAS Data Set to Create a Numeric Format Conclusion Problems Chapter 12 Develop And Fine-tune Your Programming Skills The Easy Way -- By Example! Sas Programming By Example Guides You, With A Series Of Annotated Examples, Through Basic Tasks To More Complex Ones. Problems And Solutions Are Provided To Make The Most Of The Programming Tools Available In Base Sas Software. Conversational In Tone, And Cleverly Organized, This Book Is Useful Both As A Tutorial For Learning Programming And As A Convenient Quick-reference For Solving Programming Problems. Book Jacket.--jacket. Manipulating Data -- Input And Infile -- Data Recoding -- Set, Merge, And Update -- Table Lookup Tools -- Sas Functions -- Sas Dates -- Programming Tips And Techniques -- Sas Arrays -- Retain -- Presenting Your Data -- Proc Print -- Proc Means And Proc Univariate -- Proc Format -- Proc Chart -- Proc Plot -- A Collection Of Efficiency Tips -- Efficiency -- Appendix: Problem Solutions. Ron Cody And Ray Pass. Includes Index.
دانلود کتاب SAS(R) programming by example