>>>>> "Matthias" == Matthias Budinger <budinger at
amadeus.statistik.uni-dortmund.de>
>>>>> on Thu, 14 Aug 2003 19:01:50 +0200 (MET DST) writes:
Matthias> Hi
Matthias> given an ARMA process and the AR and MA coefficients I need the
residuals.
Matthias> arima() calculates the residuals together with the best AR and
MA
Matthias> coefficients, but I need the coefficients to take known values.
Matthias> In S-PLUS there is a function arima.filt(). Is there something
similar in
Matthias> R?
Similar, yes: arima.sim() with 0-innovations should do it.
If you look at arima.sim's source code, you see that apart from
argument checking and random generation of the innovations,
it's basically just two calls to filter(), one normal
(method = "convolution") for the MA part and one "recursive"
for
the AR part.
In short: You should be able to write quite a short arima.filt()
function, using the same two calls to filter() that arima.sim()
does.
At the end you could check your arima.filt() is compatible to
S-plus' one and donate it to the R project...
Regards,
Martin Maechler <maechler at stat.math.ethz.ch>
http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum LEO C16 Leonhardstr. 27
ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND
phone: x-41-1-632-3408 fax: ...-1228 <><