class_docstr: Compute effect of treatment using the regression discontinuity method.
  
  Estimates effect by transforming the problem to an instrumental variables
  problem.
  
  Supports additional parameters as listed below.
docstr: Fits the estimator with data for effect estimation
  :param data: data frame containing the data
  :param treatment: name of the treatment variable
  :param outcome: name of the outcome variable
  :param effect_modifiers: Variables on which to compute separate
              effects, or return a heterogeneous effect function. Not all
              methods support this currently.
code: def fit(
      self,
      data: pd.DataFrame,
      effect_modifier_names: Optional[List[str]] = None,
  ):
      """
      Fits the estimator with data for effect estimation
      :param data: data frame containing the data
      :param treatment: name of the treatment variable
      :param outcome: name of the outcome variable
      :param effect_modifiers: Variables on which to compute separate
                  effects, or return a heterogeneous effect function. Not all
                  methods support this currently.
      """
      self._set_effect_modifiers(data, effect_modifier_names)
  
      self.rd_variable = data[self.rd_variable_name]
  
      self.symbolic_estimator = self.construct_symbolic_estimator(
          self._target_estimand
      )
      self.logger.info(self.symbolic_estimator)
  
      upper_limit = self.rd_threshold_value + self.rd_bandwidth
      lower_limit = self.rd_threshold_value - self.rd_bandwidth
      rows_filter = np.s_[
          (self.rd_variable >= lower_limit)
          & (self.rd_variable <= upper_limit)
      ]
      local_rd_variable = self.rd_variable[rows_filter]
      local_treatment_variable = data[
          self._target_estimand.treatment_variable[0]
      ][
          rows_filter
      ]  # indexing by treatment name again since this method assumes a single-dimensional treatment
      local_outcome_variable = data[
          self._target_estimand.outcome_variable[0]
      ][rows_filter]
      self._local_df = pd.DataFrame(
          data={
              "local_rd_variable": local_rd_variable,
              self._target_estimand.treatment_variable[
                  0
              ]: local_treatment_variable,
              self._target_estimand.outcome_variable[
                  0
              ]: local_outcome_variable,
          }
      )
      self.logger.debug(self._local_df)
      self.iv_estimator = InstrumentalVariableEstimator(
          self._target_estimand,
          test_significance=self._significance_test,
          iv_instrument_name="local_rd_variable",
      )
  
      self.iv_estimator.fit(self._local_df)
  
      return self
  
file_path: dowhy/dowhy/causal_estimators/regression_discontinuity_estimator.py
imports: from typing import Any, List, Optional, Union
  import numpy
  import pandas
  from dowhy.causal_estimator import CausalEstimator
  from dowhy.causal_estimators.instrumental_variable_estimator import InstrumentalVariableEstimator
  from dowhy.causal_identifier import IdentifiedEstimand
label_desc: Use image node_id 2 for calling the RegressionDiscontinuityEstimator obj's underlying member method code with example usage: obj.fit(data, effect_modifier_names) and returns: self