Descaler {dsa} | R Documentation |
Invert taking logs and differences of a time series
Description
For a series that has been logged and/or differenced, this function reverses these transformations.
Usage
Descaler(x, y = NA, Diff = 0, Sdiff = 0, Log = FALSE, Lag = NA)
Arguments
x |
time series |
y |
time series used as benchmark |
Diff |
number of differences to be taken |
Sdiff |
number of seasonal differences to be taken |
Log |
Should time series be logarithmised |
Lag |
Lag for Sdiff can be specified |
Details
The time series used as a benchmark (y) is necessary, if regular or seasonal differences have to be inversed, because the first values of this series are used to reconstruct the original values or benchmark the new series.
Author(s)
Daniel Ollech
Examples
a = ts(rnorm(100, 100, 10), start=c(2015,1), frequency=12)
b = Scaler(a, Diff=1, Log=TRUE)
Descaler(b,a, Diff=1, Log=TRUE)
[Package dsa version 1.0.12 Index]