コード例 #1
0
ファイル: test_unitroot.py プロジェクト: chengshaozhe/arch
 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
ファイル: test_unitroot.py プロジェクト: esvhd/arch
 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
ファイル: test_unitroot.py プロジェクト: chengshaozhe/arch
 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
ファイル: test_unitroot.py プロジェクト: syncoding/arch
 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
ファイル: test_unitroot.py プロジェクト: esvhd/arch
 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
ファイル: test_unitroot.py プロジェクト: syncoding/arch
 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
ファイル: test_unitroot.py プロジェクト: chengshaozhe/arch
 def test_pp_bad_type(self):
     pp = PhillipsPerron(self.inflation, lags=12)
     with pytest.raises(ValueError):
         pp.test_type = 'unknown'
コード例 #8
0
ファイル: test_unitroot.py プロジェクト: esvhd/arch
 def test_pp_bad_type(self):
     pp = PhillipsPerron(self.inflation, lags=12)
     with pytest.raises(ValueError):
         pp.test_type = 'unknown'