mq: Multivariate Ljung-Box Q Statistics

Description Usage Arguments Details Value Author(s) References Examples

Description

Computes the multivariate Ljung-Box statistics for cross-correlation matrices

Usage

1
mq(x, lag = 24, adj = 0)

Arguments

x

The data matrix of a vector time series or residual series of a fitted multivariate model.

lag

The number of cross-correlation matrices used. Default is 24.

adj

Adjustment for the degrees of freedom for the Ljung-Box statistics. This is used for residual series. Default is zero.

Details

Computes the multivariate Ljung-Box statistics and their p-values. For model checking, the subcommand adj can be used to adjust the degrees of freedom of the Chi-square statistics.

Value

The multivariate Q-statistics and their p-values. Also, it provides a plot of the p-values.

Author(s)

Ruey S. Tsay

References

Tsay (2014). Multivariate Time Series Analysis with R and Financial Applications. John Wiley. Hoboken, NJ.

Examples

1
2
x=matrix(rnorm(1500),500,3)
mq(x)

Example output

Ljung-Box Statistics:  
         m       Q(m)     df    p-value
 [1,]   1.00      4.42    9.00     0.88
 [2,]   2.00     13.03   18.00     0.79
 [3,]   3.00     18.37   27.00     0.89
 [4,]   4.00     27.24   36.00     0.85
 [5,]   5.00     33.95   45.00     0.89
 [6,]   6.00     46.48   54.00     0.76
 [7,]   7.00     49.40   63.00     0.89
 [8,]   8.00     65.25   72.00     0.70
 [9,]   9.00     73.29   81.00     0.72
[10,]  10.00     85.00   90.00     0.63
[11,]  11.00     95.33   99.00     0.59
[12,]  12.00    102.68  108.00     0.63
[13,]  13.00    113.61  117.00     0.57
[14,]  14.00    119.66  126.00     0.64
[15,]  15.00    133.50  135.00     0.52
[16,]  16.00    141.98  144.00     0.53
[17,]  17.00    148.44  153.00     0.59
[18,]  18.00    159.71  162.00     0.54
[19,]  19.00    170.10  171.00     0.51
[20,]  20.00    176.15  180.00     0.57
[21,]  21.00    180.80  189.00     0.65
[22,]  22.00    184.78  198.00     0.74
[23,]  23.00    195.56  207.00     0.71
[24,]  24.00    204.93  216.00     0.69

MTS documentation built on May 29, 2017, 5:15 p.m.