Combining and Modifying SAS Data Sets: Examples provides solutions for common tasks involving reshaping or combining SAS data sets. You can save programming hours by using these programs as a model for developing your own. In addition, examples demonstrate basic tasks such as converting a variable's type, working with character strings, and working with SAS time and date values, among others. Data combining and modifying tools used in these examples include DATA step features such as the SET, MERGE, and MODIFY statements; BY-group processing; array processing; and error handling; as well as the SQL procedure. This book is designed for intermediate to advanced SAS programmers who need minimal explanation and who can learn by example. The code is documented in margin notes, with only the most complicated issues explained in more detail. Chapter 1 and some examples direct you to sources of more complete information on the tools and concepts used. Book jacket.
This book is best suited for intermediate to advanced SAS programmers who need to merge or otherwise combine or modify data sets. Although the MERGE command is quite simple, it can be quite tricky if not fully understood: Merge commands may combine your data in unexpected ways that won't always show as errors in your program log. Thus, it is extrememly important to know exactly what the program is doing.There are numerous helpful examples that are divided into programming "goal," "strategy," "input data set(s)," "resulting data set," "program," and "where to go from here" (references to further discussions of the topic). As shown in the following brief excerpt, readers will benefit by knowing some programming terminology: "Goal: Within the same data set, look ahead from a variable value in one observation to return the value of the same variable in the observation that immediately follows it." Chapter 1. An Introduction to Data Relationships, Access Methods, and Techniques for Data Manipulation.Chapter 2. Combining Single Observations with Single Observations.Chapter 3. Combining a Single Observation with Multiple Observations.Chapter 4. Combining Multiple Observations with Multiple Observations.Chapter 5. Manipulating Data From a Single Source.Chapter 6. Utilities and Functions.The last two chapters emphasize modifying rather than combining data sets, and have a great deal of useful information (e.g., adding new observations to the end of a data set, simulating the LEAD function, adding a new variable that contains the frequency of a by-group value, converting character and numeric variables, producing equal-sized random samples, etc.). PROC SQL is sometimes used in the programs. The 197-page book has many well-organized examples, and includes an appendix on error checking and a useful index.
ThriftBooks sells millions of used books at the lowest everyday prices. We personally assess every book's quality and offer rare, out-of-print treasures. We deliver the joy of reading in recyclable packaging with free standard shipping on US orders over $15. ThriftBooks.com. Read more. Spend less.