This function computes Tiao-Box test for autocorrelation, i.e, coefficient of p-th lag in VAR(p) model. Its null hypothesis is that p-th lag is not essential. The alternative hypothesis is that it is essential.
TB_AR_test(d,p)
Arguments
d: matrix of time-series, assumed to be the stationary VARMA type, columns correspond to time index, and rows to different time-series
p: numeric indicating a lag length beyond which we are willing to assume that the autocorrelation is essentially zero
Returns
class htest object, list of - statistic: test statistic