| sar.eq.test | R Documentation | 
This function computes Wald test and confidence band for equality of Granger-causality in two samples
using bootstrap samples generated by sar.eq.bootstrap() based on the spline autoregression (SAR) models
of quantile series (QSER).
sar.eq.test(A1, A1.sim, A2, A2.sim, sel.lag = NULL, sel.tau = NULL)
A1 | 
 matrix of selected SAR coefficients for sample 1  | 
A1.sim | 
 simulated bootstrap samples from   | 
A2 | 
 matrix of selected SAR coefficients for sample 2  | 
A2.sim | 
 simulated bootstrap samples from   | 
sel.lag | 
 indices of time lags for Wald test (default =   | 
sel.tau | 
 indices of quantile levels for Wald test (default =   | 
a list with the following elements:
test | 
 list of Wald test result containing   | 
D.u | 
 matrix of upper limits of 95% confidence band for   | 
D.l | 
 matrix of lower limits of 95% confidence band for   | 
y11 <- stats::arima.sim(list(order=c(1,0,0), ar=0.5), n=64)
y21 <- stats::arima.sim(list(order=c(1,0,0), ar=-0.5), n=64)
y12 <- stats::arima.sim(list(order=c(1,0,0), ar=0.5), n=64)
y22 <- stats::arima.sim(list(order=c(1,0,0), ar=-0.5), n=64)
tau <- seq(0.1,0.9,0.05)
y1.sar <- qspec.sar(cbind(y11,y21),tau0=tau,p=1)
y2.sar <- qspec.sar(cbind(y12,y22),tau0=tau,p=1)
A1.sim <- sar.eq.bootstrap(y1.sar$qser,y1.sar$fit,y2.sar$fit,index=c(1,2),nsim=5)
A2.sim <- sar.eq.bootstrap(y2.sar$qser,y2.sar$fit,y1.sar$fit,index=c(1,2),nsim=5)
A1 <- sar.gc.coef(y1.sar$fit,index=c(1,2))
A2 <- sar.gc.coef(y2.sar$fit,index=c(1,2))
test <- sar.eq.test(A1,A1.sim,A2,A2.sim,sel.lag=NULL,sel.tau=NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.