I am using the command ivreg from the AER package. My data looks like this:
head(d0) y x0 x1 x2 x3 x4 x5 1 0.005157174 18422880 0 four stars GA 0.02857143 37963 2 0.005157174 18422880 0 four stars GA 0.02857143 37963 3 0.008145795 18422880 0 two stars GA 0.00993997 37963 4 0.004613947 22938495 0 four stars GA 0.02857143 37963 5 0.005157174 18422880 0 four stars GA 0.02857143 37963 6 0.008145795 18422880 0 three stars GA 0.00993997 37963 My x0 variable is endogenous, so I would like to run the following regression, instrumenting x0 with x5 :
mod_iv <- ivreg(y~x0+x1+x2+x3|x5+x1+x2+x3,data=d0) The command above runs well. However, when I type summary(mod_iv). I get the error message
Error in solve.default(vcov.hyp) : system is computationally singular: reciprocal condition number = 9.79783e-23 It seems like this is common, as I found in this post. The interesting part is that it seems like the problem really is originated by x0. For instance, theis regression below does run correctly inside summary:
mod_iv <- ivreg(y~x4+x1+x2+x3|x5+x1+x2+x3,data=d0) summary(mod_iv) Do you know what could be causing this error?