Dear All,
I am encountering a problem that I found really hard to solve. I am writing here for seek for some advices.
There are two datasets in my analysis. The first one contains interstate conflicts data. The data looks like (for example):
(A: Conflict starter. B: The other side of the conflict)
My aim is to pair all the A and B side within each Conflict ID. Is there any quick way that I can use to pair them?
The other dataset includes Country's the certain information.
My aim for this dataset is to identify whether two country share the same characteristics.
Finally, I would like to combine these two dataset to create a new dataset indicating a paired country with
a dummy indicating whether they share the same characteristic. The ideal data structure look like:
I understand this is quite long and a bit confusing question! I really appreciate any help from here!
If there is anything unclear, I will be more than happy to explain!
Thank you in advance for your kind help! I look forward to hearing from you!
Best regards
Long
I am encountering a problem that I found really hard to solve. I am writing here for seek for some advices.
There are two datasets in my analysis. The first one contains interstate conflicts data. The data looks like (for example):
Conflict ID | Involved Countries | Side A or B | ||
1 | USA | A | ||
1 | Canada | B | ||
1 | Australia | A | ||
1 | China | B | ||
1 | Russia | B | ||
2 | India | A | ||
2 | Thailand | B | ||
2 | Bangladesh | B |
My aim is to pair all the A and B side within each Conflict ID. Is there any quick way that I can use to pair them?
The other dataset includes Country's the certain information.
Country | Characteristics | |||
USA | HAHAHA | |||
USA | LALALA | |||
USA | WAWAWA | |||
Canada | LALALA | |||
Canada | NONONO | |||
China | HAHAHA | |||
China | YAYAYA | |||
Australia | HAHAHA | |||
Russia | YAYAYA |
Finally, I would like to combine these two dataset to create a new dataset indicating a paired country with
a dummy indicating whether they share the same characteristic. The ideal data structure look like:
Conflict ID | Pair ID | Country | Side | Character Dummy |
1 | 1 | USA | A | 1 |
1 | 1 | Canada | B | 1 |
1 | 2 | USA | A | 1 |
1 | 2 | China | B | 1 |
1 | 3 | USA | A | 0 |
1 | 3 | Russia | B | 0 |
If there is anything unclear, I will be more than happy to explain!
Thank you in advance for your kind help! I look forward to hearing from you!
Best regards
Long
Comment