season.lagging: season.lagging

Description Usage Arguments Value Examples

Description

Generate new time series with (seasonally) lagged variables from lagging pattern.

Usage

1
season.lagging(y, lagging = NULL)

Arguments

y

= data series

lagging

= lagging array array describing what to be added to y: c(1, 3, 6) adds a new y3, using y1 lagged 6 time steps. lagging<-matrix(c(1, 3, 6-1, 2, 4, 12-1), nrow=3) adds two new variables (y3 and y4) using y1 lagged 6-1 time steps and y2 lagged 12-1 time steps.

Value

y.lagged = the part of the new series (including new lagged variables) that can be entered into marima

y.future = the part of the new series (including new lagged variables) that does not include future observation

y.lost = previous values of the time series that is incomplete with respect to the new variables generated by lagging

cbind(y.lost, y.lagged.y, y.future) is the complete series after creation and addition of the lagged variables.

Examples

1
2
3
4
5
6
7
set.seed(4711)
# generate bivariate time series
y<-round(matrix(10*rnorm(36), nrow=2))
y
# define new lagged variables (y3 and y4) with seasonalities 6 and 12
lagging <- c(1, 3, (6-1),  2, 4, (12-1)) 
season.lagging(y, lagging)

marima documentation built on May 2, 2019, 2:10 p.m.