This pyAgrum's notebook is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License
Author: Aymen Merrouche and Pierre-Henri Wuillemin.
from IPython.display import display, Math, Latex,HTML import pyAgrum as gum import pyAgrum.lib.notebook as gnb import pyAgrum.causal as csl import pyAgrum.causal.notebook as cslnb import os
Noncompliance is an important issue in the conduct of randomized controlled trials (RCTs). Taking account for noncompliers is necessary because they will bias the impact of the treatment on the outcome.
From 1973 to 1984 a randomized controlled trial was conducted to measure the effect of cholestyramine on cholesterol. The researchers in charge of this trial faced the noncompliance problem. (when patients who participate in the trial don't take their treatment). The corresponding causal diagram is the following:
bw = gum.fastBN("Assigned->Received->Cholesterol") bw
All our variables are binary, not numerical.
This question raises another one: What if noncompliers followed the instructions they were given, how would they have responded to the treatment? .We can't suppose that they would respond the same way compliers did. Not complying is maybe due to the risk of interacting with other drugs which can be a sign of a disease, and therefore these noncompliers may react differently: confounding.
bwModele = csl.CausalModel(bw,[("confounder",["Received","Cholesterol"])], True) cslnb.showCausalImpact(bwModele,on = "Cholesterol",doing="Received")
We cannot observe any of these confounders, so we can't control for it using back-door adjustment.
"Assigned" is an "instrumental variable" :
- According to data the variable "Assigned" is correlated with the outcome "Cholesterol"
- The variable "Assigned" has not a causal effect on the outcome: Assigning a number doesn't cause cholesterol.
- The instrument has a causal effect on the treatment "Received"
- The variable "Assigned" is as if it was randomly assigned. (no incoming arrows in the causal diagram)
- The correlation between "Assigned" and "Received" that is observed in the data, is the causal effect of the instrument over the treatment.
- Since the instrument is as if it was randomly assigned (no incoming arrows), it can't be correlated with any other confounders of the relationship between it and the outcome.
One of the methods of taking account for noncompliers is to take the worst-case scenario where none of the noncompliers would have improved if they followed the instructions (we get that 39.2% improved.), and the best-case scenario where all noncompliers would have improved if they had complied (we get that 78.0% improved.), we can say that the treatment is efficient because even in the worst-case scenario 39.2% of the population improved.