Description Usage Arguments Details Value See Also Examples
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.
1 2 |
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
1 2 3 4 5 6 7 8 9 10 | 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.