Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

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

share|improve this question

1 Answer

up vote 0 down vote accepted

I can answer my own question after some reflection.

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

cVec<-c(0,0,0,0,0,1,1)
car::linearHypothesis(mod,cVec, verbose=TRUE)

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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