This is a study project of the book Fundamentals of Causal Inference With R by Babette A. Brumback. Ms Brumback uses base R for all the code. This study project is coding with the tidyverse way. The motivation stems from the opinion that, in practice, the code is as important as the theory and learning better coding practice should be started as early as possible.
-
The online version of this document can be found at FCI.
-
The companion package for this project is
fciR
and can be found at fciR. -
The exercises can be found at FCI exercises. This repo could be set as a private to avoid frustrating the publisher.
Many thanks to Babette A. Brumback for a book full of amazing observations, tricks and tips.
For data processing and analysis the following packages are used
Package | Comment |
---|---|
fciR | Companion R package for this book |
conflicted | Manage conflict resolution amongst packages |
tidyverse | Tidyverse is the favored coding way |
skimr | Summary statistics |
modelr | Create elegant pipelines when modelling |
assertthat | Easy pre and post assertions |
simpr | Generate simulated data |
rsample | Resampling and bootstraps |
MonteCarlo | Monte Carlo simulation |
geepack | Generalized estimating equations solver |
Matching | Multivariate and Propensity Score Matching Software for Causal Inference. See chapter 10. |
For plotting, graphs and tables these packages are used
Package | Comment |
---|---|
ggplot | Create graphics based on the grammar of graphics |
ggdag | Causal directed acyclic graphs |
tidygraph | Graphs and networks manipulation |
ggvenn | Venn diagrams by ggplot2. Used in chap. 4 |
gt | Nice-looking tables |