I have been trying to estimated the stated problem, but I only succeed in parts of it. The following artificial setup is supposed to illustrate my problem in detail:
Setup the data:
library(plm)
data(Cigar)
Fixed effects AND robust standard errors (works perfectly)
fit <- plm(price ~ sales + pop, data=Cigar, index=c("state","year"), model="within")
> coeftest(fit, vcov.=vcovHC(fit))
t test of coefficients:
Estimate Std. Error t value Pr(>|t|)
sales -1.0391141 0.1671141 -6.2180 6.726e-10 ***
pop 0.0190151 0.0064447 2.9505 0.003228 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
New Fixed effects regression WITH Instruments: (sales is instrumented with cpi)...
fit <- plm(price ~ sales + pop | cpi + pop, data=Cigar, index=c("state","year"), model="within")
...renders usage of coeftest problematic!
coeftest(fit, vcov.=vcovHC(fit)) Fehler in vcovG.plm(x, type = type, cluster = cluster, l = 0, inner = inner, : Method not available for IV
Well the error message is obvious, but I am just wondering what other people do who face the same problem as I do?
I hope I don't miss something but there is no statistical reason why heteroskedasticity cannot apply in this setting, right?
So is there any possibility to estimate robust standard errors in this setting with the plm package or are there any R-packages which may help? Thank you very much for your answers - any advice is appreciated!
coef()
calls, so I suspect something is missing. In addition, questions about how to use software are usually off topic here (this strikes me as borderline), so you may want to try to bring the statistical issue to the fore & deemphasize the 'how do I do this in R' part. $\endgroup$xtivreg
computes cluster robust standard errors whenrobust
standard errors are requested (pg. 6). $\endgroup$