Hi all,
I have a panel dataset where I want to generate new panel units and calculate data for them based on the existing ones. To be more precise: my dataset includes country level data (e.g. GDP, employment, etc.) for about 180 countries; it also includes the same variables for selected cities within each country. Summing up the city-level data for each country is always less than the corresponding country aggregate, so what I want to do is to generate new data for each country with the residual values of each variable.
For example: I have GDP for the U.K. as a whole. I also have GDP for London, Birmingham and Manchester. What I need to do is generate a new panel entry, called let's say UK_other, for which I will then calculate and store the corresponding part of the GDP as: GDP(UK) - GDP(London) - GDP(Birmingham) - GDP(Manchester).
Any help would be greatly appreciated.
best,
Stefanos
I have a panel dataset where I want to generate new panel units and calculate data for them based on the existing ones. To be more precise: my dataset includes country level data (e.g. GDP, employment, etc.) for about 180 countries; it also includes the same variables for selected cities within each country. Summing up the city-level data for each country is always less than the corresponding country aggregate, so what I want to do is to generate new data for each country with the residual values of each variable.
For example: I have GDP for the U.K. as a whole. I also have GDP for London, Birmingham and Manchester. What I need to do is generate a new panel entry, called let's say UK_other, for which I will then calculate and store the corresponding part of the GDP as: GDP(UK) - GDP(London) - GDP(Birmingham) - GDP(Manchester).
Any help would be greatly appreciated.
best,
Stefanos
Comment