Testing Complex Social Theories – Replication materials

As reported on Twitter, my paper on causal mediation analysis with multiple mediators has been published online:

I have already discussed the theoretical background of multiple mediators in other posts (find them here, here, here, and here). Hence, and as promised, I will instead focus on the code that you need to replicate the results of the paper.

Continue reading “Testing Complex Social Theories – Replication materials”

ScotCET and causal mediation analysis with a single mediator 3. – A demonstration in R

This post finishes the discussion of two other ones (this and this) by providing an example how to carry out causal mediation analysis with a single mediator in R. The “mediation” package is utilised, for a full description of the package’s capabilities, you can refer to Tingley et al. (2014). For STATA users out there, there is a “paramed” package in STATA which should also produce the same results (within rounding error). A note of caution though: the “paramed” package can only be used with linear mediators and outcomes, and with binary logit models with rare outcomes (see: VanderWeele 2016). The dataset for the analysis can be downloaded from the bottom of the page. Continue reading “ScotCET and causal mediation analysis with a single mediator 3. – A demonstration in R”

ScotCET and implementation failure 3. – Treatment effect consistency in a blocking design with a demonstration in STATA

This post continues two earlier ones (this one and this one) and assesses the effect consistency across the matched pairs in the ScotCET dataset. Part of the redacted dataset can be downloaded at the bottom of this page which will allow you to carry out the same analysis presented below. Continue reading “ScotCET and implementation failure 3. – Treatment effect consistency in a blocking design with a demonstration in STATA”