apologies if I write anything wrong - this is my first post. I am doing some time series regressions on the different determinants of house prices for different countries, and would like to use modelplot() to showcase the different coefficients for one variable across all the countries. This is the easy part, and I have it done. However, when I try to run this code to try and include Newey-West std. errors:
modelplot(mods_TS_graph,
coef_map= varnames,
vcov = c(vcovAUS, vcovBEL, vcovEST, vcovFIN, vcovFRA, vcovGER, vcovGRE, vcovIRE, vcovITA, vcovLAT, vcovLIT, vcovLUX, vcovNET, vcovPOR, vcovSLK, vcovSLE, vcovSPA),
coef_omit="[^ECB]",
draw=T, size=1)
Where the vcovAUS arguments etc are just sandwich::NeweyWest(OLS_AUS) etc I get the following error:
Error in get_vcov.default(model, vcov = vcov, conf_level = conf_level, : Unable to extract a variance-covariance matrix from model of class lm. The variance-covariance matrix is required to adjust the standard errors. The
vcov
argument accepts a variance-covariance matrix, a vector of standard errors, or a function that returns one of these, such asstats::vcov
.
I used pretty much the same method for an earlier modelsummary(), which computed Newey-West standard errors no problem. Is there something I am doing wrong? I have also tried to just use "NeweyWest" in the vcov() argument for modelplot(), just like I did in modelsummary(). Very confused. Thanks for reading, hope somebody can help.