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: Function to calculate the robustness value.
  It is the minimum strength of association that confounders must have with treatment and outcome to change conclusions.
  Robustness value describes how strong the association must be in order to reduce the estimated effect by (100 * percent_change_estimate)%.
  Robustness value close to 1 means the treatment effect can handle strong confounders explaining  almost all residual variation of the treatment and the outcome.
  Robustness value close to 0 means that even very weak confounders can also change the results.
  
  :param alpha: confidence interval (default = 1)
  
  :returns: robustness value
docstr_tok: ["Function","to","calculate","the","robustness","value",".","It","is","the","minimum","strength","of","association","that","confounders","must","have","with","treatment","and","outcome","to","change","conclusions",".","Robustness","value","describes","how","strong","the","association","must","be","in","order","to","reduce","the","estimated","effect","by","(","100","*","percent_change_estimate",")","%",".","Robustness","value","close","to","1","means","the","treatment","effect","can","handle","strong","confounders","explaining","almost","all","residual","variation","of","the","treatment","and","the","outcome",".","Robustness","value","close","to","0","means","that","even","very","weak","confounders","can","also","change","the","results",".",":","param","alpha",":","confidence","interval","(","default","=","1",")",":","returns",":","robustness","value"]
code: def robustness_value_func(self, alpha=1.0):
      """
      Function to calculate the robustness value.
      It is the minimum strength of association that confounders must have with treatment and outcome to change conclusions.
      Robustness value describes how strong the association must be in order to reduce the estimated effect by (100 * percent_change_estimate)%.
      Robustness value close to 1 means the treatment effect can handle strong confounders explaining  almost all residual variation of the treatment and the outcome.
      Robustness value close to 0 means that even very weak confounders can also change the results.
  
      :param alpha: confidence interval (default = 1)
  
      :returns: robustness value
      """
  
      partial_cohen_f = abs(
          self.t_stats / np.sqrt(self.degree_of_freedom)
      )  # partial f of treatment t with outcome y. f = t_val/sqrt(dof)
      f_q = self.percent_change_estimate * partial_cohen_f
      t_alpha_df_1 = t.ppf(
          alpha / 2, self.degree_of_freedom - 1
      )  # t-value threshold with alpha significance level and dof-1 degrees of freedom
      f_critical = abs(t_alpha_df_1) / np.sqrt(
          self.degree_of_freedom - 1
      )
      f_adjusted = f_q - f_critical
  
      if f_adjusted < 0:
          r_value = 0
      else:
          r_value = 0.5 * (
              np.sqrt(f_adjusted**4 + (4 * f_adjusted**2))
              - f_adjusted**2
          )
  
      if f_adjusted > 0 and f_q > 1 / f_critical:
          r_value = (f_q**2 - f_critical**2) / (1 + f_q**2)
  
      return r_value
  
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 4 for calling the LinearSensitivityAnalyzer obj's underlying member method code with example usage: obj.robustness_value_func(alpha) and returns: r_value