Closed tappek closed 2 years ago
plm's IV estimation does not respect suppressed intercept in instrument matrix. Reproducible example below.
library("plm") library("ivreg") library("AER") data("SeatBelt", package = "pder") SeatBelt$occfat <- with(SeatBelt, log(farsocc / (vmtrural + vmturban))) pSB <- pdata.frame(SeatBelt) formiv1 <- occfat ~ log(usage) + log(percapin) | log(percapin) + ds + dp + dsp formiv2 <- occfat ~ log(usage) + log(percapin) | log(percapin) + ds + dp + dsp + 0 plm(formiv1, SeatBelt, model = "pooling") #> #> Model Formula: occfat ~ log(usage) + log(percapin) | log(percapin) + ds + dp + #> dsp #> #> Coefficients: #> (Intercept) log(usage) log(percapin) #> 7.56412 0.17686 -1.17226 AER::ivreg(formiv1, data = SeatBelt) #> #> Call: #> AER::ivreg(formula = formiv1, data = SeatBelt) #> #> Coefficients: #> (Intercept) log(usage) log(percapin) #> 7.5641 0.1769 -1.1723 ivreg::ivreg(formiv1, data = SeatBelt) #> #> Call: #> ivreg::ivreg(formula = formiv1, data = SeatBelt) #> #> Coefficients: #> (Intercept) log(usage) log(percapin) #> 7.5641 0.1769 -1.1723 plm(formiv2, SeatBelt, model = "pooling") #> #> Model Formula: occfat ~ log(usage) + log(percapin) | log(percapin) + ds + dp + #> dsp + 0 #> #> Coefficients: #> (Intercept) log(usage) log(percapin) #> 7.56412 0.17686 -1.17226 AER::ivreg(formiv2, data = SeatBelt) #> #> Call: #> AER::ivreg(formula = formiv2, data = SeatBelt) #> #> Coefficients: #> (Intercept) log(usage) log(percapin) #> 0.57379 -0.02646 -0.47789 ivreg::ivreg(formiv2, data = SeatBelt) #> #> Call: #> ivreg::ivreg(formula = formiv2, data = SeatBelt) #> #> Coefficients: #> (Intercept) log(usage) log(percapin) #> 0.57379 -0.02646 -0.47789
fixed by f3359ff
plm's IV estimation does not respect suppressed intercept in instrument matrix. Reproducible example below.