class_docstr: A class for holding the results of a mediation analysis.
  
  The following terms are used in the summary output:
  
  ACME : average causal mediated effect
  ADE : average direct effect
code: def __init__(self, indirect_effects, direct_effects):
      self.indirect_effects = indirect_effects
      self.direct_effects = direct_effects
  
      indirect_effects_avg = [None, None]
      direct_effects_avg = [None, None]
      for t in 0, 1:
          indirect_effects_avg[t] = indirect_effects[t].mean(0)
          direct_effects_avg[t] = direct_effects[t].mean(0)
  
      self.ACME_ctrl = indirect_effects_avg[0]
      self.ACME_tx = indirect_effects_avg[1]
      self.ADE_ctrl = direct_effects_avg[0]
      self.ADE_tx = direct_effects_avg[1]
      self.total_effect = (
          self.ACME_ctrl + self.ACME_tx + self.ADE_ctrl + self.ADE_tx
      ) / 2
  
      self.prop_med_ctrl = self.ACME_ctrl / self.total_effect
      self.prop_med_tx = self.ACME_tx / self.total_effect
      self.prop_med_avg = (self.prop_med_ctrl + self.prop_med_tx) / 2
  
      self.ACME_avg = (self.ACME_ctrl + self.ACME_tx) / 2
      self.ADE_avg = (self.ADE_ctrl + self.ADE_tx) / 2
  
file_path: statsmodels/statsmodels/stats/mediation.py
imports: import numpy
  import pandas
  from statsmodels.graphics.utils import maybe_name_or_idx
label_desc: Use image node_id 1 to create a new MediationResults object  with example: obj = MediationResults(indirect_effects, direct_effects)