VAR1_simu: Simulating VAR1 model with different error distributions

View source: R/mean.R

VAR1_simuR Documentation

Simulating VAR1 model with different error distributions

Description

Simulate a p dimensional VAR1 model with length n. The setting follows Ke et.al.(2019)

Usage

VAR1_simu(n, mu, skip = 300, Sigma.mat, rho, err.dist = "t3", ...)

Arguments

n

A strictly positive integer corresponding to the length of output series.

mu

A numeric vector of mean of VAR1 model.

skip

A strictly positive integer corresponding to the length of initial series not returned.

Sigma.mat

A p x p matrix such that Sigma.mat^2 is the covariance matrix of the error term.

rho

A scalar in (0,1) indicating the decay rate of the transition matrix for lag-k term as the k grows.

err.dist

A character string, such as "normal", "pareto", "lognorm" or "t4", indicating the distribution of innovations.

...

Additional arguments.

Value

A p x n matrix corresponding to the simulated data

Author(s)

Haotian Xu

Examples

n = 100
p = 50
Sigma = diag(1, p)
set.seed(123)
X = VAR1_simu(n = n, mu = rep(0, p), skip = 300, Sigma.mat = Sigma, rho = 0.7, err.dist = "pareto")
dim(X)


HaotianXu/rcov documentation built on May 14, 2023, 5:04 a.m.