Skip to content

Convenient functions to generate multivariate time series in the vector autoregressive framework.

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

BenSmithNZL/varmaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation




About

varmaker simulates observations from the vector autoregressive framework and also returns the theoretical properties of those observations.

Installation

This package has not been released to CRAN yet, but you can install the development version of varmaker with:

install.packages("devtools")
devtools::install_github("BenSmithNZL/varmaker")

Example

VAR

To simulate observations from a VAR(2) with two series, you can run:

library(varmaker)

cm_1 <- list(c(2, 0),
             matrix(c(0.5, 0.1,
                      0.4, 0.5),
                    nrow = 2,
                    ncol = 2,
                    byrow = TRUE),
             matrix(c(0, 0,
                      0.25, 0),
                    nrow = 2,
                    ncol = 2,
                    byrow = TRUE))

Sigma_a_1 <- matrix(c(0.09, 0,
                      0, 0.04),
                    nrow = 2,
                    ncol = 2,
                    byrow = TRUE)

data_1 <- create_var(cm_1, Sigma_a_1, n = 1000)

The object data_1 contains the simulated observations themselves, along with theoretical properties of the process such as the mean, autocovariance, autocorrelation, and the Granger-causalities of the series.

VMA

To simulate observations from a VMA(2) with two series, you can run:

library(varmaker)

cm_1 <- list(c(2, 0),
             matrix(c(0.5, 0.1,
                      0.4, 0.5),
                    nrow = 2,
                    ncol = 2,
                    byrow = TRUE),
             matrix(c(0, 0,
                      0.25, 0),
                    nrow = 2,
                    ncol = 2,
                    byrow = TRUE))

Sigma_a_1 <- matrix(c(0.09, 0,
                      0, 0.04),
                    nrow = 2,
                    ncol = 2,
                    byrow = TRUE)

data_2 <- create_vma(cm_1, Sigma_a_1, n = 1000)

About

Convenient functions to generate multivariate time series in the vector autoregressive framework.

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Languages