Rev 15458 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{diffinv}\alias{diffinv}\alias{diffinv.default}\alias{diffinv.ts}\alias{diffinv.vector}\title{Discrete Integrals: Inverse of Differencing}\description{Computes the inverse function of the lagged differences function\code{\link{diff}}.}\synopsis{diffinv(x, ...)diffinv.default(x, lag = 1, differences = 1,xi = rep(0, lag * differences * dim(as.matrix(x))[2]), ...)diffinv.ts(x, lag = 1, differences = 1,xi = rep(0, lag * differences * NCOL(x)), ...)diffinv.vector(x, lag = 1, differences = 1,xi = rep(0, lag * differences), ...)}\usage{diffinv(x, lag = 1, differences = 1,xi = rep(0.0, lag*differences*NCOL(x)), ...)}\arguments{\item{x}{a numeric vector, matrix, or time series.}\item{lag}{a scalar lag parameter.}\item{differences}{an integer representing the order of thedifference.}\item{xi}{a numeric vector, matrix, or time series containing theinitial values for the integrals.}\item{\dots}{arguments passed to or from other methods.}}\details{\code{diffinv} is a generic function with methods for class \code{"ts"}and \code{default} for vectors and matrices.Missing values are not handled.}\value{A numeric vector, matrix, or time series representing the discreteintegral of \code{x}.}\author{A. Trapletti}\seealso{\code{\link{diff}}}\examples{s <- 1:10d <- diff(s)diffinv(d, xi = 1)}\keyword{ts}