sar.gc.test {qfa}R Documentation

Wald Test and Confidence Band for SAR-Based Granger-Causality Analysis

Description

This function computes Wald test and confidence band for Granger-causality using bootstrap samples generated by sar.gc.bootstrap() based the spline autoregression (SAR) model of quantile series (QSER).

Usage

sar.gc.test(A, A.sim, sel.lag = NULL, sel.tau = NULL)

Arguments

A

matrix of selected SAR coefficients

A.sim

simulated bootstrap samples from sar.gc.bootstrap()

sel.lag

indices of time lags for Wald test (default = NULL: all lags)

sel.tau

indices of quantile levels for Wald test (default = NULL: all quantiles)

Value

a list with the following elements:

test

list of Wald test result containing wald and p.value

A.u

matrix of upper limits of 95% confidence band of A

A.l

matrix of lower limits of 95% confidence band of A

Examples

y1 <- stats::arima.sim(list(order=c(1,0,0), ar=0.5), n=64)
y2 <- stats::arima.sim(list(order=c(1,0,0), ar=-0.5), n=64)
tau <- seq(0.1,0.9,0.05)
y.sar <- qspec.sar(cbind(y1,y2),tau=tau,p=1)
A <- sar.gc.coef(y.sar$fit,index=c(1,2))
A.sim <- sar.gc.bootstrap(y.sar$qser,y.sar$fit,index=c(1,2),nsim=5)
y.gc <- sar.gc.test(A,A.sim)

[Package qfa version 2.1 Index]