I have a dataset that looks like this:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str7 country1 str11 country2 str4 group "China" "Philippines" "68a" "China" "Thailand" "68a" "Bahamas" "Jamaica" "176a" "Bahamas" "Grenada" "176a" end
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str11(country1 country2) str4 group "China" "Philippines" "68a" "China" "Thailand" "68a" "Philippines" "China" "68a" "Philippines" "Thailand" "68a" "Thailand" "China" "68a" "Thailand" "Philippines" "68a" "Bahamas" "Jamaica" "176a" "Bahamas " "Grenada" "176a" "Jamaica" "Bahamas" "176a" "Jamaica" "Grenada" "176a" "Grenada" "Bahamas" "176a" "Grenada" "Jamaica" "176a" end
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str7 country1 str11 countr2 str4 group "China" "Philippines" "68a" "China" "Philippines" "68a" "China" "Thailand" "68a" "China" "Thailand" "68a" "Bahamas" "Jamaica" "176a" "Bahamas" "Jamaica" "176a" "Bahamas" "Grenada" "176a" "Bahamas" "Grenada" "176a" end
I'm not sure what I'm doing wrong. Thanks in advance for your help!
This question is also posted here: https://stackoverflow.com/questions/...ach-group-in-s
Best,
Dotty
0 Response to create dataset based on all possible pairs of identifiers within each group in Stata
Post a Comment