Dear,
I read a lot of the threads before posting this question, however, did not seem to get an answer to it. I have longitudinal data (workers in the UK labour market). The data follow individuals for 5 consecutive quarters. I want to run a regression of Difference in difference (DiD) with fixed effects, however, I want to have robust and clustered standard errors at the individual level. I tried using the following:
where :
ID is the id of each individual (panel variable)
qtr is the time variable (quarterly)
SUMHRS is the outcome variable
afterCovid19 is the dummy variable ( treatment intervention) indicate : 1= if period after covid. 0= if period pefore covid
ZHC is a group of works which indicate 1 = if the workers treated 0 = not treated
However, when I run the regression, it provides the error "ID not nested within ZHC".
I’m not sure where the problem is in the data or in my model.
Any insights on what I could do?
Many thanks in advance!
I read a lot of the threads before posting this question, however, did not seem to get an answer to it. I have longitudinal data (workers in the UK labour market). The data follow individuals for 5 consecutive quarters. I want to run a regression of Difference in difference (DiD) with fixed effects, however, I want to have robust and clustered standard errors at the individual level. I tried using the following:
Code:
xtset ID qtr xtdidregress (SUMHRS AGE SEX) (afterCovid19), group (ZHC) time (qtr)
ID is the id of each individual (panel variable)
qtr is the time variable (quarterly)
SUMHRS is the outcome variable
afterCovid19 is the dummy variable ( treatment intervention) indicate : 1= if period after covid. 0= if period pefore covid
ZHC is a group of works which indicate 1 = if the workers treated 0 = not treated
However, when I run the regression, it provides the error "ID not nested within ZHC".
I’m not sure where the problem is in the data or in my model.
Any insights on what I could do?
Many thanks in advance!
Comment