Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

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 represents the series and the second optional argument 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.

Reference(s):

Usage: q = neweywest(x{,m})
Input:
x T x 1 vector of time series observations x_t
m optional; k x 1 vector of truncation lags
Output:
q k x 1 vector of Newey and West variance estimators for truncation lags given in m

Example:
;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

Result:
Contents of q

[1,]  0.0022226
[2,]  0.0040569
[3,]  0.0094627
[4,]  0.018105
Example:
;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

Result:
Contents of q

[1,]  0.0040569
[2,]  0.0058755
[3,]  0.0076776



Author: G. Teyssiere, 20010912 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006