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

Macro: 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.


Reference(s):

Usage: q = neweywest(y{,m})
Input:
y vector
m vector
Output:
q vector

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 

Library: times
See also: rvlm kpss lo

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

Author: Gilles Teyssiere, 980425. Revised 990120
(C) MD*TECH Method and Data Technologies, 17.8.2000