code: def _point_estimate(X_val, XM_val, M_val, y_val, idx, n_mediator,
                      mtype='linear'):
      
      # Mediator(s) model (M(j) ~ X + covar)
      beta_m = []
      for j in range(n_mediator):
          if mtype == 'linear':
              beta_m.append(linear_regression(X_val[idx], M_val[idx, j],
                                              coef_only=True)[1])
          else:
              beta_m.append(logistic_regression(X_val[idx], M_val[idx, j],
                                                coef_only=True)[1])
  
      # Full model (Y ~ X + M + covar)
      beta_y = linear_regression(XM_val[idx], y_val[idx],
                                 coef_only=True)[2:(2 + n_mediator)]
  
      # Point estimate
      return beta_m * beta_y
docs: Point estimate of indirect effect based on bootstrap sample.