ts.cumsum | R Documentation |
Computes the cumulative sum (integration) of a time series with optional lagging. The function is the inverse of differencing (possibly seasonal).
ts.cumsum(w, lag = 1, start)
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. |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.