ScotCET and sensitivity analysis for causal mediation analysis with a single mediator

This post should be considered as an addendum to this previous one that discussed causal mediation analysis with a single mediator. That post ended with the argument that causal evidence could be found that procedural justice indeed mediated the effect of the treatment (previous experiences with the police) towards the outcome (normative alignment with the police). This post will discuss two sensitivity analysis techniques which assess this finding’s robustness to unmeasured confounding.

As noted in the discussion of sequential ignorability assumption of causal mediation analysis with a single mediator, the results can be considered causal, as long as they are robust to unmeasured confounding. This assumption can be systematically tested through various sensitivity analysis techniques. Here two will be discussed: “ρ” (the Greek letter rho) and the Left Out Variable Error (LOVE) method.

“ρ” was proposed by Imai et al. (2010; 2011). For causal mediation analysis usually, two models are fitted, one for the mediator and one for the outcome. These two models’ error terms contain information regarding the potential of a (vector of) unmeasured confounder(s) to nullify the found indirect effect. Hence, by systematically changing the correlation between the error terms, one can estimate the correlation needed to make the mediated effect zero. Moreover, this correlation can be translated to an R-squared value which refers to either the residual or the total variance that would need to be explained by the unmeasured confounder. This approach’s strength lies in the potential to consider the full model, however, harnessing the error terms makes the inference somewhat convoluted.

The LOVE-method (Cox et al. 2013) is more straightforward than the “ρ”, in that it relies on the correlation matrix between the treatment, mediator, and outcome. Using this correlation matrix, one can estimate the correlation that the unmeasured confounder would need to take to do away with the found indirect effect. Yet, this simplicity comes at a price: by only considering the correlation between these three variables, some information is not considered, such as the potential effects of the pre-treatment covariates in the analysis.

In R, by continuing the previous post, you can carry out these sensitivity analyses the following way (for further details see: MacKinnon and Pirlott 2015; Tingley et al. 2014):

naint.sensit <- medsens(naint.medout,, eps=.01, effect.type="both") summary(naint.sensit) plot(naint.sensit, main="Procedural justice -> Moral alignment", ylim=c(-1.5,1.5))
plot(naint.sensit, sens.par="R2", r.type="total","positive")

for(i in 1:cases.rum){
for(j in 1:cases.ruy){

RYX=-0.1142 #Observed correlation between the independent and dependent variables.
RMX=-0.1025 #Observed correlation between the independent variable and the mediator.
RYM=0.6886 #Observed correlation between the mediator and the dependent variable.
#Observed standardized values of a,b, cpr.
RTRUEAB= round(TRUEAB,digits =2)#This line of code rounds the estimate of ab that accounts for bias; the user can change the value of digits=2.
love.cor=data.frame(RUM, RUY, RTRUEAB, BIASAB)
rm(love.cor, cases.rum, cases.ruy)
plot(RUM~RUY,, xlab="Procedural justice-U", ylab="Moral alignment-U", col=2, pch=1, xlim=c(0,1), ylim=c(0,1), lab=c(10,10,10), tcl=-.5)
title(main="LOVE plot for Procedural justice -> Moral alignment", col.main="black", font.main=1)

The results of the sensitivity analysis can be summarised in the following table:

Mean ρ

Total R-squared


0.6 0.36 0.20 0.7

According to these, on average the error terms would need to have a correlation of r=0.6 to make the mediated effect zero, which would translate to 36% of the residual, and 20% of the total variance explained. These findings can be plotted which might make them easier to discern:

As far as the LOVE-method is concerned, the unmeasured confounder would need to take on an average correlation of r=0.7 to nullify the indirect effect. This can be depicted by a figure as well:

Having done all these sensitivity analyses, can we conclude that the results are robust to unmeasured confounding? Not quite. Unfortunately, these numbers do not mean much on their own, they should be compared to the findings of other studies. Yet, the need for relatively strong correlations to make the indirect effect disappear, make these results a promising first step towards establishing procedural justice’s causally mediating role.


Cox, M. G., Y. Kisbu-Sakarya, M. Mio evi, and D. P. MacKinnon. 2013. “Sensitivity Plots for Confounder Bias in the Single Mediator Model.” Evaluation Review 37(5):405–31.
Imai, Kosuke, Luke Keele, and Dustin Tingley. 2010. “A General Approach to Causal Mediation Analysis.” Psychological Methods 15(4):309–34.
Imai, Kosuke, Luke Keele, Dustin Tingley, and Teppei Yamamoto. 2011. “Unpacking the Black Box of Causality: Learning about Causal Mechanisms from Experimental and Observational Studies.” American Political Science Review 105(4):765–89.
Mackinnon, David P. and Angela G. Pirlott. 2015. “Statistical Approaches for Enhancing Causal Interpretation of the M to Y Relation in Mediation Analysis.” Personality and Social Psychology Review 19(1):30–43.
Tingley, Dustin, Teppei Yamamoto, Kentaro Hirose, Luke Keele, and Kosuke Imai. 2014. “Mediation: R Package for Causal Mediation Analysis.” Journal of Statistical Software 59(5):1–38.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.