Re: [R] prewhiten

From: Achim Zeileis <Achim.Zeileis_at_uibk.ac.at>
Date: Mon, 07 Jun 2010 13:37:02 +0200 (CEST)

On Mon, 7 Jun 2010, nuncio m wrote:

> HI all.,
> I have some univariate time series that need to be prewhitened. HOw this can
> be performed in R.

That depends on what exactly you want to do for prewhtening. For example, if you want to prewhiten using an AR(1) model, you could apply ar() and then extract the residuals:

   ar(x, order.max = 1, aic = FALSE, method = ..., demean = ...)$resid and set the remaining arguments based on your preferences/needs. This can also be used for multivariate series.

> I am thinking of to fit an ARIMA model and substract this from the original
> series.

Then you could use the residuals from arima()...

Best,
Z

> Is this the correct way
> THanks in advance
> nuncio
>
> --
> Nuncio.M
> Research Scientist
> National Center for Antarctic and Ocean research
> Head land Sada
> Vasco da Gamma
> Goa-403804
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org 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.
>



R-help_at_r-project.org 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. Received on Mon 07 Jun 2010 - 11:39:55 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 07 Jun 2010 - 11:40:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive