Hello everyone!
I am struggling with this data management task in the table below:
In the part of the dataset below, you have the number of infant death caused by two disease, disaggregated at regional level.
![Click image for larger version
Name: Schermata 2019-07-04 alle 16.38.31.png
Views: 1
Size: 288.9 KB
ID: 1506082](filedata/fetch?id=1506082&d=1562251601&type=full)
So, as you can see, the mdreg_1 variable tells me which part of the world the observations are from.
These have been sorted by year, as you can see.
Now I want to add another label for this mdreg_1 var which takes the value World and this must be equal to the sum of all death by disease.
I struggle to do this, in the sense that I can generate with egen the count of death by disease by year but this will jsut be another variable while I need World to just be an additional row for each year.
The reason why I need World to be on another row is just as I was asked to do so in a test I was given sometime ago.
Thanks very much for your support!
Maria
I am struggling with this data management task in the table below:
In the part of the dataset below, you have the number of infant death caused by two disease, disaggregated at regional level.
So, as you can see, the mdreg_1 variable tells me which part of the world the observations are from.
These have been sorted by year, as you can see.
Now I want to add another label for this mdreg_1 var which takes the value World and this must be equal to the sum of all death by disease.
I struggle to do this, in the sense that I can generate with egen the count of death by disease by year but this will jsut be another variable while I need World to just be an additional row for each year.
The reason why I need World to be on another row is just as I was asked to do so in a test I was given sometime ago.
Thanks very much for your support!
Maria
Comment