Dear Stata users,
I would like to shape data I add a time variable. My data are distance between countries, which did not move through time, such as:
| countries_origin |
country_destination |
distance |
| ALB |
AUT |
8 |
| ALB |
AND |
9 |
| ALB |
BEL |
11 |
To merge it with other datasets containing control variables for example, I would like to add a time dimension to get :
| countries_origin |
country_destination |
year |
distance |
| ALB |
AUT |
2008 |
8 |
| ALB |
AUT |
2009 |
8 |
| ALB |
AND |
2008 |
9 |
| ALB |
AND |
2009 |
9 |
| ALB |
BEL |
2008 |
11 |
| ALB |
BEL |
2009 |
11 |
I tried to figure out how to solve this problem with existing commands (I did not find one that can directly answer to my question, nor an evident compilation of commands ). Do any of you have an idea on how re-shape the data ?
Thank you
0 Response to Data Shaping for Panel analysis
Post a Comment