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

Linear regression for causal inference

Linear regression models are employed to estimate the causal effect of one or more independent variables (your treatments or interventions) on a dependent variable (the outcome). This section delves into the application of linear regression for causal inference, highlighting its assumptions, methodologies, and practical considerations.

The theory

Linear regression models predict the value of a dependent variable based on the linear combination of one or more independent variables. Here is the equation for this model:

<math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mrow><mi>Y</mi><mo>=</mo><msub><mi>β</mi><mn>0</mn></msub><mo>+</mo><msub><mi>β</mi><mn>1</mn></msub><msub><mi>X</mi><mn>1</mn></msub><mo>+</mo><msub><mi>β</mi><mn>2</mn></msub><msub><mi>X</mi><mn>2</mn></msub><mo>+</mo><mo>.</mo><mo>.</mo><mo>.</mo><mo>.</mo><mo>.</mo><mo>.</mo><mo>.</mo><mo>.</mo><mo>+</mo><msub><mi>β</mi><mi>n</mi></msub><msub><mi>X</mi><mi>n</mi></msub><mo>+</mo><mi mathvariant="normal">ϵ</mi></mrow></mrow></math> (1)

In this context, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>Y</mml:mi></mml:math> is the dependent variable we want to predict. The independent variables are <math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mrow><msub><mi>X</mi><mn>1</mn></msub><mo>,</mo><msub><mi>X</mi><mn>2</mn></msub><mo>,</mo><mo>.</mo><mo>.</mo><mo>.</mo><mo>.</mo><mo>.</mo><mo>.</mo><msub><mi>X</mi><mi>n</mi></msub></mrow></mrow></math>. The intercept <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:msub><mml:mrow><mml:mi>β</mml:mi></mml:mrow><mml:mrow><mml:mn>0</mml:mn></mml:mrow></mml:msub></mml:math> represents the value of <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>Y</mml:mi></mml:math> when all <math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mi>X</mi></mrow></math>values are zero.

The coefficients <math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mrow><msub><mi>β</mi><mn>1</mn></msub><mo>,</mo><msub><mi>β</mi><mn>2</mn></msub><mo>,</mo><mo>…</mo><mo>.</mo><mo>.</mo><mo>.</mo><mo>.</mo><msub><mi>β</mi><mi>n</mi></msub></mrow></mrow></math> show how changes in each <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>X</mml:mi></mml:math> affect <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>Y</mml:mi></mml:math>, keeping other variables constant. Each coefficient indicates the impact of a unit change in its corresponding <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>X</mml:mi></mml:math> on <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>Y</mml:mi></mml:math>.

These coefficients are crucial as they quantify the relationship between...

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