[R] Partial whitening of time series?

Andy Bunn Andy.Bunn at wwu.edu
Mon Feb 26 18:29:39 CET 2007


I have a time series with a one year lag, ar=0.5. The series has some
interesting events that disappear when the series is whitened (i.e.,
fitting an AR process and looking at the residuals). I'd like to remove
the autocorrelation in stages to see the effect on the time series. Is
there a way to specify the autocorrelation term while fitting an AR
process? 

For instance, given the following:

x <- arima.sim(model = list(order = c(1,0,0), ar = 0.5), n = 500,
sd=0.25)

Can I filter x in a way that the autocorrelation at lag one is 0.4, then
0.3, 0.2, 0.1, until I get to a clean series equivalent to:

y <- arima(x, order = c(1,0,0))$resid

Thanks in advance, 
Andy



More information about the R-help mailing list