class_docstr: Class to perform Oaxaca-Blinder Decomposition.
  
  Parameters
  ----------
  endog : array_like
      The endogenous variable or the dependent variable that you are trying
      to explain.
  exog : array_like
      The exogenous variable(s) or the independent variable(s) that you are
      using to explain the endogenous variable.
  bifurcate : {int, str}
      The column of the exogenous variable(s) on which to split. This would
      generally be the group that you wish to explain the two means for.
      Int of the column for a NumPy array or int/string for the name of
      the column in Pandas.
  hasconst : bool, optional
      Indicates whether the two exogenous variables include a user-supplied
      constant. If True, a constant is assumed. If False, a constant is added
      at the start. If nothing is supplied, then True is assumed.
  swap : bool, optional
      Imitates the STATA Oaxaca command by allowing users to choose to swap
      groups. Unlike STATA, this is assumed to be True instead of False
  cov_type : str, optional
      See regression.linear_model.RegressionResults for a description of the
      available covariance estimators
  cov_kwds : dict, optional
      See linear_model.RegressionResults.get_robustcov_results for a
      description required keywords for alternative covariance estimators
  
  Notes
  -----
  Please check if your data includes at constant. This will still run, but
  will return incorrect values if set incorrectly.
  
  You can access the models by using their code as an attribute, e.g.,
  _t_model for the total model, _f_model for the first model, _s_model for
  the second model.
  
  Examples
  --------
  >>> import numpy as np
  >>> import statsmodels.api as sm
  >>> data = sm.datasets.ccards.load()
  
  '3' is the column of which we want to explain or which indicates
  the two groups. In this case, it is if you rent.
  
  >>> model = sm.OaxacaBlinder(df.endog, df.exog, 3, hasconst = False)
  >>> model.two_fold().summary()
  Oaxaca-Blinder Two-fold Effects
  Unexplained Effect: 27.94091
  Explained Effect: 130.80954
  Gap: 158.75044
  
  >>> model.three_fold().summary()
  Oaxaca-Blinder Three-fold Effects
  Endowments Effect: 321.74824
  Coefficient Effect: 75.45371
  Interaction Effect: -238.45151
  Gap: 158.75044
class_docstr_tok: ["Class","to","perform","Oaxaca-Blinder","Decomposition",".","Parameters","--","--","--","--","--","endog",":","array_like","The","endogenous","variable","or","the","dependent","variable","that","you","are","trying","to","explain",".","exog",":","array_like","The","exogenous","variable","(","s",")","or","the","independent","variable","(","s",")","that","you","are","using","to","explain","the","endogenous","variable",".","bifurcate",":","{","int",",","str","}","The","column","of","the","exogenous","variable","(","s",")","on","which","to","split",".","This","would","generally","be","the","group","that","you","wish","to","explain","the","two","means","for",".","Int","of","the","column","for","a","NumPy","array","or","int\/string","for","the","name","of","the","column","in","Pandas",".","hasconst",":","bool",",","optional","Indicates","whether","the","two","exogenous","variables","include","a","user-supplied","constant",".","If","True",",","a","constant","is","assumed",".","If","False",",","a","constant","is","added","at","the","start",".","If","nothing","is","supplied",",","then","True","is","assumed",".","swap",":","bool",",","optional","Imitates","the","STATA","Oaxaca","command","by","allowing","users","to","choose","to","swap","groups",".","Unlike","STATA",",","this","is","assumed","to","be","True","instead","of","False","cov_type",":","str",",","optional","See","regression.linear_model.RegressionResults","for","a","description","of","the","available","covariance","estimators","cov_kwds",":","dict",",","optional","See","linear_model.RegressionResults.get_robustcov_results","for","a","description","required","keywords","for","alternative","covariance","estimators","Notes","--","--","-","Please","check","if","your","data","includes","at","constant",".","This","will","still","run",",","but","will","return","incorrect","values","if","set","incorrectly",".","You","can","access","the","models","by","using","their","code","as","an","attribute",",","e.g.",",","_t_model","for","the","total","model",",","_f_model","for","the","first","model",",","_s_model","for","the","second","model",".","Examples","--","--","--","--",">",">",">","import","numpy","as","np",">",">",">","import","statsmodels.api","as","sm",">",">",">","data","=","sm.datasets.ccards.load","(",")","'","3","'","is","the","column","of","which","we","want","to","explain","or","which","indicates","the","two","groups",".","In","this","case",",","it","is","if","you","rent",".",">",">",">","model","=","sm.OaxacaBlinder","(","df.endog",",","df.exog",",","3",",","hasconst","=","False",")",">",">",">","model.two_fold","(",")",".summary","(",")","Oaxaca-Blinder","Two-fold","Effects","Unexplained","Effect",":","27.94091","Explained","Effect",":","130.80954","Gap",":","158.75044",">",">",">","model.three_fold","(",")",".summary","(",")","Oaxaca-Blinder","Three-fold","Effects","Endowments","Effect",":","321.74824","Coefficient","Effect",":","75.45371","Interaction","Effect",":","-238.45151","Gap",":","158.75044"]
docstr: Calculates the three-fold Oaxaca Blinder Decompositions
  
  Parameters
  ----------
  std: boolean, optional
      If true, bootstrapped standard errors will be calculated.
  n: int, optional
      A amount of iterations to calculate the bootstrapped
      standard errors. This defaults to 5000.
  conf: float, optional
      This is the confidence required for the standard error
      calculation. Defaults to .99, but could be anything less
      than or equal to one. One is heavy discouraged, due to the
      extreme outliers inflating the variance.
  
  Returns
  -------
  OaxacaResults
      A results container for the three-fold decomposition.
