statsmodels.regression.linear_model.burg

statsmodels.regression.linear_model.burg(endog, order=1, demean=True)[source]

Compute Burg’s AP(p) parameter estimator.

Parameters:

endog : array_like

The endogenous variable.

order : int, optional

Order of the AR. Default is 1.

demean : bool, optional

Flag indicating to subtract the mean from endog before estimation.

Returns:

rho : ndarray

The AR(p) coefficients computed using Burg’s algorithm.

sigma2 : float

The estimate of the residual variance.

See also

yule_walker
Estimate AR parameters using the Yule-Walker method.

Notes

AR model estimated includes a constant that is estimated using the sample mean (see [R68]). This value is not reported.

References

[R68](1, 2) Brockwell, P.J. and Davis, R.A., 2016. Introduction to time series and forecasting. Springer.

Examples

>>> import statsmodels.api as sm
>>> from statsmodels.datasets.sunspots import load
>>> data = load(as_pandas=True)
>>> rho, sigma2 = sm.regression.linear_model.burg(data.endog, order=4)
>>> rho
array([ 1.30934186, -0.48086633, -0.20185982,  0.05501941])
>>> sigma2
271.2467306963966