data(Davis)
mod<-lm(weight~repwt, data=Davis)
linear.hypothesis(mod, diag(2), c(0,1))
## use asymptotic Chi-squared statistic
linear.hypothesis(mod, diag(2), c(0,1), test = "Chisq")
## use HC3 standard errors via
## white.adjust option
linear.hypothesis(mod, diag(2), c(0,1), white.adjust = TRUE)
## covariance matrix *function*
linear.hypothesis(mod, diag(2), c(0,1), vcov = hccm)
## covariance matrix *estimate*
linear.hypothesis(mod, diag(2), c(0,1), vcov = hccm(mod, type = "hc3"))
Run the code above in your browser using DataLab