ts.cumsum: Time Series Cumulative Sum

View source: R/ts.cumsum.R

ts.cumsumR Documentation

Time Series Cumulative Sum

Description

Computes the cumulative sum (integration) of a time series with optional lagging. The function is the inverse of differencing (possibly seasonal).

Usage

ts.cumsum(w, lag = 1, start)

Arguments

w

is the input time series.

lag

allows integration at seasonal lags (lag=1 is the default).

start

allows specification of starting value for the integration. If not specifies, w[1] is used.

Examples

ozoneRegdat <- read.csv(RTseriesExtDataPath('ozoneRegdat.csv'))
ozo.xreg <- cbind(ozoneRegdat[,2], ts.cumsum(ozoneRegdat[, 3], lag=12),
                ts.cumsum(ozoneRegdat[, 4], lag=12))
esti(ozone.tsd, model=model.pdq(D=1, q=1, Q=1, period=12),
                y.range=c(0.1, 9), xreg.in=ozo.xreg, gamma=0)


wqmeeker/RTseries documentation built on Dec. 31, 2022, 10 a.m.