0

I am running an intrumental variable regression on data from a data frame, and run into problems when I try to a hypothesis test to test the relevance of the instruments.

F10: sibling’s financial situation F15: parent’s financial knowledge

F10 is divided into "worse", "no sibling" and "better". F15 is divided into "intermediate or "high", "dont know" and "low"

Do you have any suggestions on what might be wrong, or if I maybe have to change the values of f10 and f15 into integers?

Code:

#First stage IV regression
stage1 <- lm(indexlit1_new1 ~ f10 + f15 + age + edu2 + edu3 + edu4 + edu5 
             + male + partner + numkids + retired + dum_selfempl + lincome 
             + tot_non_equity_wealth_cat + indexlit1_new1, data = Finlit)
cluster_se_stage1 <- coeftest(stage1, vcov = vcovHC(stage1))[,2]

#First stage IV regression
stage1 <- lm(indexlit1_new1 ~ f10 + f15 + age + edu2 + edu3 + edu4 + edu5 
             + male + partner + numkids + retired + dum_selfempl + lincome 
             + tot_non_equity_wealth_cat + indexlit1_new1, data = Finlit)
cluster_se_stage1 <- coeftest(stage1, vcov = vcovHC(stage1))[,2]

Error message:

##Testing the relevance of the instruments
#define H0
myH0 <- c("f10 = no sibling", "f15 = dont know")
#F-statistic
linearHypothesis(stage1,myH0)
Rui Barradas
  • 70,273
  • 8
  • 34
  • 66
  • 2
    What R package are you using for the `linearHypothesis()` function? That's not a base R function. It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input that can be used to test and verify possible solutions. – MrFlick Oct 29 '21 at 16:57
  • Please provide enough code so others can better understand or reproduce the problem. – Community Oct 31 '21 at 06:01

0 Answers0