def test_ld(self): pacfyw = pacf_yw(self.x, nlags=40, method="mle") pacfld = pacf(self.x, nlags=40, method="ldb") assert_almost_equal(pacfyw, pacfld, DECIMAL_8) pacfyw = pacf(self.x, nlags=40, method="yw") pacfld = pacf(self.x, nlags=40, method="ldu") assert_almost_equal(pacfyw, pacfld, DECIMAL_8)
def test_yw(self): pacfyw = pacf_yw(self.x, nlags=40, method="mle") assert_almost_equal(pacfyw[1:], self.pacfyw, DECIMAL_8)
def test_pacf_yw(): pacfyw = tsa.pacf_yw(x100, 20, method='mle') assert_array_almost_equal(mlpacf.pacf100.ravel(), pacfyw, 1) pacfyw = tsa.pacf_yw(x1000, 20, method='mle') assert_array_almost_equal(mlpacf.pacf1000.ravel(), pacfyw, 2)