Re: [Numpy-discussion] Time series: lag function

2006-12-27 Thread Vincent Nijs
Sven: I simplified the function to create lags only along axis 0 (see attached). I am using c_ now which seems to play nice with 1- and 2-d array's. The reason I am using 'n = ravel(n)' in the code is that I want to be able to pass integers as well as lists. For example, I want each of the follow

Re: [Numpy-discussion] Time series: lag function

2006-12-27 Thread Sven Schreiber
Vincent Nijs schrieb: > I am tryin to convert some of my time-series code written in Ox to > scipy/numpy (e.g., unit root tests, IRFs, cointegration, etc). Two key > functions I need for this are 'lag' and 'diff'. 'diff' is available but > 'lag' is apparently not. > > Below is my attempt at a lag

[Numpy-discussion] Time series: lag function

2006-12-25 Thread Vincent Nijs
I am tryin to convert some of my time-series code written in Ox to scipy/numpy (e.g., unit root tests, IRFs, cointegration, etc). Two key functions I need for this are 'lag' and 'diff'. 'diff' is available but 'lag' is apparently not. Below is my attempt at a lag function. I tried to be somewhat