Hi! I have three variables, namely group, country and year. Each country has x groups, which can change depending on what year one observes. What I am trying to do then is creating a variable that tells me the number of groups in a given country in a given year. The data of the three variables looks like this:
Thanks in advance!
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str84 group str37 country float year "Balanta" "Guinea-Bissau" 1990 "Balanta" "Guinea-Bissau" 1991 "Balanta" "Guinea-Bissau" 1992 "Balanta" "Guinea-Bissau" 1993 "Balanta" "Guinea-Bissau" 1994 "Balanta" "Guinea-Bissau" 1995 "Balanta" "Guinea-Bissau" 1996 "Balanta" "Guinea-Bissau" 1997 "Balanta" "Guinea-Bissau" 1998 "Balanta" "Guinea-Bissau" 1999 end
Comment