Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Causal Inference in R

You're reading from   Causal Inference in R Decipher complex relationships with advanced R techniques for data-driven decision-making

Arrow left icon
Product type Paperback
Published in Nov 2024
Publisher Packt
ISBN-13 9781837639021
Length 382 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Subhajit Das Subhajit Das
Author Profile Icon Subhajit Das
Subhajit Das
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Part 1:Foundations of Causal Inference
2. Chapter 1: Introducing Causal Inference FREE CHAPTER 3. Chapter 2: Unraveling Confounding and Associations 4. Chapter 3: Initiating R with a Basic Causal Inference Example 5. Part 2: Practical Applications and Core Methods
6. Chapter 4: Constructing Causality Models with Graphs 7. Chapter 5: Navigating Causal Inference through Directed Acyclic Graphs 8. Chapter 6: Employing Propensity Score Techniques 9. Chapter 7: Employing Regression Approaches for Causal Inference 10. Chapter 8: Executing A/B Testing and Controlled Experiments 11. Chapter 9: Implementing Doubly Robust Estimation 12. Part 3: Advanced Topics and Cutting-Edge Methods
13. Chapter 10: Analyzing Instrumental Variables 14. Chapter 11: Investigating Mediation Analysis 15. Chapter 12: Exploring Sensitivity Analysis 16. Chapter 13: Scrutinizing Heterogeneity in Causal Inference 17. Chapter 14: Harnessing Causal Forests and Machine Learning Methods 18. Chapter 15: Implementing Causal Discovery in R 19. Index 20. Other Books You May Enjoy

Preparing for causal inference in R

Next, we’ll implement an example causal inference problem in R. Take our previous problem, as discussed in Chapter 2, of a group of students changing their home location from a noisy neighborhood to a quieter place. The university observed the change might have brought improvement in their grades and performance in class. They assign you as a researcher to learn whether there is any causal link between moving neighborhoods and improved grades.

Preparing and loading data

We use a toy dataset representing students who moved from a noisy to a quieter neighborhood. The data is located in the Git repository. The dataset includes grades before and after the move, noise levels in the neighborhood, and other factors such as study hours, part-time job status, and family income.

Let’s transform the data for our analysis.

Specifically, we begin by reading a CSV file named student_data.csv (provided in the Git repository) into a data...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image