code: def test_brockwell_davis_example_511():
      # Make the series stationary
      endog = dowj.diff().iloc[1:]
  
      # Should have 77 observations
      assert_equal(len(endog), 77)
  
      # Autocovariances
      desired = [0.17992, 0.07590, 0.04885]
      assert_allclose(
          acovf(endog, fft=True, nlag=2), desired, atol=1e-5
      )
  
      # Yule-Walker
      yw, _ = yule_walker(endog, ar_order=1, demean=True)
      assert_allclose(yw.ar_params, [0.4219], atol=1e-4)
      assert_allclose(yw.sigma2, 0.1479, atol=1e-4)
  
file_path: statsmodels/statsmodels/tsa/arima/estimators/tests/test_yule_walker.py
imports: import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_equal, assert_raises
  from statsmodels.tsa.stattools import acovf
  from statsmodels.tsa.innovations.arma_innovations import arma_innovations
  from statsmodels.tsa.arima.datasets.brockwell_davis_2002 import dowj, lake
  from statsmodels.tsa.arima.estimators.yule_walker import yule_walker
label_desc: Use image node_id 1 for calling a global function with example usage: test_brockwell_davis_example_511() without return types