Hi all,
I have a dataset that looks approximately like this
Country year Dis_type type_extreme_temp type_flood
Afghanistan 1990 Extreme temp 1 0
Afghanistan 1990 Flood 0 1
Afghanistan 1992 Extreme temp 1 0
...
Albania 1991 Extreme temp 1 0
Albania 1991 Flood 0 1
...
and I would like to obtain a dataset that looks like this:
Country year type_extreme_temp type_flood
Afghanistan 1990 1 1
Afghanistan 1992 1 0
...
Albania 1991 1 1
...
i.e. I would like to group in the same observation all the disasters occurred in a given year (type_extreme_temp and type_flood are dummies =1 if that type of disaster occurred at least once in that year).
I tried by using proc sort but I didn't succeed.
Any help would be highly appreciated.