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)
# \donttest{
if (require(sandwich)) {
Sigmas <- sm_vcov(X,vcov.func=vcovHC)
}
# }
# add some autocorrelation to X
Xf <- filter(X,c(0.2),"recursive")
colnames(Xf) <- colnames(X)
Sigmas <- sm_vcov(Xf)
# \donttest{
if (require(sandwich)) {
Sigmas <- sm_vcov(Xf,vcov.func=vcovHAC)
}
# }
Run the code above in your browser using DataLab