Hi All,
I have data that resembles the following:
In the above, I have population data by country-year (population 1). In the above dataset, what I wish for is country 100 to contain data from the second column (population 2), by year, but to be replaced in population1 for the years 1980-1982. The dataset should finally look like:
Any help is much appreciated!
CS
I have data that resembles the following:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(country year population1 population2) 1 1980 100 200 1 1981 100 200 1 1982 100 300 1 1983 100 400 . . . . . . . . 100 1980 . . 100 1981 . . 100 1982 . . 100 1983 . . end
In the above, I have population data by country-year (population 1). In the above dataset, what I wish for is country 100 to contain data from the second column (population 2), by year, but to be replaced in population1 for the years 1980-1982. The dataset should finally look like:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(country year population1 population2) 1 1980 100 200 1 1981 100 200 1 1982 100 300 1 1983 100 400 . . . . . . . . 100 1980 200 . 100 1981 200 . 100 1982 300 . 100 1983 . . end
CS
Comment