Does anyone have any advice on how to make a marginal effects plot in R using panel corrected standard errors?
To estimate panel corrected standard errors in R, I use the plm and lmtest packages.
First I estimate the regression model with plm:
plm <- plm(Y ~ X*Z, data = a, model='pooling', index=c('cicode', 'year'))
Then I pass this plm object through coeftest using the lmtest package:
plm2 <- coeftest(plm, vcov=function(x) vcovBK(x,type="HC1", cluster="time"))
plm2 then contains a list of the coefficients and panel corrected standard errors. What package and code could I use to then create a marginal effects plot using plm2?