sar.gc.coef {qfa}R Documentation

Extraction of SAR Coefficients for Granger-Causality Analysis

Description

This function extracts the spline autoregression (SAR) coefficients from an SAR model for Granger-causality analysis. See sar.gc.bootstrap for more details regarding the use of index.

Usage

sar.gc.coef(fit, index = c(1, 2))

Arguments

fit

object of SAR model from qser2sar() or qspec.sar()$fit

index

a pair of component indices for multiple time series or a sequence of lags for single time series (default = c(1,2))

Value

matrix of selected SAR coefficients (number of lags by number of quantiles)

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))

[Package qfa version 2.1 Index]