class_docstr: Class to contain results from likelihood models.
  
  This is the class in which things like AIC, BIC, llf
  can be implemented as methods, not computed in, say,
  the fit method of OLSModel.
class_docstr_tok: ["Class","to","contain","results","from","likelihood","models",".","This","is","the","class","in","which","things","like","AIC",",","BIC",",","llf","can","be","implemented","as","methods",",","not","computed","in",",","say",",","the","fit","method","of","OLSModel","."]
docstr: Return the confidence interval of the specified theta estimates.
  
  Parameters
  ----------
  alpha : float, default=0.05
      The `alpha` level for the confidence interval.
      ie., `alpha` = .05 returns a 95% confidence interval.
  
  
  cols : tuple, optional
      `cols` specifies which confidence intervals to return.
  
  dispersion : None or scalar, optional
      Scale factor for the variance / covariance
      (see class docstring and ``vcov`` method docstring).
  
  Returns
  -------
  cis : ndarray
      `cis` is shape ``(len(cols), 2)`` where each row contains [lower,
      upper] for the given entry in `cols`
  
  Examples
  --------
  >>> from numpy.random import standard_normal as stan
  >>> from nilearn.glm import OLSModel
  >>> x = np.hstack((stan((30,1)),stan((30,1)),stan((30,1))))
  >>> beta=np.array([3.25, 1.5, 7.0])
  >>> y = np.dot(x,beta) + stan((30))
  >>> model = OLSModel(x).fit(y)
  >>> confidence_intervals = model.conf_int(cols=(1,2))
  
  Notes
  -----
  Confidence intervals are two-tailed.
  
  tails : string, optional
      Possible values: 'two' | 'upper' | 'lower'
docstr_tok: ["Return","the","confidence","interval","of","the","specified","theta","estimates",".","Parameters","--","--","--","--","--","alpha",":","float",",","default=0.05","The","`","alpha","`","level","for","the","confidence","interval",".","ie.",",","`","alpha","`","=",".05","returns","a","95","%","confidence","interval",".","cols",":","tuple",",","optional","`","cols","`","specifies","which","confidence","intervals","to","return",".","dispersion",":","None","or","scalar",",","optional","Scale","factor","for","the","variance","\/","covariance","(","see","class","docstring","and","``","vcov","``","method","docstring",")",".","Returns","--","--","--","-","cis",":","ndarray","`","cis","`","is","shape","``","(","len","(","cols",")",",","2",")","``","where","each","row","contains","[","lower",",","upper","]","for","the","given","entry","in","`","cols","`","Examples","--","--","--","--",">",">",">","from","numpy.random","import","standard_normal","as","stan",">",">",">","from","nilearn.glm","import","OLSModel",">",">",">","x","=","np.hstack","(","(","stan","(","(","30,1",")",")",",","stan","(","(","30,1",")",")",",","stan","(","(","30,1",")",")",")",")",">",">",">","beta=np.array","(","[","3.25",",","1.5",",","7.0","]",")",">",">",">","y","=","np.dot","(","x",",","beta",")","+","stan","(","(","30",")",")",">",">",">","model","=","OLSModel","(","x",")",".fit","(","y",")",">",">",">","confidence_intervals","=","model.conf_int","(","cols=","(","1,2",")",")","Notes","--","--","-","Confidence","intervals","are","two-tailed",".","tails",":","string",",","optional","Possible","values",":","'two","'","|","'upper","'","|","'lower","'"]
code: def conf_int(self, alpha=0.05, cols=None, dispersion=None):
      """Return the confidence interval of the specified theta estimates.
  
      Parameters
      ----------
      alpha : float, default=0.05
          The `alpha` level for the confidence interval.
          ie., `alpha` = .05 returns a 95% confidence interval.
  
  
      cols : tuple, optional
          `cols` specifies which confidence intervals to return.
  
      dispersion : None or scalar, optional
          Scale factor for the variance / covariance
          (see class docstring and ``vcov`` method docstring).
  
      Returns
      -------
      cis : ndarray
          `cis` is shape ``(len(cols), 2)`` where each row contains [lower,
          upper] for the given entry in `cols`
  
      Examples
      --------
      >>> from numpy.random import standard_normal as stan
      >>> from nilearn.glm import OLSModel
      >>> x = np.hstack((stan((30,1)),stan((30,1)),stan((30,1))))
      >>> beta=np.array([3.25, 1.5, 7.0])
      >>> y = np.dot(x,beta) + stan((30))
      >>> model = OLSModel(x).fit(y)
      >>> confidence_intervals = model.conf_int(cols=(1,2))
  
      Notes
      -----
      Confidence intervals are two-tailed.
  
      tails : string, optional
          Possible values: 'two' | 'upper' | 'lower'
  
      """
      if cols is None:
          lower = self.theta - inv_t_cdf(
              1 - alpha / 2, self.df_residuals
          ) * np.sqrt(np.diag(self.vcov(dispersion=dispersion)))
          upper = self.theta + inv_t_cdf(
              1 - alpha / 2, self.df_residuals
          ) * np.sqrt(np.diag(self.vcov(dispersion=dispersion)))
      else:
          lower, upper = [], []
          for i in cols:
              lower.append(
                  self.theta[i]
                  - inv_t_cdf(1 - alpha / 2, self.df_residuals)
                  * np.sqrt(self.vcov(column=i, dispersion=dispersion))
              )
              upper.append(
                  self.theta[i]
                  + inv_t_cdf(1 - alpha / 2, self.df_residuals)
                  * np.sqrt(self.vcov(column=i, dispersion=dispersion))
              )
      return np.asarray(list(zip(lower, upper)))
  
imports: import numpy
  from nibabel.onetime import auto_attr
  from scipy.linalg import inv
  from scipy.stats import t
  from nilearn.glm._utils import pad_contrast, positive_reciprocal
label_desc: Use image node_id 7 for calling the LikelihoodModelResults obj's underlying member method code with example usage: obj.conf_int(alpha, cols, dispersion) and returns: np