class_docstr: Results class for pairwise comparisons, based on p-values
  
  Parameters
  ----------
  pvals_raw : array_like, 1-D
      p-values from a pairwise comparison test
  all_pairs : list of tuples
      list of indices, one pair for each comparison
  multitest_method : str
      method that is used by default for p-value correction. This is used
      as default by the methods like if the multiple-testing method is not
      specified as argument.
  levels : {list[str], None}
      optional names of the levels or groups
  n_levels : None or int
      If None, then the number of levels or groups is inferred from the
      other arguments. It can be explicitly specified, if the inferred
      number is incorrect.
  
  Notes
  -----
  This class can also be used for other pairwise comparisons, for example
  comparing several treatments to a control (as in Dunnet's test).
docstr: create a (n_levels, n_levels) array with corrected p_values
  
  this needs to improve, similar to R pairwise output
docstr_tok: ["create","a","(","n_levels",",","n_levels",")","array","with","corrected","p_values","this","needs","to","improve",",","similar","to","R","pairwise","output"]
code: def pval_table(self):
      """create a (n_levels, n_levels) array with corrected p_values
  
      this needs to improve, similar to R pairwise output
      """
      k = self.n_levels
      pvals_mat = np.zeros((k, k))
      # if we do not assume we have all pairs
      pvals_mat[lzip(*self.all_pairs)] = self.pval_corrected()
      return pvals_mat
  
file_path: statsmodels/statsmodels/stats/base.py
imports: from statsmodels.compat.python import lzip
  import numpy
  from statsmodels.tools.testing import Holder
label_desc: Use image node_id 4 for calling the AllPairsResults obj's underlying member method code with example usage: obj.pval_table() and returns: pvals_mat