Chapter 14 Prendre en compte l’interaction

14.1 Avec le sport

exp1 <- cmest(
  data = base3,                    # base
  model = "gformula",             # approach, defaut is rb (regression-based)
                                  # if postc is not empty only gformula or msm
  estimation = "imputation",      # method of estimation. "imputation" is conterfactual estimation
  inference = "bootstrap",        # method for se and CI
  nboot = 100,                    # defaut is 200
  EMint = TRUE,                  # interaction exposure mediator
  
  multimp = TRUE,                 # imputation multiple des DM 
  m = 10,

  outcome = "t8_SBP",                 
  exposure = "t0_baby_sex", 
  mediator = c("t4_act_sport"), 
  basec = c("t0_mother_scol_crt",
            "t0_fathers_csp_defav"),# confusion baseline
  postc = c("t4_litteraciepbm",
                     "t4_numeraciepbm",
                     "t4_act_read",
                     "t4_O_level",
                      "t4_hadchildren",
                     "t4_married",
                     "t4_act_friend",
                     "t4_religious"),    # confusion intermédiaire
  
  yreg = "linear",              # outcome regression model

  a = "Homme",                    # "active" value of exposure
  astar = "Femme",                # "control" value of exposure
  
  mreg = list("logistic"),          # regression model for each mediator
  mval = list("Non"),   # ref for M
  postcreg = list("logistic",
              "logistic",
              "logistic",
              "logistic",
              "logistic",
              "logistic",
              "logistic",
              "logistic")                 # ref for M
  ) ;    set.seed(28062022)

On peut décrire plusieurs effets :

  • l’effet direct (qui ne passe pas par l’activité physique) “moyen” d’être né homme est CDE = +14.78mmHg (95CI = [11.34 to 19.56]
  • il y a interaction avec le sport de : Int_Ref = -1.28mmHg (95CI = [-2.8 to 0.09]. Le fait de faire du sport change l’effet direct (chemins non en lien avec le sport) chez les hommes par rapport aux femmes.
  • la proportion médiée “moyenne” est PM = -26.78% (95CI = [-55.15% to -14.29%`]
  • L’effet du n’est pas le meme entre les hommes et les femmes : chez les hommes le fait de faire du sport diminue la TAS de Int_MEd = -1.59mmHg (95CI = [-3.51 to 0.13] de plus que chez les hommes.

14.2 Avec la lecture

exp1 <- cmest(
  data = base3,                    # base
  model = "gformula",             # approach, defaut is rb (regression-based)
                                  # if postc is not empty only gformula or msm
  estimation = "imputation",      # method of estimation. "imputation" is conterfactual estimation
  inference = "bootstrap",        # method for se and CI
  nboot = 100,                    # defaut is 200
  EMint = TRUE,                  # interaction exposure mediator
  
  multimp = TRUE,                 # imputation multiple des DM 
  m = 10,

  outcome = "t8_SBP",                 
  exposure = "t0_baby_sex", 
  mediator = c("t4_act_read"), 
  basec = c("t0_mother_scol_crt",
            "t0_fathers_csp_defav"),# confusion baseline
  postc = c("t4_litteraciepbm",
                     "t4_O_level",
                      "t4_hadchildren",
                     "t4_married"),    # confusion intermédiaire
  
  yreg = "linear",              # outcome regression model

  a = "Homme",                    # "active" value of exposure
  astar = "Femme",                # "control" value of exposure
  
  mreg = list("logistic"),          # regression model for each mediator
  mval = list("Oui"),   # ref for M
  postcreg = list("logistic",
              "logistic",
              "logistic",
              "logistic")                 # ref for M
  ) ;    set.seed(28062022)

On peut décrire plusieurs effets :

  • l’effet direct (qui ne passe pas par l’activité de lecture) “moyen” d’être né homme est CDE = +9.49mmHg (95CI = [6.7 to 12.84]
  • il ne semble pas y avoir d’interaction avec la lecture de : Int_Ref = +0.48mmHg (95CI = [-0.38 to 1.86].
  • la proportion médiée “moyenne” est PM = 6.84% (95CI = [-0.31 to 15.87]
  • l’effet de la lecture semble a peu près similaire chez les hommes et les femmes Int_Med = +0.39mmHg (95CI = [-0.25 to 1.25]