Muutke küpsiste eelistusi

Introduction to R for Social Scientists: A Tidy Programming Approach [Pehme köide]

Teised raamatud teemal:
Teised raamatud teemal:

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.

 

Arvustused

"The authors do a good job of explaining why and how programmers should use R! This book is ideal for social scientists but also good for all industries since it does not assume prior knowledge of R and also addresses R learning pain points. The book examples are based on real-world applications and the R syntax is explained in easy to understand language. The book is unique because it divides exercises into three levels: Easy, Intermediate and Advanced for all levels of R programmers.The step-by-step guide helps new R programmers stay on the workflow as well as apply best practices.The R examples show various options for each function which helps R programmers understand the function better. Finally, the essential programming chapter is great since all R programmers need to learn and master these R concepts." -Sunil Gupta, SAS, CDISC and R Corporate Trainer and Author, Founder of R-Guru.com

Preface vii
Overview of
Chapters
viii
Acknowledgements ix
About the Authors ix
1 Introduction
1(12)
1.1 Why R?
2(2)
1.2 Why This Book?
4(2)
1.3 Why the Tidyverse?
6(1)
1.4 What Tools Are Needed?
7(2)
1.5 How This Book Can be Used in a Class
9(1)
1.6 Plan for the Book
10(3)
2 Foundations
13(20)
2.1 Scripting with R
13(4)
2.2 Understanding R
17(4)
2.3 Working Directories
21(1)
2.4 Setting Up an R Project
22(2)
2.5 Loading and Using Packages and Libraries
24(5)
2.6 Where to Get Help
29(2)
2.7 Concluding Remarks
31(2)
3 Data Management And Manipulation
33(36)
3.1 Loading the Data
34(5)
3.2 Data Wrangling
39(6)
3.3 Grouping and Summarizing Your Data
45(3)
3.4 Creating New Variables
48(7)
3.5 Combining Data Sets
55(2)
3.6 Basic Descriptive Analysis
57(5)
3.7 Tidying a Data Set
62(2)
3.8 Saving Your Data Set for Later Use
64(1)
3.9 Saving Your Data Set Details for Presentation
65(4)
4 Visualizing Your Data
69(32)
4.1 The Global Data Set
69(1)
4.2 The Data and Preliminaries
70(2)
4.3 Histograms
72(9)
4.4 Bar Plots
81(3)
4.5 Scatterplots
84(6)
4.6 Combining Multiple Plots
90(4)
4.7 Saving Your Plots
94(1)
4.8 Advanced Visualizations
95(4)
4.9 Concluding Remarks
99(2)
5 Essential Programming
101(36)
5.1 Data Classes
101(3)
5.2 Data Structures
104(6)
5.3 Operators
110(2)
5.4 Conditional Logic
112(2)
5.5 User-Defined Functions
114(5)
5.6 Making Your Code Modular
119(1)
5.7 Loops
120(12)
5.8 Mapping with purrr
132(3)
5.9 Concluding Remarks
135(2)
6 Exploratory Data Analysis
137(16)
6.1 Visual Exploration
138(7)
6.2 Numeric Exploration
145(4)
6.3 Putting it All Together: Skimming Data
149(2)
6.4 Concluding Remarks
151(2)
7 Essential Statistical Modeling
153(32)
7.1 Loading and Inspecting the Data
153(2)
7.2 t-statistics
155(3)
7.3 Chi-square Test for Contingency Tables
158(1)
7.4 Correlation
159(2)
7.5 Ordinary Least Squares Regression
161(10)
7.6 Binary Response Models
171(12)
7.7 Concluding Remarks
183(2)
8 Parting Thoughts
185(4)
8.1 Continuing to Learn with R
185(1)
8.2 Where To Go from Here
186(1)
8.3 A Final Word
187(2)
Bibliography 189(4)
Index 193
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.