tseries (version 0.1-2)

intgrt: Discrete Integrals

Description

Computes the inverse function of the lagged differences diff.

Missing values are not handled.

Usage

intgrt <- function (x, lag = 1, differences = 1,
                    xi = rep(0.0,lag*differences*dim(as.matrix(x))[2]))

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.

Value

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

Details

intgrt is a generic function with methods for "ts" and default for vector and matrix.

See Also

diff

Examples

Run this code
s <- 1:10
d <- diff(s)
intgrt(d,xi=1)

Run the code above in your browser using DataLab