diffinv: Discrete Integration: Inverse of Differencing
Description
Computes the inverse function of the lagged differences function
diff.
Usage
diffinv(x, ...)
## S3 method for class 'default':
diffinv(x, lag = 1, differences = 1, xi, \dots)
## S3 method for class 'ts':
diffinv(x, lag = 1, differences = 1, xi, \dots)
Arguments
x
a numeric vector, matrix, or time series.
lag
a scalar lag parameter.
differences
an integer representing the order of the
difference.
xi
a numeric vector, matrix, or time series containing the
initial values for the integrals. If missing, zeros are used.
...
arguments passed to or from other methods.
Value
A numeric vector, matrix, or time series (the latter for the
"ts" method) representing the discrete integral of x.
Details
diffinv is a generic function with methods for class "ts"
and default for vectors and matrices.