stata小白望支招以下数据转换! [跪]
| id | start | end | primary_country | Name1 | country2 | Name2 | country3 | Name3 | Target |
| 1 | 2002 | 2005 | PRK | North Korea | US | United States of America | UK | United Kingdom | Thailand |
| 2 | 2001 | 2004 | US | United States of America | CHN | China | PRK | North Korea | Japan |
id1的转换如下, id2同
主要目的是把一个observation里面country-pair之间的有无target和targeted的关系找出来以便之后生成dummy variable
| id | start | end | country | name | target |
| 1 | 2002 | 2005 | PRK | North Korea | Thailand |
| 1 | 2002 | 2005 | US | United States of America | Thailand |
| 1 | 2002 | 2005 | UK | United Kingdom | Thailand |
想用reshape做,但是感觉不太对,转出来结果很妙
望好心人帮助!谢谢!



雷达卡




京公网安备 11010802022788号







