Hi all, I'm after some assistance. I need to fill in the years in between the observations in the following dataset: data have;
input Country $ Year Disaster $;
datalines;
Afghanistan 1990 Flood
Afghanistan 1993 Epidemic
...
Afghanistan 2020 Storm
Albania 1992 Landslide
Albania 1994 Storm
...
Albania 2014 Epidemic
... I would like to have all the observation for each country ranging from year 1990 to 2020, with a value "None" on the variable disaster for the years in which no disaster was registered. For example: datalines;
Afghanistan 1990 Flood
Afghanistan 1991 None
Afghanistan 1992 None
Afghanistan 1993 Epidemic
...
Afghanistan 2020 Storm
Albania 1990 None
Albania 1991 None
Albania 1992 Landslide
Albania 1993 None
Albania 1994 Storm
...
Albania 2014 Epidemic
...
Albania 2020 None Any help would be greatly appreciated .
... View more