class_docstr: Compute effect of treatment using some regression function.
  
  Fits a regression model for estimating the outcome using treatment(s) and
  confounders.
  
  Base class for all regression models, inherited by
  LinearRegressionEstimator and GeneralizedLinearModelEstimator.
class_docstr_tok: ["Compute","effect","of","treatment","using","some","regression","function",".","Fits","a","regression","model","for","estimating","the","outcome","using","treatment","(","s",")","and","confounders",".","Base","class","for","all","regression","models",",","inherited","by","LinearRegressionEstimator","and","GeneralizedLinearModelEstimator","."]
docstr: Sets the effect modifiers for the estimator
  Modifies need_conditional_estimates accordingly to effect modifiers value
  :param effect_modifiers: Variables on which to compute separate
      effects, or return a heterogeneous effect function. Not all
      methods support this currently.
docstr_tok: ["Sets","the","effect","modifiers","for","the","estimator","Modifies","need_conditional_estimates","accordingly","to","effect","modifiers","value",":","param","effect_modifiers",":","Variables","on","which","to","compute","separate","effects",",","or","return","a","heterogeneous","effect","function",".","Not","all","methods","support","this","currently","."]
code: def _set_effect_modifiers(
      self,
      data: pd.DataFrame,
      effect_modifier_names: Optional[List[str]] = None,
  ):
      """Sets the effect modifiers for the estimator
      Modifies need_conditional_estimates accordingly to effect modifiers value
      :param effect_modifiers: Variables on which to compute separate
          effects, or return a heterogeneous effect function. Not all
          methods support this currently.
      """
      self._effect_modifiers = effect_modifier_names
      if effect_modifier_names is not None:
          self._effect_modifier_names = [
              cname
              for cname in effect_modifier_names
              if cname in data.columns
          ]
          if len(self._effect_modifier_names) > 0:
              self._effect_modifiers = data[self._effect_modifier_names]
              self._effect_modifiers = self._encode(
                  self._effect_modifiers, "effect_modifiers"
              )
              self.logger.debug(
                  "Effect modifiers: "
                  + ",".join(self._effect_modifier_names)
              )
          else:
              self._effect_modifier_names = []
      else:
          self._effect_modifier_names = []
  
      self.need_conditional_estimates = (
          self.need_conditional_estimates
          if self.need_conditional_estimates != "auto"
          else (
              self._effect_modifier_names
              and len(self._effect_modifier_names) > 0
          )
      )
  
file_path: dowhy/dowhy/causal_estimators/regression_estimator.py
imports: from typing import Any, List, Optional, Union
  import numpy
  import pandas
  import statsmodels.api
  from dowhy.causal_estimator import CausalEstimate, CausalEstimator, IdentifiedEstimand
  from dowhy.utils.encoding import one_hot_encode
label_desc: Use image node_id 7 for calling the RegressionEstimator obj's underlying member method code with example usage: obj._set_effect_modifiers(data, effect_modifier_names) without return types