An Up-to-Date, All-in-One Resource for Using SAS and R to Perform Frequent Tasks
The first edition of this popular guide provided a path between SAS and R using an easy-to-understand, dictionary-like approach. Retaining the same accessible format, SAS and R: Data Management, Statistical Analysis, and Graphics, Second Edition explains how to easily perform an analytical task in both SAS and R, without having to navigate through the extensive, idiosyncratic, and sometimes unwieldy software documentation. The book covers many common tasks, such as data management, descriptive summaries, inferential procedures, regression analysis, and graphics, along with more complex applications.
New to the Second Edition
This edition now covers RStudio, a powerful and easy-to-use interface for R. It incorporates a number of additional topics, including using application program interfaces (APIs), accessing data through database management systems, using reproducible analysis tools, and statistical analysis with Markov chain Monte Carlo (MCMC) methods and finite mixture models. It also includes extended examples of simulations and many new examples.
Enables Easy Mobility between the Two Systems
Through the extensive indexing and cross-referencing, users can directly find and implement the material they need. SAS users can look up tasks in the SAS index and then find the associated R code while R users can benefit from the R index in a similar manner. Numerous example analyses demonstrate the code in action and facilitate further exploration. The datasets and code are available for download on the book's website.
Data Input and Output Input Output Data Management Structure and Meta-Data Derived Variables and Data Manipulation Merging, Combining, and Subsetting Datasets Date and Time Variables Statistical and Mathematical Functions Probability Distributions and Random Number Generation Mathematical Functions Matrix Operations Programming and Operating System Interface Control Flow, Programming, and Data Generation Functions and Macros Interactions with the Operating System Common Statistical Procedures Summary Statistics Bivariate Statistics Contingency Tables Tests for Continuous Variables Analytic Power and Sample Size Calculations Linear Regression and ANOVA Model Fitting Tests, Contrasts, and Linear Functions of Parameters Model Diagnostics Model Parameters and Results Regression Generalizations and Modeling Generalized Linear Models Further Generalizations Robust Methods Models for Correlated Data Survival Analysis Multivariate Statistics and Discriminant Procedures Complex Survey Design Model Selection and Assessment A Graphical Compendium Univariate Plots Univariate Plots by Grouping Variable Bivariate Plots Multivariate Plots Special Purpose Plots Graphical Options and Configuration Adding Elements Options and Parameters Saving Graphs Simulation Generating Data Simulation Applications Special Topics Processing by Group Simulation-Based Power Calculations Reproducible Analysis and Output Advanced Statistical Methods Case Studies Data Management and Related Tasks Read Variable Format Files Plotting Maps Data Scraping and Visualization Manipulating Bigger Datasets Constrained Optimization: The Knapsack Problem Appendix A: Introduction to SAS Installation Running SAS and a Sample Session Learning SAS and Getting Help Fundamental Elements of SAS Syntax Work Process: The Cognitive Style of SAS Useful SAS Background Output Delivery System SAS Macro Variables Appendix B: Introduction to R and RStudio Installation Running R and Sample Session Learning R and Getting Help Fundamental Structures and Objects Functions Add-ons: Packages Support and Bugs Appendix C: The HELP Study Dataset Background on the HELP Study Roadmap to Analyses of the HELP Dataset Detailed Description of the Dataset Appendix D: References Appendix E: Indices Subject Index SAS Index R Index Further Resources and Examples appear at the end of most chapters.