XgenSimple: Generate multiple time series given simple VAR structure

Description Usage Arguments Details Value Examples

View source: R/XgenSimple.R

Description

Generate vector autoregression time series with user-specified correlation structure

Usage

1
XgenSimple(p, A, x0, t, sigmax)

Arguments

p

a number. Number of covariates x.

A

a list. Each element is a transition (lag coefficient) matrix. Caution: some specifications can make the series unstationary

x0

a list. Each element is a vector of length p, initial value of x. The length depends on the time lags (number of A).

t

a number. Length of series, including the initial lags.

sigmax

a number. Standard deviation of noise of x.

Details

This function has been used as the most basic data generator. It is also used in the XgenCorr, XgenCorr2 and intervention functions. Mathematical details see the book.

Value

a list of components

Big A

The expanded transition matrix for all lags

X

The generated multiple time series

lag

The lag for VAR process

Characteristic roots

Absolute value for 1/eigen(BigA), if any is smaller than 1, process is unstationary and series can not be generated

Examples

1
2
3
4
5
6
7
8
9
A <- list(A1 = toeplitz(c(0.4, rep(0, 9))),
         A2 = toeplitz(c(0.2, rep(0, 9))),
         A3 = toeplitz(c(0.1, rep(0, 9))))
x0 <- list(x1 = rep(0, 10), x2 = rep(0, 10), x3 = rep(0, 10))
sigmax <- 1
nseries <- 10
nsize <- 50

XgenSimple(p = nseries, A = A, x0 = x0, t = nsize, sigmax = sigmax)

yymmhaha/PackPaper1 documentation built on May 24, 2019, 8:55 a.m.