# NOT RUN {
X <- matrix(rnorm(1000*3),ncol=3)
Sigmas <- sm_vcov(X)
Sigmas.n <- sm_vcov(X,vcov.func="normal")
Sigmas.n <- sm_vcov(X,fit.intercept=FALSE)
# make it fat tailed:
X <- matrix(rt(1000*3,df=5),ncol=3)
Sigmas <- sm_vcov(X)
# }
# NOT RUN {
if (require(sandwich)) {
Sigmas <- sm_vcov(X,vcov.func=vcovHC)
}
# }
# NOT RUN {
# add some autocorrelation to X
Xf <- filter(X,c(0.2),"recursive")
colnames(Xf) <- colnames(X)
Sigmas <- sm_vcov(Xf)
# }
# NOT RUN {
if (require(sandwich)) {
Sigmas <- sm_vcov(Xf,vcov.func=vcovHAC)
}
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab