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: Compute a Tcontrast for a row vector `matrix`.
  
  To get the t-statistic for a single column, use the 't' method.
  
  Parameters
  ----------
  matrix : 1D array-like
      Contrast matrix.
  
  store : sequence, default=('t', 'effect', 'sd')
      Components of t to store in results output object.
  
  dispersion : None or float, optional
  
  Returns
  -------
  res : ``TContrastResults`` object
docstr_tok: ["Compute","a","Tcontrast","for","a","row","vector","`","matrix","`",".","To","get","the","t-statistic","for","a","single","column",",","use","the","'t","'","method",".","Parameters","--","--","--","--","--","matrix",":","1D","array-like","Contrast","matrix",".","store",":","sequence",",","default=","(","'t","'",",","'effect","'",",","'sd","'",")","Components","of","t","to","store","in","results","output","object",".","dispersion",":","None","or","float",",","optional","Returns","--","--","--","-","res",":","``","TContrastResults","``","object"]
code: def Tcontrast(
      self, matrix, store=("t", "effect", "sd"), dispersion=None
  ):
      """Compute a Tcontrast for a row vector `matrix`.
  
      To get the t-statistic for a single column, use the 't' method.
  
      Parameters
      ----------
      matrix : 1D array-like
          Contrast matrix.
  
      store : sequence, default=('t', 'effect', 'sd')
          Components of t to store in results output object.
  
      dispersion : None or float, optional
  
      Returns
      -------
      res : ``TContrastResults`` object
  
      """
      matrix = np.asarray(matrix)
      # 1D vectors assumed to be row vector
      if matrix.ndim == 1:
          matrix = matrix[None]
      if matrix.size == 0:
          raise ValueError(
              "t contrasts cannot be empty: " f"got {matrix}"
          )
      if matrix.shape[0] != 1:
          raise ValueError(
              "t contrasts should have only one row: " f"got {matrix}."
          )
      matrix = pad_contrast(
          con_val=matrix, theta=self.theta, stat_type="t"
      )
      store = set(store)
      if not store.issubset(("t", "effect", "sd")):
          raise ValueError(f"Unexpected store request in {store}")
      st_t = st_effect = st_sd = effect = sd = None
      if "t" in store or "effect" in store:
          effect = np.dot(matrix, self.theta)
      if "effect" in store:
          st_effect = np.squeeze(effect)
      if "t" in store or "sd" in store:
          sd = np.sqrt(self.vcov(matrix=matrix, dispersion=dispersion))
      if "sd" in store:
          st_sd = np.squeeze(sd)
      if "t" in store:
          st_t = np.squeeze(effect * positive_reciprocal(sd))
      return TContrastResults(
          effect=st_effect, t=st_t, sd=st_sd, df_den=self.df_residuals
      )
  
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 5 for calling the LikelihoodModelResults obj's underlying member method code with example usage: obj.Tcontrast(matrix, store, dispersion) and returns: TContrastResults