I'm doing question C5.1 in Wooldridge's econometrics textbook. The question asks you to test the hypothesis H0:intercept equals.5 against H1: intercept does not equal .5. Wooldridge instructs you to do so by running a regression of the dependent variable on a constant, which I've done. I'm then trying to use linearHypothesis to test the H0 that the intercept is equal to .5, but something seems to not be working.
I input the following code
install.packages('wooldridge')
library('wooldridge')
data(pntsprd)
reg<-lm(sprdcvr~1,data=data)
H0<-("Intercept"=0.5)
linearHypothesis(reg,H0)
and get this output:
Linear hypothesis test
Hypothesis:
0.5 ((Intercept) = 0
Model 1: restricted model
Model 2: sprdcvr ~ 1
Res.Df RSS Df Sum of Sq F Pr(>F)
1 553 285.00
2 552 138.12 1 146.88 587.01 < 2.2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
What am I doing wrong?