@requires_statsmodels
def test_yule_walker():
 from statsmodels.regression.linear_model import yule_walker as sm_yw
 d = np.random.randn(100)
 (sm_rho, sm_sigma) = sm_yw(d, order=2)
 (rho, sigma) = _yule_walker(d[np.newaxis], order=2)
 assert_array_almost_equal(sm_sigma, sigma)
 assert_array_almost_equal(sm_rho, rho)

@ requires_statsmodels def test_yule_walker ( ) : from statsmodels . regression . linear_model import yule_walker as sm_yw d = np . random . randn ( 100 ) ( sm_rho , sm_sigma ) = sm_yw ( d , order = 2 ) ( rho , sigma ) = _yule_walker ( d [ np . newaxis ] , order = 2 ) assert_array_almost_equal ( sm_sigma , sigma ) assert_array_almost_equal ( sm_rho , rho )
test yule-walker against statsmodels .