[SciPy-user] Estimating AR(1) model?

David Cournapeau david@ar.media.kyoto-u.ac...
Sat Dec 8 21:23:03 CST 2007


Webb Sprague wrote:
> Hi all,
>
> Is there a quick approach for estimating a simple AR(1) time series
> model from a vector of data points?  Currently I use lingregress on
> lagged data and roll my own standard error computations.  It would be
> great if someone smarter than I has done this already, especially if
> they use MLE or Yule-Walker.
>
>   
Using Yule-Walker (and something like Levinson Durbin to solve it) for 
AR(1) is kind of overkill. There is a function similar to lpc into my 
sandbox (cdavid: from scipy.sandbox.cdavid import lpc). This gives you 
the ar coefficients, the error, and the k coefficients (follows matlab 
lpc function).

cheers,

David


More information about the SciPy-user mailing list