Hello everyone, I am learning STATA as a beginner, so I need your help. My data is like this.
We are supposed to run a regression to estimate the effect of the policy in New Jersey, and the employment represents the employment in every small restaurant in each state. My code is like this:
xtset id treatment
STATA said, "repeated time values within the panel." In this case, could you please give me some guidance about how I can set my panel data and run the regression to estimate the effect of the policy run in New Jersey (each state has many small restaurants, so I really do not know how to deal with this case)? Thanks for the kind help in advance, and hope you all have good luck today!
id | treatment (time variable, take 0 before treatment, 1 after treatment) | group (take 0 in New Jersey, take 1 in PA) | employment (independent variable) |
1 | 0 | 1 | 16 |
1 | 1 | 1 | 20 |
2 | 0 | 1 | 4 |
2 | 1 | 1 | 2 |
3 | 0 | 0 | 7 |
3 | 1 | 0 | 8 |
4 | 0 | 0 | 4 |
4 | 1 | 0 | 6 |
xtset id treatment
STATA said, "repeated time values within the panel." In this case, could you please give me some guidance about how I can set my panel data and run the regression to estimate the effect of the policy run in New Jersey (each state has many small restaurants, so I really do not know how to deal with this case)? Thanks for the kind help in advance, and hope you all have good luck today!

Comment