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)