set.seed(123)
X <- matrix(rnorm(1000*3),ncol=3)
th <- theta(X)
if (FALSE) {
if (require(sandwich)) {
th2 <- theta(X,vcov.func=vcovHC)
}
}
# works on data frames too:
set.seed(456)
X <- data.frame(a=runif(100),b=rnorm(100),c=1)
th <- theta(X)
Run the code above in your browser using DataLab