x<- rnorm(15);
#Newey-West covariance with automatic BW selection
lrcov = NW_lrv(x)
#Newey-West covariance with 10 lags
lrcov = NW_lrv(x, 10)
#Newey-West covariance with 10 lags and no demeaning
lrcov = NW_lrv(x, 10, 0)
Run the code above in your browser using DataLab