class_docstr: Class to perform sensitivity analysis
  See: https://carloscinelli.com/files/Cinelli%20and%20Hazlett%20(2020)%20-%20Making%20Sense%20of%20Sensitivity.pdf
  
  :param estimator: linear estimator of the causal model
  :param data: Pandas dataframe
  :param treatment_name: name of treatment
   :param percent_change_estimate: It is the percentage of reduction of treatment estimate that could alter the results (default = 1)
                                      if percent_change_estimate = 1, the robustness value describes the strength of association of confounders with treatment and outcome in order to reduce the estimate by 100% i.e bring it down to 0.
  :param null_hypothesis_effect: assumed effect under the null hypothesis
  :param confounder_increases_estimate: True implies that confounder increases the absolute value of estimate and vice versa. (Default = True)
  :param benchmark_common_causes: names of variables for bounding strength of confounders
  :param significance_level: confidence interval for statistical inference(default = 0.05)
  :param frac_strength_treatment: strength of association between unobserved confounder and treatment compared to benchmark covariate
  :param frac_strength_outcome: strength of association between unobserved confounder and outcome compared to benchmark covariate
  :param common_causes_order: The order of column names in OLS regression data
class_docstr_tok: ["Class","to","perform","sensitivity","analysis","See",":","https",":","\/\/carloscinelli.com\/files\/Cinelli","%","20and","%","20Hazlett","%","20","(","2020",")","%","20-","%","20Making","%","20Sense","%","20of","%","20Sensitivity.pdf",":","param","estimator",":","linear","estimator","of","the","causal","model",":","param","data",":","Pandas","dataframe",":","param","treatment_name",":","name","of","treatment",":","param","percent_change_estimate",":","It","is","the","percentage","of","reduction","of","treatment","estimate","that","could","alter","the","results","(","default","=","1",")","if","percent_change_estimate","=","1",",","the","robustness","value","describes","the","strength","of","association","of","confounders","with","treatment","and","outcome","in","order","to","reduce","the","estimate","by","100","%","i.e","bring","it","down","to","0.",":","param","null_hypothesis_effect",":","assumed","effect","under","the","null","hypothesis",":","param","confounder_increases_estimate",":","True","implies","that","confounder","increases","the","absolute","value","of","estimate","and","vice","versa",".","(","Default","=","True",")",":","param","benchmark_common_causes",":","names","of","variables","for","bounding","strength","of","confounders",":","param","significance_level",":","confidence","interval","for","statistical","inference","(","default","=","0.05",")",":","param","frac_strength_treatment",":","strength","of","association","between","unobserved","confounder","and","treatment","compared","to","benchmark","covariate",":","param","frac_strength_outcome",":","strength","of","association","between","unobserved","confounder","and","outcome","compared","to","benchmark","covariate",":","param","common_causes_order",":","The","order","of","column","names","in","OLS","regression","data"]
docstr: Computes the contours, threshold line and bounds for plotting estimates.
  Contour lines (z - axis) correspond to the adjusted estimate values for different values of r2tu_w (x) and r2yu_tw (y).
  :param r2tu_w: hypothetical partial R^2 of confounder with treatment(x - axis)
  :param r2yu_tw: hypothetical partial R^2 of confounder with outcome(y - axis)
  
  :returns:
  contour_values : values of contour lines for the plot
  critical_estimate : threshold point
  estimate_bounds : estimate values for unobserved confounders (bias adjusted estimates)
docstr_tok: ["Computes","the","contours",",","threshold","line","and","bounds","for","plotting","estimates",".","Contour","lines","(","z","-","axis",")","correspond","to","the","adjusted","estimate","values","for","different","values","of","r2tu_w","(","x",")","and","r2yu_tw","(","y",")",".",":","param","r2tu_w",":","hypothetical","partial","R^2","of","confounder","with","treatment","(","x","-","axis",")",":","param","r2yu_tw",":","hypothetical","partial","R^2","of","confounder","with","outcome","(","y","-","axis",")",":","returns",":","contour_values",":","values","of","contour","lines","for","the","plot","critical_estimate",":","threshold","point","estimate_bounds",":","estimate","values","for","unobserved","confounders","(","bias","adjusted","estimates",")"]
code: def plot_estimate(self, r2tu_w, r2yu_tw):
      """
      Computes the contours, threshold line and bounds for plotting estimates.
      Contour lines (z - axis) correspond to the adjusted estimate values for different values of r2tu_w (x) and r2yu_tw (y).
      :param r2tu_w: hypothetical partial R^2 of confounder with treatment(x - axis)
      :param r2yu_tw: hypothetical partial R^2 of confounder with outcome(y - axis)
  
      :returns:
      contour_values : values of contour lines for the plot
      critical_estimate : threshold point
      estimate_bounds : estimate values for unobserved confounders (bias adjusted estimates)
      """
  
      critical_estimate = self.null_hypothesis_effect
      contour_values = np.zeros((len(r2yu_tw), len(r2tu_w)))
      for i in range(len(r2yu_tw)):
          y = r2yu_tw[i]
          for j in range(len(r2tu_w)):
              x = r2tu_w[j]
              benchmarking_results = self.compute_bias_adjusted(
                  r2tu_w=x, r2yu_tw=y
              )
              estimate = benchmarking_results["bias_adjusted_estimate"]
              contour_values[i][j] = estimate
  
      estimate_bounds = self.benchmarking_results[
          "bias_adjusted_estimate"
      ]
      return contour_values, critical_estimate, estimate_bounds
  
file_path: dowhy/dowhy/causal_refuters/linear_sensitivity_analyzer.py
imports: import logging
  import matplotlib.pyplot
  import numpy
  import pandas
  import statsmodels.api
  from scipy.stats import t
  from dowhy.utils.api import parse_state
label_desc: Use image node_id 7 for calling the LinearSensitivityAnalyzer obj's underlying member method code with example usage: obj.plot_estimate(r2tu_w, r2yu_tw) and returns: contour_values,  critical_estimate,  estimate_bounds