Dear all, I am new to R. I need to implement an ARMA filter, some thing like: y(n) = a0*x(n) + a1*x(n-1) + b1*y(n-1) + b2*y(n-2) I checked out the filter manual page. It doesn't seem that the filter function can do this job for me. Can any one help me out? Thanks a lot! Best regards, Jingzhao
On Sun, 8 May 2005, Jingzhao Ou wrote:> I am new to R. I need to implement an ARMA filter, some thing like: > > y(n) = a0*x(n) + a1*x(n-1) + b1*y(n-1) + b2*y(n-2) > > I checked out the filter manual page. It doesn't seem that the filter function > can do this job for me. Can any one help me out?You can help yourself by reading that page more closely. Check the code for arima.sim, which uses filter for exactly this purpose. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Dear Prof. Ripley, Thanks a lot for your reply. I just made it work after checking out arima.sim. I am switching from MATLAB to R recently and am working hard to overcome the learning curve at this time. The filter command in MATLAB is different from that in R, which caused some confusion to me. :-) Wish you have a nice day! Best regards, Jingzhao --- Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:> You can help yourself by reading that page more closely. > > Check the code for arima.sim, which uses filter for exactly this purpose. > > -- > Brian D. Ripley, ripley at stats.ox.ac.uk > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 >