I have data on trade agreements and membership to the WTO between country (i) and country (j). My data looks something like:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str3(country_i country_j) int year byte(gatt pta) "AUS" "BRA" 1986 0 0 "AUS" "BRA" 1987 0 0 "AUS" "BRA" 1988 0 1 "AUS" "BRA" 1989 0 1 "AUS" "BRA" 1990 0 1 "AUS" "BRA" 1991 0 1 "AUS" "BRA" 1992 1 1 "AUS" "BRA" 1993 1 1 "AUS" "BRA" 1994 1 1 "BRA" "AUS" 1986 0 0 "BRA" "AUS" 1987 0 0 "BRA" "AUS" 1988 1 0 "BRA" "AUS" 1989 1 0 "BRA" "AUS" 1990 1 1 "BRA" "AUS" 1991 1 1 "BRA" "AUS" 1992 1 1 "BRA" "AUS" 1993 1 1 "BRA" "AUS" 1994 1 1 end
The gatt membership year between AUS-BRA pair is 1992 whereas between BRA-AUS pair , it is year 1988. I want to pick the minimum year (earliest year between the symmetric pairs). How can i do that in STATA ?
similarly the pta between between AUS-BRA pair is 1988 whereas between BRA-AUS pair, the agreement year is1990. Similarily, i want to pick the minimum year of agreement signing between the country pairs which are symmetric .
Thank you
0 Response to How to identify the minimum year of membership to the agreement between the pairs that are symmetric
Post a Comment