class_docstr: Significance test for the categorical variables in a nonparametric
  regression.
  
  Parameters
  ----------
  model : Instance of KernelReg class
      This is the nonparametric regression model whose elements
      are tested for significance.
  test_vars : tuple, list of one element
      index of position of the discrete variable to be tested
      for significance. E.g. (3) tests variable at
      position 3 for significance.
  nboot : int
      Number of bootstrap samples used to determine the distribution
      of the test statistic in a finite sample. Default is 400
  
  Attributes
  ----------
  sig : str
      The significance level of the variable(s) tested
      "Not Significant": Not significant at the 90% confidence level
                          Fails to reject the null
      "*": Significant at the 90% confidence level
      "**": Significant at the 95% confidence level
      "***": Significant at the 99% confidence level
  
  Notes
  -----
  This class currently does not allow joint hypothesis.
  Only one variable can be tested at a time
  
  References
  ----------
  See [9] and chapter 12 in [1].
docstr: Calculates the significance level of the variable tested
code: def _compute_sig(self):
      """Calculates the significance level of the variable tested"""
  
      m = self._est_cond_mean()
      Y = self.endog
      X = self.exog
      n = np.shape(X)[0]
      u = Y - m
      u = u - np.mean(u)  # center
      fct1 = (1 - 5**0.5) / 2.0
      fct2 = (1 + 5**0.5) / 2.0
      u1 = fct1 * u
      u2 = fct2 * u
      r = fct2 / (5**0.5)
      I_dist = np.empty((self.nboot, 1))
      for j in range(self.nboot):
          u_boot = copy.deepcopy(u2)
  
          prob = np.random.uniform(0, 1, size=(n, 1))
          ind = prob < r
          u_boot[ind] = u1[ind]
          Y_boot = m + u_boot
          I_dist[j] = self._compute_test_stat(Y_boot, X)
  
      sig = "Not Significant"
      if self.test_stat > mquantiles(I_dist, 0.9):
          sig = "*"
      if self.test_stat > mquantiles(I_dist, 0.95):
          sig = "**"
      if self.test_stat > mquantiles(I_dist, 0.99):
          sig = "***"
  
      return sig
  
imports: import copy
  import numpy
  from scipy import optimize
  from scipy.stats.mstats import mquantiles
  from ._kernel_base import GenericKDE, EstimatorSettings, gpke, LeaveOneOut, _get_type_pos, _adjust_shape, _compute_min_std_IQR, kernel_func
label_desc: Use image node_id 2 for calling the TestRegCoefD obj's underlying member method code with example usage: obj._compute_sig() and returns: sig