getLongRunVar {cointReg} | R Documentation |
This function computes the long-run variance Omega, the one sided long-run variance Delta (starting with lag 0) and the variance Sigma from an input matrix of residuals.
getLongRunVar(u, bandwidth = c("and", "nw"), kernel = c("ba", "bo", "da", "pa", "qs", "tr"), demeaning = FALSE, check = TRUE, ...)
u |
[ |
bandwidth |
[ |
kernel |
[ |
demeaning |
[ |
check |
[ |
... |
Arguments passed to |
The bandwidth can be one of the following:
"ba"
: Bartlett kernel
"bo"
: Bohmann kernel
"da"
: Daniell kernel
"pa"
: Parzen kernel
"qs"
: Quadratic Spectral kernel
"tr"
: Truncated kernel
[list
] with components:
Omega
[matrix
]Long-run variance matrix
Delta
[matrix
]One-sided long-run variance matrix
Sigma
[matrix
]Variance matrix
set.seed(1909) x <- rnorm(100) band <- getBandwidthAnd(x, kernel = "ba") getLongRunVar(x, kernel = "ba", bandwidth = band) # shorter: getLongRunVar(x, kernel = "ba", bandwidth = "and") x2 <- arima.sim(model = list(ar = c(0.7, 0.2)), innov = x, n = 100) x2 <- cbind(a = x2, b = x2 + rnorm(100)) getLongRunVar(x2, kernel = "ba", bandwidth = "nw")