Learn R Programming

portes (version 1.08)

Hosking: The Modified Multivariate Portmanteau Test, Hosking (1980)

Description

The modified multivariate portmanteau test suggested by Hosking (1980).

Usage

Hosking(obj,lags=seq(5,30,5),order=0,SquaredQ=FALSE)

Arguments

obj
a univariate or multivariate series with class "numeric", "matrix", "ts", or ("mts" "ts"). It can be also an object of fitted time-series model with class "ar",
lags
vector of lag auto-cross correlation coefficients used for Hosking test.
order
this is used for degrees of freedom of asymptotic chi-square distribution. If obj is a fitted time-series model with class "ar", "arima0", "Arima", "varest",
SquaredQ
if TRUE then apply the test on the squared values. This checks for Autoregressive Conditional Heteroscedastic, ARCH, effects. When SquaredQ = FALSE, then apply the test on the usual resi

Value

  • The multivariate test statistic suggested by Hosking (1980) and its associated p-values for different lags based on the asymptotic chi-square distribution with k^2(lags-order) degrees of freedom.

References

Hosking, J. R. M. (1980). "The Multivariate Portmanteau Statistic". Journal of American Statistical Association, 75, 602-608.

See Also

acf, Box.test, BoxPierce, LjungBox, LiMcLeod, gvtest, portest, GetResiduals

Examples

Run this code
##############################################################
## Quarterly, west German investment, income, and consumption 
## from first quarter of 1960 to fourth quarter of 1982: 
##############################################################
data(WestGerman)
DiffData <- matrix(numeric(3 * 91), ncol = 3)
  for (i in 1:3) 
    DiffData[, i] <- diff(log(WestGerman[, i]), lag = 1)
fit <- ar.ols(DiffData, intercept = TRUE, order.max = 2)
lags <- c(5,10)
## Apply the test statistic on the fitted model 
Hosking(fit,lags,order = 2)        ## True
Hosking(fit,lags)                  ## True
## Apply the test statistic on the residuals
res <- ts((fit$resid)[-(1:2), ])
Hosking(res,lags,order = 2)        ## True
Hosking(res,lags)                  ## Not True

Run the code above in your browser using DataLab