code: def test_brockwell_davis_example_511():
      # Note: this example is primarily tested in
      # test_yule_walker::test_brockwell_davis_example_511.
  
      # Difference the series
      endog = dowj.diff().iloc[1:]
  
      # Durbin-Levinson
      dl, _ = durbin_levinson(endog, ar_order=2, demean=True)
  
      assert_allclose(dl[0].params, np.var(endog))
      assert_allclose(dl[1].params, [0.4219, 0.1479], atol=1e-4)
      assert_allclose(dl[2].params, [0.3739, 0.1138, 0.1460], atol=1e-4)
  
file_path: statsmodels/statsmodels/tsa/arima/estimators/tests/test_durbin_levinson.py
imports: import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_raises
  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.durbin_levinson import durbin_levinson
label_desc: Use image node_id 1 for calling a global function with example usage: test_brockwell_davis_example_511() without return types