I want to add multiple rows by deriving them from a string column in Stata. To be more precise I have a dataset like below:
year countryname intensitylevel 1990 India, Pakistan 1 1991 India, Pakistan 1 1992 India, Pakistan 1 1996 India, Pakistan 1 So, I want to split the countryname variable for each countries separately and at the end I want to have a dataset like below:
year countryname intensitylevel 1990 India 1 1990 Pakistan 1 1991 India 1 1991 Pakistan 1
so on.... Any help would be much appreciated. Thanks.
year countryname intensitylevel 1990 India, Pakistan 1 1991 India, Pakistan 1 1992 India, Pakistan 1 1996 India, Pakistan 1 So, I want to split the countryname variable for each countries separately and at the end I want to have a dataset like below:
year countryname intensitylevel 1990 India 1 1990 Pakistan 1 1991 India 1 1991 Pakistan 1
so on.... Any help would be much appreciated. Thanks.
Comment