Discrete Integrals: Inverse of Differencing

Usage

diffinv(x, lag = 1, differences = 1,
    xi = rep(0.0, lag*differences*NCOL(x)))

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.

Description

Computes the inverse function of the lagged differences diff.

Missing values are not handled.

Details

diffinv is a generic function with methods for class "ts" and default for vectors and matrices.

Value

A numeric vector, matrix, or time series representing the discrete integral of x.

Author(s)

A. Trapletti

See Also

diff

Examples

s <- 1:10
d <- diff(s)
diffinv(d,xi=1)


[Package Contents]