Introduction to R for Social Scientists: A Tidy Programming Approach

Introduction to R for Social Scientists: A Tidy Programming Approach

Introduction to R for Social Scientists: A Tidy Programming Approach

Introduction to R for Social Scientists: A Tidy Programming Approach

Paperback

$71.99 
  • SHIP THIS ITEM
    Qualifies for Free Shipping
  • PICK UP IN STORE
    Check Availability at Nearby Stores

Related collections and offers


Overview

Introduction to R for Social Scientists: A Tidy Programming Approach introduces the Tidy approach to programming in R for social science research to help quantitative researchers develop a modern technical toolbox. The Tidy approach is built around consistent syntax, common grammar, and stacked code, which contribute to clear, efficient programming. The authors include hundreds of lines of code to demonstrate a suite of techniques for developing and debugging an efficient social science research workflow. To deepen the dedication to teaching Tidy best practices for conducting social science research in R, the authors include numerous examples using real world data including the American National Election Study and the World Indicators Data. While no prior experience in R is assumed, readers are expected to be acquainted with common social science research designs and terminology.

Whether used as a reference manual or read from cover to cover, readers will be equipped with a deeper understanding of R and the Tidyverse, as well as a framework for how best to leverage these powerful tools to write tidy, efficient code for solving problems. To this end, the authors provide many suggestions for additional readings and tools to build on the concepts covered. They use all covered techniques in their own work as scholars and practitioners.


Product Details

ISBN-13: 9780367460723
Publisher: CRC Press
Publication date: 03/09/2021
Series: Chapman & Hall/CRC Statistics in the Social and Behavioral Sciences
Pages: 208
Product dimensions: 6.12(w) x 9.19(h) x (d)

About the Author

Ryan Kennedy is an associate professor of political science at the University of Houston and a research associate for the Hobby Center for Public Policy. His work has appeared in top journals including Science, the American Political Science Review, and Journal of Politics. These articles have won several awards, including best paper in the American Political Science Review, and have been cited over 1,700 times. They have also drawn attention from media outlets like Time, the New York Times, and Smithsonian Magazine.

Philip Waggoner is an assistant instructional professor of computational social science at the University of Chicago and a visiting research scholar at ISERP at Columbia University. He is an Associate Editor at the Journal of Mathematical Sociology and the Journal of Open Research Software, and author of the forthcoming book, Unsupervised Machine Learning for Clustering in Political and Social Research (Cambridge University Press). His work has appeared or is forthcoming in many journals including the Journal of Politics, Journal of Mathematical Sociology, and Journal of Statistical Theory and Practice.

Table of Contents

Preface vii

Overview of Chapters viii

Acknowledgements ix

About the Authors ix

1 Introduction 1

1.1 Why R? 2

1.2 Why This Book? 4

1.3 Why the Tidyverse? 6

1.4 What Tools Are Needed? 7

1.5 How This Book Can be Used in a Class 9

1.6 Plan for the Book 10

2 Foundations 13

2.1 Scripting with R 13

2.2 Understanding R 17

2.3 Working Directories 21

2.4 Setting Up an R Project 22

2.5 Loading and Using Packages and Libraries 24

2.6 Where to Get Help 29

2.7 Concluding Remarks 31

3 Data Management and Manipulation 33

3.1 Loading the Data 34

3.2 Data Wrangling 39

3.3 Grouping and Summarizing Your Data 45

3.4 Creating New Variables 48

3.5 Combining Data Sets 55

3.6 Basic Descriptive Analysis 57

3.7 Tidying a Data Set 62

3.8 Saving Your Data Set for Later Use 64

3.9 Saving Your Data Set Details for Presentation 65

4 Visualizing Your Data 69

4.1 The Global Data Set 69

4.2 The Data and Preliminaries 70

4.3 Histograms 72

4.4 Bar Plots 81

4.5 Scatterplots 84

4.6 Combining Multiple Plots 90

4.7 Saving Your Plots 94

4.8 Advanced Visualizations 95

4.9 Concluding Remarks 99

5 Essential Programming 101

5.1 Data Classes 101

5.2 Data Structures 104

5.3 Operators 110

5.4 Conditional Logic 112

5.5 User-Defined Functions 114

5.6 Making Your Code Modular 119

5.7 Loops 120

5.8 Mapping with purrr 132

5.9 Concluding Remarks 135

6 Exploratory Data Analysis 137

6.1 Visual Exploration 138

6.2 Numeric Exploration 145

6.3 Putting it All Together: Skimming Data 149

6.4 Concluding Remarks 151

7 Essential Statistical Modeling 153

7.1 Loading and Inspecting the Data 153

7.2 t-statistics 155

7.3 Chi-square Test for Contingency Tables 158

7.4 Correlation 159

7.5 Ordinary Least Squares Regression 161

7.6 Binary Response Models 171

7.7 Concluding Remarks 183

8 Parting Thoughts 185

8.1 Continuing to Learn with R 185

8.2 Where To Go from Here 186

8.3 A Final Word 187

Bibliography 189

Index 193

From the B&N Reads Blog

Customer Reviews