Re: [Numpy-discussion] simulate AR

2011-10-14 Thread josef . pktd
On Fri, Oct 14, 2011 at 2:59 PM, wrote: > On Fri, Oct 14, 2011 at 2:29 PM,   wrote: >> On Fri, Oct 14, 2011 at 2:18 PM, Alan G Isaac wrote: >>> On 10/14/2011 1:42 PM, josef.p...@gmail.com wrote: If I remember correctly, signal.lfilter doesn't require stationarity, but handling of the s

Re: [Numpy-discussion] simulate AR

2011-10-14 Thread josef . pktd
On Fri, Oct 14, 2011 at 2:29 PM, wrote: > On Fri, Oct 14, 2011 at 2:18 PM, Alan G Isaac wrote: >> On 10/14/2011 1:42 PM, josef.p...@gmail.com wrote: >>> If I remember correctly, signal.lfilter doesn't require stationarity, >>> but handling of the starting values is a bit difficult. >> >> >> Hmm.

Re: [Numpy-discussion] simulate AR

2011-10-14 Thread josef . pktd
On Fri, Oct 14, 2011 at 2:39 PM, Skipper Seabold wrote: > On Fri, Oct 14, 2011 at 2:18 PM, Alan G Isaac wrote: >> >> On 10/14/2011 1:42 PM, josef.p...@gmail.com wrote: >> > If I remember correctly, signal.lfilter doesn't require stationarity, >> > but handling of the starting values is a bit diff

Re: [Numpy-discussion] simulate AR

2011-10-14 Thread Skipper Seabold
On Fri, Oct 14, 2011 at 2:18 PM, Alan G Isaac wrote: > > On 10/14/2011 1:42 PM, josef.p...@gmail.com wrote: > > If I remember correctly, signal.lfilter doesn't require stationarity, > > but handling of the starting values is a bit difficult. > > > Hmm.  Yes. > AR(1) is trivial, but how do you hand

Re: [Numpy-discussion] simulate AR

2011-10-14 Thread josef . pktd
On Fri, Oct 14, 2011 at 2:18 PM, Alan G Isaac wrote: > On 10/14/2011 1:42 PM, josef.p...@gmail.com wrote: >> If I remember correctly, signal.lfilter doesn't require stationarity, >> but handling of the starting values is a bit difficult. > > > Hmm.  Yes. > AR(1) is trivial, but how do you handle h

Re: [Numpy-discussion] simulate AR

2011-10-14 Thread Alan G Isaac
On 10/14/2011 1:42 PM, josef.p...@gmail.com wrote: > If I remember correctly, signal.lfilter doesn't require stationarity, > but handling of the starting values is a bit difficult. Hmm. Yes. AR(1) is trivial, but how do you handle higher orders? Thanks, Alan ___

Re: [Numpy-discussion] simulate AR

2011-10-14 Thread josef . pktd
On Fri, Oct 14, 2011 at 1:26 PM, Alan G Isaac wrote: >>> Assuming stationarity ... > > On 10/14/2011 1:22 PM, josef.p...@gmail.com wrote: >> maybe ? > > I just meant that the MA approximation is > not reliable for a non-stationary AR. > E.g., http://www.jstor.org/stable/2348631 section 5: simulat

Re: [Numpy-discussion] simulate AR

2011-10-14 Thread Alan G Isaac
>> Assuming stationarity ... On 10/14/2011 1:22 PM, josef.p...@gmail.com wrote: > maybe ? I just meant that the MA approximation is not reliable for a non-stationary AR. E.g., http://www.jstor.org/stable/2348631 Cheers, Alan ___ NumPy-Discussion maili

Re: [Numpy-discussion] simulate AR

2011-10-14 Thread josef . pktd
On Fri, Oct 14, 2011 at 12:49 PM, Alan G Isaac wrote: > On 10/14/2011 12:21 PM, josef.p...@gmail.com wrote: >> One other way to simulate the AR is to get the (truncated) >> MA-representation, and then convolve can be used > > > Assuming stationarity ... maybe ? If it's integrated, then you need a

Re: [Numpy-discussion] simulate AR

2011-10-14 Thread Alan G Isaac
On 10/14/2011 12:21 PM, josef.p...@gmail.com wrote: > One other way to simulate the AR is to get the (truncated) > MA-representation, and then convolve can be used Assuming stationarity ... Alan ___ NumPy-Discussion mailing list NumPy-Discussion@scipy

Re: [Numpy-discussion] simulate AR

2011-10-14 Thread josef . pktd
On Fri, Oct 14, 2011 at 11:56 AM, Fabrice Silva wrote: > Le vendredi 14 octobre 2011 à 10:49 -0400, josef.p...@gmail.com a > écrit : >> On Fri, Oct 14, 2011 at 10:24 AM, Alan G Isaac wrote: >> > As a simple example, if I have y0 and a white noise series e, >> > what is the best way to produces a

Re: [Numpy-discussion] simulate AR

2011-10-14 Thread Fabrice Silva
Le vendredi 14 octobre 2011 à 10:49 -0400, josef.p...@gmail.com a écrit : > On Fri, Oct 14, 2011 at 10:24 AM, Alan G Isaac wrote: > > As a simple example, if I have y0 and a white noise series e, > > what is the best way to produces a series y such that y[t] = 0.9*y[t-1] + > > e[t] > > for t=1,2,

Re: [Numpy-discussion] simulate AR

2011-10-14 Thread josef . pktd
On Fri, Oct 14, 2011 at 10:24 AM, Alan G Isaac wrote: > As a simple example, if I have y0 and a white noise series e, > what is the best way to produces a series y such that y[t] = 0.9*y[t-1] + e[t] > for t=1,2,...? > > 1. How can I best simulate an autoregressive process using NumPy? > > 2. With

[Numpy-discussion] simulate AR

2011-10-14 Thread Alan G Isaac
As a simple example, if I have y0 and a white noise series e, what is the best way to produces a series y such that y[t] = 0.9*y[t-1] + e[t] for t=1,2,...? 1. How can I best simulate an autoregressive process using NumPy? 2. With SciPy, it looks like I could do this as e[0] = y0 signal.lfilter((1