simu.VAR1 {changepoints}R Documentation

Simulate from a VAR1 model (without change point).

Description

Simulate data of size n and dimension p from a VAR1 model (without change point) with Gaussian i.i.d. error terms.

Usage

simu.VAR1(sigma, p, n, A, vzero = NULL)

Arguments

sigma

A numeric scalar representing the standard deviation of error terms.

p

An integer scalar representing dimension.

n

An integer scalar representing sample size.

A

A numeric p-by-p matrix representing the transition matrix of the VAR1 model.

vzero

A numeric vector representing the observation at time 0. If vzero = NULL,it is generated following the distribution of the error terms.

Value

A p-by-n matrix.

Author(s)

Daren Wang

References

Wang, Yu, Rinaldo and Willett (2019) <arxiv:1909.06359>

Examples

p = 10
sigma = 1
n = 100
A = matrix(rnorm(p*p), nrow = p)*0.1  # transition matrix
simu.VAR1(sigma, p, n, A)

[Package changepoints version 1.1.0 Index]