getLongRunVar {cointReg}  R Documentation 
LongRun Variance
Description
This function computes the longrun variance Omega, the one sided longrun variance Delta (starting with lag 0) and the variance Sigma from an input matrix of residuals.
Usage
getLongRunVar(u, bandwidth = c("and", "nw"), kernel = c("ba", "bo", "da",
"pa", "qs", "tr"), demeaning = FALSE, check = TRUE, ...)
Arguments
u 
[ 
bandwidth 
[ 
kernel 
[ 
demeaning 
[ 
check 
[ 
... 
Arguments passed to 
Details
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
Value
[list
] with components:
Omega
[matrix
]
Longrun variance matrix
Delta
[matrix
]
Onesided longrun variance matrix
Sigma
[matrix
]
Variance matrix
See Also
Examples
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")