Hi All,
I had posted this earlier, but had incorrectly conveyed my qualm. The dataset I have resembles the following:
Here, I have data by country and year, on the average wages by education level (educated or not) of males and females. For expositional purposes, there are only 3 countries, and 2 years. A balanced panel consists of data on male and female average wages, for both education levels (educated or not). A complete set of observations is for country 3, in year 2001.
I wish to make this panel dataset balanced, i.e. fill in place holders even for combinations of missing observations. This would mean that for 2000, I would expand "down" for country 1, have two more cells (one for educated males and one for not educated females), but with missing values for average value. For these missing values, I will be using an econometric model to impute them. But, in order to perform the imputation, I need to have this panel dataset balanced.
Any guidance on this is much appreciated.
Many Thanks,
CS
I had posted this earlier, but had incorrectly conveyed my qualm. The dataset I have resembles the following:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float country str7 Gender str12 Education float(AverageValue year) 1 "Male" "Not Educated" 2000 2000 1 "Female" "Educated" 3000 2000 2 "Male" "Educated" 3000 2000 3 "Female " "Not Educated" 4000 2000 1 "Male" "Educated" 3000 2001 1 "Female" "Educated" 3000 2001 2 "Female" "Educated" 3000 2001 3 "Male" "Educated" 3000 2001 3 "Male" "Not Educated" 2000 2001 3 "Female" "Educated" 3000 2001 3 "Female" "Not Educated" 2000 2001 end
Here, I have data by country and year, on the average wages by education level (educated or not) of males and females. For expositional purposes, there are only 3 countries, and 2 years. A balanced panel consists of data on male and female average wages, for both education levels (educated or not). A complete set of observations is for country 3, in year 2001.
I wish to make this panel dataset balanced, i.e. fill in place holders even for combinations of missing observations. This would mean that for 2000, I would expand "down" for country 1, have two more cells (one for educated males and one for not educated females), but with missing values for average value. For these missing values, I will be using an econometric model to impute them. But, in order to perform the imputation, I need to have this panel dataset balanced.
Any guidance on this is much appreciated.
Many Thanks,
CS
Comment