Library: | times |
See also: | rvlm kpss lo |
Quantlet: | neweywest | |
Description: |
Calculation of the Newey and West Heteroskedastic and
Autocorrelation Consistent estimator of the variance.
The first argument of the quantlet is the series, the second
optional argument is the vector of truncation lags of the
autocorrelation consistent variance estimator. If the second
optional argument is missing, the vector of truncation lags
is set to m = 5, 10, 25, 50.
|
Usage: | q = neweywest(y{,m}) | |
Input: | ||
y | vector | |
m | vector | |
Output: | ||
q | vector |
;Calculation of the Newey and West variance estimator of ;the first 1000 observations of the series dmus58.dat ;This estimator is calculated for the default truncation ;orders m = 5, 10, 25, 50 library("times") x = read("dmus58.dat") x = x[1:1000] q = neweywest(x) q
Contents of q [1,] 0.0022226 [2,] 0.0040569 [3,] 0.0094627 [4,] 0.018105
;Calculation of the Newey and West variance estimator of ;the first 1000 observations of the series dmus58.dat ;This estimator is calculated for the vector of truncation ;orders m = 10, 15, 20 provided by the user. library("times") x = read("dmus58.dat") x = x[1:1000] m = #(10,15,20) q = neweywest(x,m) q
Contents of q [1,] 0.0040569 [2,] 0.0058755 [3,] 0.0076776
Library: | times |
See also: | rvlm kpss lo |