code: def _get_dummy_effects(
      effects, exog, dummy_ind, method, model, params
  ):
      """
      If there's a dummy variable, the predicted difference is taken at
      0 and 1
      """
      # this is the index for the effect and the index for dummy col in exog
      for i in dummy_ind:
          exog0 = exog.copy()  # only copy once, can we avoid a copy?
          exog0[:, i] = 0
          effect0 = model.predict(params, exog0)
          # fittedvalues0 = np.dot(exog0,params)
          exog0[:, i] = 1
          effect1 = model.predict(params, exog0)
          if "ey" in method:
              effect0 = np.log(effect0)
              effect1 = np.log(effect1)
          effects[:, i] = effect1 - effect0
      return effects
  
imports: from statsmodels.compat.python import lzip
  import numpy
  from scipy.stats import norm
  from statsmodels.tools.decorators import cache_readonly
label_desc: Use image node_id 10 for calling a global function with example usage: _get_dummy_effects(effects, exog, dummy_ind, method, model, params) and returns: effects