I fit the following linear model using OLS, where $X_{5}$ and $X_{6}$ are both dummy variables and the rest are continuous:
$Y=\beta_{0} + \beta_{1}X_{1}+ \beta_{2}X_{2} + \beta_{3}X_{3} + \beta_{4}X_{4} + \beta_{5}X_{5} + \beta_{6}X_{6} + u$
If I want to test a simple contrast, say that $\beta_{5}$ = 0 I can do the following (or look at the print out from any regression program, but just for illustration sake):
Null Hypothesis: Ho: $\beta_{6}(1) - \beta_{6}(0)$ =0
Using the Car package in R:
cVec<-c(0,0,0,0,0,1,0)
car::linearHypothesis(mod,cVec, verbose=TRUE)
If I want to test that both $\beta_{5}$ = 0 and $\beta_{6}$ = 0 and set up the vector to multiply against the coefficient vector as follows:
cVec<-c(0,0,0,0,0,1,1)
the hypothesis test is not correct and one actually needs to use a matrix for this simultaneous test:
cMatrix<-t(cbind(c(0,0,0,0,0,1,0),c(0,0,0,0,0,0,1)))
car::linearHypothesis(mod,cMatrix, verbose=TRUE)
Why and what is cVec<-c(0,0,0,0,0,1,1)
actually testing if not if there is a difference between $\beta_{0} + \beta_{1}X_{1}+ \beta_{2}X_{2} + \beta_{3}X_{3} + \beta_{4}X_{4} + \beta_{5}(1) + \beta_{6}(1)$ AND $\beta_{0} + \beta_{1}X_{1}+ \beta_{2}X_{2} + \beta_{3}X_{3} + \beta_{4}X_{4} + \beta_{5}(0) + \beta_{6}(0)$