diff --git a/00_documentation/002_repo_structure/0022_dataset_tables/enrollment.md b/00_documentation/002_repo_structure/0022_dataset_tables/enrollment.md index 780e41f..7b47bda 100644 --- a/00_documentation/002_repo_structure/0022_dataset_tables/enrollment.md +++ b/00_documentation/002_repo_structure/0022_dataset_tables/enrollment.md @@ -26,6 +26,18 @@ traitvars: enrollment_source enrollment_definition year_enrollment . codebook, compact Variable Obs Unique Mean Min Max Label +<<<<<<< HEAD +--------------------------------------------------------------------------------------------------------------------------------------- +countrycode 6727 217 . . . WB country code (3 letters) +year 6727 31 2005 1990 2020 Year +en~dated_all 6231 2964 87.78292 19.18834 100 Validated % of children enrolled in school (using closest year, both genders) +enr~dated_fe 5220 2565 86.06985 15.47124 100 Validated % of children enrolled in school (using closest year, female only) +enr~dated_ma 5224 2567 87.75847 22.7423 100 Validated % of children enrolled in school (using closest year, male only) +e~dated_flag 6727 2 .2332392 0 1 Flag for enrollment by gender filled up from aggregate (>=98.5%) +en~lated_all 6231 3967 87.81469 19.18834 100 Validated % of children enrolled in school (using interpolation, both genders) +enr~lated_fe 4614 2766 87.00985 15.47124 100 Validated % of children enrolled in school (using interpolation, female only) +enr~lated_ma 4618 2769 88.48919 22.7423 100 Validated % of children enrolled in school (using interpolation, male only) +======= ----------------------------------------------------------------------------------------------------------------------- countrycode 6727 217 . . . WB country code (3 letters) year 6727 31 2005 1990 2020 Year @@ -36,10 +48,15 @@ e~dated_flag 6727 2 .2332392 0 1 Flag for enrollment by gend en~lated_all 6231 3967 87.81469 19.18834 100 Validated % of children enrolled in school (using interpolation... enr~lated_fe 4614 2766 87.00985 15.47124 100 Validated % of children enrolled in school (using interpolation... enr~lated_ma 4618 2769 88.48919 22.7423 100 Validated % of children enrolled in school (using interpolation... +>>>>>>> develop e~lated_flag 6727 2 .2357663 0 1 Flag for enrollment by gender filled up from aggregate (>=98.5%) enrollmen~ce 6727 4 . . . The source used for this enrollment value enrollment~n 6727 6 . . . The definition used for this enrollment value year_enrol~t 6231 30 2005.948 1990 2019 The year that the enrollment value is from +<<<<<<< HEAD +--------------------------------------------------------------------------------------------------------------------------------------- +======= ----------------------------------------------------------------------------------------------------------------------- +>>>>>>> develop ~~~~ diff --git a/00_documentation/002_repo_structure/0022_dataset_tables/population.md b/00_documentation/002_repo_structure/0022_dataset_tables/population.md index eb93eac..265f47c 100644 --- a/00_documentation/002_repo_structure/0022_dataset_tables/population.md +++ b/00_documentation/002_repo_structure/0022_dataset_tables/population.md @@ -26,12 +26,27 @@ traitvars: population_source . codebook, compact Variable Obs Unique Mean Min Max Label +<<<<<<< HEAD +--------------------------------------------------------------------------------------------------------------------------------------- +======= ----------------------------------------------------------------------------------------------------------------------- +>>>>>>> develop countrycode 13237 217 . . . WB country code (3 letters) year_popul~n 13237 61 2020 1990 2050 Year of population populat~e_10 11795 6832 320676.8 479 1.33e+07 Female population aged 10 (WB API) popul~e_0516 11795 9464 3837089 5500 1.43e+08 Female population aged 05-16 (WB API) po~e_primary 10941 8257 2210692 3477 7.53e+07 Female population primary age, country specific (WB API) +<<<<<<< HEAD +popu~e_9plus 11413 8005 1198257 967 5.14e+07 Female population aged 9 to end of primary, country specific (WB API) +populat~a_10 11795 6836 339959 492 1.42e+07 Male population aged 10 (WB API) +popul~a_0516 11795 9528 4067005 5800 1.60e+08 Male population aged 05-16 (WB API) +po~a_primary 10941 8286 2343564 3858 8.08e+07 Male population primary age, country specific (WB API) +popu~a_9plus 11413 8004 1265978 1007 5.52e+07 Male population aged 9 to end of primary, country specific (WB API) +populat~l_10 11795 7468 660635.8 971 2.75e+07 Total population aged 10 (WB API) +popul~l_0516 11795 10279 7904094 11300 3.04e+08 Total population aged 05-16 (WB API) +po~l_primary 10941 9035 4554256 7335 1.56e+08 Total population primary age, country specific (WB API) +popu~l_9plus 11413 8713 2464235 1974 1.07e+08 Total population aged 9 to end of primary, country specific (WB API) +======= popu~e_9plus 11413 8005 1198257 967 5.14e+07 Female population aged 9 to end of primary, country specific ... populat~a_10 11795 6836 339959 492 1.42e+07 Male population aged 10 (WB API) popul~a_0516 11795 9528 4067005 5800 1.60e+08 Male population aged 05-16 (WB API) @@ -41,10 +56,15 @@ populat~l_10 11795 7468 660635.8 971 2.75e+07 Total population aged 10 popul~l_0516 11795 10279 7904094 11300 3.04e+08 Total population aged 05-16 (WB API) po~l_primary 10941 9035 4554256 7335 1.56e+08 Total population primary age, country specific (WB API) popu~l_9plus 11413 8713 2464235 1974 1.07e+08 Total population aged 9 to end of primary, country specific (... +>>>>>>> develop popul~e_1014 11792 8157 1582125 2300 6.21e+07 Female population between ages 10 to 14 (WB API) popul~a_1014 11792 8190 1676713 2300 6.72e+07 Male population between ages 10 to 14 (WB API) popul~l_1014 11792 8890 3258838 4600 1.29e+08 Total population between ages 10 to 14 (WB API) population~e 13237 1 . . . The source used for population variables +<<<<<<< HEAD +--------------------------------------------------------------------------------------------------------------------------------------- +======= ----------------------------------------------------------------------------------------------------------------------- +>>>>>>> develop ~~~~ diff --git a/00_documentation/002_repo_structure/0022_dataset_tables/proficiency.md b/00_documentation/002_repo_structure/0022_dataset_tables/proficiency.md index 3d2f3c6..091e56a 100644 --- a/00_documentation/002_repo_structure/0022_dataset_tables/proficiency.md +++ b/00_documentation/002_repo_structure/0022_dataset_tables/proficiency.md @@ -26,7 +26,11 @@ traitvars: min_proficiency_threshold source_assessment surveyid . codebook, compact Variable Obs Unique Mean Min Max Label +<<<<<<< HEAD +--------------------------------------------------------------------------------------------------------------------------------------- +======= ----------------------------------------------------------------------------------------------------------------------- +>>>>>>> develop countrycode 831 153 . . . WB country code (3 letters) year 831 21 2011.366 1996 2019 Year of assessment idgrade 831 4 4.309266 3 6 Grade ID @@ -48,6 +52,10 @@ fgt2_ma 693 693 .0387286 .0017091 .4102417 Avg gap squared to minim min_profic~d 822 18 . . . Minimum Proficiency Threshold (assessment-specific) source_ass~t 831 3 . . . Source of assessment data surveyid 831 580 . . . SurveyID (countrycode_year_assessment) +<<<<<<< HEAD +--------------------------------------------------------------------------------------------------------------------------------------- +======= ----------------------------------------------------------------------------------------------------------------------- +>>>>>>> develop ~~~~ diff --git a/00_documentation/002_repo_structure/0022_dataset_tables/rawfull.md b/00_documentation/002_repo_structure/0022_dataset_tables/rawfull.md index a55dd7f..526496c 100644 --- a/00_documentation/002_repo_structure/0022_dataset_tables/rawfull.md +++ b/00_documentation/002_repo_structure/0022_dataset_tables/rawfull.md @@ -26,7 +26,11 @@ traitvars: year_enrollment year_population source_assessment enrollment_source p . codebook, compact Variable Obs Unique Mean Min Max Label +<<<<<<< HEAD +--------------------------------------------------------------------------------------------------------------------------------------- +======= ----------------------------------------------------------------------------------------------------------------------- +>>>>>>> develop countrycode 1042 217 . . . WB country code (3 letters) year_asses~t 1042 21 2012.495 1996 2019 Year of assessment idgrade 1042 5 -204.6315 -999 6 Grade ID @@ -45,6 +49,28 @@ fgt1_ma 687 687 .1403113 .0298228 .5797679 Avg gap to minimum pro fgt2_all 687 687 .0366347 .001687 .390271 Avg gap squared to minimum proficiency (all, FGT2) fgt2_fe 687 687 .0335486 .0011683 .3641997 Avg gap squared to minimum proficiency (fe, FGT2) fgt2_ma 687 687 .0389487 .0017091 .4102417 Avg gap squared to minimum proficiency (ma, FGT2) +<<<<<<< HEAD +en~dated_all 1022 584 92.44464 23.54786 100 Validated % of children enrolled in school (using closest year, both genders) +enr~dated_fe 862 486 91.9935 16.75778 100 Validated % of children enrolled in school (using closest year, female only) +enr~dated_ma 864 488 92.50133 30.29106 100 Validated % of children enrolled in school (using closest year, male only) +e~dated_flag 1042 2 .2303263 0 1 Flag for enrollment by gender filled up from aggregate (>=98.5%) +en~lated_all 1022 622 92.4566 23.54786 100 Validated % of children enrolled in school (using interpolation, both gend... +enr~lated_fe 792 463 92.7003 16.75778 100 Validated % of children enrolled in school (using interpolation, female only) +enr~lated_ma 794 464 93.03792 30.29106 100 Validated % of children enrolled in school (using interpolation, male only) +e~lated_flag 1042 2 .2447217 0 1 Flag for enrollment by gender filled up from aggregate (>=98.5%) +populat~e_10 1016 193 293790.7 672 1.21e+07 Female population aged 10 (WB API) +popul~e_0516 1016 193 3507837 8061 1.43e+08 Female population aged 05-16 (WB API) +po~e_primary 970 179 2013042 4379 7.18e+07 Female population primary age, country specific (WB API) +popu~e_9plus 990 186 1085839 1356 3.63e+07 Female population aged 9 to end of primary, country specific (WB API) +populat~a_10 1016 193 310473.2 687 1.34e+07 Male population aged 10 (WB API) +popul~a_0516 1016 193 3706547 8324 1.59e+08 Male population aged 05-16 (WB API) +po~a_primary 970 179 2125880 4534 7.94e+07 Male population primary age, country specific (WB API) +popu~a_9plus 990 186 1143901 1400 4.03e+07 Male population aged 9 to end of primary, country specific (WB API) +populat~l_10 1016 193 604263.9 1359 2.55e+07 Total population aged 10 (WB API) +popul~l_0516 1016 193 7214384 16385 3.02e+08 Total population aged 05-16 (WB API) +po~l_primary 970 179 4138922 8913 1.51e+08 Total population primary age, country specific (WB API) +popu~l_9plus 990 186 2229740 2756 7.65e+07 Total population aged 9 to end of primary, country specific (WB API) +======= en~dated_all 1022 584 92.44464 23.54786 100 Validated % of children enrolled in school (using closest ... enr~dated_fe 862 486 91.9935 16.75778 100 Validated % of children enrolled in school (using closest ... enr~dated_ma 864 488 92.50133 30.29106 100 Validated % of children enrolled in school (using closest ... @@ -65,6 +91,7 @@ populat~l_10 1016 193 604263.9 1359 2.55e+07 Total population aged popul~l_0516 1016 193 7214384 16385 3.02e+08 Total population aged 05-16 (WB API) po~l_primary 970 179 4138922 8913 1.51e+08 Total population primary age, country specific (WB API) popu~l_9plus 990 186 2229740 2756 7.65e+07 Total population aged 9 to end of primary, country specifi... +>>>>>>> develop popul~e_1014 1016 193 1432652 3328 6.01e+07 Female population between ages 10 to 14 (WB API) popul~a_1014 1016 193 1514505 3467 6.72e+07 Male population between ages 10 to 14 (WB API) popul~l_1014 1016 193 2947158 6795 1.27e+08 Total population between ages 10 to 14 (WB API) @@ -86,6 +113,10 @@ incomeleve~e 1042 4 . . . Income Level Name lendingtype 1042 4 . . . Lending Type Code lendingty~me 1042 4 . . . Lending Type Name cmu 774 48 . . . WB Country Management Unit +<<<<<<< HEAD +--------------------------------------------------------------------------------------------------------------------------------------- +======= ----------------------------------------------------------------------------------------------------------------------- +>>>>>>> develop ~~~~ diff --git a/00_documentation/002_repo_structure/0022_dataset_tables/rawlatest.md b/00_documentation/002_repo_structure/0022_dataset_tables/rawlatest.md index 998c080..45e992e 100644 --- a/00_documentation/002_repo_structure/0022_dataset_tables/rawlatest.md +++ b/00_documentation/002_repo_structure/0022_dataset_tables/rawlatest.md @@ -13,20 +13,32 @@ sources: All population, enrollment and proficiency sources combined. ~~~~ +<<<<<<< HEAD +About the **49 variables** in this dataset: +======= About the **52 variables** in this dataset: +>>>>>>> develop ~~~~ The variables belong to the following variable classifications: idvars valuevars traitvars idvars: countrycode preference +<<<<<<< HEAD +valuevars: adj_nonprof_all adj_nonprof_fe adj_nonprof_ma nonprof_all se_nonprof_all nonprof_ma se_nonprof_ma nonprof_fe se_nonprof_fe fgt1_all fgt1_fe fgt1_ma fgt2_all fgt2_fe fgt2_ma enrollment_all enrollment_ma enrollment_fe population_2017_fe population_2017_ma population_2017_all population_source anchor_population anchor_population_w_assessment +======= valuevars: adj_nonprof_all adj_nonprof_fe adj_nonprof_ma nonprof_all se_nonprof_all nonprof_ma se_nonprof_ma nonprof_fe se_nonprof_fe fgt1_all fgt1_fe fgt1_ma fgt2_all fgt2_fe fgt2_ma enrollment_all enrollment_ma enrollment_fe population_fe_0516 population_ma_0516 population_all_0516 population_2017_fe population_2017_ma population_2017_all population_source anchor_population anchor_population_w_assessment +>>>>>>> develop traitvars: idgrade test nla_code subject year_assessment year_enrollment enrollment_flag enrollment_source enrollment_definition min_proficiency_threshold surveyid countryname region regionname adminregion adminregionname incomelevel incomelevelname lendingtype lendingtypename cmu preference_description lp_by_gender_is_available . codebook, compact Variable Obs Unique Mean Min Max Label +<<<<<<< HEAD +--------------------------------------------------------------------------------------------------------------------------------------- +======= ----------------------------------------------------------------------------------------------------------------------- +>>>>>>> develop countrycode 217 217 . . . WB country code (3 letters) preference 217 1 . . . Preference adj_nonpro~l 121 121 40.24131 2.186121 97.71729 Learning Poverty (adjusted non-proficiency, all) @@ -44,12 +56,18 @@ fgt1_ma 110 110 .1503822 .0448706 .5445552 Avg gap to minimum profi fgt2_all 110 110 .0393368 .0034088 .3331398 Avg gap squared to minimum proficiency (all, FGT2) fgt2_fe 110 110 .0356563 .0031767 .2936567 Avg gap squared to minimum proficiency (fe, FGT2) fgt2_ma 110 110 .0419848 .0035797 .3594563 Avg gap squared to minimum proficiency (ma, FGT2) +<<<<<<< HEAD +enrollment~l 201 197 90.5746 23.54786 100 Validated % of children enrolled in school (using closest year, both genders) +enrollment~a 161 157 90.01606 30.29106 100 Validated % of children enrolled in school (using closest year, male only) +enrollmen~fe 160 156 89.272 16.75778 100 Validated % of children enrolled in school (using closest year, female only) +======= enrollment~l 201 197 90.5746 23.54786 100 Validated % of children enrolled in school (using closest ye... enrollment~a 161 157 90.01606 30.29106 100 Validated % of children enrolled in school (using closest ye... enrollmen~fe 160 156 89.272 16.75778 100 Validated % of children enrolled in school (using closest ye... popul~e_0516 193 193 3799861 8061 1.43e+08 Female population aged 05-16 (WB API) popul~a_0516 193 193 4067900 8324 1.59e+08 Male population aged 05-16 (WB API) popul~l_0516 193 193 7867761 16385 3.02e+08 Total population aged 05-16 (WB API) +>>>>>>> develop populatio~fe 193 193 1553426 3328 6.01e+07 Female population between ages 10 to 14 (WB API) population~a 193 193 1664672 3467 6.72e+07 Male population between ages 10 to 14 (WB API) population~l 193 193 3218098 6795 1.27e+08 Total population between ages 10 to 14 (WB API) @@ -62,7 +80,11 @@ nla_code 217 11 . . . Reference code for NLA i subject 217 4 . . . Subject year_asses~t 217 13 2015.857 2001 2019 Year of assessment year_enrol~t 201 18 2013.99 1993 2018 The year that the enrollment value is from +<<<<<<< HEAD +enrollment~g 217 2 .235023 0 1 Flag for enrollment by gender filled up from aggregate (>=98.5%) +======= enrollment~g 217 2 .235023 0 1 Flag for enrollment by gender filled up from aggregate (>=98... +>>>>>>> develop enrollmen~ce 217 4 . . . The source used for this enrollment value enrollment~n 217 6 . . . The definition used for this enrollment value min_profic~d 116 10 . . . Minimum Proficiency Threshold (assessment-specific) @@ -79,6 +101,10 @@ lendingty~me 217 4 . . . Lending Type Name cmu 169 48 . . . WB Country Management Unit preference~n 217 1 . . . Preference description lp_by_gend~e 217 2 .4239631 0 1 Dummy for availibility of Learning Poverty gender disaggregated +<<<<<<< HEAD +--------------------------------------------------------------------------------------------------------------------------------------- +======= ----------------------------------------------------------------------------------------------------------------------- +>>>>>>> develop ~~~~ diff --git a/05_working_paper/052_programs/0523_bmp_pisa_validation.do b/05_working_paper/052_programs/0523_bmp_pisa_validation.do index 72aa611..261f675 100644 --- a/05_working_paper/052_programs/0523_bmp_pisa_validation.do +++ b/05_working_paper/052_programs/0523_bmp_pisa_validation.do @@ -3,6 +3,11 @@ *==============================================================================* qui { + * Change here only if wanting to use a different preference + * than what is being passed in the global in 032_run + * But don't commit any change here (only commit in global 032_run) + local chosen_preference = $chosen_preference + *----------------------------------------------------------------------------- local outputs "${clone}/05_working_paper/053_outputs" local rawdata "${clone}/05_working_paper/051_rawdata" @@ -14,7 +19,7 @@ qui { *----------------------------------------------------------------------------- * create and save Learning Poverty dataset - use "${clone}/01_data/013_outputs/preference1005.dta", clear + use "${clone}/01_data/013_outputs/preference`chosen_preference'.dta", clear keep if !missing(adj_nonprof_all) sort region countryname local vars2keep "countrycode countryname enrollment_all nonprof_all adj_nonprof_all test year_assessment" diff --git a/05_working_paper/052_programs/0525_export_excel.do b/05_working_paper/052_programs/0525_export_excel.do index e88fe03..211d09a 100644 --- a/05_working_paper/052_programs/0525_export_excel.do +++ b/05_working_paper/052_programs/0525_export_excel.do @@ -3,6 +3,16 @@ *==============================================================================* qui { + * Change here only if wanting to use a different preference + * than what is being passed in the global in 032_run + * But don't commit any change here (only commit in global 032_run) + local chosen_preference = $chosen_preference + + * Change here only if wanting to use a different anchor year + * than what is being passed in the global in 012_run + * But don't commit any change here (only commit in global 012_run) + local anchor_year = $anchor_year + * File that will be updated, one worksheet at a time from the template global template_file "${clone}/05_working_paper/051_rawdata/LPV_Tables_Figures_Template.xlsx" global excel_file "${clone}/05_working_paper/053_outputs/LPV_Tables_Figures.xlsx" @@ -123,7 +133,7 @@ qui { *----------------------------------------------------------------------------- * Only count what is in the Global Number tempfile in_global_number - use "${clone}/01_data/013_outputs/preference1005.dta", clear + use "${clone}/01_data/013_outputs/preference`chosen_preference'.dta", clear * Those 3 PASEC are "desguised" as NLAs because they belong to an earlier round replace test = "PASEC" if inlist(countrycode,"MLI","MDG","COD") gen byte included = (year_assessment >= 2011 & lendingtype != "LNX") @@ -162,7 +172,7 @@ qui { destring year, replace force tempfile cutoff_nla save `cutoff_nla', replace - use "${clone}/01_data/013_outputs/preference1005.dta", clear + use "${clone}/01_data/013_outputs/preference`chosen_preference'.dta", clear replace test = "PASEC" if inlist(countrycode,"MLI","MDG","COD") keep if test == "NLA" keep countryname year_assessment nla_code @@ -369,23 +379,27 @@ qui { * Corresponding notes below the table: * - list of Enrollment gender flag countries - use "${clone}/01_data/013_outputs/preference1005.dta", clear + use "${clone}/01_data/013_outputs/preference`chosen_preference'.dta", clear keep if enrollment_flag & lp_by_gender_is_available keep countrycode countryname export excel using "${excel_file}", sheet("T8", modify) cell(B29) nolabel keepcellfmt * - share of population with gender disaggregated data - use "${clone}/01_data/013_outputs/preference1005.dta", clear - collapse (sum) population_2015_all, by(lp_by_gender_is_available) - sum population_2015_all - gen share = population_2015_all / `r(sum)' + use "${clone}/01_data/013_outputs/preference`chosen_preference'.dta", clear + collapse (sum) population_`anchor_year'_all, by(lp_by_gender_is_available) + sum population_`anchor_year'_all + gen share = population_`anchor_year'_all / `r(sum)' gen group = "all countries" export excel using "${excel_file}", sheet("T8", modify) cell(J29) firstrow(variables) nolabel keepcellfmt +<<<<<<< HEAD + use "${clone}/01_data/013_outputs/preference`chosen_preference'.dta", clear +======= use "${clone}/01_data/013_outputs/preference1005.dta", clear +>>>>>>> develop keep if lendingtype != "LNX" - collapse (sum) population_2015_all, by(lp_by_gender_is_available) - sum population_2015_all - gen share = population_2015_all / `r(sum)' + collapse (sum) population_`anchor_year'_all, by(lp_by_gender_is_available) + sum population_`anchor_year'_all + gen share = population_`anchor_year'_all / `r(sum)' gen group = "low and middle income countries" export excel using "${excel_file}", sheet("T8", modify) cell(J34) firstrow(variables) nolabel keepcellfmt @@ -485,11 +499,19 @@ qui { *----------------------------------------------------------------------------- * Table 12 Learning poverty rates in 2030 under two scenarios (simulation using spells by region) *----------------------------------------------------------------------------- +<<<<<<< HEAD + local table_12_A_file "simfile_preference_`chosen_preference'_regional_growth_summarytable.dta" + local table_12_B_file "simfile_preference_`chosen_preference'_income_level_summarytable.dta" + local table_12_C_file "simfile_preference_`chosen_preference'_initial_poverty_level_summarytable.dta" + local table_12_D_file "simfile_preference_`chosen_preference'_regional_growth_glossy_summarytable.dta" + local table_12_E_file "simfile_preference_`chosen_preference'_regional_growth_min2_summarytable.dta" +======= local table_12_A_file "simfile_preference_1005_regional_growth_summarytable.dta" local table_12_B_file "simfile_preference_1005_income_level_summarytable.dta" local table_12_C_file "simfile_preference_1005_initial_poverty_level_summarytable.dta" local table_12_D_file "simfile_preference_1005_regional_growth_glossy_summarytable.dta" local table_12_E_file "simfile_preference_1005_regional_growth_min2_summarytable.dta" +>>>>>>> develop local table_12_A_place "B9" local table_12_B_place "B25" local table_12_C_place "B37" @@ -556,10 +578,15 @@ qui { *----------------------------------------------------------------------------- +<<<<<<< HEAD +======= *----------------------------------------------------------------------------- * Table 16 Source of enrollment data +>>>>>>> develop *----------------------------------------------------------------------------- - use "${clone}/01_data/013_outputs/preference1005.dta", clear + * Table 16 Source of enrollment data + *----------------------------------------------------------------------------- + use "${clone}/01_data/013_outputs/preference`chosen_preference'.dta", clear keep if !missing(adj_nonprof_all) preserve collapse (count) freq=adj_nonprof_all, by(enrollment_definition) @@ -583,15 +610,15 @@ qui { *----------------------------------------------------------------------------- * Table 17 Population ages 10-14 years old by region and income classifications (Year = 2015) *----------------------------------------------------------------------------- - use "${clone}/01_data/013_outputs/preference1005.dta", clear - keep regionname incomelevel population_2015_all - separate population_2015_all , by(incomelevel) - collapse (sum) population_2015_all?, by(regionname) - label var population_2015_all1 "High income Countries" - label var population_2015_all2 "Low income Countries" - label var population_2015_all3 "Low-middle income" - label var population_2015_all4 "Upper-middle income" - order regionname population_2015_all1 population_2015_all4 population_2015_all3 population_2015_all2 + use "${clone}/01_data/013_outputs/preference`chosen_preference'.dta", clear + keep regionname incomelevel population_`anchor_year'_all + separate population_`anchor_year'_all , by(incomelevel) + collapse (sum) population_`anchor_year'_all?, by(regionname) + label var population_`anchor_year'_all1 "High income Countries" + label var population_`anchor_year'_all2 "Low income Countries" + label var population_`anchor_year'_all3 "Low-middle income" + label var population_`anchor_year'_all4 "Upper-middle income" + order regionname population_`anchor_year'_all1 population_`anchor_year'_all4 population_`anchor_year'_all3 population_`anchor_year'_all2 preserve collapse (sum) population* gen regionname = "Global" @@ -599,8 +626,13 @@ qui { save `globalpop', replace restore append using `globalpop' +<<<<<<< HEAD + egen population_`anchor_year'_alltotal = rowtotal(population_`anchor_year'_all?) + label var population_`anchor_year'_alltotal "Total" +======= egen population_2015_alltotal = rowtotal(population_2015_all?) label var population_2015_alltotal "Total" +>>>>>>> develop export excel using "${excel_file}", sheet("T17", modify) cell(B6) firstrow(varlabels) nolabel keepcellfmt noi disp as txt "Table 17 exported" @@ -664,7 +696,7 @@ qui { *----------------------------------------------------------------------------- * Table 20 Country Numbers *----------------------------------------------------------------------------- - use "${clone}/01_data/013_outputs/preference1005.dta", clear + use "${clone}/01_data/013_outputs/preference`chosen_preference'.dta", clear keep if year_assessment >= 2011 & !missing(adj_nonprof_all) gen oos_all = 100 - enrollment_all sort region countryname @@ -763,8 +795,13 @@ qui { collapse (max) *_countries, by(countrycode idgrade) keep if rich_countries == 1 | client_countries == 1 merge m:1 countrycode using "${clone}/01_data/013_outputs/rawlatest.dta", keepusing(population_2017_all) assert(match using) keep(match) nogen +<<<<<<< HEAD + gen population_rich = population_`anchor_year'_all * rich_countries + gen population_client = population_`anchor_year'_all * client_countries +======= gen population_rich = population_2017_all * rich_countries gen population_client = population_2017_all * client_countries +>>>>>>> develop collapse (sum) population_rich population_client, by(idgrade) egen population_all = rowtotal(population_rich population_client) assert _N == 3 @@ -864,7 +901,11 @@ qui { * Figure 4 Learning poverty gender gap, by country * Figure 5 Learning poverty gender gap by the level of Learning Poverty *----------------------------------------------------------------------------- +<<<<<<< HEAD + use "${clone}/01_data/013_outputs/preference`chosen_preference'.dta", clear +======= use "${clone}/01_data/013_outputs/preference1005.dta", clear +>>>>>>> develop replace lp_by_gender_is_available = 0 if inlist(countrycode,"MNG","PHL") keep if lp_by_gender_is_available keep countrycode adj_* @@ -902,7 +943,7 @@ qui { *----------------------------------------------------------------------------- * Figure 8 Learning poverty under two scenarios, 2015-30 (simulation) *----------------------------------------------------------------------------- - use "${clone}/02_simulation/023_outputs/simfile_preference_1005_regional_growth_fulltable.dta", clear + use "${clone}/02_simulation/023_outputs/simfile_preference_`chosen_preference'_regional_growth_fulltable.dta", clear keep if year>=2015 & year<=2030 keep if region == "_Overall" keep if inlist(benchmark,"_own_","_r80_")