'Clustered Standard Errors for Interaction term with plm and coeftest in R
I have a dataset with a hierarchical structure with multiple observations on individuals over time and individuals belonging to groups. I run a model with individual and time fixed effects but want to estimate cluster-robust standard errors on the group level.
I use plm::plm for the model estimation and lmtest::coeftest with sandwich::vcovCL for the standard errors:
coeftest(Model, vcov = vcovCL(Model, cluster = ~group))
When I add interactions terms (multiplication of two independent variables) to the model, coeftest does not calculate standard errors for those. Does anyone know why? This happens both for variables that are constant/not constant on the group level.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