docstr_tok: ["Calculates","the","three-fold","Oaxaca","Blinder","Decompositions","Parameters","--","--","--","--","--","std",":","boolean",",","optional","If","true",",","bootstrapped","standard","errors","will","be","calculated",".","n",":","int",",","optional","A","amount","of","iterations","to","calculate","the","bootstrapped","standard","errors",".","This","defaults","to","5000.","conf",":","float",",","optional","This","is","the","confidence","required","for","the","standard","error","calculation",".","Defaults","to",".99",",","but","could","be","anything","less","than","or","equal","to","one",".","One","is","heavy","discouraged",",","due","to","the","extreme","outliers","inflating","the","variance",".","Returns","--","--","--","-","OaxacaResults","A","results","container","for","the","three-fold","decomposition","."]
code: def three_fold(self, std=False, n=None, conf=None):
      """
      Calculates the three-fold Oaxaca Blinder Decompositions
  
      Parameters
      ----------
      std: boolean, optional
          If true, bootstrapped standard errors will be calculated.
      n: int, optional
          A amount of iterations to calculate the bootstrapped
          standard errors. This defaults to 5000.
      conf: float, optional
          This is the confidence required for the standard error
          calculation. Defaults to .99, but could be anything less
          than or equal to one. One is heavy discouraged, due to the
          extreme outliers inflating the variance.
  
      Returns
      -------
      OaxacaResults
          A results container for the three-fold decomposition.
      """
      self.submitted_n = n
      self.submitted_conf = conf
      self.submitted_weight = None
      std_val = None
      self.endow_eff = (
          self.exog_f_mean - self.exog_s_mean
      ) @ self._s_model.params
      self.coef_eff = self.exog_s_mean @ (
          self._f_model.params - self._s_model.params
      )
      self.int_eff = (self.exog_f_mean - self.exog_s_mean) @ (
          self._f_model.params - self._s_model.params
      )
  
      if std is True:
          std_val = self.variance(3)
  
      return OaxacaResults(
          (self.endow_eff, self.coef_eff, self.int_eff, self.gap),
          3,
          std_val=std_val,
      )
  
file_path: statsmodels/statsmodels/stats/oaxaca.py
imports: from textwrap import dedent
  import numpy
  from statsmodels.regression.linear_model import OLS
  from statsmodels.tools.tools import add_constant
label_desc: Use image node_id 3 for calling the OaxacaBlinder obj's underlying member method code with example usage: obj.three_fold(std, n, conf) and returns: OaxacaResults