Hi,
I am running a panel regression (xtreg) with a DiD variables and fixed effects (time and individual). I cluster my errors with on country level. I do not have any issue in this first model.
However, I would like to conduct an additional analysis with a double-clustering method. For this purpose, I have successfully created a new variable with the following command:
gen double_cluster=group(country_id qdate)
qdate: is my quarterly time that I have used when setting my panel (2011q1, 20111q2 ...)
I run my model - xtreg, fe vce(cluster double_cluster) and received an error called "panels are not nested within clusters".
I tried to tackle this issue by creating a new time variable called time_id. For instance, my initial date 2011q1 becomes 1 for every country, 2011q2 becomes 2 and so on.Then, I create a new double_cluster variable and run my model. Nevertheless, the issue persists.
I follow the recommended approach mentioned in this thread to examine if there is an error in my data:
The prompting Data Browser is empty, suggesting me that there is no issue in my data. (?)
So, I decided to open this thread and ask for your recommendations.
I am running a panel regression (xtreg) with a DiD variables and fixed effects (time and individual). I cluster my errors with on country level. I do not have any issue in this first model.
However, I would like to conduct an additional analysis with a double-clustering method. For this purpose, I have successfully created a new variable with the following command:
gen double_cluster=group(country_id qdate)
qdate: is my quarterly time that I have used when setting my panel (2011q1, 20111q2 ...)
I run my model - xtreg, fe vce(cluster double_cluster) and received an error called "panels are not nested within clusters".
I tried to tackle this issue by creating a new time variable called time_id. For instance, my initial date 2011q1 becomes 1 for every country, 2011q2 becomes 2 and so on.Then, I create a new double_cluster variable and run my model. Nevertheless, the issue persists.
I follow the recommended approach mentioned in this thread to examine if there is an error in my data:
by country_id, sort: gen byte moved = (country_id [1] != country_id [_N])
browse if moved
The prompting Data Browser is empty, suggesting me that there is no issue in my data. (?)
So, I decided to open this thread and ask for your recommendations.

Comment