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","."]
code: def estimate_effect(
      self,
      data: pd.DataFrame,
      treatment_value: Any = 1,
      control_value: Any = 0,
      target_units=None,
      need_conditional_estimates=None,
      **_,
  ):
      self._target_units = target_units
      self._treatment_value = treatment_value
      self._control_value = control_value
      if need_conditional_estimates is None:
          need_conditional_estimates = self.need_conditional_estimates
      # TODO make treatment_value and control value also as local parameters
      # All treatments are set to the same constant value
      effect_estimate = self._do(data, treatment_value) - self._do(
          data, control_value
      )
      conditional_effect_estimates = None
      if need_conditional_estimates:
          conditional_effect_estimates = (
              self._estimate_conditional_effects(
                  data,
                  self._estimate_effect_fn,
                  effect_modifier_names=self._effect_modifier_names,
              )
          )
      intercept_parameter = self.model.params[0]
      estimate = CausalEstimate(
          data=data,
          treatment_name=self._target_estimand.treatment_variable,
          outcome_name=self._target_estimand.outcome_variable,
          estimate=effect_estimate,
          control_value=control_value,
          treatment_value=treatment_value,
          conditional_estimates=conditional_effect_estimates,
          target_estimand=self._target_estimand,
          realized_estimand_expr=self.symbolic_estimator,
          intercept=intercept_parameter,
      )
  
      estimate.add_estimator(self)
      return estimate
  
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 5 for calling the RegressionEstimator obj's underlying member method code with example usage: obj.estimate_effect(data, treatment_value, control_value, target_units, need_conditional_estimates) and returns: estimate