Implementing sensitivity analysis in R
R is an impactful tool if you’re aiming to assess the robustness of your causal conclusions under various assumptions. This section will provide a step-by-step overview of using R to perform sensitivity analysis. Here, we’ll understand the impact that reading comics at a young age has in terms of their engagement in higher studies later on.
Using R for sensitivity analysis
In this section, we’ll consider a study that’s designed to explore how reading comics at a young age influences students’ likelihood of pursuing higher studies. In this hypothetical study, we’ll consider variables such as the frequency of comic reading (comic_freq
), parents’ level of education (parents_edu
), time spent on homework (homework_time
), and an indicator of enrolling in higher education (higher_studies
).
First, let’s generate some synthetic data for this study:
# Set seed for reproducibility set.seed...