y = PhillipsPerron(default, trend='n', test_type='tau')
y.__str__()
Out[54]: ' Phillips-Perron Test (Z-tau) \n=====================================\nTest Statistic -1.951\nP-value 0.049\nLags 23\n-------------------------------------\n\nTrend: No Trend\nCritical Values: -2.57 (1%), -1.94 (5%), -1.62 (10%)\nNull Hypothesis: The process contains a unit root.\nAlternative Hypothesis: The process is weakly stationary.'
The rho version doesn't:
y = PhillipsPerron(default, trend='n', test_type='rho')
y.__str__()
Traceback (most recent call last):
File "<ipython-input-56-8cc462d9ab10>", line 1, in <module>
y.__str__()
File "C:\Users\u609587\AppData\Local\Continuum\anaconda3\lib\site-packages\arch\unitroot\unitroot.py", line 484, in __str__
return self.summary().__str__()
File "C:\Users\u609587\AppData\Local\Continuum\anaconda3\lib\site-packages\arch\unitroot\unitroot.py", line 570, in summary
("Test Statistic", "{0:0.3f}".format(self.stat)),
File "C:\Users\u609587\AppData\Local\Continuum\anaconda3\lib\site-packages\arch\unitroot\unitroot.py", line 554, in stat
self._compute_if_needed()
File "C:\Users\u609587\AppData\Local\Continuum\anaconda3\lib\site-packages\arch\unitroot\unitroot.py", line 517, in _compute_if_needed
self._compute_statistic()
File "C:\Users\u609587\AppData\Local\Continuum\anaconda3\lib\site-packages\arch\unitroot\unitroot.py", line 1171, in _compute_statistic
self._pvalue = mackinnonp(self._stat, regression=trend, dist_type=dist_type)
File "C:\Users\u609587\AppData\Local\Continuum\anaconda3\lib\site-packages\arch\unitroot\unitroot.py", line 1815, in mackinnonp
maxstat = adf_z_max[regression]
KeyError: 'n'
Here's an example setup that will reproduce it.
The tau version works:
The rho version doesn't: