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:

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:

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)$


1 Answer 1


I can answer my own question after some reflection.

Clearly, what is being tested under the single degree of freedom test:

car::linearHypothesis(mod,cVec, verbose=TRUE)

is simply that $\beta_{5}+\beta_{6} =0$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.