# statsmodels.regression.linear_model.yule_walker¶

statsmodels.regression.linear_model.yule_walker(X, order=1, method='unbiased', df=None, inv=False, demean=True)[source]

Estimate AR(p) parameters from a sequence X using Yule-Walker equation.

Unbiased or maximum-likelihood estimator (mle)

See, for example:

http://en.wikipedia.org/wiki/Autoregressive_moving_average_model

Parameters
Xarray-like

1d array

orderinteger, optional

The order of the autoregressive process. Default is 1.

methodstring, optional

Method can be ‘unbiased’ or ‘mle’ and this determines denominator in estimate of autocorrelation function (ACF) at lag k. If ‘mle’, the denominator is n=X.shape[0], if ‘unbiased’ the denominator is n-k. The default is unbiased.

dfinteger, optional

Specifies the degrees of freedom. If df is supplied, then it is assumed the X has df degrees of freedom rather than n. Default is None.

invbool

If inv is True the inverse of R is also returned. Default is False.

demeanbool

True, the mean is subtracted from X before estimation.

Returns
rho

The autoregressive coefficients

sigma

TODO

Examples

>>> import statsmodels.api as sm

>>> rho