recursive.portmanteau.multi: Compute a sequence of multivariate Portmanteau tests

View source: R/tests.R

recursive.portmanteau.multiR Documentation

Compute a sequence of multivariate Portmanteau tests

Description

This function computes a sequence of multivariate Portmanteau tests

Usage

recursive.portmanteau.multi(resids, var.p.lag, max.lag)

Arguments

resids

is a dataframe containing the standardized residuals from a multivariate model

var.p.lag

is the number of lags in the estimated multivariate VAR(p) model

max.lag

is the the max lag used to compute the multivariate Portmanteau test

Details

This function computes a sequence of multivariate Portmanteau tests using a modified version of the original portmanteau.multi internal function of the vars package

Value

results is a list with the lag, statistic and p-values

Examples

## Not run: 
 Sigma <- matrix(c(10,3,3,2),2,2)
 dat.norm<- MASS::mvrnorm(n = 1000, rep(0, 2), Sigma)
 var.2c <- vars::VAR(dat.norm, p = 1, type = "const")
 res.var<-resid(var.2c)
 recursive.portmanteau.multi(res.var,1,20)

## End(Not run)

deanfantazzini/bitcoinFinance documentation built on June 12, 2024, 4:10 p.m.