The pct() function returns a transformation of the provided time series using a Percentage Change transformation. pct.rev() reverses the transformation.
pct(x)pct.rev(p, xi, addinit =TRUE)
Arguments
x: A numeric vector or univariate time series of class ts.
p: A numeric vector or univariate time series of percentage changes. Possibly returned by pct().
xi: Initial value/observation of x (x[1]). First known non-transformed value used to recursively obtain the original series.
addinit: If TRUE, xi is included in the return.
Returns
A vector of length length(x)-1 containing the transformed values.
Details
The Percentage Change transformation is given approximately by