I used "xtset" to declare my dataset is panel data. The data looks like things below:
then I run
and got the number of observations much lower than the one I truly have (number of rows of the table above). Why does STATA drop a lot of observations? Do I have to reshape the table so that the years are unique? If I do this, I lose many observations actually. I just want to see how the regression goes across countries over time, not only for one specific country over time.
Thanks for your help.
code | country | years | var_1 | var_2 |
1 | a | 2000 | ...(numeric) | ...(numeric) |
1 | a | 2001 | ||
2 | b | 2000 | ||
2 | b | 2001 | ||
... | ... | ... |
Code:
xtset code year
Code:
xtreg var_1 var_2
Thanks for your help.
Comment