Пример #1
0
 def test_pp(self):
     pp = PhillipsPerron(self.inflation, lags=12)
     assert_almost_equal(pp.stat, -7.8076512, DECIMAL_4)
     assert pp.test_type == 'tau'
     pp.test_type = 'rho'
     assert_almost_equal(pp.stat, -108.1552688, DECIMAL_2)
     pp.summary()
Пример #2
0
 def test_pp(self):
     pp = PhillipsPerron(self.inflation, lags=12)
     assert_almost_equal(pp.stat, -7.8076512, DECIMAL_4)
     assert pp.test_type == 'tau'
     pp.test_type = 'rho'
     assert_almost_equal(pp.stat, -108.1552688, DECIMAL_2)
     pp.summary()
Пример #3
0
 def test_pp_auto(self):
     pp = PhillipsPerron(self.inflation)
     n = self.inflation.shape[0] - 1
     lags = ceil(12.0 * ((n / 100.0) ** (1.0 / 4.0)))
     assert_equal(pp.lags, lags)
     assert_almost_equal(pp.stat, -8.135547778, DECIMAL_4)
     pp.test_type = 'rho'
     assert_almost_equal(pp.stat, -118.7746451, DECIMAL_2)
Пример #4
0
 def test_pp(self):
     pp = PhillipsPerron(self.inflation, lags=12)
     assert_almost_equal(pp.stat, -7.8076512, DECIMAL_4)
     assert pp.test_type == "tau"
     with pytest.warns(FutureWarning, match="Mutating unit root"):
         pp.test_type = "rho"
     assert_almost_equal(pp.stat, -108.1552688, DECIMAL_2)
     pp.summary()
Пример #5
0
 def test_pp_auto(self):
     pp = PhillipsPerron(self.inflation)
     n = self.inflation.shape[0] - 1
     lags = ceil(12.0 * ((n / 100.0) ** (1.0 / 4.0)))
     assert_equal(pp.lags, lags)
     assert_almost_equal(pp.stat, -8.135547778, DECIMAL_4)
     pp.test_type = 'rho'
     assert_almost_equal(pp.stat, -118.7746451, DECIMAL_2)
Пример #6
0
 def test_pp_auto(self):
     pp = PhillipsPerron(self.inflation)
     n = self.inflation.shape[0] - 1
     lags = ceil(12.0 * ((n / 100.0)**(1.0 / 4.0)))
     assert_equal(pp.lags, lags)
     assert_almost_equal(pp.stat, -8.135547778, DECIMAL_4)
     with pytest.warns(FutureWarning, match="Mutating unit root"):
         pp.test_type = "rho"
     assert_almost_equal(pp.stat, -118.7746451, DECIMAL_2)
Пример #7
0
 def test_pp_bad_type(self):
     pp = PhillipsPerron(self.inflation, lags=12)
     with pytest.raises(ValueError):
         pp.test_type = 'unknown'
Пример #8
0
 def test_pp_bad_type(self):
     pp = PhillipsPerron(self.inflation, lags=12)
     with pytest.raises(ValueError):
         pp.test_type = 'unknown'