[R] reconstructing original series based on differenced data

Berend Hasselman bhh at xs4all.nl
Thu May 16 12:07:33 CEST 2013


On 16-05-2013, at 11:52, Preetam Pal <lordpreetam at gmail.com> wrote:

> Hi all,
> 
> I have a time series X_t which has been differenced thrice to get Y_t.
> I know these y values only and nothing else.
> Is there a function in R which can be used to lead back to the original
> X_t's?

Brute force searching in Google for "inverse differences R" found http://stat.ethz.ch/R-manual/R-patched/library/stats/html/diffinv.html.

In R do

?diffinv

which can also be found indirectly by going to the help page of diff (link under See Also).

Berend



More information about the R-help mailing list