Learn R Programming

COINT (version 0.0.2)

qs: Quadratic-Spectral Kernel for Consistent Estimate of Long-run Variance

Description

Computes the Andrews (1991) Quadratic-Spectral window to obtain consistent estimate of long-run variance of multivariate time series.

Usage

qs(data,v)

Value

amat

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".

weights

The weights vector, used by function fmgive

Arguments

data

Data matrix for computing consistent long-run variance, normally, multivariate regression residuals.

v

Number of autocovariance terms in the kernel.

Author

Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.

References

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.

Examples

Run this code
data(macro)
e=apply(macro, 2, function(x) x-mean(x))

qs(e,v=15)

Run the code above in your browser using DataLab