qs | R Documentation |
Computes the Andrews (1991) Quadratic-Spectral window to obtain consistent estimate of long-run variance of multivariate time series.
qs(data,v)
data |
Data matrix for computing consistent long-run variance, normally, multivariate regression residuals. |
v |
Number of autocovariance terms in the kernel. |
Return the consistent estimate of long-run variance. This procedure handles both multivariate and single time series, which is basically designed for "fmvar","fmgmm" and "fmols".
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
Andrews, D. W. K. (1991) Heteroskedasticity and Autocorrelation Consistent Covariance Matrix Estimation. Econometrica, 59, 817-858.
Brillinger, David R. (1981) Time Series Data Analysis and Theory. San Francisco, CA: Holden-Day.
data(macro)
e=apply(macro, 2, function(x) x-mean(x))
qs(e,v=15)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.