I am currently running a LM Model with a DID-Estimator (panel structure) and the group ID looks like the following:
GROUP_ID: 10101 10101 10102 10102 10103 10103 10201 10201 10202 10202…etc
Additionally I have another variable grouping the ID looking like the following:
Grouping: video video video video video video cd cd cd cd cd
and another dependent variable with integers to each group ID
After running an lm model I would now like to cluster the standard errors according to the grouping variable, meaning clustering the standard errors of the first 6 rows (video) and clustering the standard errors of the last 4 rows (cd) as they have serial correlation.
Can someone help me with a code here?