[R] Partial whitening of time series?

Wensui Liu liuwensui at gmail.com
Mon Feb 26 19:14:35 CET 2007


andy,

if your model is Xt = 0.5 * Xt-1 + e, then it should have
Xt = 0.1 * Xt-1 + 0.4 * Xt-1 + e
(Xt - 0.1*Xt-1) = 0.4 * Xt-1 + e

so what you need to do is to substract part of lag from your series.
it is just my $0.02.

On 2/26/07, Andy Bunn <Andy.Bunn at wwu.edu> wrote:
> 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
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>


-- 
WenSui Liu
A lousy statistician who happens to know a little programming
(http://spaces.msn.com/statcompute/blog)



More information about the R-help mailing list