Example #1
0
 def slope_pval(self, compare_to=0):
     """
     Test if the slope is different from some value (by default, zero)
     """
     tb0 = np.abs((compare_to - self.slope) / self.slope_std)
     one_tailed_p = r.pt(
             tb0, self.summary.rx2('df')[1], lower_tail=False)[0]
     two_tailed_p = one_tailed_p * 2
     if compare_to == 0:
         assert two_tailed_p == self._slope_p
     return two_tailed_p
Example #2
0
 def intercept_pval(self, compare_to=0):
     """
     Test if the intercept is different from some value (by default, zero)
     """
     tb1 = np.abs((compare_to - self.intercept) / self.intercept_std)
     one_tailed_p = r.pt(
             tb1, self.summary.rx2('df')[1], lower_tail=False)[0]
     two_tailed_p = one_tailed_p * 2
     if compare_to == 0:
         assert two_tailed_p == self._intercept_p
     return two_tailed_p