recursive.portmanteau.multi | R Documentation |
This function computes a sequence of multivariate Portmanteau tests
recursive.portmanteau.multi(resids, var.p.lag, max.lag)
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 |
This function computes a sequence of multivariate Portmanteau tests using a modified version of the original portmanteau.multi internal function of the vars package
results is a list with the lag, statistic and p-values
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.