Learn R Programming

gimme (version 0.7-18)

simulateVAR: Simulate data from Vector AutoRegression (VAR) models.

Description

This function simulates data. It allows for structural VAR and VAR data generating models.

Usage

simulateVAR(A   = NULL, 
            Phi       = NULL, 
            Psi       = NULL, 
            subAssign = NULL, 
            N         = NULL, 
            ASign     = "random",  
            PhiSign   = "random",  
            Obs       = NULL,
            indA      = 0.01, 
            indPhi    = 0.01,
            indPsi    = 0.00)

Arguments

A

A matrix (for no subgroups) or list of A matrices, with slice # = # of subgroups.

Phi

Phi matrix (for no subgroups) or list of Phi matrices, with slice # = # of subgroups.

Psi

matrix (for no subgroups) or list of Psi matrices, with slice # = # of subgroups.

subAssign

Optional vector of length N that indicates which subgroup each individual is in.

N

Number of indvidiuals.

ASign

Defaults to "random" for ind level paths, with 50 percent chance of positive and 50 percent negative, other option is either "neg" or "pos" which provides all negative or all positive relations, respectively.

PhiSign

Defaults to "random" for ind level paths, with 50 percent chance of positive and 50 percent negative, other option is either "neg" or "pos" which provides all negative or all positive relations, respectively.

Obs

Number of observations (T) per individual. Burn in of 400 is used to generate then discarded.

indA

Sparsity of individual-level A paths. 0 indicates no individual-level. Use decimals. Default is 0.01, meaning that each path that is not in the group-level A matrix has a 0.01 chance of being added.

indPhi

Sparsity of individual-level Phi paths. 0 indicates no individual-level. Use decimals. Default is 0.01, meaning that each path that is not in the group-level Phi matrix has a 0.01 chance of being added.

indPsi

Sparsity of individual-level Psi paths. 0 indicates no individual-level. Use decimals. Default is 0, meaning that each path that is not in the group-level Psi matrix has a 0 chance of being added at the ind. level. Individual- level paths added at this rate per individual.

Author

KM Gates, Ai Ye, Ethan McCormick, & Zachary Fisher