I am using data from the European Social Survey (ESS) and I would like to calculate country-level cluster-robust standard errors for a regression model in R that includes country fixed effects and employs the design weights that come with the ESS.
To correctly use the weights, I use the 'survey' package and the functions 'svydesign' and 'svyglm'. This step looks like this:
design_1 <- svydesign(id=~1, weights=~dweight, data=ESS)
m1 <- svyglm(y ~ cntry + x, design = design_1)
My question is: when I now apply the functions 'cluster.vcov' and 'coeftest' from the packages 'lmtest' and 'multiwayvcov' to the model m1, do the resulting standard errors correctly account for the design weights? This step looks like this:
vcov_m1 <- cluster.vcov(m1, ESS$cntry)
Note that I do not use 'cntry' as an id variable in the svydesign function, because then I cannot include country dummies in the regression model.
Thanks in advance for your feedback!