class_docstr: A Results class for empirical likelihood regression through the origin.
  
  Parameters
  ----------
  model : class
      An OLS model with an intercept.
  
  params : 1darray
      Fitted parameters.
  
  est_llr : float
      The log likelihood ratio of the model with the intercept restricted to
      0 at the maximum likelihood estimates of the parameters.
      llr_restricted/llr_unrestricted
  
  llf_el : float
      The log likelihood of the fitted model with the intercept restricted to 0.
  
  Attributes
  ----------
  model : class
      An OLS model with an intercept.
  
  params : 1darray
      Fitted parameter.
  
  llr : float
      The log likelihood ratio of the maximum empirical likelihood estimate.
  
  llf_el : float
      The log likelihood of the fitted model with the intercept restricted to 0.
  
  Notes
  -----
  IMPORTANT.  Since EL estimation does not drop the intercept parameter but
  instead estimates the slope parameters conditional on the slope parameter
  being 0, the first element for params will be the intercept, which is
  restricted to 0.
  
  IMPORTANT.  This class inherits from RegressionResults but inference is
  conducted via empirical likelihood.  Therefore, any methods that
  require an estimate of the covariance matrix will not function.  Instead
  use el_test and conf_int_el to conduct inference.
  
  Examples
  --------
  >>> import statsmodels.api as sm
  >>> data = sm.datasets.bc.load()
  >>> model = sm.emplike.ELOriginRegress(data.endog, data.exog)
  >>> fitted = model.fit()
  >>> fitted.params #  0 is the intercept term.
  array([ 0.        ,  0.00351813])
  
  >>> fitted.el_test(np.array([.0034]), np.array([1]))
  (3.6696503297979302, 0.055411808127497755)
  >>> fitted.conf_int_el(1)
  (0.0033971871114706867, 0.0036373150174892847)
  
  # No covariance matrix so normal inference is not valid
  >>> fitted.conf_int()
  TypeError: unsupported operand type(s) for *: 'instancemethod' and 'float'
docstr: Returns the confidence interval for a regression parameter when the
  regression is forced through the origin.
  
  Parameters
  ----------
  param_num : int
      The parameter number to be tested.  Note this uses python
      indexing but the '0' parameter refers to the intercept term.
  upper_bound : float
      The maximum value the upper confidence limit can be.  The
      closer this is to the confidence limit, the quicker the
      computation.  Default is .00001 confidence limit under normality.
  lower_bound : float
      The minimum value the lower confidence limit can be.
      Default is .00001 confidence limit under normality.
  sig : float, optional
      The significance level.  Default .05.
  method : str, optional
       Algorithm to optimize of nuisance params.  Can be 'nm' or
      'powell'.  Default is 'nm'.
  stochastic_exog : bool
      Default is True.
  
  Returns
  -------
  ci: tuple
      The confidence interval for the parameter 'param_num'.
docstr_tok: ["Returns","the","confidence","interval","for","a","regression","parameter","when","the","regression","is","forced","through","the","origin",".","Parameters","--","--","--","--","--","param_num",":","int","The","parameter","number","to","be","tested",".","Note","this","uses","python","indexing","but","the","'","0","'","parameter","refers","to","the","intercept","term",".","upper_bound",":","float","The","maximum","value","the","upper","confidence","limit","can","be",".","The","closer","this","is","to","the","confidence","limit",",","the","quicker","the","computation",".","Default","is",".00001","confidence","limit","under","normality",".","lower_bound",":","float","The","minimum","value","the","lower","confidence","limit","can","be",".","Default","is",".00001","confidence","limit","under","normality",".","sig",":","float",",","optional","The","significance","level",".","Default",".05.","method",":","str",",","optional","Algorithm","to","optimize","of","nuisance","params",".","Can","be","'nm","'","or","'powell","'",".","Default","is","'nm","'",".","stochastic_exog",":","bool","Default","is","True",".","Returns","--","--","--","-","ci",":","tuple","The","confidence","interval","for","the","parameter","'param_num","'","."]
code: def conf_int_el(
      self,
      param_num,
      upper_bound=None,
      lower_bound=None,
      sig=0.05,
      method="nm",
      stochastic_exog=True,
  ):
      """
      Returns the confidence interval for a regression parameter when the
      regression is forced through the origin.
  
      Parameters
      ----------
      param_num : int
          The parameter number to be tested.  Note this uses python
          indexing but the '0' parameter refers to the intercept term.
      upper_bound : float
          The maximum value the upper confidence limit can be.  The
          closer this is to the confidence limit, the quicker the
          computation.  Default is .00001 confidence limit under normality.
      lower_bound : float
          The minimum value the lower confidence limit can be.
          Default is .00001 confidence limit under normality.
      sig : float, optional
          The significance level.  Default .05.
      method : str, optional
           Algorithm to optimize of nuisance params.  Can be 'nm' or
          'powell'.  Default is 'nm'.
      stochastic_exog : bool
          Default is True.
  
      Returns
      -------
      ci: tuple
          The confidence interval for the parameter 'param_num'.
      """
      r0 = chi2.ppf(1 - sig, 1)
      param_num = np.array([param_num])
      if upper_bound is None:
          ci = np.asarray(self.model.fit().conf_int(0.0001))
          upper_bound = np.squeeze(ci[param_num])[1]
      if lower_bound is None:
          ci = np.asarray(self.model.fit().conf_int(0.0001))
          lower_bound = np.squeeze(ci[param_num])[0]
  
      def f(b0):
          b0 = np.array([b0])
          val = self.el_test(
              b0,
              param_num,
              method=method,
              stochastic_exog=stochastic_exog,
          )
          return val[0] - r0
  
      _param = np.squeeze(self.params[param_num])
      lowerl = optimize.brentq(f, np.squeeze(lower_bound), _param)
      upperl = optimize.brentq(f, _param, np.squeeze(upper_bound))
      return (lowerl, upperl)
  
file_path: statsmodels/statsmodels/emplike/originregress.py
imports: import numpy
  from scipy import optimize
  from scipy.stats import chi2
  from statsmodels.regression.linear_model import OLS, RegressionResults
  from statsmodels.tools.tools import add_constant
label_desc: Use image node_id 3 for calling the OriginResults obj's underlying member method code with example usage: obj.conf_int_el(param_num, upper_bound, lower_bound, sig, method, stochastic_exog) and returns: lowerl,  upperl, unknown