From b71ec07057159bef83c52c52f7ce21fd7474c1c6 Mon Sep 17 00:00:00 2001 From: Mario G <63501500+gronert-m@users.noreply.github.com> Date: Fri, 18 Oct 2024 15:25:31 -0400 Subject: [PATCH] Add in code, addendums to CSD --- .../ARM_2008_ILCS_V01_M_V01_A_GLD_ALL.do | 1753 +++++++++++++++ .../ARM_2009_ILCS_V01_M_V01_A_GLD_ALL.do | 1798 ++++++++++++++++ .../ARM_2010_ILCS_V01_M_V01_A_GLD_ALL.do | 1767 +++++++++++++++ .../ARM_2011_ILCS_V01_M_V01_A_GLD_ALL.do | 1782 +++++++++++++++ .../ARM_2012_ILCS_V01_M_V01_A_GLD_ALL.do | 1818 ++++++++++++++++ .../ARM_2013_ILCS_V01_M_V01_A_GLD_ALL.do | 1904 +++++++++++++++++ .../ARM/ILCS/1. Introduction to ARM ILCS.md | 26 +- .../ARM/ILCS/utilities/education_vars.png | Bin 0 -> 18161 bytes 8 files changed, 10847 insertions(+), 1 deletion(-) create mode 100644 GLD/ARM/ARM_2008_ILCS/ARM_2008_ILCS_V01_M_V01_A_GLD/Programs/ARM_2008_ILCS_V01_M_V01_A_GLD_ALL.do create mode 100644 GLD/ARM/ARM_2009_ILCS/ARM_2009_ILCS_V01_M_V01_A_GLD/Programs/ARM_2009_ILCS_V01_M_V01_A_GLD_ALL.do create mode 100644 GLD/ARM/ARM_2010_ILCS/ARM_2010_ILCS_V01_M_V01_A_GLD/Programs/ARM_2010_ILCS_V01_M_V01_A_GLD_ALL.do create mode 100644 GLD/ARM/ARM_2011_ILCS/ARM_2011_ILCS_V01_M_V01_A_GLD/Programs/ARM_2011_ILCS_V01_M_V01_A_GLD_ALL.do create mode 100644 GLD/ARM/ARM_2012_ILCS/ARM_2012_ILCS_V01_M_V01_A_GLD/Programs/ARM_2012_ILCS_V01_M_V01_A_GLD_ALL.do create mode 100644 GLD/ARM/ARM_2013_ILCS/ARM_2013_ILCS_V01_M_V01_A_GLD/Programs/ARM_2013_ILCS_V01_M_V01_A_GLD_ALL.do create mode 100644 Support/B - Country Survey Details/ARM/ILCS/utilities/education_vars.png diff --git a/GLD/ARM/ARM_2008_ILCS/ARM_2008_ILCS_V01_M_V01_A_GLD/Programs/ARM_2008_ILCS_V01_M_V01_A_GLD_ALL.do b/GLD/ARM/ARM_2008_ILCS/ARM_2008_ILCS_V01_M_V01_A_GLD/Programs/ARM_2008_ILCS_V01_M_V01_A_GLD_ALL.do new file mode 100644 index 000000000..e32232861 --- /dev/null +++ b/GLD/ARM/ARM_2008_ILCS/ARM_2008_ILCS_V01_M_V01_A_GLD/Programs/ARM_2008_ILCS_V01_M_V01_A_GLD_ALL.do @@ -0,0 +1,1753 @@ + +/*%%============================================================================================= + 0: GLD Harmonization Preamble +==============================================================================================%%*/ + +/* ----------------------------------------------------------------------- + +<_Program name_> ARM_2008_ILCS_V01_M_V01_A_GLD_ALL.do +<_Application_> Stata 18 <_Application_> +<_Author(s)_> World Bank Jobs Group (gld@worldbank.org) +<_Date created_> 2024-09-11 + +------------------------------------------------------------------------- + +<_Country_> Armenia +<_Survey Title_> Integrated Living Conditions Survey +<_Survey Year_> 2008 +<_Study ID_> https://microdatalib.worldbank.org/index.php/catalog/2615 +<_Data collection from_> [MM/YYYY] +<_Data collection to_> [MM/YYYY] +<_Source of dataset_> [Source of data, e.g. NSO] +<_Sample size (HH)_> [#] +<_Sample size (IND)_> [#] +<_Sampling method_> [Brief description] +<_Geographic coverage_> [To what level is data significant] +<_Currency_> [Currency used for wages] + +----------------------------------------------------------------------- + +<_ICLS Version_> [Version of ICLS for Labor Questions] +<_ISCED Version_> [Version of ICLS for Labor Questions] +<_ISCO Version_> [Version of ICLS for Labor Questions] +<_OCCUP National_> [Version of ICLS for Labor Questions] +<_ISIC Version_> [Version of ICLS for Labor Questions] +<_INDUS National_> [Version of ICLS for Labor Questions] + +----------------------------------------------------------------------- +<_Version Control_> + +* Date: [YYYY-MM-DD] - [Description of changes] +* Date: [YYYY-MM-DD] - [Description of changes] + + + +-------------------------------------------------------------------------*/ + + +/*%%============================================================================================= + 1: Setting up of program environment, dataset +==============================================================================================%%*/ + +*----------1.1: Initial commands------------------------------* + +clear +set more off +set mem 800m +set varabbrev off + +*----------1.2: Set directories------------------------------* + +* Define path sections +local server "Y:/GLD-Harmonization/529026_MG/Countries" +local country "ARM" +local year "2008" +local survey "ILCS" +local vermast "V01" +local veralt "V01" + +* From the definitions, set path chunks +local level_1 "`country'_`year'_`survey'" +local level_2_mast "`level_1'_`vermast'_M" +local level_2_harm "`level_1'_`vermast'_M_`veralt'_A_GLD" + +* From chunks, define path_in, path_output folder +local path_in_stata "`server'/`country'/`level_1'/`level_2_mast'/Data/Stata" +local path_in_other "`server'/`country'/`level_1'/`level_2_mast'/Data/Original" +local path_output "`server'/`country'/`level_1'/`level_2_harm'/Data/Harmonized" + +* Define Output file name +local out_file "`level_2_harm'_ALL.dta" + +*----------1.3: Database assembly------------------------------* + +* All steps necessary to merge datasets (if several) to have all elements needed to produce +* harmonized output in a single file + +* Check whether there is a weight file +local has_wf = fileexists("`path_in_stata/weight.dta'") + +* Start with HH +use "`path_in_stata'/hh.dta" + +* If there is a weight file, merge it in +if `has_wf' { + merge 1:1 recno using "`path_in_stata/weight.dta'", assert(match) nogen +} + +* Add member roster +merge 1:m recno using "`path_in_stata'/mem.dta", assert(match) nogen + +* 2008 has employment in mem.dta + +* Add number labels +numlabel, add force + +/*%%============================================================================================= + 2: Survey & ID +==============================================================================================%%*/ + +{ + +*<_countrycode_> + gen str4 countrycode = "ARM" + label var countrycode "Country code" +* + + +*<_survname_> + gen survname = "ILCS" + label var survname "Survey acronym" +* + + +*<_survey_> + gen survey = "GLD" + label var survey "Survey type" +* + + +*<_icls_v_> + gen icls_v = "ICLS-13" + label var icls_v "ICLS version underlying questionnaire questions" +* + + +*<_isced_version_> + gen isced_version = "" + label var isced_version "Version of ISCED used for educat_isced" +* + + +*<_isco_version_> + gen isco_version = "" + label var isco_version "Version of ISCO used" +* + + +*<_isic_version_> + gen isic_version = "isic_3.1" + label var isic_version "Version of ISIC used" +* + + +*<_year_> + gen int year = 2008 + label var year "Year of survey" +* + + +*<_vermast_> + gen vermast = "`vermast'" + label var vermast "Version of master data" +* + + +*<_veralt_> + gen veralt = "`veralt'" + label var veralt "Version of the alt/harmonized data" +* + + +*<_harmonization_> + gen harmonization = "GLD" + label var harmonization "Type of harmonization" +* + + +*<_int_year_> + gen int_year= 2008 + label var int_year "Year of the interview" +* + + +*<_int_month_> + gen int_month = date + label de lblint_month 1 "January" 2 "February" 3 "March" 4 "April" 5 "May" 6 "June" 7 "July" 8 "August" 9 "September" 10 "October" 11 "November" 12 "December" + label value int_month lblint_month + label var int_month "Month of the interview" +* + + +*<_hhid_> +/* <_hhid_note> + + Values are running number. Would have preferred making it a string with 0001 to 5184, but leave as is since + GMD has it this way. For PID concatenate this with 01-12 but leave as is. + + */ + gen hhid = recno + label var hhid "Household ID" +* + + +*<_pid_> + gen pid = memnum + label var pid "Individual ID" +* + + +*<_weight_> + * Weight already exists + *gen weight = . + label var weight "Survey sampling weight" +* + + +*<_weight_m_> + gen weight_m = . + label var weight_m "Survey sampling weight to obtain national estimates for each month" +* + + +*<_weight_q_> + gen weight_q = . + label var weight_q "Survey sampling weight to obtain national estimates for each quarter" +* + + +*<_psu_> + gen psu = . + label var psu "Primary sampling units" +* + + +*<_ssu_> + gen ssu = . + label var ssu "Secondary sampling units" +* + + +*<_strata_> + gen strata = . + label var strata "Strata" +* + + +*<_wave_> + gen wave = . + label var wave "Survey wave" +* + + +*<_panel_> + gen panel = "" + label var panel "Panel individual belongs to" +* + + +*<_visit_no_> + gen visit_no = . + label var visit_no "Visit number in panel" +* + +} + + +/*%%============================================================================================= + 3: Geography +==============================================================================================%%*/ + +{ + +*<_urban_> + * typev is 0 if YErevan, 1 if urban (other), rural is 2 + gen byte urban = inrange(typev, 0,1) + replace urban = 0 if typev == 2 + label var urban "Location is urban" + la de lblurban 1 "Urban" 0 "Rural" + label values urban lblurban +* + + +*<_subnatid1_> +/* <_subnatid1_note> + + The variable is string and country-specific categorical. Numeric entries are coded in string format using the following naming convention: "1 – Hatay". That is, the variable itself is to be string, not a labelled numeric vector. + + Example of entries would be "1 - Alaska", "2 - Arkansas", ... + + */ + gen str subnatid1 = "" + replace subnatid1 = "1 - Yerevan" if marz == 1 + replace subnatid1 = "2 - Aragatsotn" if marz == 2 + replace subnatid1 = "3 - Ararat" if marz == 3 + replace subnatid1 = "4 - Armavir" if marz == 4 + replace subnatid1 = "5 - Gegharkunik" if marz == 5 + replace subnatid1 = "6 - Lori" if marz == 6 + replace subnatid1 = "7 - Kotayk" if marz == 7 + replace subnatid1 = "8 - Shirak" if marz == 8 + replace subnatid1 = "9 - Syunik" if marz == 9 + replace subnatid1 = "10 - Vayoc Dzor" if marz == 10 + replace subnatid1 = "11 - Tavush" if marz == 11 +* + + +*<_subnatid2_> + gen str subnatid2 = "" + label var subnatid2 "Subnational ID at Second Administrative Level" +* + + +*<_subnatid3_> + gen str subnatid3 = "" + label var subnatid3 "Subnational ID at Third Administrative Level" +* + + +*<_subnatidsurvey_> +/* <_subnatidsurvey_note> + + Variable denoting lowest administrative info to which the survey is still significat. + See entry in GLD Guidelines (https://github.com/worldbank/gld/blob/main/Support/A%20-%20Guides%20and%20Documentation/GLD_1.0_Guidelines.docx) for more details + + */ + gen str subnatidsurvey = "" + label var subnatidsurvey "Administrative level at which survey is representative" +* + + +*<_subnatid1_prev_> +/* <_subnatid1_prev_note> + + subnatid1_prev is coded as missing unless the classification used for subnatid1 has changed since the previous survey. + + */ + gen subnatid1_prev = . + label var subnatid1_prev "Classification used for subnatid1 from previous survey" +* + + +*<_subnatid2_prev_> + gen subnatid2_prev = . + label var subnatid2_prev "Classification used for subnatid2 from previous survey" +* + + +*<_subnatid3_prev_> + gen subnatid3_prev = . + label var subnatid3_prev "Classification used for subnatid3 from previous survey" +* + + +*<_gaul_adm1_code_> + gen gaul_adm1_code = . + label var gaul_adm1_code "Global Administrative Unit Layers (GAUL) Admin 1 code" +* + + +*<_gaul_adm2_code_> + gen gaul_adm2_code = . + label var gaul_adm2_code "Global Administrative Unit Layers (GAUL) Admin 2 code" +* + + +*<_gaul_adm3_code_> + gen gaul_adm3_code = . + label var gaul_adm3_code "Global Administrative Unit Layers (GAUL) Admin 3 code" +* + +} + + +/*%%============================================================================================= + 4: Demography +==============================================================================================%%*/ + +{ + +*<_hsize_> + * If keep all + gen hsize = members + /* * If drop absentees + gen helper = 1 + egen hh_abs_no = total(helper), by(recno) + replace hsize = hsize - hh_abs_no + drop helper hh_abs_no + */ + label var hsize "Household size" +* + + +*<_age_> + * Already in there + *gen age = . + label var age "Individual age" +* + + +*<_male_> + gen male = a1_1 + recode male (2 = 0) + label var male "Sex - Ind is male" + la de lblmale 1 "Male" 0 "Female" + label values male lblmale +* + + +*<_relationharm_> + gen relationharm = a1_2 + recode relationharm (4 = 3) (6 = 4) (7 = 5) (8 = 6) + label var relationharm "Relationship to the head of household - Harmonized" + la de lblrelationharm 1 "Head of household" 2 "Spouse" 3 "Children" 4 "Parents" 5 "Other relatives" 6 "Other and non-relatives" + label values relationharm lblrelationharm +* + + +*<_relationcs_> + clonevar relationcs = a1_2 + label var relationcs "Relationship to the head of household - Country original" +* + + +*<_marital_> + gen byte marital = a1_5 + recode marital (3 = 5) (5 = 3) + label var marital "Marital status" + la de lblmarital 1 "Married" 2 "Never Married" 3 "Living together" 4 "Divorced/Separated" 5 "Widowed", replace + label values marital lblmarital +* + + +*<_eye_dsablty_> + gen eye_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all" + label values eye_dsablty dsablty + label var eye_dsablty "Disability related to eyesight" +* + + +*<_hear_dsablty_> + gen hear_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values hear_dsablty dsablty + label var hear_dsablty "Disability related to hearing" +* + + +*<_walk_dsablty_> + gen walk_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values walk_dsablty dsablty + label var walk_dsablty "Disability related to walking or climbing stairs" +* + + +*<_conc_dsord_> + gen conc_dsord = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values conc_dsord dsablty + label var conc_dsord "Disability related to concentration or remembering" +* + + +*<_slfcre_dsablty_> + gen slfcre_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values slfcre_dsablty dsablty + label var slfcre_dsablty "Disability related to selfcare" +* + + +*<_comm_dsablty_> + gen comm_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values comm_dsablty dsablty + label var comm_dsablty "Disability related to communicating" +* + +} + + +/*%%============================================================================================= + 5: Migration +==============================================================================================%%*/ + + +{ + +* Migration questions are at household level this year - cannot use + +*<_migrated_mod_age_> + gen migrated_mod_age = . + label var migrated_mod_age "Migration module application age" +* + + +*<_migrated_ref_time_> + gen migrated_ref_time = . + label var migrated_ref_time "Reference time applied to migration questions (in years)" +* + + +*<_migrated_binary_> + gen migrated_binary = . + label de lblmigrated_binary 0 "No" 1 "Yes" + label values migrated_binary lblmigrated_binary + label var migrated_binary "Individual has migrated" +* + + +*<_migrated_years_> + gen migrated_years = . + label var migrated_years "Years since latest migration" +* + + +*<_migrated_from_urban_> + gen migrated_from_urban = . + label de lblmigrated_from_urban 0 "Rural" 1 "Urban" + label values migrated_from_urban lblmigrated_from_urban + label var migrated_from_urban "Migrated from area" +* + + +*<_migrated_from_cat_> + gen migrated_from_cat = . + label de lblmigrated_from_cat 1 "From same admin3 area" 2 "From same admin2 area" 3 "From same admin1 area" 4 "From other admin1 area" 5 "From other country" + label values migrated_from_cat lblmigrated_from_cat + label var migrated_from_cat "Category of migration area" +* + + +*<_migrated_from_code_> + gen migrated_from_code = . + *label de lblmigrated_from_code + *label values migrated_from_code lblmigrated_from_code + label var migrated_from_code "Code of migration area as subnatid level of migrated_from_cat" +* + + +*<_migrated_from_country_> + gen migrated_from_country = . + label var migrated_from_country "Code of migration country (ISO 3 Letter Code)" +* + + +*<_migrated_reason_> + gen migrated_reason = . + label de lblmigrated_reason 1 "Family reasons" 2 "Educational reasons" 3 "Employment" 4 "Forced (political reasons, natural disaster, …)" 5 "Other reasons" + label values migrated_reason lblmigrated_reason + label var migrated_reason "Reason for migrating" +* + + +} + + +/*%%============================================================================================= + 6: Education +==============================================================================================%%*/ + + +{ + +*<_ed_mod_age_> + +/* <_ed_mod_age_note> + +Education module is only asked to those XX and older. + + */ + +gen byte ed_mod_age = 6 +label var ed_mod_age "Education module application age" + +* + +*<_school_> + gen byte school = 0 + replace school = 1 if e2_4 == 1 + label var school "Attending school" + la de lblschool 0 "No" 1 "Yes" + label values school lblschool +* + + +*<_literacy_> + gen byte literacy = 1 + replace literacy = 0 if e2_2 == 0 + replace literacy = . if mi(e2_2) + label var literacy "Individual can read & write" + la de lblliteracy 0 "No" 1 "Yes" + label values literacy lblliteracy +* + + +*<_educy_> + * Number of years is a combination of level (e2_2) and years in that course (e2_3) + gen byte educy =. + replace educy = 0 if e2_2 == 0 + replace educy = e2_3 if e2_2 == 1 & inrange(e2_3,0,4) + replace educy = 4 + e2_3 if e2_2 == 2 & inrange(e2_3,0,5) + replace educy = 9 + e2_3 if e2_2 == 3 & inrange(e2_3,0,3) + replace educy = 9 + e2_3 if e2_2 == 4 & inrange(e2_3,0,2) + replace educy = 9 + e2_3 if e2_2 == 5 & inrange(e2_3,0,5) + replace educy = 12 + e2_3 if e2_2 == 6 & inrange(e2_3,0,7) + replace educy = 16 + e2_3 if e2_2 == 7 & inrange(e2_3,0,4) + label var educy "Years of education" +* + + +*<_educat7_> + gen byte educat7 =. + replace educat7 = 1 if e2_2 == 0 + replace educat7 = 2 if e2_2 == 1 & e2_3 < 4 + replace educat7 = 3 if e2_2 == 1 & e2_3 == 4 + replace educat7 = 4 if e2_2 == 2 + replace educat7 = 5 if inrange(e2_2, 3, 4) + replace educat7 = 6 if e2_2 == 5 + replace educat7 = 7 if inrange(e2_2, 6, 7) + label var educat7 "Level of education 1" + la de lbleducat7 1 "No education" 2 "Primary incomplete" 3 "Primary complete" 4 "Secondary incomplete" 5 "Secondary complete" 6 "Higher than secondary but not university" 7 "University incomplete or complete", replace + label values educat7 lbleducat7 +* + + +*<_educat5_> + gen byte educat5 = educat7 + recode educat5 4=3 5=4 6 7=5 + label var educat5 "Level of education 2" + la de lbleducat5 1 "No education" 2 "Primary incomplete" 3 "Primary complete but secondary incomplete" 4 "Secondary complete" 5 "Some tertiary/post-secondary" + label values educat5 lbleducat5 +* + + +*<_educat4_> + gen byte educat4 = educat7 + recode educat4 (2 3 4 = 2) (5=3) (6 7=4) + label var educat4 "Level of education 3" + la de lbleducat4 1 "No education" 2 "Primary" 3 "Secondary" 4 "Post-secondary" + label values educat4 lbleducat4 +* + + +*<_educat_orig_> + clonevar educat_orig = e2_2 + label var educat_orig "Original survey education code" +* + + +*<_educat_isced_> + gen educat_isced = . + label var educat_isced "ISCED standardised level of education" +* + + +*----------6.1: Education cleanup------------------------------* + +*<_% Correction min age_> + +** Drop info for cases under the age for which questions to be asked (do not need a variable for this) +local ed_var "school literacy educy educat7 educat5 educat4 educat_orig educat_isced" + +foreach v of local ed_var { + cap confirm numeric variable `v' + if _rc == 0 { // is indeed numeric + replace `v'=. if ( age < ed_mod_age & !missing(age) ) + } + else { // is not + replace `v'= "" if ( age < ed_mod_age & !missing(age) ) + } +} + + +* + + +} + + +/*%%============================================================================================= + 7: Training +==============================================================================================%%*/ + + +{ + +*<_vocational_> + gen vocational = . + label de lblvocational 0 "No" 1 "Yes" + label var vocational "Ever received vocational training" +* + + +*<_vocational_type_> + gen vocational_type = . + label de lblvocational_type 1 "Inside Enterprise" 2 "External" + label values vocational_type lblvocational_type + label var vocational_type "Type of vocational training" +* + + +*<_vocational_length_l_> + gen vocational_length_l = . + label var vocational_length_l "Length of training in months, lower limit" +* + + +*<_vocational_length_u_> + gen vocational_length_u = . + label var vocational_length_u "Length of training in months, upper limit" +* + + +*<_vocational_field_orig_> + gen str vocational_field_orig = "" + label var vocational_field_orig "Original field of training information" +* + + +*<_vocational_financed_> + gen vocational_financed = . + label de lblvocational_financed 1 "Employer" 2 "Government" 3 "Mixed Employer/Government" 4 "Own funds" 5 "Other" + label var vocational_financed "How training was financed" +* + +} + + +/*%%============================================================================================= + 8: Labour +==============================================================================================%%*/ + + +*<_minlaborage_> + gen byte minlaborage = 15 + label var minlaborage "Labor module application age" +* + + +*----------8.1: 7 day reference overall------------------------------* + +{ +*<_lstatus_> + gen byte lstatus = . + + * Employed if either has work (d1_1) or will go back (d1_2) + replace lstatus = 1 if d1_1 == 1 | d1_2 == 1 + + * Unemployed if looking for a job (yes to d4_5 two forms) and willing to accept (yes to d4_14) + replace lstatus = 2 if inrange(d4_5, 1, 2) & d4_14 == 1 + + * Remaining people would all go to NLF but since data is 15-75 and there is the absentee issue, define precisely + replace lstatus = 3 if (d4_5 == 3 & d4_14 == 2) | (d4_5 == 3 & d4_14 == 1) | (inrange(d4_5, 1, 2) & d4_14 == 2) + + replace lstatus = . if age < minlaborage + label var lstatus "Labor status" + la de lbllstatus 1 "Employed" 2 "Unemployed" 3 "Non-LF" + label values lstatus lbllstatus +* + + +*<_potential_lf_> + gen byte potential_lf = 0 + replace potential_lf = 1 if (d4_5 == 3 & d4_14 == 1) | (inrange(d4_5, 1, 2) & d4_14 == 2) + replace potential_lf = . if age < minlaborage & age != . + replace potential_lf = . if lstatus != 3 + label var potential_lf "Potential labour force status" + la de lblpotential_lf 0 "No" 1 "Yes" + label values potential_lf lblpotential_lf +* + + +*<_underemployment_> + gen byte underemployment = . + replace underemployment = . if age < minlaborage & age != . + replace underemployment = . if lstatus != 1 + label var underemployment "Underemployment status" + la de lblunderemployment 0 "No" 1 "Yes" + label values underemployment lblunderemployment +* + + +*<_nlfreason_> + gen byte nlfreason=. + label var nlfreason "Reason not in the labor force" + la de lblnlfreason 1 "Student" 2 "Housekeeper" 3 "Retired" 4 "Disabled" 5 "Other" + label values nlfreason lblnlfreason +* + + +*<_unempldur_l_> + gen byte unempldur_l=. + replace unempldur_l = 0 if d4_11 == 1 + replace unempldur_l = 1 if d4_11 == 2 + replace unempldur_l = 4 if d4_11 == 3 + replace unempldur_l = 7 if d4_11 == 4 + replace unempldur_l = 13 if d4_11 == 5 + replace unempldur_l = 25 if d4_11 == 6 + replace unempldur_l = 49 if d4_11 == 7 + replace unempldur_l = . if lstatus != 2 + label var unempldur_l "Unemployment duration (months) lower bracket" +* + + +*<_unempldur_u_> + gen byte unempldur_u=. + replace unempldur_u = 1 if d4_11 == 1 + replace unempldur_u = 3 if d4_11 == 2 + replace unempldur_u = 6 if d4_11 == 3 + replace unempldur_u = 12 if d4_11 == 4 + replace unempldur_u = 24 if d4_11 == 5 + replace unempldur_u = 48 if d4_11 == 6 + replace unempldur_u = 999 if d4_11 == 7 + replace unempldur_u = . if lstatus != 2 + label var unempldur_u "Unemployment duration (months) upper bracket" +* + +} + + +*----------8.2: 7 day reference main job------------------------------* + + +{ +*<_empstat_> + gen byte empstat = d1_7 + recode empstat (2 = 1) (5 = 2) (6 = 4) (7 = 5) + label var empstat "Employment status during past week primary job 7 day recall" + la de lblempstat 1 "Paid employee" 2 "Non-paid employee" 3 "Employer" 4 "Self-employed" 5 "Other, workers not classifiable by status" + label values empstat lblempstat +* + + +*<_ocusec_> +/* <_ocusec_note> + + While other years have code 2 as "municipality", here it is "community". Translating from Armenian + gives the same. Of the 98 answers, if weighted, 40% work in Public Admin, 23.4% in education, 13.3% + in provision of public services (culture, sport, ...). They are also 98% with contract. + Assume this is public as well + + Code 4 is "mixed - with government particiaption, send to state owned" + + */ + gen byte ocusec = d1_6 + recode ocusec (2 7 = 1) (3 5 6 = 2) (4 = 3) + label var ocusec "Sector of activity primary job 7 day recall" + la de lblocusec 1 "Public Sector, Central Government, Army" 2 "Private, NGO" 3 "State owned" 4 "Public or State-owned, but cannot distinguish" + label values ocusec lblocusec +* + + +*<_industry_orig_> + gen industry_orig = d1_4 + label var industry_orig "Original survey industry code, main job 7 day recall" +* + + +*<_industrycat_isic_> + gen industrycat_isic = "" + replace industrycat_isic = "A" if d1_4 == 1 + replace industrycat_isic = "B" if d1_4 == 2 + replace industrycat_isic = "C" if d1_4 == 3 + replace industrycat_isic = "D" if d1_4 == 4 + replace industrycat_isic = "E" if d1_4 == 5 + replace industrycat_isic = "F" if d1_4 == 6 + replace industrycat_isic = "G" if d1_4 == 7 + replace industrycat_isic = "H" if d1_4 == 8 + replace industrycat_isic = "I" if d1_4 == 9 + replace industrycat_isic = "J" if d1_4 == 10 + replace industrycat_isic = "K" if d1_4 == 11 + replace industrycat_isic = "L" if d1_4 == 12 + replace industrycat_isic = "M" if d1_4 == 13 + replace industrycat_isic = "N" if d1_4 == 14 | d1_4 == 15 + replace industrycat_isic = "O" if d1_4 == 16 + replace industrycat_isic = "P" if d1_4 == 17 + replace industrycat_isic = "Q" if d1_4 == 18 + label var industrycat_isic "ISIC code of primary job 7 day recall" +* + + +*<_industrycat10_> + gen byte industrycat10 = . + replace industrycat10 = 1 if inrange(d1_4, 1, 2) + replace industrycat10 = 2 if d1_4 == 3 + replace industrycat10 = 3 if d1_4 == 4 + replace industrycat10 = 4 if d1_4 == 5 + replace industrycat10 = 5 if d1_4 == 6 + replace industrycat10 = 6 if inrange(d1_4, 7, 8) + replace industrycat10 = 7 if d1_4 == 9 + replace industrycat10 = 8 if inrange(d1_4, 10, 11) + replace industrycat10 = 9 if d1_4 == 12 + replace industrycat10 = 10 if inrange(d1_4, 13, 18) + label var industrycat10 "1 digit industry classification, primary job 7 day recall" + la de lblindustrycat10 1 "Agriculture" 2 "Mining" 3 "Manufacturing" 4 "Public utilities" 5 "Construction" 6 "Commerce" 7 "Transport and Comnunications" 8 "Financial and Business Services" 9 "Public Administration" 10 "Other Services, Unspecified" + label values industrycat10 lblindustrycat10 +* + + +*<_industrycat4_> + gen byte industrycat4 = industrycat10 + recode industrycat4 (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4 "Broad Economic Activities classification, primary job 7 day recall" + la de lblindustrycat4 1 "Agriculture" 2 "Industry" 3 "Services" 4 "Other" + label values industrycat4 lblindustrycat4 +* + + +*<_occup_orig_> + gen occup_orig = . + label var occup_orig "Original occupation record primary job 7 day recall" +* + + +*<_occup_isco_> + gen occup_isco = "" + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + *drop if missing(occup_isco) + *int_classif_universe, var(occup_isco) universe(ISCO) + count + *list + *assert `r(N)' == 0 + restore + + label var occup_isco "ISCO code of primary job 7 day recall" +* + + +*<_occup_> + gen byte occup = . + label var occup "1 digit occupational classification, primary job 7 day recall" + la de lbloccup 1 "Managers" 2 "Professionals" 3 "Technicians" 4 "Clerks" 5 "Service and market sales workers" 6 "Skilled agricultural" 7 "Craft workers" 8 "Machine operators" 9 "Elementary occupations" 10 "Armed forces" 99 "Others" + label values occup lbloccup +* + + +*<_occup_skill_> + gen occup_skill = . + replace occup_skill = 3 if inrange(occup, 1, 3) + replace occup_skill = 2 if inrange(occup, 4, 8) + replace occup_skill = 1 if occup == 9 + la de lblskill 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill lblskill + label var occup_skill "Skill based on ISCO standard primary job 7 day recall" +* + + +*<_wage_no_compen_> + egen double wage_no_compen = rowtotal(d1_17 d1_18), missing + replace wage_no_compen = . if lstatus != 1 | empstat == 2 | wage_no_compen == 0 + label var wage_no_compen "Last wage payment primary job 7 day recall" +* + + +*<_unitwage_> + gen byte unitwage = 5 + replace unitwage = . if mi(wage_no_compen) + label var unitwage "Last wages' time unit primary job 7 day recall" + la de lblunitwage 1 "Daily" 2 "Weekly" 3 "Every two weeks" 4 "Bimonthly" 5 "Monthly" 6 "Trimester" 7 "Biannual" 8 "Annually" 9 "Hourly" 10 "Other" + label values unitwage lblunitwage +* + + +*<_whours_> + gen whours = d1_14 + replace whours = . if whours == 0 | lstatus != 1 + label var whours "Hours of work in last week primary job 7 day recall" +* + + + +*<_wmonths_> + gen wmonths = . + label var wmonths "Months of work in past 12 months primary job 7 day recall" +* + + +*<_wage_total_> +/* <_wage_total_note> + + Use gross wages when available and net wages only when gross wages are not available. + This is done to make it easy to compare earnings in formal and informal sectors. + + */ + gen wage_total = . + label var wage_total "Annualized total wage primary job 7 day recall" +* + + +*<_contract_> + gen byte contract = 0 + replace contract = 1 if d1_7 == 1 + replace contract = . if lstatus != 1 + label var contract "Employment has contract primary job 7 day recall" + la de lblcontract 0 "Without contract" 1 "With contract" + label values contract lblcontract +* + + +*<_healthins_> + gen byte healthins = . + label var healthins "Employment has health insurance primary job 7 day recall" + la de lblhealthins 0 "Without health insurance" 1 "With health insurance" + label values healthins lblhealthins +* + + +*<_socialsec_> + gen byte socialsec = . + label var socialsec "Employment has social security insurance primary job 7 day recall" + la de lblsocialsec 1 "With social security" 0 "Without social secturity" + label values socialsec lblsocialsec +* + + +*<_union_> + gen byte union = . + label var union "Union membership at primary job 7 day recall" + la de lblunion 0 "Not union member" 1 "Union member" + label values union lblunion +* + + +*<_firmsize_l_> + gen firmsize_l = . + label var firmsize_l "Firm size (lower bracket) primary job 7 day recall" +* + + +*<_firmsize_u_> + gen firmsize_u= . + label var firmsize_u "Firm size (upper bracket) primary job 7 day recall" +* + +} + + +*----------8.3: 7 day reference secondary job------------------------------* +* Since labels are the same as main job, values are labelled using main job labels + + +{ +*<_empstat_2_> + gen byte empstat_2 = d2_4 + recode empstat_2 (2 = 1) (5 = 2) (6 = 4) (7 = 5) + label var empstat_2 "Employment status during past week secondary job 7 day recall" + label values empstat_2 lblempstat +* + + +*<_ocusec_2_> + gen byte ocusec_2 = d2_3 + recode ocusec_2 (2 7 = 1) (3 5 6 = 2) (4 = 3) + label var ocusec_2 "Sector of activity secondary job 7 day recall" + label values ocusec_2 lblocusec +* + + +*<_industry_orig_2_> + gen industry_orig_2 = d2_2 + label var industry_orig_2 "Original survey industry code, secondary job 7 day recall" +* + + +*<_industrycat_isic_2_> + gen industrycat_isic_2 = "" + replace industrycat_isic_2 = "A" if d2_2 == 1 + replace industrycat_isic_2 = "B" if d2_2 == 2 + replace industrycat_isic_2 = "C" if d2_2 == 3 + replace industrycat_isic_2 = "D" if d2_2 == 4 + replace industrycat_isic_2 = "E" if d2_2 == 5 + replace industrycat_isic_2 = "F" if d2_2 == 6 + replace industrycat_isic_2 = "G" if d2_2 == 7 + replace industrycat_isic_2 = "H" if d2_2 == 8 + replace industrycat_isic_2 = "I" if d2_2 == 9 + replace industrycat_isic_2 = "J" if d2_2 == 10 + replace industrycat_isic_2 = "K" if d2_2 == 11 + replace industrycat_isic_2 = "L" if d2_2 == 12 + replace industrycat_isic_2 = "M" if d2_2 == 13 + replace industrycat_isic_2 = "N" if d2_2 == 14 | d2_2 == 15 + replace industrycat_isic_2 = "O" if d2_2 == 16 + replace industrycat_isic_2 = "P" if d2_2 == 17 + replace industrycat_isic_2 = "Q" if d2_2 == 18 + label var industrycat_isic_2 "ISIC code of secondary job 7 day recall" +* + + +*<_industrycat10_2_> + gen byte industrycat10_2 = . + replace industrycat10_2 = 1 if inrange(d2_2, 1, 2) + replace industrycat10_2 = 2 if d2_2 == 3 + replace industrycat10_2 = 3 if d2_2 == 4 + replace industrycat10_2 = 4 if d2_2 == 5 + replace industrycat10_2 = 5 if d2_2 == 6 + replace industrycat10_2 = 6 if inrange(d2_2, 7, 8) + replace industrycat10_2 = 7 if d2_2 == 9 + replace industrycat10_2 = 8 if inrange(d2_2, 10, 11) + replace industrycat10_2 = 9 if d2_2 == 12 + replace industrycat10_2 = 10 if inrange(d2_2, 13, 18) + label var industrycat10_2 "1 digit industry classification, secondary job 7 day recall" + label values industrycat10_2 lblindustrycat10 +* + + +*<_industrycat4_2_> + gen byte industrycat4_2 = industrycat10_2 + recode industrycat4_2 (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4_2 "Broad Economic Activities classification, secondary job 7 day recall" + label values industrycat4_2 lblindustrycat4 +* + + +*<_occup_orig_2_> + gen occup_orig_2 = . + label var occup_orig_2 "Original occupation record secondary job 7 day recall" +* + + +*<_occup_isco_2_> + gen occup_isco_2 = "" + label var occup_isco_2 "ISCO code of secondary job 7 day recall" +* + + +*<_occup_2_> + gen byte occup_2 = . + label var occup_2 "1 digit occupational classification secondary job 7 day recall" + label values occup_2 lbloccup +* + + +*<_occup_skill_2_> + gen occup_skill_2 = . + replace occup_skill_2 = 3 if inrange(occup_2, 1, 3) + replace occup_skill_2 = 2 if inrange(occup_2, 4, 8) + replace occup_skill_2 = 1 if occup_2 == 9 + la de lblskill2 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill_2 lblskill2 + label var occup_skill_2 "Skill based on ISCO standard secondary job 7 day recall" +* + + +*<_wage_no_compen_2_> + egen double wage_no_compen_2 = rowtotal(d2_11 d2_12), missing + replace wage_no_compen_2 = . if mi(empstat_2) | empstat_2 == 2 | wage_no_compen_2 == 0 + label var wage_no_compen_2 "Last wage payment secondary job 7 day recall" +* + + +*<_unitwage_2_> + gen byte unitwage_2 = 5 + replace unitwage_2 = . if mi(wage_no_compen_2) + label var unitwage_2 "Last wages' time unit secondary job 7 day recall" + label values unitwage_2 lblunitwage +* + + +*<_whours_2_> + gen whours_2 = . + label var whours_2 "Hours of work in last week secondary job 7 day recall" +* + + +*<_wmonths_2_> + gen wmonths_2 = . + label var wmonths_2 "Months of work in past 12 months secondary job 7 day recall" +* + + +*<_wage_total_2_> + gen wage_total_2 = . + label var wage_total_2 "Annualized total wage secondary job 7 day recall" +* + + +*<_firmsize_l_2_> + gen firmsize_l_2 = . + label var firmsize_l_2 "Firm size (lower bracket) secondary job 7 day recall" +* + + +*<_firmsize_u_2_> + gen firmsize_u_2 = . + label var firmsize_u_2 "Firm size (upper bracket) secondary job 7 day recall" +* + +} + +*----------8.4: 7 day reference additional jobs------------------------------* + +*<_t_hours_others_> + gen t_hours_others = . + label var t_hours_others "Annualized hours worked in all but primary and secondary jobs 7 day recall" +* + + +*<_t_wage_nocompen_others_> + gen t_wage_nocompen_others = . + label var t_wage_nocompen_others "Annualized wage in all but 1st & 2nd jobs excl. bonuses, etc. 7 day recall" +* + + +*<_t_wage_others_> + gen t_wage_others = . + label var t_wage_others "Annualized wage in all but primary and secondary jobs (12-mon ref period)" +* + + +*----------8.5: 7 day reference total summary------------------------------* + + +*<_t_hours_total_> + gen t_hours_total = . + label var t_hours_total "Annualized hours worked in all jobs 7 day recall" +* + + +*<_t_wage_nocompen_total_> + gen t_wage_nocompen_total = . + label var t_wage_nocompen_total "Annualized wage in all jobs excl. bonuses, etc. 7 day recall" +* + + +*<_t_wage_total_> + gen t_wage_total = . + label var t_wage_total "Annualized total wage for all jobs 7 day recall" +* + + +*----------8.6: 12 month reference overall------------------------------* + +{ + +*<_lstatus_year_> + gen byte lstatus_year = . + replace lstatus_year=. if age < minlaborage & age != . + label var lstatus_year "Labor status during last year" + la de lbllstatus_year 1 "Employed" 2 "Unemployed" 3 "Non-LF" + label values lstatus_year lbllstatus_year +* + +*<_potential_lf_year_> + gen byte potential_lf_year = . + replace potential_lf_year=. if age < minlaborage & age != . + replace potential_lf_year = . if lstatus_year != 3 + label var potential_lf_year "Potential labour force status" + la de lblpotential_lf_year 0 "No" 1 "Yes" + label values potential_lf_year lblpotential_lf_year +* + + +*<_underemployment_year_> + gen byte underemployment_year = . + replace underemployment_year = . if age < minlaborage & age != . + replace underemployment_year = . if lstatus_year == 1 + label var underemployment_year "Underemployment status" + la de lblunderemployment_year 0 "No" 1 "Yes" + label values underemployment_year lblunderemployment_year +* + + +*<_nlfreason_year_> + gen byte nlfreason_year=. + label var nlfreason_year "Reason not in the labor force" + la de lblnlfreason_year 1 "Student" 2 "Housekeeper" 3 "Retired" 4 "Disabled" 5 "Other" + label values nlfreason_year lblnlfreason_year +* + + +*<_unempldur_l_year_> + gen byte unempldur_l_year=. + label var unempldur_l_year "Unemployment duration (months) lower bracket" +* + + +*<_unempldur_u_year_> + gen byte unempldur_u_year=. + label var unempldur_u_year "Unemployment duration (months) upper bracket" +* + +} + +*----------8.7: 12 month reference main job------------------------------* + +{ + +*<_empstat_year_> + gen byte empstat_year = . + label var empstat_year "Employment status during past week primary job 12 month recall" + la de lblempstat_year 1 "Paid employee" 2 "Non-paid employee" 3 "Employer" 4 "Self-employed" 5 "Other, workers not classifiable by status" + label values empstat_year lblempstat_year +* + +*<_ocusec_year_> + gen byte ocusec_year = . + label var ocusec_year "Sector of activity primary job 12 month recall" + la de lblocusec_year 1 "Public Sector, Central Government, Army" 2 "Private, NGO" 3 "State owned" 4 "Public or State-owned, but cannot distinguish" + label values ocusec_year lblocusec_year +* + +*<_industry_orig_year_> + gen industry_orig_year = . + label var industry_orig_year "Original industry record main job 12 month recall" +* + + +*<_industrycat_isic_year_> + gen industrycat_isic_year = . + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + *drop if missing(industrycat_isic_year) + *int_classif_universe, var(industrycat_isic_year) universe(ISIC) + count + *list + *assert `r(N)' == 0 + restore + + label var industrycat_isic_year "ISIC code of primary job 12 month recall" +* + +*<_industrycat10_year_> + gen byte industrycat10_year = . + label var industrycat10_year "1 digit industry classification, primary job 12 month recall" + la de lblindustrycat10_year 1 "Agriculture" 2 "Mining" 3 "Manufacturing" 4 "Public utilities" 5 "Construction" 6 "Commerce" 7 "Transport and Comnunications" 8 "Financial and Business Services" 9 "Public Administration" 10 "Other Services, Unspecified" + label values industrycat10_year lblindustrycat10_year +* + + +*<_industrycat4_year_> + gen byte industrycat4_year=industrycat10_year + recode industrycat4_year (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4_year "Broad Economic Activities classification, primary job 12 month recall" + la de lblindustrycat4_year 1 "Agriculture" 2 "Industry" 3 "Services" 4 "Other" + label values industrycat4_year lblindustrycat4_year +* + + +*<_occup_orig_year_> + gen occup_orig_year = . + label var occup_orig_year "Original occupation record primary job 12 month recall" +* + + +*<_occup_isco_year_> + gen occup_isco_year = "" + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + *drop if missing(occup_isco_year) + *int_classif_universe, var(occup_isco_year) universe(ISCO) + count + *list + *assert `r(N)' == 0 + restore + + label var occup_isco_year "ISCO code of primary job 12 month recall" +* + + +*<_occup_year_> + gen byte occup_year = . + label var occup_year "1 digit occupational classification, primary job 12 month recall" + la de lbloccup_year 1 "Managers" 2 "Professionals" 3 "Technicians" 4 "Clerks" 5 "Service and market sales workers" 6 "Skilled agricultural" 7 "Craft workers" 8 "Machine operators" 9 "Elementary occupations" 10 "Armed forces" 99 "Others" + label values occup_year lbloccup_year +* + + +*<_occup_skill_year_> + gen occup_skill_year = . + replace occup_skill_year = 3 if inrange(occup_year, 1, 3) + replace occup_skill_year = 2 if inrange(occup_year, 4, 8) + replace occup_skill_year = 1 if occup_year == 9 + la de lblskillyear 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill_year lblskillyear + label var occup_skill_year "Skill based on ISCO standard primary job 12 month recall" +* + + +*<_wage_no_compen_year_> --- this var has the same name as other and when quoted in the keep and order codes is repeated. + gen double wage_no_compen_year = . + label var wage_no_compen_year "Last wage payment primary job 12 month recall" +* + + +*<_unitwage_year_> + gen byte unitwage_year = . + label var unitwage_year "Last wages' time unit primary job 12 month recall" + la de lblunitwage_year 1 "Daily" 2 "Weekly" 3 "Every two weeks" 4 "Bimonthly" 5 "Monthly" 6 "Trimester" 7 "Biannual" 8 "Annually" 9 "Hourly" 10 "Other" + label values unitwage_year lblunitwage_year +* + + +*<_whours_year_> + gen whours_year = . + label var whours_year "Hours of work in last week primary job 12 month recall" +* + + +*<_wmonths_year_> + gen wmonths_year = . + label var wmonths_year "Months of work in past 12 months primary job 12 month recall" +* + + +*<_wage_total_year_> + gen wage_total_year = . + label var wage_total_year "Annualized total wage primary job 12 month recall" +* + + +*<_contract_year_> + gen byte contract_year = . + label var contract_year "Employment has contract primary job 12 month recall" + la de lblcontract_year 0 "Without contract" 1 "With contract" + label values contract_year lblcontract_year +* + + +*<_healthins_year_> + gen byte healthins_year = . + label var healthins_year "Employment has health insurance primary job 12 month recall" + la de lblhealthins_year 0 "Without health insurance" 1 "With health insurance" + label values healthins_year lblhealthins_year +* + + +*<_socialsec_year_> + gen byte socialsec_year = . + label var socialsec_year "Employment has social security insurance primary job 7 day recall" + la de lblsocialsec_year 1 "With social security" 0 "Without social secturity" + label values socialsec_year lblsocialsec_year +* + + +*<_union_year_> + gen byte union_year = . + label var union_year "Union membership at primary job 12 month recall" + la de lblunion_year 0 "Not union member" 1 "Union member" + label values union_year lblunion_year +* + + +*<_firmsize_l_year_> + gen firmsize_l_year = . + label var firmsize_l_year "Firm size (lower bracket) primary job 12 month recall" +* + + +*<_firmsize_u_year_> + gen firmsize_u_year = . + label var firmsize_u_year "Firm size (upper bracket) primary job 12 month recall" +* + +} + + +*----------8.8: 12 month reference secondary job------------------------------* + +{ + +*<_empstat_2_year_> + gen byte empstat_2_year = . + label var empstat_2_year "Employment status during past week secondary job 12 month recall" + label values empstat_2_year lblempstat_year +* + + +*<_ocusec_2_year_> + gen byte ocusec_2_year = . + label var ocusec_2_year "Sector of activity secondary job 12 month recall" + la de lblocusec_2_year 1 "Public Sector, Central Government, Army" 2 "Private, NGO" 3 "State owned" 4 "Public or State-owned, but cannot distinguish" + label values ocusec_2_year lblocusec_2_year +* + + + +*<_industry_orig_2_year_> + gen industry_orig_2_year = . + label var industry_orig_2_year "Original survey industry code, secondary job 12 month recall" +* + + + +*<_industrycat_isic_2_year_> + gen industrycat_isic_2_year = . + label var industrycat_isic_2_year "ISIC code of secondary job 12 month recall" +* + + +*<_industrycat10_2_year_> + gen byte industrycat10_2_year = . + label var industrycat10_2_year "1 digit industry classification, secondary job 12 month recall" + label values industrycat10_2_year lblindustrycat10_year +* + + +*<_industrycat4_2_year_> + gen byte industrycat4_2_year=industrycat10_2_year + recode industrycat4_2_year (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4_2_year "Broad Economic Activities classification, secondary job 12 month recall" + label values industrycat4_2_year lblindustrycat4_year +* + + +*<_occup_orig_2_year_> + gen occup_orig_2_year = . + label var occup_orig_2_year "Original occupation record secondary job 12 month recall" +* + + +*<_occup_isco_2_year_> + gen occup_isco_2_year = "" + label var occup_isco_2_year "ISCO code of secondary job 12 month recall" +* + + +*<_occup_2_year_> + gen byte occup_2_year = . + label var occup_2_year "1 digit occupational classification, secondary job 12 month recall" + label values occup_2_year lbloccup_year +* + + +*<_occup_skill_2_year_> + gen occup_skill_2_year = . + replace occup_skill_2_year = 3 if inrange(occup_2_year, 1, 3) + replace occup_skill_2_year = 2 if inrange(occup_2_year, 4, 8) + replace occup_skill_2_year = 1 if occup_2_year == 9 + la de lblskilly2 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill_2_year lblskilly2 + label var occup_skill_2_year "Skill based on ISCO standard secondary job 12 month recall" +* + + +*<_wage_no_compen_2_year_> + gen double wage_no_compen_2_year = . + label var wage_no_compen_2_year "Last wage payment secondary job 12 month recall" +* + + +*<_unitwage_2_year_> + gen byte unitwage_2_year = . + label var unitwage_2_year "Last wages' time unit secondary job 12 month recall" + label values unitwage_2_year lblunitwage_year +* + + +*<_whours_2_year_> + gen whours_2_year = . + label var whours_2_year "Hours of work in last week secondary job 12 month recall" +* + + +*<_wmonths_2_year_> + gen wmonths_2_year = . + label var wmonths_2_year "Months of work in past 12 months secondary job 12 month recall" +* + + +*<_wage_total_2_year_> + gen wage_total_2_year = . + label var wage_total_2_year "Annualized total wage secondary job 12 month recall" +* + +*<_firmsize_l_2_year_> + gen firmsize_l_2_year = . + label var firmsize_l_2_year "Firm size (lower bracket) secondary job 12 month recall" +* + + +*<_firmsize_u_2_year_> + gen firmsize_u_2_year = . + label var firmsize_u_2_year "Firm size (upper bracket) secondary job 12 month recall" +* + +} + + +*----------8.9: 12 month reference additional jobs------------------------------* + + +*<_t_hours_others_year_> + gen t_hours_others_year = . + label var t_hours_others_year "Annualized hours worked in all but primary and secondary jobs 12 month recall" +* + +*<_t_wage_nocompen_others_year_> + gen t_wage_nocompen_others_year = . + label var t_wage_nocompen_others_year "Annualized wage in all but 1st & 2nd jobs excl. bonuses, etc. 12 month recall" +* + +*<_t_wage_others_year_> + gen t_wage_others_year = . + label var t_wage_others_year "Annualized wage in all but primary and secondary jobs 12 month recall" +* + + +*----------8.10: 12 month total summary------------------------------* + + +*<_t_hours_total_year_> + gen t_hours_total_year = . + label var t_hours_total_year "Annualized hours worked in all jobs 12 month month recall" +* + + +*<_t_wage_nocompen_total_year_> + gen t_wage_nocompen_total_year = . + label var t_wage_nocompen_total_year "Annualized wage in all jobs excl. bonuses, etc. 12 month recall" +* + + +*<_t_wage_total_year_> + gen t_wage_total_year = . + label var t_wage_total_year "Annualized total wage for all jobs 12 month recall" +* + + +*----------8.11: Overall across reference periods------------------------------* + + +*<_njobs_> + gen njobs = . + label var njobs "Total number of jobs" +* + + +*<_t_hours_annual_> + gen t_hours_annual = . + label var t_hours_annual "Total hours worked in all jobs in the previous 12 months" +* + + +*<_linc_nc_> + gen linc_nc = . + label var linc_nc "Total annual wage income in all jobs, excl. bonuses, etc." +* + + +*<_laborincome_> + gen laborincome = t_wage_total_year + label var laborincome "Total annual individual labor income in all jobs, incl. bonuses, etc." +* + + +*----------8.13: Labour cleanup------------------------------* + +{ +*<_% Correction min age_> + +** Drop info for cases under the age for which questions to be asked (do not need a variable for this) + local lab_var "minlaborage lstatus nlfreason unempldur_l unempldur_u empstat ocusec industry_orig industrycat_isic industrycat10 industrycat4 occup_orig occup_isco occup_skill occup wage_no_compen unitwage whours wmonths wage_total contract healthins socialsec union firmsize_l firmsize_u empstat_2 ocusec_2 industry_orig_2 industrycat_isic_2 industrycat10_2 industrycat4_2 occup_orig_2 occup_isco_2 occup_skill_2 occup_2 wage_no_compen_2 unitwage_2 whours_2 wmonths_2 wage_total_2 firmsize_l_2 firmsize_u_2 t_hours_others t_wage_nocompen_others t_wage_others t_hours_total t_wage_nocompen_total t_wage_total lstatus_year nlfreason_year unempldur_l_year unempldur_u_year empstat_year ocusec_year industry_orig_year industrycat_isic_year industrycat10_year industrycat4_year occup_orig_year occup_isco_year occup_skill_year occup_year unitwage_year whours_year wmonths_year wage_total_year contract_year healthins_year socialsec_year union_year firmsize_l_year firmsize_u_year empstat_2_year ocusec_2_year industry_orig_2_year industrycat_isic_2_year industrycat10_2_year industrycat4_2_year occup_orig_2_year occup_isco_2_year occup_skill_2_year occup_2_year wage_no_compen_2_year unitwage_2_year whours_2_year wmonths_2_year wage_total_2_year firmsize_l_2_year firmsize_u_2_year t_hours_others_year t_wage_nocompen_others_year t_wage_others_year t_hours_total_year t_wage_nocompen_total_year t_wage_total_year njobs t_hours_annual linc_nc laborincome" + + foreach v of local lab_var { + cap confirm numeric variable `v' + if _rc == 0 { // is indeed numeric + replace `v'=. if ( age < minlaborage & !missing(age) ) + } + else { // is not + replace `v'= "" if ( age < minlaborage & !missing(age) ) + } + + } + +* +} + + +/*%%============================================================================================= + 9: Final steps +==============================================================================================%%*/ + +quietly{ + +*<_% KEEP VARIABLES - ALL_> + + keep countrycode survname survey icls_v isced_version isco_version isic_version year vermast veralt harmonization int_year int_month hhid pid weight weight_m weight_q psu ssu strata wave panel visit_no urban subnatid1 subnatid2 subnatid3 subnatidsurvey subnatid1_prev subnatid2_prev subnatid3_prev gaul_adm1_code gaul_adm2_code gaul_adm3_code hsize age male relationharm relationcs marital eye_dsablty hear_dsablty walk_dsablty conc_dsord slfcre_dsablty comm_dsablty migrated_mod_age migrated_ref_time migrated_binary migrated_years migrated_from_urban migrated_from_cat migrated_from_code migrated_from_country migrated_reason ed_mod_age school literacy educy educat7 educat5 educat4 educat_orig educat_isced vocational vocational_type vocational_length_l vocational_length_u vocational_field_orig vocational_financed minlaborage lstatus potential_lf underemployment nlfreason unempldur_l unempldur_u empstat ocusec industry_orig industrycat_isic industrycat10 industrycat4 occup_orig occup_isco occup_skill occup wage_no_compen unitwage whours wmonths wage_total contract healthins socialsec union firmsize_l firmsize_u empstat_2 ocusec_2 industry_orig_2 industrycat_isic_2 industrycat10_2 industrycat4_2 occup_orig_2 occup_isco_2 occup_skill_2 occup_2 wage_no_compen_2 unitwage_2 whours_2 wmonths_2 wage_total_2 firmsize_l_2 firmsize_u_2 t_hours_others t_wage_nocompen_others t_wage_others t_hours_total t_wage_nocompen_total t_wage_total lstatus_year potential_lf_year underemployment_year nlfreason_year unempldur_l_year unempldur_u_year empstat_year ocusec_year industry_orig_year industrycat_isic_year industrycat10_year industrycat4_year occup_orig_year occup_isco_year occup_skill_year occup_year wage_no_compen_year unitwage_year whours_year wmonths_year wage_total_year contract_year healthins_year socialsec_year union_year firmsize_l_year firmsize_u_year empstat_2_year ocusec_2_year industry_orig_2_year industrycat_isic_2_year industrycat10_2_year industrycat4_2_year occup_orig_2_year occup_isco_2_year occup_skill_2_year occup_2_year wage_no_compen_2_year unitwage_2_year whours_2_year wmonths_2_year wage_total_2_year firmsize_l_2_year firmsize_u_2_year t_hours_others_year t_wage_nocompen_others_year t_wage_others_year t_hours_total_year t_wage_nocompen_total_year t_wage_total_year njobs t_hours_annual linc_nc laborincome + +* + +*<_% ORDER VARIABLES_> + + order countrycode survname survey icls_v isced_version isco_version isic_version year vermast veralt harmonization int_year int_month hhid pid weight weight_m weight_q psu ssu strata wave panel visit_no urban subnatid1 subnatid2 subnatid3 subnatidsurvey subnatid1_prev subnatid2_prev subnatid3_prev gaul_adm1_code gaul_adm2_code gaul_adm3_code hsize age male relationharm relationcs marital eye_dsablty hear_dsablty walk_dsablty conc_dsord slfcre_dsablty comm_dsablty migrated_mod_age migrated_ref_time migrated_binary migrated_years migrated_from_urban migrated_from_cat migrated_from_code migrated_from_country migrated_reason ed_mod_age school literacy educy educat7 educat5 educat4 educat_orig educat_isced vocational vocational_type vocational_length_l vocational_length_u vocational_field_orig vocational_financed minlaborage lstatus potential_lf underemployment nlfreason unempldur_l unempldur_u empstat ocusec industry_orig industrycat_isic industrycat10 industrycat4 occup_orig occup_isco occup_skill occup wage_no_compen unitwage whours wmonths wage_total contract healthins socialsec union firmsize_l firmsize_u empstat_2 ocusec_2 industry_orig_2 industrycat_isic_2 industrycat10_2 industrycat4_2 occup_orig_2 occup_isco_2 occup_skill_2 occup_2 wage_no_compen_2 unitwage_2 whours_2 wmonths_2 wage_total_2 firmsize_l_2 firmsize_u_2 t_hours_others t_wage_nocompen_others t_wage_others t_hours_total t_wage_nocompen_total t_wage_total lstatus_year potential_lf_year underemployment_year nlfreason_year unempldur_l_year unempldur_u_year empstat_year ocusec_year industry_orig_year industrycat_isic_year industrycat10_year industrycat4_year occup_orig_year occup_isco_year occup_skill_year occup_year wage_no_compen_year unitwage_year whours_year wmonths_year wage_total_year contract_year healthins_year socialsec_year union_year firmsize_l_year firmsize_u_year empstat_2_year ocusec_2_year industry_orig_2_year industrycat_isic_2_year industrycat10_2_year industrycat4_2_year occup_orig_2_year occup_isco_2_year occup_skill_2_year occup_2_year wage_no_compen_2_year unitwage_2_year whours_2_year wmonths_2_year wage_total_2_year firmsize_l_2_year firmsize_u_2_year t_hours_others_year t_wage_nocompen_others_year t_wage_others_year t_hours_total_year t_wage_nocompen_total_year t_wage_total_year njobs t_hours_annual linc_nc laborincome + +* + +*<_% DROP UNUSED LABELS_> + + * Store all labels in data + label dir + local all_lab `r(names)' + + * Store all variables with a label, extract value label names + local used_lab = "" + ds, has(vallabel) + + local labelled_vars `r(varlist)' + + foreach varName of local labelled_vars { + local y : value label `varName' + local used_lab `"`used_lab' `y'"' + } + + * Compare lists, `notused' is list of labels in directory but not used in final variables + local notused : list all_lab - used_lab // local `notused' defines value labs not in remaining vars + local notused_len : list sizeof notused // store size of local + + * drop labels if the length of the notused vector is 1 or greater, otherwise nothing to drop + if `notused_len' >= 1 { + label drop `notused' + } + else { + di "There are no unused labels to drop. No value labels dropped." + } + + +* + +} + + +*<_% DELETE MISSING VARIABLES_> + +quietly: describe, varlist +local kept_vars `r(varlist)' + +foreach var of local kept_vars { + capture assert missing(`var') + if !_rc drop `var' +} + +* + + +*<_% COMPRESS_> + +compress + +* + + +*<_% SAVE_> + +save "`path_output'/`out_file'", replace + +* diff --git a/GLD/ARM/ARM_2009_ILCS/ARM_2009_ILCS_V01_M_V01_A_GLD/Programs/ARM_2009_ILCS_V01_M_V01_A_GLD_ALL.do b/GLD/ARM/ARM_2009_ILCS/ARM_2009_ILCS_V01_M_V01_A_GLD/Programs/ARM_2009_ILCS_V01_M_V01_A_GLD_ALL.do new file mode 100644 index 000000000..3c631f184 --- /dev/null +++ b/GLD/ARM/ARM_2009_ILCS/ARM_2009_ILCS_V01_M_V01_A_GLD/Programs/ARM_2009_ILCS_V01_M_V01_A_GLD_ALL.do @@ -0,0 +1,1798 @@ + +/*%%============================================================================================= + 0: GLD Harmonization Preamble +==============================================================================================%%*/ + +/* ----------------------------------------------------------------------- + +<_Program name_> ARM_2009_ILCS_V01_M_V01_A_GLD_ALL.do +<_Application_> Stata 18 <_Application_> +<_Author(s)_> World Bank Jobs Group (gld@worldbank.org) +<_Date created_> 2024-09-11 + +------------------------------------------------------------------------- + +<_Country_> Armenia +<_Survey Title_> Integrated Living Conditions Survey +<_Survey Year_> 2009 +<_Study ID_> https://microdatalib.worldbank.org/index.php/catalog/2615 +<_Data collection from_> [MM/YYYY] +<_Data collection to_> [MM/YYYY] +<_Source of dataset_> [Source of data, e.g. NSO] +<_Sample size (HH)_> [#] +<_Sample size (IND)_> [#] +<_Sampling method_> [Brief description] +<_Geographic coverage_> [To what level is data significant] +<_Currency_> [Currency used for wages] + +----------------------------------------------------------------------- + +<_ICLS Version_> [Version of ICLS for Labor Questions] +<_ISCED Version_> [Version of ICLS for Labor Questions] +<_ISCO Version_> [Version of ICLS for Labor Questions] +<_OCCUP National_> [Version of ICLS for Labor Questions] +<_ISIC Version_> [Version of ICLS for Labor Questions] +<_INDUS National_> [Version of ICLS for Labor Questions] + +----------------------------------------------------------------------- +<_Version Control_> + +* Date: [YYYY-MM-DD] - [Description of changes] +* Date: [YYYY-MM-DD] - [Description of changes] + + + +-------------------------------------------------------------------------*/ + + +/*%%============================================================================================= + 1: Setting up of program environment, dataset +==============================================================================================%%*/ + +*----------1.1: Initial commands------------------------------* + +clear +set more off +set mem 800m +set varabbrev off + +*----------1.2: Set directories------------------------------* + +* Define path sections +local server "Y:/GLD-Harmonization/529026_MG/Countries" +local country "ARM" +local year "2009" +local survey "ILCS" +local vermast "V01" +local veralt "V01" + +* From the definitions, set path chunks +local level_1 "`country'_`year'_`survey'" +local level_2_mast "`level_1'_`vermast'_M" +local level_2_harm "`level_1'_`vermast'_M_`veralt'_A_GLD" + +* From chunks, define path_in, path_output folder +local path_in_stata "`server'/`country'/`level_1'/`level_2_mast'/Data/Stata" +local path_in_other "`server'/`country'/`level_1'/`level_2_mast'/Data/Original" +local path_output "`server'/`country'/`level_1'/`level_2_harm'/Data/Harmonized" + +* Define Output file name +local out_file "`level_2_harm'_ALL.dta" + +*----------1.3: Database assembly------------------------------* + +* All steps necessary to merge datasets (if several) to have all elements needed to produce +* harmonized output in a single file + +* Check whether there is a weight file +local has_wf = fileexists("`path_in_stata'/weight.dta") + +* Start with HH +use "`path_in_stata'/hh.dta" + +* If there is a weight file, merge it in +if `has_wf' { + merge 1:1 recno using "`path_in_stata'/weight.dta", assert(match) nogen +} + +* Add member roster +merge 1:m recno using "`path_in_stata'/mem.dta", assert(match) nogen + +* Add employment section +merge 1:1 recno memnum using "`path_in_stata'/d1", assert(match master) nogen + +* Add number labels +numlabel, add force + +/*%%============================================================================================= + 2: Survey & ID +==============================================================================================%%*/ + +{ + +*<_countrycode_> + gen str4 countrycode = "ARM" + label var countrycode "Country code" +* + + +*<_survname_> + gen survname = "ILCS" + label var survname "Survey acronym" +* + + +*<_survey_> + gen survey = "GLD" + label var survey "Survey type" +* + + +*<_icls_v_> + gen icls_v = "ICLS-13" + label var icls_v "ICLS version underlying questionnaire questions" +* + + +*<_isced_version_> + gen isced_version = "" + label var isced_version "Version of ISCED used for educat_isced" +* + + +*<_isco_version_> + gen isco_version = "" + label var isco_version "Version of ISCO used" +* + + +*<_isic_version_> + gen isic_version = "isic_3.1" + label var isic_version "Version of ISIC used" +* + + +*<_year_> + gen int year = 2009 + label var year "Year of survey" +* + + +*<_vermast_> + gen vermast = "`vermast'" + label var vermast "Version of master data" +* + + +*<_veralt_> + gen veralt = "`veralt'" + label var veralt "Version of the alt/harmonized data" +* + + +*<_harmonization_> + gen harmonization = "GLD" + label var harmonization "Type of harmonization" +* + + +*<_int_year_> + gen int_year= 2009 + label var int_year "Year of the interview" +* + + +*<_int_month_> + gen int_month = date + label de lblint_month 1 "January" 2 "February" 3 "March" 4 "April" 5 "May" 6 "June" 7 "July" 8 "August" 9 "September" 10 "October" 11 "November" 12 "December" + label value int_month lblint_month + label var int_month "Month of the interview" +* + + +*<_hhid_> +/* <_hhid_note> + + Values are running number. Would have preferred making it a string with 0001 to 5184, but leave as is since + GMD has it this way. For PID concatenate this with 01-12 but leave as is. + + */ + gen hhid = recno + label var hhid "Household ID" +* + + +*<_pid_> + gen pid = memnum + label var pid "Individual ID" +* + + +*<_weight_> + * Weight already exists + *gen weight = . + label var weight "Survey sampling weight" +* + +*<_weight_m_> + gen weight_m = . + label var weight_m "Survey sampling weight to obtain national estimates for each month" +* + + +*<_weight_q_> + gen weight_q = . + label var weight_q "Survey sampling weight to obtain national estimates for each quarter" +* + + +*<_psu_> + * PSU already exists + *gen psu = . + label var psu "Primary sampling units" +* + + +*<_ssu_> + gen ssu = recno + label var ssu "Secondary sampling units" +* + + +*<_strata_> + gen strata = . + label var strata "Strata" +* + + +*<_wave_> + gen wave = . + label var wave "Survey wave" +* + + +*<_panel_> + gen panel = "" + label var panel "Panel individual belongs to" +* + + +*<_visit_no_> + gen visit_no = . + label var visit_no "Visit number in panel" +* + +} + + +/*%%============================================================================================= + 3: Geography +==============================================================================================%%*/ + +{ + +*<_urban_> + * typev is 0 if YErevan, 1 if urban (other), rural is 2 + gen byte urban = inrange(typev, 0,1) + replace urban = 0 if typev == 2 + label var urban "Location is urban" + la de lblurban 1 "Urban" 0 "Rural" + label values urban lblurban +* + + +*<_subnatid1_> +/* <_subnatid1_note> + + The variable is string and country-specific categorical. Numeric entries are coded in string format using the following naming convention: "1 – Hatay". That is, the variable itself is to be string, not a labelled numeric vector. + + Example of entries would be "1 - Alaska", "2 - Arkansas", ... + + */ + gen str subnatid1 = "" + replace subnatid1 = "1 - Yerevan" if marz == 1 + replace subnatid1 = "2 - Aragatsotn" if marz == 2 + replace subnatid1 = "3 - Ararat" if marz == 3 + replace subnatid1 = "4 - Armavir" if marz == 4 + replace subnatid1 = "5 - Gegharkunik" if marz == 5 + replace subnatid1 = "6 - Lori" if marz == 6 + replace subnatid1 = "7 - Kotayk" if marz == 7 + replace subnatid1 = "8 - Shirak" if marz == 8 + replace subnatid1 = "9 - Syunik" if marz == 9 + replace subnatid1 = "10 - Vayoc Dzor" if marz == 10 + replace subnatid1 = "11 - Tavush" if marz == 11 +* + + +*<_subnatid2_> + gen str subnatid2 = "" + label var subnatid2 "Subnational ID at Second Administrative Level" +* + + +*<_subnatid3_> + gen str subnatid3 = "" + label var subnatid3 "Subnational ID at Third Administrative Level" +* + + +*<_subnatidsurvey_> +/* <_subnatidsurvey_note> + + Variable denoting lowest administrative info to which the survey is still significat. + See entry in GLD Guidelines (https://github.com/worldbank/gld/blob/main/Support/A%20-%20Guides%20and%20Documentation/GLD_1.0_Guidelines.docx) for more details + + */ + decode urban, generate(helper) + generate subnatidsurvey = string(urban) + " - " + helper + drop helper + label var subnatidsurvey "Administrative level at which survey is representative" +* + + +*<_subnatid1_prev_> +/* <_subnatid1_prev_note> + + subnatid1_prev is coded as missing unless the classification used for subnatid1 has changed since the previous survey. + + */ + gen subnatid1_prev = . + label var subnatid1_prev "Classification used for subnatid1 from previous survey" +* + + +*<_subnatid2_prev_> + gen subnatid2_prev = . + label var subnatid2_prev "Classification used for subnatid2 from previous survey" +* + + +*<_subnatid3_prev_> + gen subnatid3_prev = . + label var subnatid3_prev "Classification used for subnatid3 from previous survey" +* + + +*<_gaul_adm1_code_> + gen gaul_adm1_code = . + label var gaul_adm1_code "Global Administrative Unit Layers (GAUL) Admin 1 code" +* + + +*<_gaul_adm2_code_> + gen gaul_adm2_code = . + label var gaul_adm2_code "Global Administrative Unit Layers (GAUL) Admin 2 code" +* + + +*<_gaul_adm3_code_> + gen gaul_adm3_code = . + label var gaul_adm3_code "Global Administrative Unit Layers (GAUL) Admin 3 code" +* + +} + + +/*%%============================================================================================= + 4: Demography +==============================================================================================%%*/ + +{ + +*<_hsize_> + * If keep all + gen hsize = members + /* * If drop absentees + gen helper = 1 + egen hh_abs_no = total(helper), by(recno) + replace hsize = hsize - hh_abs_no + drop helper hh_abs_no + */ + label var hsize "Household size" +* + + +*<_age_> + * Already in there + *gen age = . + label var age "Individual age" +* + + +*<_male_> + gen male = a1_1 + recode male (2 = 0) + label var male "Sex - Ind is male" + la de lblmale 1 "Male" 0 "Female" + label values male lblmale +* + + +*<_relationharm_> + gen relationharm = a1_2 + recode relationharm (4 = 3) (6 = 4) (7 = 5) (8 = 6) + label var relationharm "Relationship to the head of household - Harmonized" + la de lblrelationharm 1 "Head of household" 2 "Spouse" 3 "Children" 4 "Parents" 5 "Other relatives" 6 "Other and non-relatives" + label values relationharm lblrelationharm +* + + +*<_relationcs_> + clonevar relationcs = a1_2 + label var relationcs "Relationship to the head of household - Country original" +* + + +*<_marital_> + gen byte marital = a1_5 + recode marital (3 = 5) (5 = 3) + label var marital "Marital status" + la de lblmarital 1 "Married" 2 "Never Married" 3 "Living together" 4 "Divorced/Separated" 5 "Widowed", replace + label values marital lblmarital +* + + +*<_eye_dsablty_> + gen eye_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all" + label values eye_dsablty dsablty + label var eye_dsablty "Disability related to eyesight" +* + + +*<_hear_dsablty_> + gen hear_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values hear_dsablty dsablty + label var hear_dsablty "Disability related to hearing" +* + + +*<_walk_dsablty_> + gen walk_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values walk_dsablty dsablty + label var walk_dsablty "Disability related to walking or climbing stairs" +* + + +*<_conc_dsord_> + gen conc_dsord = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values conc_dsord dsablty + label var conc_dsord "Disability related to concentration or remembering" +* + + +*<_slfcre_dsablty_> + gen slfcre_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values slfcre_dsablty dsablty + label var slfcre_dsablty "Disability related to selfcare" +* + + +*<_comm_dsablty_> + gen comm_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values comm_dsablty dsablty + label var comm_dsablty "Disability related to communicating" +* + +} + + +/*%%============================================================================================= + 5: Migration +==============================================================================================%%*/ + + +{ + +* Migration is not done as it is much more narrowly defined as migrated and returned. Thus anyone who +* migrated from their home town to the capital city would not be included. + +*<_migrated_mod_age_> + gen migrated_mod_age = . + label var migrated_mod_age "Migration module application age" +* + + +*<_migrated_ref_time_> + gen migrated_ref_time = . + label var migrated_ref_time "Reference time applied to migration questions (in years)" +* + + +*<_migrated_binary_> + gen migrated_binary = . + label de lblmigrated_binary 0 "No" 1 "Yes" + label values migrated_binary lblmigrated_binary + label var migrated_binary "Individual has migrated" +* + + +*<_migrated_years_> + gen migrated_years = . + label var migrated_years "Years since latest migration" +* + + +*<_migrated_from_urban_> + gen migrated_from_urban = . + label de lblmigrated_from_urban 0 "Rural" 1 "Urban" + label values migrated_from_urban lblmigrated_from_urban + label var migrated_from_urban "Migrated from area" +* + + +*<_migrated_from_cat_> + gen migrated_from_cat = . + label de lblmigrated_from_cat 1 "From same admin3 area" 2 "From same admin2 area" 3 "From same admin1 area" 4 "From other admin1 area" 5 "From other country" + label values migrated_from_cat lblmigrated_from_cat + label var migrated_from_cat "Category of migration area" +* + + +*<_migrated_from_code_> + gen migrated_from_code = . + *label de lblmigrated_from_code + *label values migrated_from_code lblmigrated_from_code + label var migrated_from_code "Code of migration area as subnatid level of migrated_from_cat" +* + + +*<_migrated_from_country_> + gen migrated_from_country = . + label var migrated_from_country "Code of migration country (ISO 3 Letter Code)" +* + + +*<_migrated_reason_> + gen migrated_reason = . + label de lblmigrated_reason 1 "Family reasons" 2 "Educational reasons" 3 "Employment" 4 "Forced (political reasons, natural disaster, …)" 5 "Other reasons" + label values migrated_reason lblmigrated_reason + label var migrated_reason "Reason for migrating" +* + + +} + + +/*%%============================================================================================= + 6: Education +==============================================================================================%%*/ + + +{ + +*<_ed_mod_age_> + +/* <_ed_mod_age_note> + +Education module is only asked to those XX and older. + + */ + +gen byte ed_mod_age = 6 +label var ed_mod_age "Education module application age" + +* + +*<_school_> + gen byte school = 0 + replace school = 1 if e2_4 == 1 + label var school "Attending school" + la de lblschool 0 "No" 1 "Yes" + label values school lblschool +* + + +*<_literacy_> + gen byte literacy = 1 + replace literacy = 0 if e2_2 == 0 + replace literacy = . if mi(e2_2) + label var literacy "Individual can read & write" + la de lblliteracy 0 "No" 1 "Yes" + label values literacy lblliteracy +* + + +*<_educy_> + * Number of years is a combination of level (e2_2) and years in that course (e2_3) + gen byte educy =. + replace educy = 0 if e2_2 == 0 + replace educy = e2_3 if e2_2 == 1 & inrange(e2_3,0,4) + replace educy = 4 + e2_3 if e2_2 == 2 & inrange(e2_3,0,5) + replace educy = 9 + e2_3 if e2_2 == 3 & inrange(e2_3,0,3) + replace educy = 9 + e2_3 if e2_2 == 4 & inrange(e2_3,0,2) + replace educy = 9 + e2_3 if e2_2 == 5 & inrange(e2_3,0,5) + replace educy = 12 + e2_3 if e2_2 == 6 & inrange(e2_3,0,7) + replace educy = 16 + e2_3 if e2_2 == 7 & inrange(e2_3,0,4) + label var educy "Years of education" +* + + +*<_educat7_> + gen byte educat7 =. + replace educat7 = 1 if e2_2 == 0 + replace educat7 = 2 if e2_2 == 1 & e2_3 < 4 + replace educat7 = 3 if e2_2 == 1 & e2_3 == 4 + replace educat7 = 4 if e2_2 == 2 + replace educat7 = 5 if inrange(e2_2, 3, 4) + replace educat7 = 6 if e2_2 == 5 + replace educat7 = 7 if inrange(e2_2, 6, 7) + label var educat7 "Level of education 1" + la de lbleducat7 1 "No education" 2 "Primary incomplete" 3 "Primary complete" 4 "Secondary incomplete" 5 "Secondary complete" 6 "Higher than secondary but not university" 7 "University incomplete or complete", replace + label values educat7 lbleducat7 +* + + +*<_educat5_> + gen byte educat5 = educat7 + recode educat5 4=3 5=4 6 7=5 + label var educat5 "Level of education 2" + la de lbleducat5 1 "No education" 2 "Primary incomplete" 3 "Primary complete but secondary incomplete" 4 "Secondary complete" 5 "Some tertiary/post-secondary" + label values educat5 lbleducat5 +* + + +*<_educat4_> + gen byte educat4 = educat7 + recode educat4 (2 3 4 = 2) (5=3) (6 7=4) + label var educat4 "Level of education 3" + la de lbleducat4 1 "No education" 2 "Primary" 3 "Secondary" 4 "Post-secondary" + label values educat4 lbleducat4 +* + + +*<_educat_orig_> + clonevar educat_orig = e2_2 + label var educat_orig "Original survey education code" +* + + +*<_educat_isced_> + gen educat_isced = . + label var educat_isced "ISCED standardised level of education" +* + + +*----------6.1: Education cleanup------------------------------* + +*<_% Correction min age_> + +** Drop info for cases under the age for which questions to be asked (do not need a variable for this) +local ed_var "school literacy educy educat7 educat5 educat4 educat_orig educat_isced" + +foreach v of local ed_var { + cap confirm numeric variable `v' + if _rc == 0 { // is indeed numeric + replace `v'=. if ( age < ed_mod_age & !missing(age) ) + } + else { // is not + replace `v'= "" if ( age < ed_mod_age & !missing(age) ) + } +} + + +* + + +} + + +/*%%============================================================================================= + 7: Training +==============================================================================================%%*/ + + +{ + +*<_vocational_> + gen vocational = . + label de lblvocational 0 "No" 1 "Yes" + label var vocational "Ever received vocational training" +* + + +*<_vocational_type_> + gen vocational_type = . + label de lblvocational_type 1 "Inside Enterprise" 2 "External" + label values vocational_type lblvocational_type + label var vocational_type "Type of vocational training" +* + + +*<_vocational_length_l_> + gen vocational_length_l = . + label var vocational_length_l "Length of training in months, lower limit" +* + + +*<_vocational_length_u_> + gen vocational_length_u = . + label var vocational_length_u "Length of training in months, upper limit" +* + + +*<_vocational_field_orig_> + gen str vocational_field_orig = "" + label var vocational_field_orig "Original field of training information" +* + + +*<_vocational_financed_> + gen vocational_financed = . + label de lblvocational_financed 1 "Employer" 2 "Government" 3 "Mixed Employer/Government" 4 "Own funds" 5 "Other" + label var vocational_financed "How training was financed" +* + +} + + +/*%%============================================================================================= + 8: Labour +==============================================================================================%%*/ + + +*<_minlaborage_> + gen byte minlaborage = 15 + label var minlaborage "Labor module application age" +* + + +*----------8.1: 7 day reference overall------------------------------* + +{ +*<_lstatus_> + gen byte lstatus = 1 if !mi(d1_4a) + + * For unemployed we need looking for a job (d2_5) and willing to accept (d3_11) + * Ensured all who looked answer the willing question + count if inrange(d3_5,1,2) & mi(d3_11) + assert `r(N)' == 0 + replace lstatus = 2 if lstatus == . & inrange(d3_5, 1, 2) & d3_11 == 1 + + * Normally, I would set all others to NLF, but given that we have the absentees, assign only to no in d2_5 + replace lstatus = 3 if lstatus == . & d3_5 == 3 + replace lstatus = 3 if lstatus == . & inrange(d3_5, 1, 2) & d3_11 == 2 + + replace lstatus = . if age < minlaborage + label var lstatus "Labor status" + la de lbllstatus 1 "Employed" 2 "Unemployed" 3 "Non-LF" + label values lstatus lbllstatus +* + + +*<_potential_lf_> + gen byte potential_lf = 0 + * Either not looking but would accept or looking but would not accept + replace potential_lf = 1 if (d3_5 == 3 & d3_11 == 1) | (inrange(d3_5,1,2) & d3_11 == 2) + replace potential_lf = . if age < minlaborage & age != . + replace potential_lf = . if lstatus != 3 + label var potential_lf "Potential labour force status" + la de lblpotential_lf 0 "No" 1 "Yes" + label values potential_lf lblpotential_lf +* + + +*<_underemployment_> + gen byte underemployment = . + replace underemployment = 1 if d1_25a == 1 + replace underemployment = 0 if d1_25a == 2 + replace underemployment = . if age < minlaborage & age != . + replace underemployment = . if lstatus != 1 + label var underemployment "Underemployment status" + la de lblunderemployment 0 "No" 1 "Yes" + label values underemployment lblunderemployment +* + + +*<_nlfreason_> + gen byte nlfreason=. + label var nlfreason "Reason not in the labor force" + la de lblnlfreason 1 "Student" 2 "Housekeeper" 3 "Retired" 4 "Disabled" 5 "Other" + label values nlfreason lblnlfreason +* + + +*<_unempldur_l_> + gen byte unempldur_l=. + replace unempldur_l = 0 if d3_13 == 1 + replace unempldur_l = 1 if d3_13 == 2 + replace unempldur_l = 4 if d3_13 == 3 + replace unempldur_l = 7 if d3_13 == 4 + replace unempldur_l = 13 if d3_13 == 5 + replace unempldur_l = 25 if d3_13 == 6 + replace unempldur_l = 49 if d3_13 == 7 + replace unempldur_l = . if lstatus != 2 + label var unempldur_l "Unemployment duration (months) lower bracket" +* + + +*<_unempldur_u_> + gen byte unempldur_u=. + replace unempldur_u = 1 if d3_13 == 1 + replace unempldur_u = 3 if d3_13 == 2 + replace unempldur_u = 6 if d3_13 == 3 + replace unempldur_u = 12 if d3_13 == 4 + replace unempldur_u = 24 if d3_13 == 5 + replace unempldur_u = 48 if d3_13 == 6 + replace unempldur_u = 999 if d3_13 == 7 + replace unempldur_u = . if lstatus != 2 + label var unempldur_u "Unemployment duration (months) upper bracket" +* + +} + + +*----------8.2: 7 day reference main job------------------------------* + + +{ +*<_empstat_> + gen byte empstat = d1_8a + recode empstat (2 3 = 1) (4 = 3) (5 6 8 = 4) (7 = 2) (90 = 5) + label var empstat "Employment status during past week primary job 7 day recall" + la de lblempstat 1 "Paid employee" 2 "Non-paid employee" 3 "Employer" 4 "Self-employed" 5 "Other, workers not classifiable by status", replace + label values empstat lblempstat +* + + +*<_ocusec_> + gen byte ocusec = d1_9a + recode ocusec (2 = 1) (3/5 = 2) + replace ocusec = . if lstatus != 1 + label var ocusec "Sector of activity primary job 7 day recall" + la de lblocusec 1 "Public Sector, Central Government, Army" 2 "Private, NGO" 3 "State owned" 4 "Public or State-owned, but cannot distinguish" + label values ocusec lblocusec +* + + +*<_industry_orig_> + decode d1_5a, gen(industry_orig) + label var industry_orig "Original survey industry code, main job 7 day recall" +* + + +*<_industrycat_isic_> + gen industrycat_isic = "" + replace industrycat_isic = "A" if d1_5a == 1 + replace industrycat_isic = "B" if d1_5a == 2 + replace industrycat_isic = "C" if d1_5a == 3 + replace industrycat_isic = "D" if d1_5a == 4 + replace industrycat_isic = "E" if d1_5a == 5 + replace industrycat_isic = "F" if d1_5a == 6 + replace industrycat_isic = "G" if d1_5a == 7 + replace industrycat_isic = "H" if d1_5a == 8 + replace industrycat_isic = "I" if d1_5a == 9 + replace industrycat_isic = "J" if d1_5a == 10 + replace industrycat_isic = "K" if d1_5a == 11 + replace industrycat_isic = "L" if d1_5a == 12 + replace industrycat_isic = "M" if d1_5a == 13 + replace industrycat_isic = "N" if d1_5a == 14 + replace industrycat_isic = "O" if d1_5a == 15 + replace industrycat_isic = "P" if d1_5a == 16 + replace industrycat_isic = "Q" if d1_5a == 17 + label var industrycat_isic "ISIC code of primary job 7 day recall" +* + + +*<_industrycat10_> + gen byte industrycat10 = . + replace industrycat10 = 1 if inrange(d1_5a, 1, 2) + replace industrycat10 = 2 if d1_5a == 3 + replace industrycat10 = 3 if d1_5a == 4 + replace industrycat10 = 4 if d1_5a == 5 + replace industrycat10 = 5 if d1_5a == 6 + replace industrycat10 = 6 if inrange(d1_5a, 7, 8) + replace industrycat10 = 7 if d1_5a == 9 + replace industrycat10 = 8 if inrange(d1_5a, 10, 11) + replace industrycat10 = 9 if d1_5a == 12 + replace industrycat10 = 10 if inrange(d1_5a, 13, 17) + label var industrycat10 "1 digit industry classification, primary job 7 day recall" + la de lblindustrycat10 1 "Agriculture" 2 "Mining" 3 "Manufacturing" 4 "Public utilities" 5 "Construction" 6 "Commerce" 7 "Transport and Comnunications" 8 "Financial and Business Services" 9 "Public Administration" 10 "Other Services, Unspecified" + label values industrycat10 lblindustrycat10 +* + + +*<_industrycat4_> + gen byte industrycat4 = industrycat10 + recode industrycat4 (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4 "Broad Economic Activities classification, primary job 7 day recall" + la de lblindustrycat4 1 "Agriculture" 2 "Industry" 3 "Services" 4 "Other" + label values industrycat4 lblindustrycat4 +* + + +*<_occup_orig_> + gen occup_orig = . + label var occup_orig "Original occupation record primary job 7 day recall" +* + + +*<_occup_isco_> + gen occup_isco = "" + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + *drop if missing(occup_isco) + *int_classif_universe, var(occup_isco) universe(ISCO) + count + *list + *assert `r(N)' == 0 + restore + + label var occup_isco "ISCO code of primary job 7 day recall" +* + + +*<_occup_> + gen byte occup = . + label var occup "1 digit occupational classification, primary job 7 day recall" + la de lbloccup 1 "Managers" 2 "Professionals" 3 "Technicians" 4 "Clerks" 5 "Service and market sales workers" 6 "Skilled agricultural" 7 "Craft workers" 8 "Machine operators" 9 "Elementary occupations" 10 "Armed forces" 99 "Others" + label values occup lbloccup +* + + +*<_occup_skill_> + gen occup_skill = . + replace occup_skill = 3 if inrange(occup, 1, 3) + replace occup_skill = 2 if inrange(occup, 4, 8) + replace occup_skill = 1 if occup == 9 + la de lblskill 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill lblskill + label var occup_skill "Skill based on ISCO standard primary job 7 day recall" +* + + +*<_wage_no_compen_> + egen double wage_no_compen = rowtotal(d1_17a d1_19a), missing + replace wage_no_compen = . if lstatus != 1 | empstat == 2 | wage_no_compen == 0 + label var wage_no_compen "Last wage payment primary job 7 day recall" +* + + +*<_unitwage_> + gen byte unitwage = 5 + replace unitwage = . if mi(wage_no_compen) + label var unitwage "Last wages' time unit primary job 7 day recall" + la de lblunitwage 1 "Daily" 2 "Weekly" 3 "Every two weeks" 4 "Bimonthly" 5 "Monthly" 6 "Trimester" 7 "Biannual" 8 "Annually" 9 "Hourly" 10 "Other" + label values unitwage lblunitwage +* + + +*<_whours_> + gen whours = d1_26a + replace whours = . if whours == 0 | lstatus != 1 + label var whours "Hours of work in last week primary job 7 day recall" +* + + +*<_wmonths_> + gen wmonths = . + label var wmonths "Months of work in past 12 months primary job 7 day recall" +* + + +*<_wage_total_> +/* <_wage_total_note> + + Use gross wages when available and net wages only when gross wages are not available. + This is done to make it easy to compare earnings in formal and informal sectors. + + */ + gen wage_total = . + label var wage_total "Annualized total wage primary job 7 day recall" +* + + +*<_contract_> + gen byte contract = 0 + replace contract = 1 if d1_8a == 1 | d1_8a == 2 + replace contract = . if lstatus != 1 + label var contract "Employment has contract primary job 7 day recall" + la de lblcontract 0 "Without contract" 1 "With contract" + label values contract lblcontract +* + + +*<_healthins_> + gen byte healthins = . + label var healthins "Employment has health insurance primary job 7 day recall" + la de lblhealthins 0 "Without health insurance" 1 "With health insurance" + label values healthins lblhealthins +* + + +*<_socialsec_> + gen byte socialsec = . + label var socialsec "Employment has social security insurance primary job 7 day recall" + la de lblsocialsec 1 "With social security" 0 "Without social secturity" + label values socialsec lblsocialsec +* + + +*<_union_> + gen byte union = . + label var union "Union membership at primary job 7 day recall" + la de lblunion 0 "Not union member" 1 "Union member" + label values union lblunion +* + + +*<_firmsize_l_> + gen firmsize_l = . + replace firmsize_l = 1 if d1_11a == 1 + replace firmsize_l = 6 if d1_11a == 2 + replace firmsize_l = 16 if d1_11a == 3 + replace firmsize_l = 31 if d1_11a == 4 + replace firmsize_l = 50 if d1_11a == 5 + replace firmsize_l = 100 if d1_11a == 6 + + * Add in public sector workers (skip firm size as largest bracket) + replace firmsize_l = 100 if ocusec == 1 & mi(firmsize_l) + + replace firmsize_l = . if lstatus != 1 + label var firmsize_l "Firm size (lower bracket) primary job 7 day recall" +* + + +*<_firmsize_u_> + gen firmsize_u= . + replace firmsize_u = 5 if d1_11a == 1 + replace firmsize_u = 15 if d1_11a == 2 + replace firmsize_u = 30 if d1_11a == 3 + replace firmsize_u = 49 if d1_11a == 4 + replace firmsize_u = 99 if d1_11a == 5 + replace firmsize_u = 9999 if d1_11a == 6 + + * Add in public sector workers (skip firm size as largest bracket) + replace firmsize_u = 9999 if ocusec == 1 & mi(firmsize_u) + + replace firmsize_u = . if lstatus != 1 + label var firmsize_u "Firm size (upper bracket) primary job 7 day recall" +* + + +} + + +*----------8.3: 7 day reference secondary job------------------------------* +* Since labels are the same as main job, values are labelled using main job labels + + +{ +*<_empstat_2_> + gen byte empstat_2 = d1_8b + recode empstat_2 (2 = 1) (5 6 = 4) (7 = 2) (0 = .) + label var empstat_2 "Employment status during past week secondary job 7 day recall" + label values empstat_2 lblempstat +* + + +*<_ocusec_2_> + gen byte ocusec_2 = d1_9b + recode ocusec_2 (2 = 1) (3/5 = 2) (0 = .) + replace ocusec_2 = . if mi(empstat_2) + label var ocusec_2 "Sector of activity secondary job 7 day recall" + label values ocusec_2 lblocusec +* + + +*<_industry_orig_2_> + decode d1_5b, gen(industry_orig_2) + label var industry_orig_2 "Original survey industry code, secondary job 7 day recall" +* + + +*<_industrycat_isic_2_> + gen industrycat_isic_2 = "" + replace industrycat_isic_2 = "A" if d1_5b == 1 + replace industrycat_isic_2 = "B" if d1_5b == 2 + replace industrycat_isic_2 = "C" if d1_5b == 3 + replace industrycat_isic_2 = "D" if d1_5b == 4 + replace industrycat_isic_2 = "E" if d1_5b == 5 + replace industrycat_isic_2 = "F" if d1_5b == 6 + replace industrycat_isic_2 = "G" if d1_5b == 7 + replace industrycat_isic_2 = "H" if d1_5b == 8 + replace industrycat_isic_2 = "I" if d1_5b == 9 + replace industrycat_isic_2 = "J" if d1_5b == 10 + replace industrycat_isic_2 = "K" if d1_5b == 11 + replace industrycat_isic_2 = "L" if d1_5b == 12 + replace industrycat_isic_2 = "M" if d1_5b == 13 + replace industrycat_isic_2 = "N" if d1_5b == 14 + replace industrycat_isic_2 = "O" if d1_5b == 15 + replace industrycat_isic_2 = "P" if d1_5b == 16 + replace industrycat_isic_2 = "Q" if d1_5b == 17 + label var industrycat_isic_2 "ISIC code of secondary job 7 day recall" +* + + +*<_industrycat10_2_> + gen byte industrycat10_2 = . + replace industrycat10_2 = 1 if inrange(d1_5b, 1, 2) + replace industrycat10_2 = 2 if d1_5b == 3 + replace industrycat10_2 = 3 if d1_5b == 4 + replace industrycat10_2 = 4 if d1_5b == 5 + replace industrycat10_2 = 5 if d1_5b == 6 + replace industrycat10_2 = 6 if inrange(d1_5b, 7, 8) + replace industrycat10_2 = 7 if d1_5b == 9 + replace industrycat10_2 = 8 if inrange(d1_5b, 10, 11) + replace industrycat10_2 = 9 if d1_5b == 12 + replace industrycat10_2 = 10 if inrange(d1_5b, 13, 17) + label var industrycat10_2 "1 digit industry classification, secondary job 7 day recall" + label values industrycat10_2 lblindustrycat10 +* + + +*<_industrycat4_2_> + gen byte industrycat4_2 = industrycat10_2 + recode industrycat4_2 (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4_2 "Broad Economic Activities classification, secondary job 7 day recall" + label values industrycat4_2 lblindustrycat4 +* + + +*<_occup_orig_2_> + gen occup_orig_2 = . + label var occup_orig_2 "Original occupation record secondary job 7 day recall" +* + + +*<_occup_isco_2_> + gen occup_isco_2 = "" + label var occup_isco_2 "ISCO code of secondary job 7 day recall" +* + + +*<_occup_2_> + gen byte occup_2 = . + label var occup_2 "1 digit occupational classification secondary job 7 day recall" + label values occup_2 lbloccup +* + + +*<_occup_skill_2_> + gen occup_skill_2 = . + replace occup_skill_2 = 3 if inrange(occup_2, 1, 3) + replace occup_skill_2 = 2 if inrange(occup_2, 4, 8) + replace occup_skill_2 = 1 if occup_2 == 9 + la de lblskill2 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill_2 lblskill2 + label var occup_skill_2 "Skill based on ISCO standard secondary job 7 day recall" +* + + +*<_wage_no_compen_2_> + egen double wage_no_compen_2 = rowtotal(d1_17b d1_19b), missing + replace wage_no_compen_2 = . if mi(empstat_2) | empstat_2 == 2 | wage_no_compen_2 == 0 + label var wage_no_compen_2 "Last wage payment secondary job 7 day recall" +* + + +*<_unitwage_2_> + gen byte unitwage_2 = 5 + replace unitwage_2 = . if mi(wage_no_compen_2) + label var unitwage_2 "Last wages' time unit secondary job 7 day recall" + label values unitwage_2 lblunitwage +* + + +*<_whours_2_> + gen whours_2 = d1_26b + replace whours_2 = . if whours_2 == 0 | mi(empstat_2) + label var whours_2 "Hours of work in last week secondary job 7 day recall" +* + + +*<_wmonths_2_> + gen wmonths_2 = . + label var wmonths_2 "Months of work in past 12 months secondary job 7 day recall" +* + + +*<_wage_total_2_> + gen wage_total_2 = . + label var wage_total_2 "Annualized total wage secondary job 7 day recall" +* + + +*<_firmsize_l_2_> + gen firmsize_l_2 = . + replace firmsize_l_2 = 1 if d1_11b == 1 + replace firmsize_l_2 = 6 if d1_11b == 2 + replace firmsize_l_2 = 16 if d1_11b == 3 + replace firmsize_l_2 = 31 if d1_11b == 4 + replace firmsize_l_2 = 50 if d1_11b == 5 + replace firmsize_l_2 = 100 if d1_11b == 6 + + * Add in public sector workers (skip firm size as largest bracket) + replace firmsize_l_2 = 100 if ocusec_2 == 1 & mi(firmsize_l_2) + + replace firmsize_l_2 = . if mi(empstat_2) + label var firmsize_l_2 "Firm size (lower bracket) secondary job 7 day recall" +* + + +*<_firmsize_u_2_> + gen firmsize_u_2 = . + replace firmsize_u_2 = 5 if d1_11b == 1 + replace firmsize_u_2 = 15 if d1_11b == 2 + replace firmsize_u_2 = 30 if d1_11b == 3 + replace firmsize_u_2 = 49 if d1_11b == 4 + replace firmsize_u_2 = 99 if d1_11b == 5 + replace firmsize_u_2 = 9999 if d1_11b == 6 + + * Add in public sector workers (skip firm size as largest bracket) + replace firmsize_u_2 = 9999 if ocusec_2 == 1 & mi(firmsize_u_2) + + replace firmsize_u_2 = . if mi(empstat_2) + label var firmsize_u_2 "Firm size (upper bracket) secondary job 7 day recall" +* + +} + +*----------8.4: 7 day reference additional jobs------------------------------* + +*<_t_hours_others_> + gen t_hours_others = . + label var t_hours_others "Annualized hours worked in all but primary and secondary jobs 7 day recall" +* + + +*<_t_wage_nocompen_others_> + gen t_wage_nocompen_others = . + label var t_wage_nocompen_others "Annualized wage in all but 1st & 2nd jobs excl. bonuses, etc. 7 day recall" +* + + +*<_t_wage_others_> + gen t_wage_others = . + label var t_wage_others "Annualized wage in all but primary and secondary jobs (12-mon ref period)" +* + + +*----------8.5: 7 day reference total summary------------------------------* + + +*<_t_hours_total_> + gen t_hours_total = . + label var t_hours_total "Annualized hours worked in all jobs 7 day recall" +* + + +*<_t_wage_nocompen_total_> + gen t_wage_nocompen_total = . + label var t_wage_nocompen_total "Annualized wage in all jobs excl. bonuses, etc. 7 day recall" +* + + +*<_t_wage_total_> + gen t_wage_total = . + label var t_wage_total "Annualized total wage for all jobs 7 day recall" +* + + +*----------8.6: 12 month reference overall------------------------------* + +{ + +*<_lstatus_year_> + gen byte lstatus_year = . + replace lstatus_year=. if age < minlaborage & age != . + label var lstatus_year "Labor status during last year" + la de lbllstatus_year 1 "Employed" 2 "Unemployed" 3 "Non-LF" + label values lstatus_year lbllstatus_year +* + +*<_potential_lf_year_> + gen byte potential_lf_year = . + replace potential_lf_year=. if age < minlaborage & age != . + replace potential_lf_year = . if lstatus_year != 3 + label var potential_lf_year "Potential labour force status" + la de lblpotential_lf_year 0 "No" 1 "Yes" + label values potential_lf_year lblpotential_lf_year +* + + +*<_underemployment_year_> + gen byte underemployment_year = . + replace underemployment_year = . if age < minlaborage & age != . + replace underemployment_year = . if lstatus_year == 1 + label var underemployment_year "Underemployment status" + la de lblunderemployment_year 0 "No" 1 "Yes" + label values underemployment_year lblunderemployment_year +* + + +*<_nlfreason_year_> + gen byte nlfreason_year=. + label var nlfreason_year "Reason not in the labor force" + la de lblnlfreason_year 1 "Student" 2 "Housekeeper" 3 "Retired" 4 "Disabled" 5 "Other" + label values nlfreason_year lblnlfreason_year +* + + +*<_unempldur_l_year_> + gen byte unempldur_l_year=. + label var unempldur_l_year "Unemployment duration (months) lower bracket" +* + + +*<_unempldur_u_year_> + gen byte unempldur_u_year=. + label var unempldur_u_year "Unemployment duration (months) upper bracket" +* + +} + +*----------8.7: 12 month reference main job------------------------------* + +{ + +*<_empstat_year_> + gen byte empstat_year = . + label var empstat_year "Employment status during past week primary job 12 month recall" + la de lblempstat_year 1 "Paid employee" 2 "Non-paid employee" 3 "Employer" 4 "Self-employed" 5 "Other, workers not classifiable by status" + label values empstat_year lblempstat_year +* + +*<_ocusec_year_> + gen byte ocusec_year = . + label var ocusec_year "Sector of activity primary job 12 month recall" + la de lblocusec_year 1 "Public Sector, Central Government, Army" 2 "Private, NGO" 3 "State owned" 4 "Public or State-owned, but cannot distinguish" + label values ocusec_year lblocusec_year +* + +*<_industry_orig_year_> + gen industry_orig_year = . + label var industry_orig_year "Original industry record main job 12 month recall" +* + + +*<_industrycat_isic_year_> + gen industrycat_isic_year = . + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + *drop if missing(industrycat_isic_year) + *int_classif_universe, var(industrycat_isic_year) universe(ISIC) + count + *list + *assert `r(N)' == 0 + restore + + label var industrycat_isic_year "ISIC code of primary job 12 month recall" +* + +*<_industrycat10_year_> + gen byte industrycat10_year = . + label var industrycat10_year "1 digit industry classification, primary job 12 month recall" + la de lblindustrycat10_year 1 "Agriculture" 2 "Mining" 3 "Manufacturing" 4 "Public utilities" 5 "Construction" 6 "Commerce" 7 "Transport and Comnunications" 8 "Financial and Business Services" 9 "Public Administration" 10 "Other Services, Unspecified" + label values industrycat10_year lblindustrycat10_year +* + + +*<_industrycat4_year_> + gen byte industrycat4_year=industrycat10_year + recode industrycat4_year (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4_year "Broad Economic Activities classification, primary job 12 month recall" + la de lblindustrycat4_year 1 "Agriculture" 2 "Industry" 3 "Services" 4 "Other" + label values industrycat4_year lblindustrycat4_year +* + + +*<_occup_orig_year_> + gen occup_orig_year = . + label var occup_orig_year "Original occupation record primary job 12 month recall" +* + + +*<_occup_isco_year_> + gen occup_isco_year = "" + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + *drop if missing(occup_isco_year) + *int_classif_universe, var(occup_isco_year) universe(ISCO) + count + *list + *assert `r(N)' == 0 + restore + + label var occup_isco_year "ISCO code of primary job 12 month recall" +* + + +*<_occup_year_> + gen byte occup_year = . + label var occup_year "1 digit occupational classification, primary job 12 month recall" + la de lbloccup_year 1 "Managers" 2 "Professionals" 3 "Technicians" 4 "Clerks" 5 "Service and market sales workers" 6 "Skilled agricultural" 7 "Craft workers" 8 "Machine operators" 9 "Elementary occupations" 10 "Armed forces" 99 "Others" + label values occup_year lbloccup_year +* + + +*<_occup_skill_year_> + gen occup_skill_year = . + replace occup_skill_year = 3 if inrange(occup_year, 1, 3) + replace occup_skill_year = 2 if inrange(occup_year, 4, 8) + replace occup_skill_year = 1 if occup_year == 9 + la de lblskillyear 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill_year lblskillyear + label var occup_skill_year "Skill based on ISCO standard primary job 12 month recall" +* + + +*<_wage_no_compen_year_> --- this var has the same name as other and when quoted in the keep and order codes is repeated. + gen double wage_no_compen_year = . + label var wage_no_compen_year "Last wage payment primary job 12 month recall" +* + + +*<_unitwage_year_> + gen byte unitwage_year = . + label var unitwage_year "Last wages' time unit primary job 12 month recall" + la de lblunitwage_year 1 "Daily" 2 "Weekly" 3 "Every two weeks" 4 "Bimonthly" 5 "Monthly" 6 "Trimester" 7 "Biannual" 8 "Annually" 9 "Hourly" 10 "Other" + label values unitwage_year lblunitwage_year +* + + +*<_whours_year_> + gen whours_year = . + label var whours_year "Hours of work in last week primary job 12 month recall" +* + + +*<_wmonths_year_> + gen wmonths_year = . + label var wmonths_year "Months of work in past 12 months primary job 12 month recall" +* + + +*<_wage_total_year_> + gen wage_total_year = . + label var wage_total_year "Annualized total wage primary job 12 month recall" +* + + +*<_contract_year_> + gen byte contract_year = . + label var contract_year "Employment has contract primary job 12 month recall" + la de lblcontract_year 0 "Without contract" 1 "With contract" + label values contract_year lblcontract_year +* + + +*<_healthins_year_> + gen byte healthins_year = . + label var healthins_year "Employment has health insurance primary job 12 month recall" + la de lblhealthins_year 0 "Without health insurance" 1 "With health insurance" + label values healthins_year lblhealthins_year +* + + +*<_socialsec_year_> + gen byte socialsec_year = . + label var socialsec_year "Employment has social security insurance primary job 7 day recall" + la de lblsocialsec_year 1 "With social security" 0 "Without social secturity" + label values socialsec_year lblsocialsec_year +* + + +*<_union_year_> + gen byte union_year = . + label var union_year "Union membership at primary job 12 month recall" + la de lblunion_year 0 "Not union member" 1 "Union member" + label values union_year lblunion_year +* + + +*<_firmsize_l_year_> + gen firmsize_l_year = . + label var firmsize_l_year "Firm size (lower bracket) primary job 12 month recall" +* + + +*<_firmsize_u_year_> + gen firmsize_u_year = . + label var firmsize_u_year "Firm size (upper bracket) primary job 12 month recall" +* + +} + + +*----------8.8: 12 month reference secondary job------------------------------* + +{ + +*<_empstat_2_year_> + gen byte empstat_2_year = . + label var empstat_2_year "Employment status during past week secondary job 12 month recall" + label values empstat_2_year lblempstat_year +* + + +*<_ocusec_2_year_> + gen byte ocusec_2_year = . + label var ocusec_2_year "Sector of activity secondary job 12 month recall" + la de lblocusec_2_year 1 "Public Sector, Central Government, Army" 2 "Private, NGO" 3 "State owned" 4 "Public or State-owned, but cannot distinguish" + label values ocusec_2_year lblocusec_2_year +* + + + +*<_industry_orig_2_year_> + gen industry_orig_2_year = . + label var industry_orig_2_year "Original survey industry code, secondary job 12 month recall" +* + + + +*<_industrycat_isic_2_year_> + gen industrycat_isic_2_year = . + label var industrycat_isic_2_year "ISIC code of secondary job 12 month recall" +* + + +*<_industrycat10_2_year_> + gen byte industrycat10_2_year = . + label var industrycat10_2_year "1 digit industry classification, secondary job 12 month recall" + label values industrycat10_2_year lblindustrycat10_year +* + + +*<_industrycat4_2_year_> + gen byte industrycat4_2_year=industrycat10_2_year + recode industrycat4_2_year (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4_2_year "Broad Economic Activities classification, secondary job 12 month recall" + label values industrycat4_2_year lblindustrycat4_year +* + + +*<_occup_orig_2_year_> + gen occup_orig_2_year = . + label var occup_orig_2_year "Original occupation record secondary job 12 month recall" +* + + +*<_occup_isco_2_year_> + gen occup_isco_2_year = "" + label var occup_isco_2_year "ISCO code of secondary job 12 month recall" +* + + +*<_occup_2_year_> + gen byte occup_2_year = . + label var occup_2_year "1 digit occupational classification, secondary job 12 month recall" + label values occup_2_year lbloccup_year +* + + +*<_occup_skill_2_year_> + gen occup_skill_2_year = . + replace occup_skill_2_year = 3 if inrange(occup_2_year, 1, 3) + replace occup_skill_2_year = 2 if inrange(occup_2_year, 4, 8) + replace occup_skill_2_year = 1 if occup_2_year == 9 + la de lblskilly2 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill_2_year lblskilly2 + label var occup_skill_2_year "Skill based on ISCO standard secondary job 12 month recall" +* + + +*<_wage_no_compen_2_year_> + gen double wage_no_compen_2_year = . + label var wage_no_compen_2_year "Last wage payment secondary job 12 month recall" +* + + +*<_unitwage_2_year_> + gen byte unitwage_2_year = . + label var unitwage_2_year "Last wages' time unit secondary job 12 month recall" + label values unitwage_2_year lblunitwage_year +* + + +*<_whours_2_year_> + gen whours_2_year = . + label var whours_2_year "Hours of work in last week secondary job 12 month recall" +* + + +*<_wmonths_2_year_> + gen wmonths_2_year = . + label var wmonths_2_year "Months of work in past 12 months secondary job 12 month recall" +* + + +*<_wage_total_2_year_> + gen wage_total_2_year = . + label var wage_total_2_year "Annualized total wage secondary job 12 month recall" +* + +*<_firmsize_l_2_year_> + gen firmsize_l_2_year = . + label var firmsize_l_2_year "Firm size (lower bracket) secondary job 12 month recall" +* + + +*<_firmsize_u_2_year_> + gen firmsize_u_2_year = . + label var firmsize_u_2_year "Firm size (upper bracket) secondary job 12 month recall" +* + +} + + +*----------8.9: 12 month reference additional jobs------------------------------* + + +*<_t_hours_others_year_> + gen t_hours_others_year = . + label var t_hours_others_year "Annualized hours worked in all but primary and secondary jobs 12 month recall" +* + +*<_t_wage_nocompen_others_year_> + gen t_wage_nocompen_others_year = . + label var t_wage_nocompen_others_year "Annualized wage in all but 1st & 2nd jobs excl. bonuses, etc. 12 month recall" +* + +*<_t_wage_others_year_> + gen t_wage_others_year = . + label var t_wage_others_year "Annualized wage in all but primary and secondary jobs 12 month recall" +* + + +*----------8.10: 12 month total summary------------------------------* + + +*<_t_hours_total_year_> + gen t_hours_total_year = . + label var t_hours_total_year "Annualized hours worked in all jobs 12 month month recall" +* + + +*<_t_wage_nocompen_total_year_> + gen t_wage_nocompen_total_year = . + label var t_wage_nocompen_total_year "Annualized wage in all jobs excl. bonuses, etc. 12 month recall" +* + + +*<_t_wage_total_year_> + gen t_wage_total_year = . + label var t_wage_total_year "Annualized total wage for all jobs 12 month recall" +* + + +*----------8.11: Overall across reference periods------------------------------* + + +*<_njobs_> + gen njobs = . + label var njobs "Total number of jobs" +* + + +*<_t_hours_annual_> + gen t_hours_annual = . + label var t_hours_annual "Total hours worked in all jobs in the previous 12 months" +* + + +*<_linc_nc_> + gen linc_nc = . + label var linc_nc "Total annual wage income in all jobs, excl. bonuses, etc." +* + + +*<_laborincome_> + gen laborincome = t_wage_total_year + label var laborincome "Total annual individual labor income in all jobs, incl. bonuses, etc." +* + + +*----------8.13: Labour cleanup------------------------------* + +{ +*<_% Correction min age_> + +** Drop info for cases under the age for which questions to be asked (do not need a variable for this) + local lab_var "minlaborage lstatus nlfreason unempldur_l unempldur_u empstat ocusec industry_orig industrycat_isic industrycat10 industrycat4 occup_orig occup_isco occup_skill occup wage_no_compen unitwage whours wmonths wage_total contract healthins socialsec union firmsize_l firmsize_u empstat_2 ocusec_2 industry_orig_2 industrycat_isic_2 industrycat10_2 industrycat4_2 occup_orig_2 occup_isco_2 occup_skill_2 occup_2 wage_no_compen_2 unitwage_2 whours_2 wmonths_2 wage_total_2 firmsize_l_2 firmsize_u_2 t_hours_others t_wage_nocompen_others t_wage_others t_hours_total t_wage_nocompen_total t_wage_total lstatus_year nlfreason_year unempldur_l_year unempldur_u_year empstat_year ocusec_year industry_orig_year industrycat_isic_year industrycat10_year industrycat4_year occup_orig_year occup_isco_year occup_skill_year occup_year unitwage_year whours_year wmonths_year wage_total_year contract_year healthins_year socialsec_year union_year firmsize_l_year firmsize_u_year empstat_2_year ocusec_2_year industry_orig_2_year industrycat_isic_2_year industrycat10_2_year industrycat4_2_year occup_orig_2_year occup_isco_2_year occup_skill_2_year occup_2_year wage_no_compen_2_year unitwage_2_year whours_2_year wmonths_2_year wage_total_2_year firmsize_l_2_year firmsize_u_2_year t_hours_others_year t_wage_nocompen_others_year t_wage_others_year t_hours_total_year t_wage_nocompen_total_year t_wage_total_year njobs t_hours_annual linc_nc laborincome" + + foreach v of local lab_var { + cap confirm numeric variable `v' + if _rc == 0 { // is indeed numeric + replace `v'=. if ( age < minlaborage & !missing(age) ) + } + else { // is not + replace `v'= "" if ( age < minlaborage & !missing(age) ) + } + + } + +* +} + + +/*%%============================================================================================= + 9: Final steps +==============================================================================================%%*/ + +quietly{ + +*<_% KEEP VARIABLES - ALL_> + + keep countrycode survname survey icls_v isced_version isco_version isic_version year vermast veralt harmonization int_year int_month hhid pid weight weight_m weight_q psu ssu strata wave panel visit_no urban subnatid1 subnatid2 subnatid3 subnatidsurvey subnatid1_prev subnatid2_prev subnatid3_prev gaul_adm1_code gaul_adm2_code gaul_adm3_code hsize age male relationharm relationcs marital eye_dsablty hear_dsablty walk_dsablty conc_dsord slfcre_dsablty comm_dsablty migrated_mod_age migrated_ref_time migrated_binary migrated_years migrated_from_urban migrated_from_cat migrated_from_code migrated_from_country migrated_reason ed_mod_age school literacy educy educat7 educat5 educat4 educat_orig educat_isced vocational vocational_type vocational_length_l vocational_length_u vocational_field_orig vocational_financed minlaborage lstatus potential_lf underemployment nlfreason unempldur_l unempldur_u empstat ocusec industry_orig industrycat_isic industrycat10 industrycat4 occup_orig occup_isco occup_skill occup wage_no_compen unitwage whours wmonths wage_total contract healthins socialsec union firmsize_l firmsize_u empstat_2 ocusec_2 industry_orig_2 industrycat_isic_2 industrycat10_2 industrycat4_2 occup_orig_2 occup_isco_2 occup_skill_2 occup_2 wage_no_compen_2 unitwage_2 whours_2 wmonths_2 wage_total_2 firmsize_l_2 firmsize_u_2 t_hours_others t_wage_nocompen_others t_wage_others t_hours_total t_wage_nocompen_total t_wage_total lstatus_year potential_lf_year underemployment_year nlfreason_year unempldur_l_year unempldur_u_year empstat_year ocusec_year industry_orig_year industrycat_isic_year industrycat10_year industrycat4_year occup_orig_year occup_isco_year occup_skill_year occup_year wage_no_compen_year unitwage_year whours_year wmonths_year wage_total_year contract_year healthins_year socialsec_year union_year firmsize_l_year firmsize_u_year empstat_2_year ocusec_2_year industry_orig_2_year industrycat_isic_2_year industrycat10_2_year industrycat4_2_year occup_orig_2_year occup_isco_2_year occup_skill_2_year occup_2_year wage_no_compen_2_year unitwage_2_year whours_2_year wmonths_2_year wage_total_2_year firmsize_l_2_year firmsize_u_2_year t_hours_others_year t_wage_nocompen_others_year t_wage_others_year t_hours_total_year t_wage_nocompen_total_year t_wage_total_year njobs t_hours_annual linc_nc laborincome + +* + +*<_% ORDER VARIABLES_> + + order countrycode survname survey icls_v isced_version isco_version isic_version year vermast veralt harmonization int_year int_month hhid pid weight weight_m weight_q psu ssu strata wave panel visit_no urban subnatid1 subnatid2 subnatid3 subnatidsurvey subnatid1_prev subnatid2_prev subnatid3_prev gaul_adm1_code gaul_adm2_code gaul_adm3_code hsize age male relationharm relationcs marital eye_dsablty hear_dsablty walk_dsablty conc_dsord slfcre_dsablty comm_dsablty migrated_mod_age migrated_ref_time migrated_binary migrated_years migrated_from_urban migrated_from_cat migrated_from_code migrated_from_country migrated_reason ed_mod_age school literacy educy educat7 educat5 educat4 educat_orig educat_isced vocational vocational_type vocational_length_l vocational_length_u vocational_field_orig vocational_financed minlaborage lstatus potential_lf underemployment nlfreason unempldur_l unempldur_u empstat ocusec industry_orig industrycat_isic industrycat10 industrycat4 occup_orig occup_isco occup_skill occup wage_no_compen unitwage whours wmonths wage_total contract healthins socialsec union firmsize_l firmsize_u empstat_2 ocusec_2 industry_orig_2 industrycat_isic_2 industrycat10_2 industrycat4_2 occup_orig_2 occup_isco_2 occup_skill_2 occup_2 wage_no_compen_2 unitwage_2 whours_2 wmonths_2 wage_total_2 firmsize_l_2 firmsize_u_2 t_hours_others t_wage_nocompen_others t_wage_others t_hours_total t_wage_nocompen_total t_wage_total lstatus_year potential_lf_year underemployment_year nlfreason_year unempldur_l_year unempldur_u_year empstat_year ocusec_year industry_orig_year industrycat_isic_year industrycat10_year industrycat4_year occup_orig_year occup_isco_year occup_skill_year occup_year wage_no_compen_year unitwage_year whours_year wmonths_year wage_total_year contract_year healthins_year socialsec_year union_year firmsize_l_year firmsize_u_year empstat_2_year ocusec_2_year industry_orig_2_year industrycat_isic_2_year industrycat10_2_year industrycat4_2_year occup_orig_2_year occup_isco_2_year occup_skill_2_year occup_2_year wage_no_compen_2_year unitwage_2_year whours_2_year wmonths_2_year wage_total_2_year firmsize_l_2_year firmsize_u_2_year t_hours_others_year t_wage_nocompen_others_year t_wage_others_year t_hours_total_year t_wage_nocompen_total_year t_wage_total_year njobs t_hours_annual linc_nc laborincome + +* + +*<_% DROP UNUSED LABELS_> + + * Store all labels in data + label dir + local all_lab `r(names)' + + * Store all variables with a label, extract value label names + local used_lab = "" + ds, has(vallabel) + + local labelled_vars `r(varlist)' + + foreach varName of local labelled_vars { + local y : value label `varName' + local used_lab `"`used_lab' `y'"' + } + + * Compare lists, `notused' is list of labels in directory but not used in final variables + local notused : list all_lab - used_lab // local `notused' defines value labs not in remaining vars + local notused_len : list sizeof notused // store size of local + + * drop labels if the length of the notused vector is 1 or greater, otherwise nothing to drop + if `notused_len' >= 1 { + label drop `notused' + } + else { + di "There are no unused labels to drop. No value labels dropped." + } + + +* + +} + + +*<_% DELETE MISSING VARIABLES_> + +quietly: describe, varlist +local kept_vars `r(varlist)' + +foreach var of local kept_vars { + capture assert missing(`var') + if !_rc drop `var' +} + +* + + +*<_% COMPRESS_> + +compress + +* + + +*<_% SAVE_> + +save "`path_output'/`out_file'", replace + +* diff --git a/GLD/ARM/ARM_2010_ILCS/ARM_2010_ILCS_V01_M_V01_A_GLD/Programs/ARM_2010_ILCS_V01_M_V01_A_GLD_ALL.do b/GLD/ARM/ARM_2010_ILCS/ARM_2010_ILCS_V01_M_V01_A_GLD/Programs/ARM_2010_ILCS_V01_M_V01_A_GLD_ALL.do new file mode 100644 index 000000000..0ebad0fd0 --- /dev/null +++ b/GLD/ARM/ARM_2010_ILCS/ARM_2010_ILCS_V01_M_V01_A_GLD/Programs/ARM_2010_ILCS_V01_M_V01_A_GLD_ALL.do @@ -0,0 +1,1767 @@ + +/*%%============================================================================================= + 0: GLD Harmonization Preamble +==============================================================================================%%*/ + +/* ----------------------------------------------------------------------- + +<_Program name_> ARM_2010_ILCS_V01_M_V01_A_GLD_ALL.do +<_Application_> Stata 18 <_Application_> +<_Author(s)_> World Bank Jobs Group (gld@worldbank.org) +<_Date created_> 2024-09-11 + +------------------------------------------------------------------------- + +<_Country_> Armenia +<_Survey Title_> Integrated Living Conditions Survey +<_Survey Year_> 2010 +<_Study ID_> https://microdatalib.worldbank.org/index.php/catalog/2615 +<_Data collection from_> [MM/YYYY] +<_Data collection to_> [MM/YYYY] +<_Source of dataset_> [Source of data, e.g. NSO] +<_Sample size (HH)_> [#] +<_Sample size (IND)_> [#] +<_Sampling method_> [Brief description] +<_Geographic coverage_> [To what level is data significant] +<_Currency_> [Currency used for wages] + +----------------------------------------------------------------------- + +<_ICLS Version_> [Version of ICLS for Labor Questions] +<_ISCED Version_> [Version of ICLS for Labor Questions] +<_ISCO Version_> [Version of ICLS for Labor Questions] +<_OCCUP National_> [Version of ICLS for Labor Questions] +<_ISIC Version_> [Version of ICLS for Labor Questions] +<_INDUS National_> [Version of ICLS for Labor Questions] + +----------------------------------------------------------------------- +<_Version Control_> + +* Date: [YYYY-MM-DD] - [Description of changes] +* Date: [YYYY-MM-DD] - [Description of changes] + + + +-------------------------------------------------------------------------*/ + + +/*%%============================================================================================= + 1: Setting up of program environment, dataset +==============================================================================================%%*/ + +*----------1.1: Initial commands------------------------------* + +clear +set more off +set mem 800m +set varabbrev off + +*----------1.2: Set directories------------------------------* + +* Define path sections +local server "Y:/GLD-Harmonization/529026_MG/Countries" +local country "ARM" +local year "2010" +local survey "ILCS" +local vermast "V01" +local veralt "V01" + +* From the definitions, set path chunks +local level_1 "`country'_`year'_`survey'" +local level_2_mast "`level_1'_`vermast'_M" +local level_2_harm "`level_1'_`vermast'_M_`veralt'_A_GLD" + +* From chunks, define path_in, path_output folder +local path_in_stata "`server'/`country'/`level_1'/`level_2_mast'/Data/Stata" +local path_in_other "`server'/`country'/`level_1'/`level_2_mast'/Data/Original" +local path_output "`server'/`country'/`level_1'/`level_2_harm'/Data/Harmonized" + +* Define Output file name +local out_file "`level_2_harm'_ALL.dta" + +*----------1.3: Database assembly------------------------------* + +* All steps necessary to merge datasets (if several) to have all elements needed to produce +* harmonized output in a single file + +* Check whether there is a weight file +local has_wf = fileexists("`path_in_stata/weight.dta'") + +* Start with HH +use "`path_in_stata'/hh.dta" + +* If there is a weight file, merge it in +if `has_wf' { + merge 1:1 recno using "`path_in_stata/weight.dta'", assert(match) nogen +} + +* Add member roster +merge 1:m recno using "`path_in_stata'/mem.dta", assert(match) nogen + +* Add employment section +merge 1:1 recno memnum using "`path_in_stata'/d1", assert(match master) nogen + +* Add number labels +numlabel, add force + +/*%%============================================================================================= + 2: Survey & ID +==============================================================================================%%*/ + +{ + +*<_countrycode_> + gen str4 countrycode = "ARM" + label var countrycode "Country code" +* + + +*<_survname_> + gen survname = "ILCS" + label var survname "Survey acronym" +* + + +*<_survey_> + gen survey = "GLD" + label var survey "Survey type" +* + + +*<_icls_v_> + gen icls_v = "ICLS-13" + label var icls_v "ICLS version underlying questionnaire questions" +* + + +*<_isced_version_> + gen isced_version = "" + label var isced_version "Version of ISCED used for educat_isced" +* + + +*<_isco_version_> + gen isco_version = "" + label var isco_version "Version of ISCO used" +* + + +*<_isic_version_> + gen isic_version = "isic_4" + label var isic_version "Version of ISIC used" +* + + +*<_year_> + gen int year = 2010 + label var year "Year of survey" +* + + +*<_vermast_> + gen vermast = "`vermast'" + label var vermast "Version of master data" +* + + +*<_veralt_> + gen veralt = "`veralt'" + label var veralt "Version of the alt/harmonized data" +* + + +*<_harmonization_> + gen harmonization = "GLD" + label var harmonization "Type of harmonization" +* + + +*<_int_year_> + gen int_year= 2010 + label var int_year "Year of the interview" +* + + +*<_int_month_> + gen int_month = date + label de lblint_month 1 "January" 2 "February" 3 "March" 4 "April" 5 "May" 6 "June" 7 "July" 8 "August" 9 "September" 10 "October" 11 "November" 12 "December" + label value int_month lblint_month + label var int_month "Month of the interview" +* + + +*<_hhid_> +/* <_hhid_note> + + Values are 1-5184 running. Would have preferred making it a string with 0001 to 5184, but leave as is since + GMD has it this way. For PID concatenate this with 01-12 but leave as is. + + */ + gen hhid = recno + label var hhid "Household ID" +* + + +*<_pid_> + gen pid = memnum + label var pid "Individual ID" +* + + +*<_weight_> + *gen weight = weight + label var weight "Survey sampling weight" +* + + +*<_weight_m_> + gen weight_m = . + label var weight_m "Survey sampling weight to obtain national estimates for each month" +* + + +*<_weight_q_> + gen weight_q = . + label var weight_q "Survey sampling weight to obtain national estimates for each quarter" +* + + +*<_psu_> + gen psu = . + label var psu "Primary sampling units" +* + + +*<_ssu_> + gen ssu = . + label var ssu "Secondary sampling units" +* + + +*<_strata_> + gen strata = . + label var strata "Strata" +* + + +*<_wave_> + gen wave = . + label var wave "Survey wave" +* + + +*<_panel_> + gen panel = "" + label var panel "Panel individual belongs to" +* + + +*<_visit_no_> + gen visit_no = . + label var visit_no "Visit number in panel" +* + +} + + +/*%%============================================================================================= + 3: Geography +==============================================================================================%%*/ + +{ + +*<_urban_> + * typev is 0 if Yerevan, 1 if urban (other), rural is 2 + gen byte urban = inrange(typev, 0,1) + replace urban = 0 if typev == 2 + label var urban "Location is urban" + la de lblurban 1 "Urban" 0 "Rural" + label values urban lblurban +* + + + +*<_subnatid1_> +/* <_subnatid1_note> + + The variable is string and country-specific categorical. Numeric entries are coded in string format using the following naming convention: "1 – Hatay". That is, the variable itself is to be string, not a labelled numeric vector. + + Example of entries would be "1 - Alaska", "2 - Arkansas", ... + + */ + gen str subnatid1 = "" + replace subnatid1 = "1 - Yerevan" if marz == 1 + replace subnatid1 = "2 - Aragatsotn" if marz == 2 + replace subnatid1 = "3 - Ararat" if marz == 3 + replace subnatid1 = "4 - Armavir" if marz == 4 + replace subnatid1 = "5 - Gegharkunik" if marz == 5 + replace subnatid1 = "6 - Lori" if marz == 6 + replace subnatid1 = "7 - Kotayk" if marz == 7 + replace subnatid1 = "8 - Shirak" if marz == 8 + replace subnatid1 = "9 - Syunik" if marz == 9 + replace subnatid1 = "10 - Vayoc Dzor" if marz == 10 + replace subnatid1 = "11 - Tavush" if marz == 11 + label var subnatid1 "Subnational ID at First Administrative Level" +* + + +*<_subnatid2_> + gen str subnatid2 = "" + label var subnatid2 "Subnational ID at Second Administrative Level" +* + + +*<_subnatid3_> + gen str subnatid3 = "" + label var subnatid3 "Subnational ID at Third Administrative Level" +* + + +*<_subnatidsurvey_> +/* <_subnatidsurvey_note> + + Variable denoting lowest administrative info to which the survey is still significat. + See entry in GLD Guidelines (https://github.com/worldbank/gld/blob/main/Support/A%20-%20Guides%20and%20Documentation/GLD_1.0_Guidelines.docx) for more details + + */ + decode urban, generate(helper) + generate subnatidsurvey = string(urban) + " - " + helper + drop helper + label var subnatidsurvey "Administrative level at which survey is representative" +* + + +*<_subnatid1_prev_> +/* <_subnatid1_prev_note> + + subnatid1_prev is coded as missing unless the classification used for subnatid1 has changed since the previous survey. + + */ + gen subnatid1_prev = . + label var subnatid1_prev "Classification used for subnatid1 from previous survey" +* + + +*<_subnatid2_prev_> + gen subnatid2_prev = . + label var subnatid2_prev "Classification used for subnatid2 from previous survey" +* + + +*<_subnatid3_prev_> + gen subnatid3_prev = . + label var subnatid3_prev "Classification used for subnatid3 from previous survey" +* + + +*<_gaul_adm1_code_> + gen gaul_adm1_code = . + label var gaul_adm1_code "Global Administrative Unit Layers (GAUL) Admin 1 code" +* + + +*<_gaul_adm2_code_> + gen gaul_adm2_code = . + label var gaul_adm2_code "Global Administrative Unit Layers (GAUL) Admin 2 code" +* + + +*<_gaul_adm3_code_> + gen gaul_adm3_code = . + label var gaul_adm3_code "Global Administrative Unit Layers (GAUL) Admin 3 code" +* + +} + + +/*%%============================================================================================= + 4: Demography +==============================================================================================%%*/ + +{ + +*<_hsize_> + * If keep all + gen hsize = members + /* * If drop absentees + gen helper = 1 + egen hh_abs_no = total(helper), by(recno) + replace hsize = hsize - hh_abs_no + drop helper hh_abs_no + */ + label var hsize "Household size" +* + + +*<_age_> + * Already in there + *gen age = . + label var age "Individual age" +* + + +*<_male_> + gen male = a1_1 + recode male (2 = 0) + label var male "Sex - Ind is male" + la de lblmale 1 "Male" 0 "Female" + label values male lblmale +* + + +*<_relationharm_> + gen relationharm = a1_2 + recode relationharm (4 = 3) (6 = 4) (7 = 5) (8 = 6) + label var relationharm "Relationship to the head of household - Harmonized" + la de lblrelationharm 1 "Head of household" 2 "Spouse" 3 "Children" 4 "Parents" 5 "Other relatives" 6 "Other and non-relatives" + label values relationharm lblrelationharm +* + + +*<_relationcs_> + clonevar relationcs = a1_2 + label var relationcs "Relationship to the head of household - Country original" +* + + +*<_marital_> + gen byte marital = a1_5 + recode marital (3 = 5) (5 = 3) + label var marital "Marital status" + la de lblmarital 1 "Married" 2 "Never Married" 3 "Living together" 4 "Divorced/Separated" 5 "Widowed" + label values marital lblmarital +* + + +*<_eye_dsablty_> + gen eye_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all" + label values eye_dsablty dsablty + label var eye_dsablty "Disability related to eyesight" +* + + +*<_hear_dsablty_> + gen hear_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values hear_dsablty dsablty + label var hear_dsablty "Disability related to hearing" +* + + +*<_walk_dsablty_> + gen walk_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values walk_dsablty dsablty + label var walk_dsablty "Disability related to walking or climbing stairs" +* + + +*<_conc_dsord_> + gen conc_dsord = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values conc_dsord dsablty + label var conc_dsord "Disability related to concentration or remembering" +* + + +*<_slfcre_dsablty_> + gen slfcre_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values slfcre_dsablty dsablty + label var slfcre_dsablty "Disability related to selfcare" +* + + +*<_comm_dsablty_> + gen comm_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values comm_dsablty dsablty + label var comm_dsablty "Disability related to communicating" +* + +} + + +/*%%============================================================================================= + 5: Migration +==============================================================================================%%*/ + + +{ + +* Migration is not done as it is much more narrowly defined as migrated and returned. Thus anyone who +* migrated from their home town to the capital city would not be included. + +*<_migrated_mod_age_> + gen migrated_mod_age = . + label var migrated_mod_age "Migration module application age" +* + + +*<_migrated_ref_time_> + gen migrated_ref_time = . + label var migrated_ref_time "Reference time applied to migration questions (in years)" +* + + +*<_migrated_binary_> + gen migrated_binary = . + label de lblmigrated_binary 0 "No" 1 "Yes" + label values migrated_binary lblmigrated_binary + label var migrated_binary "Individual has migrated" +* + + +*<_migrated_years_> + gen migrated_years = . + label var migrated_years "Years since latest migration" +* + + +*<_migrated_from_urban_> + gen migrated_from_urban = . + label de lblmigrated_from_urban 0 "Rural" 1 "Urban" + label values migrated_from_urban lblmigrated_from_urban + label var migrated_from_urban "Migrated from area" +* + + +*<_migrated_from_cat_> + gen migrated_from_cat = . + label de lblmigrated_from_cat 1 "From same admin3 area" 2 "From same admin2 area" 3 "From same admin1 area" 4 "From other admin1 area" 5 "From other country" + label values migrated_from_cat lblmigrated_from_cat + label var migrated_from_cat "Category of migration area" +* + + +*<_migrated_from_code_> + gen migrated_from_code = . + *label de lblmigrated_from_code + *label values migrated_from_code lblmigrated_from_code + label var migrated_from_code "Code of migration area as subnatid level of migrated_from_cat" +* + + +*<_migrated_from_country_> + gen migrated_from_country = . + label var migrated_from_country "Code of migration country (ISO 3 Letter Code)" +* + + +*<_migrated_reason_> + gen migrated_reason = . + label de lblmigrated_reason 1 "Family reasons" 2 "Educational reasons" 3 "Employment" 4 "Forced (political reasons, natural disaster, …)" 5 "Other reasons" + label values migrated_reason lblmigrated_reason + label var migrated_reason "Reason for migrating" +* + + +} + + +/*%%============================================================================================= + 6: Education +==============================================================================================%%*/ + + +{ + +*<_ed_mod_age_> + +/* <_ed_mod_age_note> + +Education module is only asked to those XX and older. + + */ + +gen byte ed_mod_age = 6 +label var ed_mod_age "Education module application age" + +* + + +*<_school_> + gen byte school = 0 + replace school = 1 if e2_7 == 1 + label var school "Attending school" + la de lblschool 0 "No" 1 "Yes" + label values school lblschool +* + + +*<_literacy_> + gen byte literacy = 1 + replace literacy = 0 if e2_2 == 0 + replace literacy = . if mi(e2_2) + label var literacy "Individual can read & write" + la de lblliteracy 0 "No" 1 "Yes" + label values literacy lblliteracy +* + + +*<_educy_> + * Number of years is a combination of level (e2_2) and years in that course (e2_3) + gen byte educy =. + replace educy = 0 if e2_2 == 0 + replace educy = e2_3 if e2_2 == 1 & inrange(e2_3,0,4) + replace educy = 4 + e2_3 if e2_2 == 2 & inrange(e2_3,0,5) + replace educy = 9 + e2_3 if e2_2 == 3 & inrange(e2_3,0,3) + replace educy = 9 + e2_3 if e2_2 == 4 & inrange(e2_3,0,2) + replace educy = 9 + e2_3 if e2_2 == 5 & inrange(e2_3,0,5) + replace educy = 12 + e2_3 if e2_2 == 6 & inrange(e2_3,0,7) + replace educy = 16 + e2_3 if e2_2 == 7 & inrange(e2_3,0,4) + label var educy "Years of education" +* + + +*<_educat7_> + gen byte educat7 =. + replace educat7 = 1 if e2_2 == 0 + replace educat7 = 2 if e2_2 == 1 & e2_3 < 4 + replace educat7 = 3 if e2_2 == 1 & e2_3 == 4 + replace educat7 = 4 if e2_2 == 2 + replace educat7 = 5 if inrange(e2_2, 3, 4) + replace educat7 = 6 if e2_2 == 5 + replace educat7 = 7 if inrange(e2_2, 6, 7) + label var educat7 "Level of education 1" + la de lbleducat7 1 "No education" 2 "Primary incomplete" 3 "Primary complete" 4 "Secondary incomplete" 5 "Secondary complete" 6 "Higher than secondary but not university" 7 "University incomplete or complete", replace + label values educat7 lbleducat7 +* + + +*<_educat5_> + gen byte educat5 = educat7 + recode educat5 4=3 5=4 6 7=5 + label var educat5 "Level of education 2" + la de lbleducat5 1 "No education" 2 "Primary incomplete" 3 "Primary complete but secondary incomplete" 4 "Secondary complete" 5 "Some tertiary/post-secondary" + label values educat5 lbleducat5 +* + + +*<_educat4_> + gen byte educat4 = educat7 + recode educat4 (2 3 4 = 2) (5=3) (6 7=4) + label var educat4 "Level of education 3" + la de lbleducat4 1 "No education" 2 "Primary" 3 "Secondary" 4 "Post-secondary" + label values educat4 lbleducat4 +* + + +*<_educat_orig_> + clonevar educat_orig = e2_2 + label var educat_orig "Original survey education code" +* + + +*<_educat_isced_> + gen educat_isced = . + label var educat_isced "ISCED standardised level of education" +* + + +*----------6.1: Education cleanup------------------------------* + +*<_% Correction min age_> + +** Drop info for cases under the age for which questions to be asked (do not need a variable for this) +local ed_var "school literacy educy educat7 educat5 educat4 educat_orig educat_isced" + +foreach v of local ed_var { + cap confirm numeric variable `v' + if _rc == 0 { // is indeed numeric + replace `v'=. if ( age < ed_mod_age & !missing(age) ) + } + else { // is not + replace `v'= "" if ( age < ed_mod_age & !missing(age) ) + } +} + + +* + + +} + + +/*%%============================================================================================= + 7: Training +==============================================================================================%%*/ + + +{ + +*<_vocational_> + gen vocational = . + label de lblvocational 0 "No" 1 "Yes" + label var vocational "Ever received vocational training" +* + + +*<_vocational_type_> + gen vocational_type = . + label de lblvocational_type 1 "Inside Enterprise" 2 "External" + label values vocational_type lblvocational_type + label var vocational_type "Type of vocational training" +* + + +*<_vocational_length_l_> + gen vocational_length_l = . + label var vocational_length_l "Length of training in months, lower limit" +* + + +*<_vocational_length_u_> + gen vocational_length_u = . + label var vocational_length_u "Length of training in months, upper limit" +* + + +*<_vocational_field_orig_> + gen str vocational_field_orig = "" + label var vocational_field_orig "Original field of training information" +* + + +*<_vocational_financed_> + gen vocational_financed = . + label de lblvocational_financed 1 "Employer" 2 "Government" 3 "Mixed Employer/Government" 4 "Own funds" 5 "Other" + label var vocational_financed "How training was financed" +* + +} + + +/*%%============================================================================================= + 8: Labour +==============================================================================================%%*/ + + +*<_minlaborage_> + gen byte minlaborage = 15 + label var minlaborage "Labor module application age" +* + + +*----------8.1: 7 day reference overall------------------------------* + +{ +*<_lstatus_> + * Logic is either have a job (yes to D1_1a) or returning (D1_2a) + * However the returning is subject to reasons (D1_3a) that are not + * a skip pattern but upon probing of the enumerator + * The below tab shows that some go to main job, others don't + * tab d1_3a d1_4a,m + gen byte lstatus = 1 if !mi(d1_4a) + + * For unemployed we need looking for a job (d2_5) and willing to accept (d2_10) + * Ensured all who looked answer the willing question + count if inrange(d2_5,1,2) & mi(d2_10) + assert `r(N)' == 0 + replace lstatus = 2 if lstatus == . & inrange(d2_5, 1, 2) & d2_10 == 1 + + * Normally, I would set all others to NLF, but given that we have the absentees, assign only to no in d2_5 + replace lstatus = 3 if lstatus == . & d2_5 == 3 + replace lstatus = 3 if lstatus == . & inrange(d2_5, 1, 2) & d2_10 == 2 + + replace lstatus = . if age < minlaborage + label var lstatus "Labor status" + la de lbllstatus 1 "Employed" 2 "Unemployed" 3 "Non-LF" + label values lstatus lbllstatus +* + + +*<_potential_lf_> + gen byte potential_lf = 0 + * Either not looking but would accept or looking but would not accept + replace potential_lf = 1 if (d2_5 == 3 & d2_10 == 1) | (inrange(d2_5,1,2) & d2_10 == 2) + replace potential_lf = . if age < minlaborage & age != . + replace potential_lf = . if lstatus != 3 + label var potential_lf "Potential labour force status" + la de lblpotential_lf 0 "No" 1 "Yes" + label values potential_lf lblpotential_lf +* + + +*<_underemployment_> + gen byte underemployment = 0 + replace underemployment = 1 if d1_23a == 7 + replace underemployment = . if age < minlaborage & age != . + replace underemployment = . if lstatus != 1 + label var underemployment "Underemployment status" + la de lblunderemployment 0 "No" 1 "Yes" + label values underemployment lblunderemployment +* + + +*<_nlfreason_> + gen byte nlfreason=. + label var nlfreason "Reason not in the labor force" + la de lblnlfreason 1 "Student" 2 "Housekeeper" 3 "Retired" 4 "Disabled" 5 "Other" + label values nlfreason lblnlfreason +* + + +*<_unempldur_l_> + gen byte unempldur_l=. + replace unempldur_l = 0 if d2_9 == 1 + replace unempldur_l = 1 if d2_9 == 2 + replace unempldur_l = 4 if d2_9 == 3 + replace unempldur_l = 7 if d2_9 == 4 + replace unempldur_l = 13 if d2_9 == 5 + replace unempldur_l = 25 if d2_9 == 6 + replace unempldur_l = 49 if d2_9 == 7 + replace unempldur_l = . if lstatus != 2 + label var unempldur_l "Unemployment duration (months) lower bracket" +* + + +*<_unempldur_u_> + gen byte unempldur_u=. + replace unempldur_u = 1 if d2_9 == 1 + replace unempldur_u = 3 if d2_9 == 2 + replace unempldur_u = 6 if d2_9 == 3 + replace unempldur_u = 12 if d2_9 == 4 + replace unempldur_u = 24 if d2_9 == 5 + replace unempldur_u = 48 if d2_9 == 6 + replace unempldur_u = 999 if d2_9 == 7 + replace unempldur_u = . if lstatus != 2 + label var unempldur_u "Unemployment duration (months) upper bracket" +* +} + + +*----------8.2: 7 day reference main job------------------------------* + + +{ +*<_empstat_> + gen byte empstat = d1_7a + recode empstat (2 3 = 1) (4 = 3) (5 6 8 = 4) (7 = 2) + label var empstat "Employment status during past week primary job 7 day recall" + la de lblempstat 1 "Paid employee" 2 "Non-paid employee" 3 "Employer" 4 "Self-employed" 5 "Other, workers not classifiable by status" + label values empstat lblempstat +* + + +*<_ocusec_> + gen byte ocusec = d1_8a + recode ocusec (2 = 1) (3/5 = 2) + replace ocusec = . if lstatus != 1 + label var ocusec "Sector of activity primary job 7 day recall" + la de lblocusec 1 "Public Sector, Central Government, Army" 2 "Private, NGO" 3 "State owned" 4 "Public or State-owned, but cannot distinguish" + label values ocusec lblocusec +* + + +*<_industry_orig_> + decode d1_5a, gen(industry_orig) + label var industry_orig "Original survey industry code, main job 7 day recall" +* + + +*<_industrycat_isic_> + gen industrycat_isic = "" + replace industrycat_isic = "A" if d1_5a == 1 + replace industrycat_isic = "B" if d1_5a == 2 + replace industrycat_isic = "C" if d1_5a == 3 + replace industrycat_isic = "D" if d1_5a == 4 + replace industrycat_isic = "E" if d1_5a == 5 + replace industrycat_isic = "F" if d1_5a == 6 + replace industrycat_isic = "G" if d1_5a == 7 + replace industrycat_isic = "H" if d1_5a == 8 + replace industrycat_isic = "I" if d1_5a == 9 + replace industrycat_isic = "J" if d1_5a == 10 + replace industrycat_isic = "K" if d1_5a == 11 + replace industrycat_isic = "L" if d1_5a == 12 + replace industrycat_isic = "M" if d1_5a == 13 + replace industrycat_isic = "N" if d1_5a == 14 + replace industrycat_isic = "O" if d1_5a == 15 + replace industrycat_isic = "P" if d1_5a == 16 + replace industrycat_isic = "Q" if d1_5a == 17 + replace industrycat_isic = "R" if d1_5a == 18 + replace industrycat_isic = "S" if d1_5a == 19 + replace industrycat_isic = "T" if d1_5a == 20 + replace industrycat_isic = "U" if d1_5a == 21 + + label var industrycat_isic "ISIC code of primary job 7 day recall" +* + + +*<_industrycat10_> + gen byte industrycat10 = . + replace industrycat10 = 1 if d1_5a == 1 + replace industrycat10 = 2 if d1_5a == 2 + replace industrycat10 = 3 if d1_5a == 3 + replace industrycat10 = 4 if inrange(d1_5a,4,5) + replace industrycat10 = 5 if d1_5a == 6 + replace industrycat10 = 6 if inlist(d1_5a, 7, 9) + replace industrycat10 = 7 if inlist(d1_5a, 8, 10) + replace industrycat10 = 8 if inrange(d1_5a, 11, 14) + replace industrycat10 = 9 if d1_5a == 15 + replace industrycat10 = 10 if inrange(d1_5a, 16, 21) + label var industrycat10 "1 digit industry classification, primary job 7 day recall" + la de lblindustrycat10 1 "Agriculture" 2 "Mining" 3 "Manufacturing" 4 "Public utilities" 5 "Construction" 6 "Commerce" 7 "Transport and Comnunications" 8 "Financial and Business Services" 9 "Public Administration" 10 "Other Services, Unspecified" + label values industrycat10 lblindustrycat10 +* + + +*<_industrycat4_> + gen byte industrycat4 = industrycat10 + recode industrycat4 (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4 "Broad Economic Activities classification, primary job 7 day recall" + la de lblindustrycat4 1 "Agriculture" 2 "Industry" 3 "Services" 4 "Other" + label values industrycat4 lblindustrycat4 +* + + +*<_occup_orig_> + gen occup_orig = . + label var occup_orig "Original occupation record primary job 7 day recall" +* + + +*<_occup_isco_> + gen occup_isco = "" + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + *drop if missing(occup_isco) + *int_classif_universe, var(occup_isco) universe(ISCO) + count + *list + *assert `r(N)' == 0 + restore + + label var occup_isco "ISCO code of primary job 7 day recall" +* + + +*<_occup_> + gen byte occup = . + label var occup "1 digit occupational classification, primary job 7 day recall" + la de lbloccup 1 "Managers" 2 "Professionals" 3 "Technicians" 4 "Clerks" 5 "Service and market sales workers" 6 "Skilled agricultural" 7 "Craft workers" 8 "Machine operators" 9 "Elementary occupations" 10 "Armed forces" 99 "Others" + label values occup lbloccup +* + + +*<_occup_skill_> + gen occup_skill = . + replace occup_skill = 3 if inrange(occup, 1, 3) + replace occup_skill = 2 if inrange(occup, 4, 8) + replace occup_skill = 1 if occup == 9 + la de lblskill 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill lblskill + label var occup_skill "Skill based on ISCO standard primary job 7 day recall" +* + + +*<_wage_no_compen_> + egen double wage_no_compen = rowtotal(d1_13a d1_15a), missing + replace wage_no_compen = . if lstatus != 1 | empstat == 2 | wage_no_compen == 0 + label var wage_no_compen "Last wage payment primary job 7 day recall" +* + + +*<_unitwage_> + gen byte unitwage = 5 + replace unitwage = . if mi(wage_no_compen) + label var unitwage "Last wages' time unit primary job 7 day recall" + la de lblunitwage 1 "Daily" 2 "Weekly" 3 "Every two weeks" 4 "Bimonthly" 5 "Monthly" 6 "Trimester" 7 "Biannual" 8 "Annually" 9 "Hourly" 10 "Other" + label values unitwage lblunitwage +* + + +*<_whours_> + gen whours = d1_21a + replace whours = . if whours == 0 | lstatus != 1 + label var whours "Hours of work in last week primary job 7 day recall" +* + + +*<_wmonths_> + gen wmonths = . + label var wmonths "Months of work in past 12 months primary job 7 day recall" +* + + +*<_wage_total_> +/* <_wage_total_note> + + Use gross wages when available and net wages only when gross wages are not available. + This is done to make it easy to compare earnings in formal and informal sectors. + + */ + gen wage_total = . + label var wage_total "Annualized total wage primary job 7 day recall" +* + + +*<_contract_> + gen byte contract = 0 + replace contract = 1 if d1_7a == 1 | d1_7a == 2 + replace contract = . if lstatus != 1 + label var contract "Employment has contract primary job 7 day recall" + la de lblcontract 0 "Without contract" 1 "With contract" + label values contract lblcontract +* + + +*<_healthins_> + gen byte healthins = . + label var healthins "Employment has health insurance primary job 7 day recall" + la de lblhealthins 0 "Without health insurance" 1 "With health insurance" + label values healthins lblhealthins +* + + +*<_socialsec_> + gen byte socialsec = . + label var socialsec "Employment has social security insurance primary job 7 day recall" + la de lblsocialsec 1 "With social security" 0 "Without social secturity" + label values socialsec lblsocialsec +* + + +*<_union_> + gen byte union = . + label var union "Union membership at primary job 7 day recall" + la de lblunion 0 "Not union member" 1 "Union member" + label values union lblunion +* + + +*<_firmsize_l_> + gen firmsize_l = . + label var firmsize_l "Firm size (lower bracket) primary job 7 day recall" +* + + +*<_firmsize_u_> + gen firmsize_u= . + label var firmsize_u "Firm size (upper bracket) primary job 7 day recall" +* + +} + + +*----------8.3: 7 day reference secondary job------------------------------* +* Since labels are the same as main job, values are labelled using main job labels + + +{ +*<_empstat_2_> + gen byte empstat_2 = d1_7b + recode empstat_2 (2 3 = 1) (4 = 3) (5 6 8 = 4) (7 = 2) + label var empstat_2 "Employment status during past week secondary job 7 day recall" + label values empstat_2 lblempstat +* + + +*<_ocusec_2_> + gen byte ocusec_2 = d1_8b + recode ocusec_2 (2 = 1) (3/5 = 2) (0 = .) + replace ocusec_2 = . if mi(empstat_2) + label var ocusec_2 "Sector of activity secondary job 7 day recall" + label values ocusec_2 lblocusec +* + + +*<_industry_orig_2_> + decode d1_5b, gen(industry_orig_2) + label var industry_orig_2 "Original survey industry code, secondary job 7 day recall" +* + + +*<_industrycat_isic_2_> + gen industrycat_isic_2 = "" + replace industrycat_isic_2 = "A" if d1_5b == 1 + replace industrycat_isic_2 = "B" if d1_5b == 2 + replace industrycat_isic_2 = "C" if d1_5b == 3 + replace industrycat_isic_2 = "D" if d1_5b == 4 + replace industrycat_isic_2 = "E" if d1_5b == 5 + replace industrycat_isic_2 = "F" if d1_5b == 6 + replace industrycat_isic_2 = "G" if d1_5b == 7 + replace industrycat_isic_2 = "H" if d1_5b == 8 + replace industrycat_isic_2 = "I" if d1_5b == 9 + replace industrycat_isic_2 = "J" if d1_5b == 10 + replace industrycat_isic_2 = "K" if d1_5b == 11 + replace industrycat_isic_2 = "L" if d1_5b == 12 + replace industrycat_isic_2 = "M" if d1_5b == 13 + replace industrycat_isic_2 = "N" if d1_5b == 14 + replace industrycat_isic_2 = "O" if d1_5b == 15 + replace industrycat_isic_2 = "P" if d1_5b == 16 + replace industrycat_isic_2 = "Q" if d1_5b == 17 + replace industrycat_isic_2 = "R" if d1_5b == 18 + replace industrycat_isic_2 = "S" if d1_5b == 19 + replace industrycat_isic_2 = "T" if d1_5b == 20 + replace industrycat_isic_2 = "U" if d1_5b == 21 + label var industrycat_isic_2 "ISIC code of secondary job 7 day recall" +* + + +*<_industrycat10_2_> + gen byte industrycat10_2 = . + replace industrycat10_2 = 1 if d1_5b == 1 + replace industrycat10_2 = 2 if d1_5b == 2 + replace industrycat10_2 = 3 if d1_5b == 3 + replace industrycat10_2 = 4 if inrange(d1_5b,4,5) + replace industrycat10_2 = 5 if d1_5b == 6 + replace industrycat10_2 = 6 if inlist(d1_5b, 7, 9) + replace industrycat10_2 = 7 if inlist(d1_5b, 8, 10) + replace industrycat10_2 = 8 if inrange(d1_5b, 11, 14) + replace industrycat10_2 = 9 if d1_5b == 15 + replace industrycat10_2 = 10 if inrange(d1_5b, 16, 21) + label var industrycat10_2 "1 digit industry classification, secondary job 7 day recall" + label values industrycat10_2 lblindustrycat10 +* + + +*<_industrycat4_2_> + gen byte industrycat4_2 = industrycat10_2 + recode industrycat4_2 (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4_2 "Broad Economic Activities classification, secondary job 7 day recall" + label values industrycat4_2 lblindustrycat4 +* + + +*<_occup_orig_2_> + gen occup_orig_2 = . + label var occup_orig_2 "Original occupation record secondary job 7 day recall" +* + + +*<_occup_isco_2_> + gen occup_isco_2 = "" + label var occup_isco_2 "ISCO code of secondary job 7 day recall" +* + + +*<_occup_2_> + gen byte occup_2 = . + label var occup_2 "1 digit occupational classification secondary job 7 day recall" + label values occup_2 lbloccup +* + + +*<_occup_skill_2_> + gen occup_skill_2 = . + replace occup_skill_2 = 3 if inrange(occup_2, 1, 3) + replace occup_skill_2 = 2 if inrange(occup_2, 4, 8) + replace occup_skill_2 = 1 if occup_2 == 9 + la de lblskill2 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill_2 lblskill2 + label var occup_skill_2 "Skill based on ISCO standard secondary job 7 day recall" +* + + +*<_wage_no_compen_2_> + egen double wage_no_compen_2 = rowtotal(d1_13b d1_15b), missing + replace wage_no_compen_2 = . if mi(empstat_2) | empstat_2 == 2 | wage_no_compen_2 == 0 + label var wage_no_compen_2 "Last wage payment secondary job 7 day recall" +* + + +*<_unitwage_2_> + gen byte unitwage_2 = 5 + replace unitwage_2 = . if mi(wage_no_compen_2) + label var unitwage_2 "Last wages' time unit secondary job 7 day recall" + label values unitwage_2 lblunitwage +* + + +*<_whours_2_> + gen whours_2 = d1_21b + replace whours_2 = . if whours_2 == 0 | mi(empstat_2) + label var whours_2 "Hours of work in last week secondary job 7 day recall" +* + + +*<_wmonths_2_> + gen wmonths_2 = . + label var wmonths_2 "Months of work in past 12 months secondary job 7 day recall" +* + + +*<_wage_total_2_> + gen wage_total_2 = . + label var wage_total_2 "Annualized total wage secondary job 7 day recall" +* + + +*<_firmsize_l_2_> + gen firmsize_l_2 = . + label var firmsize_l_2 "Firm size (lower bracket) secondary job 7 day recall" +* + + +*<_firmsize_u_2_> + gen firmsize_u_2 = . + label var firmsize_u_2 "Firm size (upper bracket) secondary job 7 day recall" +* + +} + +*----------8.4: 7 day reference additional jobs------------------------------* + +*<_t_hours_others_> + gen t_hours_others = . + label var t_hours_others "Annualized hours worked in all but primary and secondary jobs 7 day recall" +* + + +*<_t_wage_nocompen_others_> + gen t_wage_nocompen_others = . + label var t_wage_nocompen_others "Annualized wage in all but 1st & 2nd jobs excl. bonuses, etc. 7 day recall" +* + + +*<_t_wage_others_> + gen t_wage_others = . + label var t_wage_others "Annualized wage in all but primary and secondary jobs (12-mon ref period)" +* + + +*----------8.5: 7 day reference total summary------------------------------* + + +*<_t_hours_total_> + gen t_hours_total = . + label var t_hours_total "Annualized hours worked in all jobs 7 day recall" +* + + +*<_t_wage_nocompen_total_> + gen t_wage_nocompen_total = . + label var t_wage_nocompen_total "Annualized wage in all jobs excl. bonuses, etc. 7 day recall" +* + + +*<_t_wage_total_> + gen t_wage_total = . + label var t_wage_total "Annualized total wage for all jobs 7 day recall" +* + + +*----------8.6: 12 month reference overall------------------------------* + +{ + +*<_lstatus_year_> + gen byte lstatus_year = . + replace lstatus_year=. if age < minlaborage & age != . + label var lstatus_year "Labor status during last year" + la de lbllstatus_year 1 "Employed" 2 "Unemployed" 3 "Non-LF" + label values lstatus_year lbllstatus_year +* + +*<_potential_lf_year_> + gen byte potential_lf_year = . + replace potential_lf_year=. if age < minlaborage & age != . + replace potential_lf_year = . if lstatus_year != 3 + label var potential_lf_year "Potential labour force status" + la de lblpotential_lf_year 0 "No" 1 "Yes" + label values potential_lf_year lblpotential_lf_year +* + + +*<_underemployment_year_> + gen byte underemployment_year = . + replace underemployment_year = . if age < minlaborage & age != . + replace underemployment_year = . if lstatus_year == 1 + label var underemployment_year "Underemployment status" + la de lblunderemployment_year 0 "No" 1 "Yes" + label values underemployment_year lblunderemployment_year +* + + +*<_nlfreason_year_> + gen byte nlfreason_year=. + label var nlfreason_year "Reason not in the labor force" + la de lblnlfreason_year 1 "Student" 2 "Housekeeper" 3 "Retired" 4 "Disabled" 5 "Other" + label values nlfreason_year lblnlfreason_year +* + + +*<_unempldur_l_year_> + gen byte unempldur_l_year=. + label var unempldur_l_year "Unemployment duration (months) lower bracket" +* + + +*<_unempldur_u_year_> + gen byte unempldur_u_year=. + label var unempldur_u_year "Unemployment duration (months) upper bracket" +* + +} + +*----------8.7: 12 month reference main job------------------------------* + +{ + +*<_empstat_year_> + gen byte empstat_year = . + label var empstat_year "Employment status during past week primary job 12 month recall" + la de lblempstat_year 1 "Paid employee" 2 "Non-paid employee" 3 "Employer" 4 "Self-employed" 5 "Other, workers not classifiable by status" + label values empstat_year lblempstat_year +* + +*<_ocusec_year_> + gen byte ocusec_year = . + label var ocusec_year "Sector of activity primary job 12 month recall" + la de lblocusec_year 1 "Public Sector, Central Government, Army" 2 "Private, NGO" 3 "State owned" 4 "Public or State-owned, but cannot distinguish" + label values ocusec_year lblocusec_year +* + +*<_industry_orig_year_> + gen industry_orig_year = . + label var industry_orig_year "Original industry record main job 12 month recall" +* + + +*<_industrycat_isic_year_> + gen industrycat_isic_year = . + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + *drop if missing(industrycat_isic_year) + *int_classif_universe, var(industrycat_isic_year) universe(ISIC) + count + *list + *assert `r(N)' == 0 + restore + + label var industrycat_isic_year "ISIC code of primary job 12 month recall" +* + +*<_industrycat10_year_> + gen byte industrycat10_year = . + label var industrycat10_year "1 digit industry classification, primary job 12 month recall" + la de lblindustrycat10_year 1 "Agriculture" 2 "Mining" 3 "Manufacturing" 4 "Public utilities" 5 "Construction" 6 "Commerce" 7 "Transport and Comnunications" 8 "Financial and Business Services" 9 "Public Administration" 10 "Other Services, Unspecified" + label values industrycat10_year lblindustrycat10_year +* + + +*<_industrycat4_year_> + gen byte industrycat4_year=industrycat10_year + recode industrycat4_year (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4_year "Broad Economic Activities classification, primary job 12 month recall" + la de lblindustrycat4_year 1 "Agriculture" 2 "Industry" 3 "Services" 4 "Other" + label values industrycat4_year lblindustrycat4_year +* + + +*<_occup_orig_year_> + gen occup_orig_year = . + label var occup_orig_year "Original occupation record primary job 12 month recall" +* + + +*<_occup_isco_year_> + gen occup_isco_year = "" + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + *drop if missing(occup_isco_year) + *int_classif_universe, var(occup_isco_year) universe(ISCO) + count + *list + *assert `r(N)' == 0 + restore + + label var occup_isco_year "ISCO code of primary job 12 month recall" +* + + +*<_occup_year_> + gen byte occup_year = . + label var occup_year "1 digit occupational classification, primary job 12 month recall" + la de lbloccup_year 1 "Managers" 2 "Professionals" 3 "Technicians" 4 "Clerks" 5 "Service and market sales workers" 6 "Skilled agricultural" 7 "Craft workers" 8 "Machine operators" 9 "Elementary occupations" 10 "Armed forces" 99 "Others" + label values occup_year lbloccup_year +* + + +*<_occup_skill_year_> + gen occup_skill_year = . + replace occup_skill_year = 3 if inrange(occup_year, 1, 3) + replace occup_skill_year = 2 if inrange(occup_year, 4, 8) + replace occup_skill_year = 1 if occup_year == 9 + la de lblskillyear 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill_year lblskillyear + label var occup_skill_year "Skill based on ISCO standard primary job 12 month recall" +* + + +*<_wage_no_compen_year_> --- this var has the same name as other and when quoted in the keep and order codes is repeated. + gen double wage_no_compen_year = . + label var wage_no_compen_year "Last wage payment primary job 12 month recall" +* + + +*<_unitwage_year_> + gen byte unitwage_year = . + label var unitwage_year "Last wages' time unit primary job 12 month recall" + la de lblunitwage_year 1 "Daily" 2 "Weekly" 3 "Every two weeks" 4 "Bimonthly" 5 "Monthly" 6 "Trimester" 7 "Biannual" 8 "Annually" 9 "Hourly" 10 "Other" + label values unitwage_year lblunitwage_year +* + + +*<_whours_year_> + gen whours_year = . + label var whours_year "Hours of work in last week primary job 12 month recall" +* + + +*<_wmonths_year_> + gen wmonths_year = . + label var wmonths_year "Months of work in past 12 months primary job 12 month recall" +* + + +*<_wage_total_year_> + gen wage_total_year = . + label var wage_total_year "Annualized total wage primary job 12 month recall" +* + + +*<_contract_year_> + gen byte contract_year = . + label var contract_year "Employment has contract primary job 12 month recall" + la de lblcontract_year 0 "Without contract" 1 "With contract" + label values contract_year lblcontract_year +* + + +*<_healthins_year_> + gen byte healthins_year = . + label var healthins_year "Employment has health insurance primary job 12 month recall" + la de lblhealthins_year 0 "Without health insurance" 1 "With health insurance" + label values healthins_year lblhealthins_year +* + + +*<_socialsec_year_> + gen byte socialsec_year = . + label var socialsec_year "Employment has social security insurance primary job 7 day recall" + la de lblsocialsec_year 1 "With social security" 0 "Without social secturity" + label values socialsec_year lblsocialsec_year +* + + +*<_union_year_> + gen byte union_year = . + label var union_year "Union membership at primary job 12 month recall" + la de lblunion_year 0 "Not union member" 1 "Union member" + label values union_year lblunion_year +* + + +*<_firmsize_l_year_> + gen firmsize_l_year = . + label var firmsize_l_year "Firm size (lower bracket) primary job 12 month recall" +* + + +*<_firmsize_u_year_> + gen firmsize_u_year = . + label var firmsize_u_year "Firm size (upper bracket) primary job 12 month recall" +* + +} + + +*----------8.8: 12 month reference secondary job------------------------------* + +{ + +*<_empstat_2_year_> + gen byte empstat_2_year = . + label var empstat_2_year "Employment status during past week secondary job 12 month recall" + label values empstat_2_year lblempstat_year +* + + +*<_ocusec_2_year_> + gen byte ocusec_2_year = . + label var ocusec_2_year "Sector of activity secondary job 12 month recall" + la de lblocusec_2_year 1 "Public Sector, Central Government, Army" 2 "Private, NGO" 3 "State owned" 4 "Public or State-owned, but cannot distinguish" + label values ocusec_2_year lblocusec_2_year +* + + + +*<_industry_orig_2_year_> + gen industry_orig_2_year = . + label var industry_orig_2_year "Original survey industry code, secondary job 12 month recall" +* + + + +*<_industrycat_isic_2_year_> + gen industrycat_isic_2_year = . + label var industrycat_isic_2_year "ISIC code of secondary job 12 month recall" +* + + +*<_industrycat10_2_year_> + gen byte industrycat10_2_year = . + label var industrycat10_2_year "1 digit industry classification, secondary job 12 month recall" + label values industrycat10_2_year lblindustrycat10_year +* + + +*<_industrycat4_2_year_> + gen byte industrycat4_2_year=industrycat10_2_year + recode industrycat4_2_year (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4_2_year "Broad Economic Activities classification, secondary job 12 month recall" + label values industrycat4_2_year lblindustrycat4_year +* + + +*<_occup_orig_2_year_> + gen occup_orig_2_year = . + label var occup_orig_2_year "Original occupation record secondary job 12 month recall" +* + + +*<_occup_isco_2_year_> + gen occup_isco_2_year = "" + label var occup_isco_2_year "ISCO code of secondary job 12 month recall" +* + + +*<_occup_2_year_> + gen byte occup_2_year = . + label var occup_2_year "1 digit occupational classification, secondary job 12 month recall" + label values occup_2_year lbloccup_year +* + + +*<_occup_skill_2_year_> + gen occup_skill_2_year = . + replace occup_skill_2_year = 3 if inrange(occup_2_year, 1, 3) + replace occup_skill_2_year = 2 if inrange(occup_2_year, 4, 8) + replace occup_skill_2_year = 1 if occup_2_year == 9 + la de lblskilly2 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill_2_year lblskilly2 + label var occup_skill_2_year "Skill based on ISCO standard secondary job 12 month recall" +* + + +*<_wage_no_compen_2_year_> + gen double wage_no_compen_2_year = . + label var wage_no_compen_2_year "Last wage payment secondary job 12 month recall" +* + + +*<_unitwage_2_year_> + gen byte unitwage_2_year = . + label var unitwage_2_year "Last wages' time unit secondary job 12 month recall" + label values unitwage_2_year lblunitwage_year +* + + +*<_whours_2_year_> + gen whours_2_year = . + label var whours_2_year "Hours of work in last week secondary job 12 month recall" +* + + +*<_wmonths_2_year_> + gen wmonths_2_year = . + label var wmonths_2_year "Months of work in past 12 months secondary job 12 month recall" +* + + +*<_wage_total_2_year_> + gen wage_total_2_year = . + label var wage_total_2_year "Annualized total wage secondary job 12 month recall" +* + +*<_firmsize_l_2_year_> + gen firmsize_l_2_year = . + label var firmsize_l_2_year "Firm size (lower bracket) secondary job 12 month recall" +* + + +*<_firmsize_u_2_year_> + gen firmsize_u_2_year = . + label var firmsize_u_2_year "Firm size (upper bracket) secondary job 12 month recall" +* + +} + + +*----------8.9: 12 month reference additional jobs------------------------------* + + +*<_t_hours_others_year_> + gen t_hours_others_year = . + label var t_hours_others_year "Annualized hours worked in all but primary and secondary jobs 12 month recall" +* + +*<_t_wage_nocompen_others_year_> + gen t_wage_nocompen_others_year = . + label var t_wage_nocompen_others_year "Annualized wage in all but 1st & 2nd jobs excl. bonuses, etc. 12 month recall" +* + +*<_t_wage_others_year_> + gen t_wage_others_year = . + label var t_wage_others_year "Annualized wage in all but primary and secondary jobs 12 month recall" +* + + +*----------8.10: 12 month total summary------------------------------* + + +*<_t_hours_total_year_> + gen t_hours_total_year = . + label var t_hours_total_year "Annualized hours worked in all jobs 12 month month recall" +* + + +*<_t_wage_nocompen_total_year_> + gen t_wage_nocompen_total_year = . + label var t_wage_nocompen_total_year "Annualized wage in all jobs excl. bonuses, etc. 12 month recall" +* + + +*<_t_wage_total_year_> + gen t_wage_total_year = . + label var t_wage_total_year "Annualized total wage for all jobs 12 month recall" +* + + +*----------8.11: Overall across reference periods------------------------------* + + +*<_njobs_> + gen njobs = . + label var njobs "Total number of jobs" +* + + +*<_t_hours_annual_> + gen t_hours_annual = . + label var t_hours_annual "Total hours worked in all jobs in the previous 12 months" +* + + +*<_linc_nc_> + gen linc_nc = . + label var linc_nc "Total annual wage income in all jobs, excl. bonuses, etc." +* + + +*<_laborincome_> + gen laborincome = t_wage_total_year + label var laborincome "Total annual individual labor income in all jobs, incl. bonuses, etc." +* + + +*----------8.13: Labour cleanup------------------------------* + +{ +*<_% Correction min age_> + +** Drop info for cases under the age for which questions to be asked (do not need a variable for this) + local lab_var "minlaborage lstatus nlfreason unempldur_l unempldur_u empstat ocusec industry_orig industrycat_isic industrycat10 industrycat4 occup_orig occup_isco occup_skill occup wage_no_compen unitwage whours wmonths wage_total contract healthins socialsec union firmsize_l firmsize_u empstat_2 ocusec_2 industry_orig_2 industrycat_isic_2 industrycat10_2 industrycat4_2 occup_orig_2 occup_isco_2 occup_skill_2 occup_2 wage_no_compen_2 unitwage_2 whours_2 wmonths_2 wage_total_2 firmsize_l_2 firmsize_u_2 t_hours_others t_wage_nocompen_others t_wage_others t_hours_total t_wage_nocompen_total t_wage_total lstatus_year nlfreason_year unempldur_l_year unempldur_u_year empstat_year ocusec_year industry_orig_year industrycat_isic_year industrycat10_year industrycat4_year occup_orig_year occup_isco_year occup_skill_year occup_year unitwage_year whours_year wmonths_year wage_total_year contract_year healthins_year socialsec_year union_year firmsize_l_year firmsize_u_year empstat_2_year ocusec_2_year industry_orig_2_year industrycat_isic_2_year industrycat10_2_year industrycat4_2_year occup_orig_2_year occup_isco_2_year occup_skill_2_year occup_2_year wage_no_compen_2_year unitwage_2_year whours_2_year wmonths_2_year wage_total_2_year firmsize_l_2_year firmsize_u_2_year t_hours_others_year t_wage_nocompen_others_year t_wage_others_year t_hours_total_year t_wage_nocompen_total_year t_wage_total_year njobs t_hours_annual linc_nc laborincome" + + foreach v of local lab_var { + cap confirm numeric variable `v' + if _rc == 0 { // is indeed numeric + replace `v'=. if ( age < minlaborage & !missing(age) ) + } + else { // is not + replace `v'= "" if ( age < minlaborage & !missing(age) ) + } + + } + +* +} + + +/*%%============================================================================================= + 9: Final steps +==============================================================================================%%*/ + +quietly{ + +*<_% KEEP VARIABLES - ALL_> + + keep countrycode survname survey icls_v isced_version isco_version isic_version year vermast veralt harmonization int_year int_month hhid pid weight weight_m weight_q psu ssu strata wave panel visit_no urban subnatid1 subnatid2 subnatid3 subnatidsurvey subnatid1_prev subnatid2_prev subnatid3_prev gaul_adm1_code gaul_adm2_code gaul_adm3_code hsize age male relationharm relationcs marital eye_dsablty hear_dsablty walk_dsablty conc_dsord slfcre_dsablty comm_dsablty migrated_mod_age migrated_ref_time migrated_binary migrated_years migrated_from_urban migrated_from_cat migrated_from_code migrated_from_country migrated_reason ed_mod_age school literacy educy educat7 educat5 educat4 educat_orig educat_isced vocational vocational_type vocational_length_l vocational_length_u vocational_field_orig vocational_financed minlaborage lstatus potential_lf underemployment nlfreason unempldur_l unempldur_u empstat ocusec industry_orig industrycat_isic industrycat10 industrycat4 occup_orig occup_isco occup_skill occup wage_no_compen unitwage whours wmonths wage_total contract healthins socialsec union firmsize_l firmsize_u empstat_2 ocusec_2 industry_orig_2 industrycat_isic_2 industrycat10_2 industrycat4_2 occup_orig_2 occup_isco_2 occup_skill_2 occup_2 wage_no_compen_2 unitwage_2 whours_2 wmonths_2 wage_total_2 firmsize_l_2 firmsize_u_2 t_hours_others t_wage_nocompen_others t_wage_others t_hours_total t_wage_nocompen_total t_wage_total lstatus_year potential_lf_year underemployment_year nlfreason_year unempldur_l_year unempldur_u_year empstat_year ocusec_year industry_orig_year industrycat_isic_year industrycat10_year industrycat4_year occup_orig_year occup_isco_year occup_skill_year occup_year wage_no_compen_year unitwage_year whours_year wmonths_year wage_total_year contract_year healthins_year socialsec_year union_year firmsize_l_year firmsize_u_year empstat_2_year ocusec_2_year industry_orig_2_year industrycat_isic_2_year industrycat10_2_year industrycat4_2_year occup_orig_2_year occup_isco_2_year occup_skill_2_year occup_2_year wage_no_compen_2_year unitwage_2_year whours_2_year wmonths_2_year wage_total_2_year firmsize_l_2_year firmsize_u_2_year t_hours_others_year t_wage_nocompen_others_year t_wage_others_year t_hours_total_year t_wage_nocompen_total_year t_wage_total_year njobs t_hours_annual linc_nc laborincome + +* + +*<_% ORDER VARIABLES_> + + order countrycode survname survey icls_v isced_version isco_version isic_version year vermast veralt harmonization int_year int_month hhid pid weight weight_m weight_q psu ssu strata wave panel visit_no urban subnatid1 subnatid2 subnatid3 subnatidsurvey subnatid1_prev subnatid2_prev subnatid3_prev gaul_adm1_code gaul_adm2_code gaul_adm3_code hsize age male relationharm relationcs marital eye_dsablty hear_dsablty walk_dsablty conc_dsord slfcre_dsablty comm_dsablty migrated_mod_age migrated_ref_time migrated_binary migrated_years migrated_from_urban migrated_from_cat migrated_from_code migrated_from_country migrated_reason ed_mod_age school literacy educy educat7 educat5 educat4 educat_orig educat_isced vocational vocational_type vocational_length_l vocational_length_u vocational_field_orig vocational_financed minlaborage lstatus potential_lf underemployment nlfreason unempldur_l unempldur_u empstat ocusec industry_orig industrycat_isic industrycat10 industrycat4 occup_orig occup_isco occup_skill occup wage_no_compen unitwage whours wmonths wage_total contract healthins socialsec union firmsize_l firmsize_u empstat_2 ocusec_2 industry_orig_2 industrycat_isic_2 industrycat10_2 industrycat4_2 occup_orig_2 occup_isco_2 occup_skill_2 occup_2 wage_no_compen_2 unitwage_2 whours_2 wmonths_2 wage_total_2 firmsize_l_2 firmsize_u_2 t_hours_others t_wage_nocompen_others t_wage_others t_hours_total t_wage_nocompen_total t_wage_total lstatus_year potential_lf_year underemployment_year nlfreason_year unempldur_l_year unempldur_u_year empstat_year ocusec_year industry_orig_year industrycat_isic_year industrycat10_year industrycat4_year occup_orig_year occup_isco_year occup_skill_year occup_year wage_no_compen_year unitwage_year whours_year wmonths_year wage_total_year contract_year healthins_year socialsec_year union_year firmsize_l_year firmsize_u_year empstat_2_year ocusec_2_year industry_orig_2_year industrycat_isic_2_year industrycat10_2_year industrycat4_2_year occup_orig_2_year occup_isco_2_year occup_skill_2_year occup_2_year wage_no_compen_2_year unitwage_2_year whours_2_year wmonths_2_year wage_total_2_year firmsize_l_2_year firmsize_u_2_year t_hours_others_year t_wage_nocompen_others_year t_wage_others_year t_hours_total_year t_wage_nocompen_total_year t_wage_total_year njobs t_hours_annual linc_nc laborincome + +* + +*<_% DROP UNUSED LABELS_> + + * Store all labels in data + label dir + local all_lab `r(names)' + + * Store all variables with a label, extract value label names + local used_lab = "" + ds, has(vallabel) + + local labelled_vars `r(varlist)' + + foreach varName of local labelled_vars { + local y : value label `varName' + local used_lab `"`used_lab' `y'"' + } + + * Compare lists, `notused' is list of labels in directory but not used in final variables + local notused : list all_lab - used_lab // local `notused' defines value labs not in remaining vars + local notused_len : list sizeof notused // store size of local + + * drop labels if the length of the notused vector is 1 or greater, otherwise nothing to drop + if `notused_len' >= 1 { + label drop `notused' + } + else { + di "There are no unused labels to drop. No value labels dropped." + } + + +* + +} + + +*<_% DELETE MISSING VARIABLES_> + +quietly: describe, varlist +local kept_vars `r(varlist)' + +foreach var of local kept_vars { + capture assert missing(`var') + if !_rc drop `var' +} + +* + + +*<_% COMPRESS_> + +compress + +* + + +*<_% SAVE_> + +save "`path_output'/`out_file'", replace + +* diff --git a/GLD/ARM/ARM_2011_ILCS/ARM_2011_ILCS_V01_M_V01_A_GLD/Programs/ARM_2011_ILCS_V01_M_V01_A_GLD_ALL.do b/GLD/ARM/ARM_2011_ILCS/ARM_2011_ILCS_V01_M_V01_A_GLD/Programs/ARM_2011_ILCS_V01_M_V01_A_GLD_ALL.do new file mode 100644 index 000000000..9ea07ab49 --- /dev/null +++ b/GLD/ARM/ARM_2011_ILCS/ARM_2011_ILCS_V01_M_V01_A_GLD/Programs/ARM_2011_ILCS_V01_M_V01_A_GLD_ALL.do @@ -0,0 +1,1782 @@ + +/*%%============================================================================================= + 0: GLD Harmonization Preamble +==============================================================================================%%*/ + +/* ----------------------------------------------------------------------- + +<_Program name_> ARM_2011_ILCS_V01_M_V01_A_GLD_ALL.do +<_Application_> Stata 18 <_Application_> +<_Author(s)_> World Bank Jobs Group (gld@worldbank.org) +<_Date created_> 2024-09-11 + +------------------------------------------------------------------------- + +<_Country_> Armenia +<_Survey Title_> Integrated Living Conditions Survey +<_Survey Year_> 2011 +<_Study ID_> https://microdatalib.worldbank.org/index.php/catalog/2615 +<_Data collection from_> [MM/YYYY] +<_Data collection to_> [MM/YYYY] +<_Source of dataset_> [Source of data, e.g. NSO] +<_Sample size (HH)_> [#] +<_Sample size (IND)_> [#] +<_Sampling method_> [Brief description] +<_Geographic coverage_> [To what level is data significant] +<_Currency_> [Currency used for wages] + +----------------------------------------------------------------------- + +<_ICLS Version_> [Version of ICLS for Labor Questions] +<_ISCED Version_> [Version of ICLS for Labor Questions] +<_ISCO Version_> [Version of ICLS for Labor Questions] +<_OCCUP National_> [Version of ICLS for Labor Questions] +<_ISIC Version_> [Version of ICLS for Labor Questions] +<_INDUS National_> [Version of ICLS for Labor Questions] + +----------------------------------------------------------------------- +<_Version Control_> + +* Date: [YYYY-MM-DD] - [Description of changes] +* Date: [YYYY-MM-DD] - [Description of changes] + + + +-------------------------------------------------------------------------*/ + + +/*%%============================================================================================= + 1: Setting up of program environment, dataset +==============================================================================================%%*/ + +*----------1.1: Initial commands------------------------------* + +clear +set more off +set mem 800m +set varabbrev off + +*----------1.2: Set directories------------------------------* + +* Define path sections +local server "Y:/GLD-Harmonization/529026_MG/Countries" +local country "ARM" +local year "2011" +local survey "ILCS" +local vermast "V01" +local veralt "V01" + +* From the definitions, set path chunks +local level_1 "`country'_`year'_`survey'" +local level_2_mast "`level_1'_`vermast'_M" +local level_2_harm "`level_1'_`vermast'_M_`veralt'_A_GLD" + +* From chunks, define path_in, path_output folder +local path_in_stata "`server'/`country'/`level_1'/`level_2_mast'/Data/Stata" +local path_in_other "`server'/`country'/`level_1'/`level_2_mast'/Data/Original" +local path_output "`server'/`country'/`level_1'/`level_2_harm'/Data/Harmonized" + +* Define Output file name +local out_file "`level_2_harm'_ALL.dta" + +*----------1.3: Database assembly------------------------------* + +* All steps necessary to merge datasets (if several) to have all elements needed to produce +* harmonized output in a single file + +* Check whether there is a weight file +local has_wf = fileexists("`path_in_stata'/Weight.dta") + +* Start with HH +use "`path_in_stata'/hh.dta" + +* If there is a weight file, merge it in +if `has_wf' { + merge 1:1 recno using "`path_in_stata'/Weight.dta", assert(match) nogen +} + +* Add member roster +merge 1:m recno using "`path_in_stata'/mem.dta", assert(match) nogen + +* Add employment section +merge 1:1 recno memnum using "`path_in_stata'/d1", assert(match master) nogen + +* Add number labels +numlabel, add force + +/*%%============================================================================================= + 2: Survey & ID +==============================================================================================%%*/ + +{ + +*<_countrycode_> + gen str4 countrycode = "ARM" + label var countrycode "Country code" +* + + +*<_survname_> + gen survname = "ILCS" + label var survname "Survey acronym" +* + + +*<_survey_> + gen survey = "GLD" + label var survey "Survey type" +* + + +*<_icls_v_> + gen icls_v = "ICLS-13" + label var icls_v "ICLS version underlying questionnaire questions" +* + + +*<_isced_version_> + gen isced_version = "" + label var isced_version "Version of ISCED used for educat_isced" +* + + +*<_isco_version_> + gen isco_version = "" + label var isco_version "Version of ISCO used" +* + + +*<_isic_version_> + gen isic_version = "isic_4" + label var isic_version "Version of ISIC used" +* + + +*<_year_> + gen int year = 2011 + label var year "Year of survey" +* + + +*<_vermast_> + gen vermast = "`vermast'" + label var vermast "Version of master data" +* + + +*<_veralt_> + gen veralt = "`veralt'" + label var veralt "Version of the alt/harmonized data" +* + + +*<_harmonization_> + gen harmonization = "GLD" + label var harmonization "Type of harmonization" +* + + +*<_int_year_> + gen int_year= 2011 + label var int_year "Year of the interview" +* + + +*<_int_month_> + gen int_month = date + label de lblint_month 1 "January" 2 "February" 3 "March" 4 "April" 5 "May" 6 "June" 7 "July" 8 "August" 9 "September" 10 "October" 11 "November" 12 "December" + label value int_month lblint_month + label var int_month "Month of the interview" +* + + +*<_hhid_> +/* <_hhid_note> + + Values are 1-5184 running. Would have preferred making it a string with 0001 to 5184, but leave as is since + GMD has it this way. For PID concatenate this with 01-12 but leave as is. + + */ + gen hhid = recno + label var hhid "Household ID" +* + + +*<_pid_> + gen pid = memnum + label var pid "Individual ID" +* + + +*<_weight_> + * Weight already exists + *gen weight = . + label var weight "Survey sampling weight" +* + + +*<_weight_m_> + gen weight_m = . + label var weight_m "Survey sampling weight to obtain national estimates for each month" +* + + +*<_weight_q_> + gen weight_q = . + label var weight_q "Survey sampling weight to obtain national estimates for each quarter" +* + + +*<_psu_> + gen psu = . + label var psu "Primary sampling units" +* + + +*<_ssu_> + gen ssu = . + label var ssu "Secondary sampling units" +* + + +*<_strata_> + gen strata = . + label var strata "Strata" +* + + +*<_wave_> + gen wave = . + label var wave "Survey wave" +* + + +*<_panel_> + gen panel = "" + label var panel "Panel individual belongs to" +* + + +*<_visit_no_> + gen visit_no = . + label var visit_no "Visit number in panel" +* + +} + + +/*%%============================================================================================= + 3: Geography +==============================================================================================%%*/ + +{ + +*<_urban_> + * typev is 0 if YErevan, 1 if urban (other), rural is 2 + gen byte urban = inrange(typev, 0,1) + replace urban = 0 if typev == 2 + label var urban "Location is urban" + la de lblurban 1 "Urban" 0 "Rural" + label values urban lblurban +* + + +*<_subnatid1_> +/* <_subnatid1_note> + + The variable is string and country-specific categorical. Numeric entries are coded in string format using the following naming convention: "1 – Hatay". That is, the variable itself is to be string, not a labelled numeric vector. + + Example of entries would be "1 - Alaska", "2 - Arkansas", ... + + */ + gen str subnatid1 = "" + replace subnatid1 = "1 - Yerevan" if marz == 1 + replace subnatid1 = "2 - Aragatsotn" if marz == 2 + replace subnatid1 = "3 - Ararat" if marz == 3 + replace subnatid1 = "4 - Armavir" if marz == 4 + replace subnatid1 = "5 - Gegharkunik" if marz == 5 + replace subnatid1 = "6 - Lori" if marz == 6 + replace subnatid1 = "7 - Kotayk" if marz == 7 + replace subnatid1 = "8 - Shirak" if marz == 8 + replace subnatid1 = "9 - Syunik" if marz == 9 + replace subnatid1 = "10 - Vayoc Dzor" if marz == 10 + replace subnatid1 = "11 - Tavush" if marz == 11 +* + + +*<_subnatid2_> + gen str subnatid2 = "" + label var subnatid2 "Subnational ID at Second Administrative Level" +* + + +*<_subnatid3_> + gen str subnatid3 = "" + label var subnatid3 "Subnational ID at Third Administrative Level" +* + + +*<_subnatidsurvey_> +/* <_subnatidsurvey_note> + + Variable denoting lowest administrative info to which the survey is still significat. + See entry in GLD Guidelines (https://github.com/worldbank/gld/blob/main/Support/A%20-%20Guides%20and%20Documentation/GLD_1.0_Guidelines.docx) for more details + + */ + decode urban, generate(helper) + generate subnatidsurvey = string(urban) + " - " + helper + drop helper + label var subnatidsurvey "Administrative level at which survey is representative" +* + + +*<_subnatid1_prev_> +/* <_subnatid1_prev_note> + + subnatid1_prev is coded as missing unless the classification used for subnatid1 has changed since the previous survey. + + */ + gen subnatid1_prev = . + label var subnatid1_prev "Classification used for subnatid1 from previous survey" +* + + +*<_subnatid2_prev_> + gen subnatid2_prev = . + label var subnatid2_prev "Classification used for subnatid2 from previous survey" +* + + +*<_subnatid3_prev_> + gen subnatid3_prev = . + label var subnatid3_prev "Classification used for subnatid3 from previous survey" +* + + +*<_gaul_adm1_code_> + gen gaul_adm1_code = . + label var gaul_adm1_code "Global Administrative Unit Layers (GAUL) Admin 1 code" +* + + +*<_gaul_adm2_code_> + gen gaul_adm2_code = . + label var gaul_adm2_code "Global Administrative Unit Layers (GAUL) Admin 2 code" +* + + +*<_gaul_adm3_code_> + gen gaul_adm3_code = . + label var gaul_adm3_code "Global Administrative Unit Layers (GAUL) Admin 3 code" +* + +} + + +/*%%============================================================================================= + 4: Demography +==============================================================================================%%*/ + +{ + +*<_hsize_> + * If keep all + gen hsize = members + /* * If drop absentees + gen helper = 1 + egen hh_abs_no = total(helper), by(recno) + replace hsize = hsize - hh_abs_no + drop helper hh_abs_no + */ + label var hsize "Household size" +* + + +*<_age_> + * Already in there + *gen age = . + label var age "Individual age" +* + + +*<_male_> + gen male = a1_1 + recode male (2 = 0) + label var male "Sex - Ind is male" + la de lblmale 1 "Male" 0 "Female" + label values male lblmale +* + + +*<_relationharm_> + gen relationharm = a1_2 + recode relationharm (4 = 3) (6 = 4) (7 = 5) (8 = 6) + label var relationharm "Relationship to the head of household - Harmonized" + la de lblrelationharm 1 "Head of household" 2 "Spouse" 3 "Children" 4 "Parents" 5 "Other relatives" 6 "Other and non-relatives" + label values relationharm lblrelationharm +* + + +*<_relationcs_> + clonevar relationcs = a1_2 + label var relationcs "Relationship to the head of household - Country original" +* + + +*<_marital_> + gen byte marital = a1_5 + recode marital (3 = 5) (5 = 3) + label var marital "Marital status" + la de lblmarital 1 "Married" 2 "Never Married" 3 "Living together" 4 "Divorced/Separated" 5 "Widowed" + label values marital lblmarital +* + + +*<_eye_dsablty_> + gen eye_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all" + label values eye_dsablty dsablty + label var eye_dsablty "Disability related to eyesight" +* + + +*<_hear_dsablty_> + gen hear_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values hear_dsablty dsablty + label var hear_dsablty "Disability related to hearing" +* + + +*<_walk_dsablty_> + gen walk_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values walk_dsablty dsablty + label var walk_dsablty "Disability related to walking or climbing stairs" +* + + +*<_conc_dsord_> + gen conc_dsord = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values conc_dsord dsablty + label var conc_dsord "Disability related to concentration or remembering" +* + + +*<_slfcre_dsablty_> + gen slfcre_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values slfcre_dsablty dsablty + label var slfcre_dsablty "Disability related to selfcare" +* + + +*<_comm_dsablty_> + gen comm_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values comm_dsablty dsablty + label var comm_dsablty "Disability related to communicating" +* + +} + + +/*%%============================================================================================= + 5: Migration +==============================================================================================%%*/ + + +{ + +* Migration is not done as it is much more narrowly defined as migrated and returned. Thus anyone who +* migrated from their home town to the capital city would not be included. + +*<_migrated_mod_age_> + gen migrated_mod_age = . + label var migrated_mod_age "Migration module application age" +* + + +*<_migrated_ref_time_> + gen migrated_ref_time = . + label var migrated_ref_time "Reference time applied to migration questions (in years)" +* + + +*<_migrated_binary_> + gen migrated_binary = . + label de lblmigrated_binary 0 "No" 1 "Yes" + label values migrated_binary lblmigrated_binary + label var migrated_binary "Individual has migrated" +* + + +*<_migrated_years_> + gen migrated_years = . + label var migrated_years "Years since latest migration" +* + + +*<_migrated_from_urban_> + gen migrated_from_urban = . + label de lblmigrated_from_urban 0 "Rural" 1 "Urban" + label values migrated_from_urban lblmigrated_from_urban + label var migrated_from_urban "Migrated from area" +* + + +*<_migrated_from_cat_> + gen migrated_from_cat = . + label de lblmigrated_from_cat 1 "From same admin3 area" 2 "From same admin2 area" 3 "From same admin1 area" 4 "From other admin1 area" 5 "From other country" + label values migrated_from_cat lblmigrated_from_cat + label var migrated_from_cat "Category of migration area" +* + + +*<_migrated_from_code_> + gen migrated_from_code = . + *label de lblmigrated_from_code + *label values migrated_from_code lblmigrated_from_code + label var migrated_from_code "Code of migration area as subnatid level of migrated_from_cat" +* + + +*<_migrated_from_country_> + gen migrated_from_country = . + label var migrated_from_country "Code of migration country (ISO 3 Letter Code)" +* + + +*<_migrated_reason_> + gen migrated_reason = . + label de lblmigrated_reason 1 "Family reasons" 2 "Educational reasons" 3 "Employment" 4 "Forced (political reasons, natural disaster, …)" 5 "Other reasons" + label values migrated_reason lblmigrated_reason + label var migrated_reason "Reason for migrating" +* + + +} + + +/*%%============================================================================================= + 6: Education +==============================================================================================%%*/ + + +{ + +*<_ed_mod_age_> + +/* <_ed_mod_age_note> + +Education module is only asked to those 6 and older. + + */ + +gen byte ed_mod_age = 6 +label var ed_mod_age "Education module application age" + +* + +*<_school_> + gen byte school = 0 + replace school = 1 if e2_7 == 1 + label var school "Attending school" + la de lblschool 0 "No" 1 "Yes" + label values school lblschool +* + + +*<_literacy_> + gen byte literacy = 1 + replace literacy = 0 if e2_2 == 0 + replace literacy = . if mi(e2_2) + label var literacy "Individual can read & write" + la de lblliteracy 0 "No" 1 "Yes" + label values literacy lblliteracy +* + + +*<_educy_> + * Number of years is a combination of level (e2_2) and years in that course (e2_3) + gen byte educy =. + replace educy = 0 if e2_2 == 0 + replace educy = e2_3 if e2_2 == 1 & inrange(e2_3,0,4) + replace educy = 4 + e2_3 if e2_2 == 2 & inrange(e2_3,0,5) + replace educy = 9 + e2_3 if e2_2 == 3 & inrange(e2_3,0,3) + replace educy = 9 + e2_3 if e2_2 == 4 & inrange(e2_3,0,2) + replace educy = 9 + e2_3 if e2_2 == 5 & inrange(e2_3,0,5) + replace educy = 12 + e2_3 if e2_2 == 6 & inrange(e2_3,0,7) + replace educy = 16 + e2_3 if e2_2 == 7 & inrange(e2_3,0,4) + label var educy "Years of education" +* + + +*<_educat7_> + gen byte educat7 =. + replace educat7 = 1 if e2_2 == 0 + replace educat7 = 2 if e2_2 == 1 & e2_3 < 4 + replace educat7 = 3 if e2_2 == 1 & e2_3 == 4 + replace educat7 = 4 if e2_2 == 2 + replace educat7 = 5 if inrange(e2_2, 3, 4) + replace educat7 = 6 if e2_2 == 5 + replace educat7 = 7 if inrange(e2_2, 6, 7) + label var educat7 "Level of education 1" + la de lbleducat7 1 "No education" 2 "Primary incomplete" 3 "Primary complete" 4 "Secondary incomplete" 5 "Secondary complete" 6 "Higher than secondary but not university" 7 "University incomplete or complete", replace + label values educat7 lbleducat7 +* + + +*<_educat5_> + gen byte educat5 = educat7 + recode educat5 4=3 5=4 6 7=5 + label var educat5 "Level of education 2" + la de lbleducat5 1 "No education" 2 "Primary incomplete" 3 "Primary complete but secondary incomplete" 4 "Secondary complete" 5 "Some tertiary/post-secondary" + label values educat5 lbleducat5 +* + + +*<_educat4_> + gen byte educat4 = educat7 + recode educat4 (2 3 4 = 2) (5=3) (6 7=4) + label var educat4 "Level of education 3" + la de lbleducat4 1 "No education" 2 "Primary" 3 "Secondary" 4 "Post-secondary" + label values educat4 lbleducat4 +* + + +*<_educat_orig_> + clonevar educat_orig = e2_2 + label var educat_orig "Original survey education code" +* + + +*<_educat_isced_> + gen educat_isced = . + label var educat_isced "ISCED standardised level of education" +* + + +*----------6.1: Education cleanup------------------------------* + +*<_% Correction min age_> + +** Drop info for cases under the age for which questions to be asked (do not need a variable for this) +local ed_var "school literacy educy educat7 educat5 educat4 educat_orig educat_isced" + +foreach v of local ed_var { + cap confirm numeric variable `v' + if _rc == 0 { // is indeed numeric + replace `v'=. if ( age < ed_mod_age & !missing(age) ) + } + else { // is not + replace `v'= "" if ( age < ed_mod_age & !missing(age) ) + } +} + + +* + + +} + + +/*%%============================================================================================= + 7: Training +==============================================================================================%%*/ + + +{ + +*<_vocational_> + gen vocational = . + label de lblvocational 0 "No" 1 "Yes" + label var vocational "Ever received vocational training" +* + + +*<_vocational_type_> + gen vocational_type = . + label de lblvocational_type 1 "Inside Enterprise" 2 "External" + label values vocational_type lblvocational_type + label var vocational_type "Type of vocational training" +* + + +*<_vocational_length_l_> + gen vocational_length_l = . + label var vocational_length_l "Length of training in months, lower limit" +* + + +*<_vocational_length_u_> + gen vocational_length_u = . + label var vocational_length_u "Length of training in months, upper limit" +* + + +*<_vocational_field_orig_> + gen str vocational_field_orig = "" + label var vocational_field_orig "Original field of training information" +* + + +*<_vocational_financed_> + gen vocational_financed = . + label de lblvocational_financed 1 "Employer" 2 "Government" 3 "Mixed Employer/Government" 4 "Own funds" 5 "Other" + label var vocational_financed "How training was financed" +* + +} + + +/*%%============================================================================================= + 8: Labour +==============================================================================================%%*/ + + +*<_minlaborage_> + gen byte minlaborage = 15 + label var minlaborage "Labor module application age" +* + + +*----------8.1: 7 day reference overall------------------------------* + +{ +*<_lstatus_> + * Logic is either have a job (yes to D1_1a) or returning (D1_2a) + * However the returning is subject to reasons (D1_3a) that are not + * a skip pattern but upon probing of the enumerator + * The below tab shows that some go to main job, others don't + * tab d1_3a d1_4a,m + gen byte lstatus = 1 if !mi(d1_4a) + + * For unemployed we need looking for a job (d2_5) and willing to accept (d2_10) + * Ensured all who looked answer the willing question + count if inrange(d2_5,1,2) & mi(d2_10) + assert `r(N)' == 0 + replace lstatus = 2 if lstatus == . & inrange(d2_5, 1, 2) & d2_10 == 1 + + * Normally, I would set all others to NLF, but given that we have the absentees, assign only to no in d2_5 + replace lstatus = 3 if lstatus == . & d2_5 == 3 + replace lstatus = 3 if lstatus == . & inrange(d2_5, 1, 2) & d2_10 == 2 + + replace lstatus = . if age < minlaborage + label var lstatus "Labor status" + la de lbllstatus 1 "Employed" 2 "Unemployed" 3 "Non-LF" + label values lstatus lbllstatus +* + + +*<_potential_lf_> + gen byte potential_lf = 0 + * Either not looking but would accept or looking but would not accept + replace potential_lf = 1 if (d2_5 == 3 & d2_10 == 1) | (inrange(d2_5,1,2) & d2_10 == 2) + replace potential_lf = . if age < minlaborage & age != . + replace potential_lf = . if lstatus != 3 + label var potential_lf "Potential labour force status" + la de lblpotential_lf 0 "No" 1 "Yes" + label values potential_lf lblpotential_lf +* + + +*<_underemployment_> + gen byte underemployment = 0 + replace underemployment = 1 if d1_24a == 7 + replace underemployment = . if age < minlaborage & age != . + replace underemployment = . if lstatus != 1 + label var underemployment "Underemployment status" + la de lblunderemployment 0 "No" 1 "Yes" + label values underemployment lblunderemployment +* + + +*<_nlfreason_> + gen byte nlfreason=. + label var nlfreason "Reason not in the labor force" + la de lblnlfreason 1 "Student" 2 "Housekeeper" 3 "Retired" 4 "Disabled" 5 "Other" + label values nlfreason lblnlfreason +* + + +*<_unempldur_l_> + gen byte unempldur_l=. + replace unempldur_l = 0 if d2_9 == 1 + replace unempldur_l = 1 if d2_9 == 2 + replace unempldur_l = 4 if d2_9 == 3 + replace unempldur_l = 7 if d2_9 == 4 + replace unempldur_l = 13 if d2_9 == 5 + replace unempldur_l = 25 if d2_9 == 6 + replace unempldur_l = 49 if d2_9 == 7 + replace unempldur_l = . if lstatus != 2 + label var unempldur_l "Unemployment duration (months) lower bracket" +* + + +*<_unempldur_u_> + gen byte unempldur_u=. + replace unempldur_u = 1 if d2_9 == 1 + replace unempldur_u = 3 if d2_9 == 2 + replace unempldur_u = 6 if d2_9 == 3 + replace unempldur_u = 12 if d2_9 == 4 + replace unempldur_u = 24 if d2_9 == 5 + replace unempldur_u = 48 if d2_9 == 6 + replace unempldur_u = 999 if d2_9 == 7 + replace unempldur_u = . if lstatus != 2 + label var unempldur_u "Unemployment duration (months) upper bracket" +* +} + + +*----------8.2: 7 day reference main job------------------------------* + + +{ +*<_empstat_> + gen byte empstat = d1_7a + recode empstat (2 3 = 1) (4 = 3) (5 6 8 = 4) (7 = 2) + label var empstat "Employment status during past week primary job 7 day recall" + la de lblempstat 1 "Paid employee" 2 "Non-paid employee" 3 "Employer" 4 "Self-employed" 5 "Other, workers not classifiable by status" + label values empstat lblempstat +* + + +*<_ocusec_> + gen byte ocusec = d1_9a + recode ocusec (2 = 1) (3/5 = 2) + replace ocusec = . if lstatus != 1 + label var ocusec "Sector of activity primary job 7 day recall" + la de lblocusec 1 "Public Sector, Central Government, Army" 2 "Private, NGO" 3 "State owned" 4 "Public or State-owned, but cannot distinguish" + label values ocusec lblocusec +* + + +*<_industry_orig_> + gen industry_orig = string(d1_5a, "%02.0f") + replace industry_orig = "" if industry_orig == "." + replace industry_orig = "" if lstatus != 1 + label var industry_orig "Original survey industry code, main job 7 day recall" +* + + +*<_industrycat_isic_> + gen industrycat_isic = industry_orig + "00" if !mi(industry_orig) + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + drop if missing(industrycat_isic) + int_classif_universe, var(industrycat_isic) universe(ISIC) + count + list + *assert `r(N)' == 0 + restore + + label var industrycat_isic "ISIC code of primary job 7 day recall" +* + + +*<_industrycat10_> + gen byte industrycat10 = . + replace industrycat10 = 1 if inrange(industry_orig, "01", "03") + replace industrycat10 = 2 if inrange(industry_orig, "05", "09") + replace industrycat10 = 3 if inrange(industry_orig, "10", "33") + replace industrycat10 = 4 if inrange(industry_orig, "35", "39") + replace industrycat10 = 5 if inrange(industry_orig, "41", "43") + replace industrycat10 = 6 if inrange(industry_orig, "45", "47") | inrange(industry_orig, "55", "56") + replace industrycat10 = 7 if inrange(industry_orig, "49", "53") | inrange(industry_orig, "58", "63") + replace industrycat10 = 8 if inrange(industry_orig, "64", "82") + replace industrycat10 = 9 if inrange(industry_orig, "84", "84") + replace industrycat10 = 10 if inrange(industry_orig, "85", "99") + label var industrycat10 "1 digit industry classification, primary job 7 day recall" + la de lblindustrycat10 1 "Agriculture" 2 "Mining" 3 "Manufacturing" 4 "Public utilities" 5 "Construction" 6 "Commerce" 7 "Transport and Comnunications" 8 "Financial and Business Services" 9 "Public Administration" 10 "Other Services, Unspecified" + label values industrycat10 lblindustrycat10 +* + + +*<_industrycat4_> + gen byte industrycat4 = industrycat10 + recode industrycat4 (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4 "Broad Economic Activities classification, primary job 7 day recall" + la de lblindustrycat4 1 "Agriculture" 2 "Industry" 3 "Services" 4 "Other" + label values industrycat4 lblindustrycat4 +* + + +*<_occup_orig_> + gen occup_orig = . + label var occup_orig "Original occupation record primary job 7 day recall" +* + + +*<_occup_isco_> + gen occup_isco = "" + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + *drop if missing(occup_isco) + *int_classif_universe, var(occup_isco) universe(ISCO) + count + *list + *assert `r(N)' == 0 + restore + + label var occup_isco "ISCO code of primary job 7 day recall" +* + + +*<_occup_> + gen byte occup = . + label var occup "1 digit occupational classification, primary job 7 day recall" + la de lbloccup 1 "Managers" 2 "Professionals" 3 "Technicians" 4 "Clerks" 5 "Service and market sales workers" 6 "Skilled agricultural" 7 "Craft workers" 8 "Machine operators" 9 "Elementary occupations" 10 "Armed forces" 99 "Others" + label values occup lbloccup +* + + +*<_occup_skill_> + gen occup_skill = . + replace occup_skill = 3 if inrange(occup, 1, 3) + replace occup_skill = 2 if inrange(occup, 4, 8) + replace occup_skill = 1 if occup == 9 + la de lblskill 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill lblskill + label var occup_skill "Skill based on ISCO standard primary job 7 day recall" +* + + +*<_wage_no_compen_> + egen double wage_no_compen = rowtotal(d1_14a d1_16a), missing + replace wage_no_compen = . if lstatus != 1 | empstat == 2 | wage_no_compen == 0 + label var wage_no_compen "Last wage payment primary job 7 day recall" +* + + +*<_unitwage_> + gen byte unitwage = 5 + replace unitwage = . if mi(wage_no_compen) + label var unitwage "Last wages' time unit primary job 7 day recall" + la de lblunitwage 1 "Daily" 2 "Weekly" 3 "Every two weeks" 4 "Bimonthly" 5 "Monthly" 6 "Trimester" 7 "Biannual" 8 "Annually" 9 "Hourly" 10 "Other" + label values unitwage lblunitwage +* + + +*<_whours_> + gen whours = d1_22a + replace whours = . if whours == 0 | lstatus != 1 + label var whours "Hours of work in last week primary job 7 day recall" +* + + +*<_wmonths_> + gen wmonths = . + label var wmonths "Months of work in past 12 months primary job 7 day recall" +* + + +*<_wage_total_> +/* <_wage_total_note> + + Use gross wages when available and net wages only when gross wages are not available. + This is done to make it easy to compare earnings in formal and informal sectors. + + */ + gen wage_total = . + label var wage_total "Annualized total wage primary job 7 day recall" +* + + +*<_contract_> + gen byte contract = 0 + replace contract = 1 if d1_7a == 1 | d1_7a == 2 + replace contract = . if lstatus != 1 + label var contract "Employment has contract primary job 7 day recall" + la de lblcontract 0 "Without contract" 1 "With contract" + label values contract lblcontract +* + + +*<_healthins_> + gen byte healthins = . + label var healthins "Employment has health insurance primary job 7 day recall" + la de lblhealthins 0 "Without health insurance" 1 "With health insurance" + label values healthins lblhealthins +* + + +*<_socialsec_> + gen byte socialsec = . + label var socialsec "Employment has social security insurance primary job 7 day recall" + la de lblsocialsec 1 "With social security" 0 "Without social secturity" + label values socialsec lblsocialsec +* + + +*<_union_> + gen byte union = . + label var union "Union membership at primary job 7 day recall" + la de lblunion 0 "Not union member" 1 "Union member" + label values union lblunion +* + + +*<_firmsize_l_> + gen firmsize_l = . + replace firmsize_l = 1 if d1_11a == 1 + replace firmsize_l = 6 if d1_11a == 2 + replace firmsize_l = 16 if d1_11a == 3 + replace firmsize_l = 31 if d1_11a == 4 + replace firmsize_l = 50 if d1_11a == 5 + replace firmsize_l = 100 if d1_11a == 6 + + * Add in public sector workers (skip firm size as largest bracket) + replace firmsize_l = 100 if ocusec == 1 & mi(firmsize_l) + + replace firmsize_l = . if lstatus != 1 + label var firmsize_l "Firm size (lower bracket) primary job 7 day recall" +* + + +*<_firmsize_u_> + gen firmsize_u= . + replace firmsize_u = 5 if d1_11a == 1 + replace firmsize_u = 15 if d1_11a == 2 + replace firmsize_u = 30 if d1_11a == 3 + replace firmsize_u = 49 if d1_11a == 4 + replace firmsize_u = 99 if d1_11a == 5 + replace firmsize_u = 9999 if d1_11a == 6 + + * Add in public sector workers (skip firm size as largest bracket) + replace firmsize_u = 9999 if ocusec == 1 & mi(firmsize_u) + + replace firmsize_u = . if lstatus != 1 + label var firmsize_u "Firm size (upper bracket) primary job 7 day recall" +* + +} + + +*----------8.3: 7 day reference secondary job------------------------------* +* Since labels are the same as main job, values are labelled using main job labels + + +{ +*<_empstat_2_> + gen byte empstat_2 = d1_7b + recode empstat_2 (2 3 = 1) (4 = 3) (5 6 8 = 4) (7 = 2) + label var empstat_2 "Employment status during past week secondary job 7 day recall" + label values empstat_2 lblempstat +* + + +*<_ocusec_2_> + gen byte ocusec_2 = d1_9b + recode ocusec_2 (2 = 1) (3/5 = 2) (0 = .) + replace ocusec_2 = . if mi(empstat_2) + label var ocusec_2 "Sector of activity secondary job 7 day recall" + label values ocusec_2 lblocusec +* + + +*<_industry_orig_2_> + gen industry_orig_2 = string(d1_5b, "%02.0f") + replace industry_orig_2 = "" if industry_orig_2 == "." + replace industry_orig_2 = "" if industry_orig_2 == "00" + replace industry_orig_2 = "" if mi(empstat_2) + label var industry_orig_2 "Original survey industry code, secondary job 7 day recall" +* + + +*<_industrycat_isic_2_> + gen industrycat_isic_2 = industry_orig_2 + "00" if !mi(industry_orig_2) + label var industrycat_isic_2 "ISIC code of secondary job 7 day recall" +* + + +*<_industrycat10_2_> + gen byte industrycat10_2 = . + replace industrycat10_2 = 1 if inrange(industry_orig_2, "01", "03") + replace industrycat10_2 = 2 if inrange(industry_orig_2, "05", "09") + replace industrycat10_2 = 3 if inrange(industry_orig_2, "10", "33") + replace industrycat10_2 = 4 if inrange(industry_orig_2, "35", "39") + replace industrycat10_2 = 5 if inrange(industry_orig_2, "41", "43") + replace industrycat10_2 = 6 if inrange(industry_orig_2, "45", "47") | inrange(industry_orig_2, "55", "56") + replace industrycat10_2 = 7 if inrange(industry_orig_2, "49", "53") | inrange(industry_orig_2, "58", "63") + replace industrycat10_2 = 8 if inrange(industry_orig_2, "64", "82") + replace industrycat10_2 = 9 if inrange(industry_orig_2, "84", "84") + replace industrycat10_2 = 10 if inrange(industry_orig_2, "85", "99") + label var industrycat10_2 "1 digit industry classification, secondary job 7 day recall" + label values industrycat10_2 lblindustrycat10 +* + + +*<_industrycat4_2_> + gen byte industrycat4_2 = industrycat10_2 + recode industrycat4_2 (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4_2 "Broad Economic Activities classification, secondary job 7 day recall" + label values industrycat4_2 lblindustrycat4 +* + + +*<_occup_orig_2_> + gen occup_orig_2 = . + label var occup_orig_2 "Original occupation record secondary job 7 day recall" +* + + +*<_occup_isco_2_> + gen occup_isco_2 = "" + label var occup_isco_2 "ISCO code of secondary job 7 day recall" +* + + +*<_occup_2_> + gen byte occup_2 = . + label var occup_2 "1 digit occupational classification secondary job 7 day recall" + label values occup_2 lbloccup +* + + +*<_occup_skill_2_> + gen occup_skill_2 = . + replace occup_skill_2 = 3 if inrange(occup_2, 1, 3) + replace occup_skill_2 = 2 if inrange(occup_2, 4, 8) + replace occup_skill_2 = 1 if occup_2 == 9 + la de lblskill2 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill_2 lblskill2 + label var occup_skill_2 "Skill based on ISCO standard secondary job 7 day recall" +* + + +*<_wage_no_compen_2_> + egen double wage_no_compen_2 = rowtotal(d1_14b d1_16b), missing + replace wage_no_compen_2 = . if mi(empstat_2) | empstat_2 == 2 | wage_no_compen_2 == 0 + label var wage_no_compen_2 "Last wage payment secondary job 7 day recall" +* + + +*<_unitwage_2_> + gen byte unitwage_2 = 5 + replace unitwage_2 = . if mi(wage_no_compen_2) + label var unitwage_2 "Last wages' time unit secondary job 7 day recall" + label values unitwage_2 lblunitwage +* + + +*<_whours_2_> + gen whours_2 = d1_22b + replace whours_2 = . if whours_2 == 0 | mi(empstat_2) + label var whours_2 "Hours of work in last week secondary job 7 day recall" +* + + +*<_wmonths_2_> + gen wmonths_2 = . + label var wmonths_2 "Months of work in past 12 months secondary job 7 day recall" +* + + +*<_wage_total_2_> + gen wage_total_2 = . + label var wage_total_2 "Annualized total wage secondary job 7 day recall" +* + + +*<_firmsize_l_2_> + gen firmsize_l_2 = . + replace firmsize_l_2 = 1 if d1_11b == 1 + replace firmsize_l_2 = 6 if d1_11b == 2 + replace firmsize_l_2 = 16 if d1_11b == 3 + replace firmsize_l_2 = 31 if d1_11b == 4 + replace firmsize_l_2 = 50 if d1_11b == 5 + replace firmsize_l_2 = 100 if d1_11b == 6 + + * Add in public sector workers (skip firm size as largest bracket) + replace firmsize_l_2 = 100 if ocusec_2 == 1 & mi(firmsize_l_2) + + replace firmsize_l_2 = . if mi(empstat_2) + label var firmsize_l_2 "Firm size (lower bracket) secondary job 7 day recall" +* + + +*<_firmsize_u_2_> + gen firmsize_u_2 = . + replace firmsize_u_2 = 5 if d1_11b == 1 + replace firmsize_u_2 = 15 if d1_11b == 2 + replace firmsize_u_2 = 30 if d1_11b == 3 + replace firmsize_u_2 = 49 if d1_11b == 4 + replace firmsize_u_2 = 99 if d1_11b == 5 + replace firmsize_u_2 = 9999 if d1_11b == 6 + + * Add in public sector workers (skip firm size as largest bracket) + replace firmsize_u_2 = 9999 if ocusec_2 == 1 & mi(firmsize_u_2) + + replace firmsize_u_2 = . if mi(empstat_2) + label var firmsize_u_2 "Firm size (upper bracket) secondary job 7 day recall" +* + +} + +*----------8.4: 7 day reference additional jobs------------------------------* + +*<_t_hours_others_> + gen t_hours_others = . + label var t_hours_others "Annualized hours worked in all but primary and secondary jobs 7 day recall" +* + + +*<_t_wage_nocompen_others_> + gen t_wage_nocompen_others = . + label var t_wage_nocompen_others "Annualized wage in all but 1st & 2nd jobs excl. bonuses, etc. 7 day recall" +* + + +*<_t_wage_others_> + gen t_wage_others = . + label var t_wage_others "Annualized wage in all but primary and secondary jobs (12-mon ref period)" +* + + +*----------8.5: 7 day reference total summary------------------------------* + + +*<_t_hours_total_> + gen t_hours_total = . + label var t_hours_total "Annualized hours worked in all jobs 7 day recall" +* + + +*<_t_wage_nocompen_total_> + gen t_wage_nocompen_total = . + label var t_wage_nocompen_total "Annualized wage in all jobs excl. bonuses, etc. 7 day recall" +* + + +*<_t_wage_total_> + gen t_wage_total = . + label var t_wage_total "Annualized total wage for all jobs 7 day recall" +* + + +*----------8.6: 12 month reference overall------------------------------* + +{ + +*<_lstatus_year_> + gen byte lstatus_year = . + replace lstatus_year=. if age < minlaborage & age != . + label var lstatus_year "Labor status during last year" + la de lbllstatus_year 1 "Employed" 2 "Unemployed" 3 "Non-LF" + label values lstatus_year lbllstatus_year +* + +*<_potential_lf_year_> + gen byte potential_lf_year = . + replace potential_lf_year=. if age < minlaborage & age != . + replace potential_lf_year = . if lstatus_year != 3 + label var potential_lf_year "Potential labour force status" + la de lblpotential_lf_year 0 "No" 1 "Yes" + label values potential_lf_year lblpotential_lf_year +* + + +*<_underemployment_year_> + gen byte underemployment_year = . + replace underemployment_year = . if age < minlaborage & age != . + replace underemployment_year = . if lstatus_year == 1 + label var underemployment_year "Underemployment status" + la de lblunderemployment_year 0 "No" 1 "Yes" + label values underemployment_year lblunderemployment_year +* + + +*<_nlfreason_year_> + gen byte nlfreason_year=. + label var nlfreason_year "Reason not in the labor force" + la de lblnlfreason_year 1 "Student" 2 "Housekeeper" 3 "Retired" 4 "Disabled" 5 "Other" + label values nlfreason_year lblnlfreason_year +* + + +*<_unempldur_l_year_> + gen byte unempldur_l_year=. + label var unempldur_l_year "Unemployment duration (months) lower bracket" +* + + +*<_unempldur_u_year_> + gen byte unempldur_u_year=. + label var unempldur_u_year "Unemployment duration (months) upper bracket" +* + +} + +*----------8.7: 12 month reference main job------------------------------* + +{ + +*<_empstat_year_> + gen byte empstat_year = . + label var empstat_year "Employment status during past week primary job 12 month recall" + la de lblempstat_year 1 "Paid employee" 2 "Non-paid employee" 3 "Employer" 4 "Self-employed" 5 "Other, workers not classifiable by status" + label values empstat_year lblempstat_year +* + +*<_ocusec_year_> + gen byte ocusec_year = . + label var ocusec_year "Sector of activity primary job 12 month recall" + la de lblocusec_year 1 "Public Sector, Central Government, Army" 2 "Private, NGO" 3 "State owned" 4 "Public or State-owned, but cannot distinguish" + label values ocusec_year lblocusec_year +* + +*<_industry_orig_year_> + gen industry_orig_year = . + label var industry_orig_year "Original industry record main job 12 month recall" +* + + +*<_industrycat_isic_year_> + gen industrycat_isic_year = . + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + *drop if missing(industrycat_isic_year) + *int_classif_universe, var(industrycat_isic_year) universe(ISIC) + count + *list + *assert `r(N)' == 0 + restore + + label var industrycat_isic_year "ISIC code of primary job 12 month recall" +* + +*<_industrycat10_year_> + gen byte industrycat10_year = . + label var industrycat10_year "1 digit industry classification, primary job 12 month recall" + la de lblindustrycat10_year 1 "Agriculture" 2 "Mining" 3 "Manufacturing" 4 "Public utilities" 5 "Construction" 6 "Commerce" 7 "Transport and Comnunications" 8 "Financial and Business Services" 9 "Public Administration" 10 "Other Services, Unspecified" + label values industrycat10_year lblindustrycat10_year +* + + +*<_industrycat4_year_> + gen byte industrycat4_year=industrycat10_year + recode industrycat4_year (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4_year "Broad Economic Activities classification, primary job 12 month recall" + la de lblindustrycat4_year 1 "Agriculture" 2 "Industry" 3 "Services" 4 "Other" + label values industrycat4_year lblindustrycat4_year +* + + +*<_occup_orig_year_> + gen occup_orig_year = . + label var occup_orig_year "Original occupation record primary job 12 month recall" +* + + +*<_occup_isco_year_> + gen occup_isco_year = "" + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + *drop if missing(occup_isco_year) + *int_classif_universe, var(occup_isco_year) universe(ISCO) + count + *list + *assert `r(N)' == 0 + restore + + label var occup_isco_year "ISCO code of primary job 12 month recall" +* + + +*<_occup_year_> + gen byte occup_year = . + label var occup_year "1 digit occupational classification, primary job 12 month recall" + la de lbloccup_year 1 "Managers" 2 "Professionals" 3 "Technicians" 4 "Clerks" 5 "Service and market sales workers" 6 "Skilled agricultural" 7 "Craft workers" 8 "Machine operators" 9 "Elementary occupations" 10 "Armed forces" 99 "Others" + label values occup_year lbloccup_year +* + + +*<_occup_skill_year_> + gen occup_skill_year = . + replace occup_skill_year = 3 if inrange(occup_year, 1, 3) + replace occup_skill_year = 2 if inrange(occup_year, 4, 8) + replace occup_skill_year = 1 if occup_year == 9 + la de lblskillyear 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill_year lblskillyear + label var occup_skill_year "Skill based on ISCO standard primary job 12 month recall" +* + + +*<_wage_no_compen_year_> --- this var has the same name as other and when quoted in the keep and order codes is repeated. + gen double wage_no_compen_year = . + label var wage_no_compen_year "Last wage payment primary job 12 month recall" +* + + +*<_unitwage_year_> + gen byte unitwage_year = . + label var unitwage_year "Last wages' time unit primary job 12 month recall" + la de lblunitwage_year 1 "Daily" 2 "Weekly" 3 "Every two weeks" 4 "Bimonthly" 5 "Monthly" 6 "Trimester" 7 "Biannual" 8 "Annually" 9 "Hourly" 10 "Other" + label values unitwage_year lblunitwage_year +* + + +*<_whours_year_> + gen whours_year = . + label var whours_year "Hours of work in last week primary job 12 month recall" +* + + +*<_wmonths_year_> + gen wmonths_year = . + label var wmonths_year "Months of work in past 12 months primary job 12 month recall" +* + + +*<_wage_total_year_> + gen wage_total_year = . + label var wage_total_year "Annualized total wage primary job 12 month recall" +* + + +*<_contract_year_> + gen byte contract_year = . + label var contract_year "Employment has contract primary job 12 month recall" + la de lblcontract_year 0 "Without contract" 1 "With contract" + label values contract_year lblcontract_year +* + + +*<_healthins_year_> + gen byte healthins_year = . + label var healthins_year "Employment has health insurance primary job 12 month recall" + la de lblhealthins_year 0 "Without health insurance" 1 "With health insurance" + label values healthins_year lblhealthins_year +* + + +*<_socialsec_year_> + gen byte socialsec_year = . + label var socialsec_year "Employment has social security insurance primary job 7 day recall" + la de lblsocialsec_year 1 "With social security" 0 "Without social secturity" + label values socialsec_year lblsocialsec_year +* + + +*<_union_year_> + gen byte union_year = . + label var union_year "Union membership at primary job 12 month recall" + la de lblunion_year 0 "Not union member" 1 "Union member" + label values union_year lblunion_year +* + + +*<_firmsize_l_year_> + gen firmsize_l_year = . + label var firmsize_l_year "Firm size (lower bracket) primary job 12 month recall" +* + + +*<_firmsize_u_year_> + gen firmsize_u_year = . + label var firmsize_u_year "Firm size (upper bracket) primary job 12 month recall" +* + +} + + +*----------8.8: 12 month reference secondary job------------------------------* + +{ + +*<_empstat_2_year_> + gen byte empstat_2_year = . + label var empstat_2_year "Employment status during past week secondary job 12 month recall" + label values empstat_2_year lblempstat_year +* + + +*<_ocusec_2_year_> + gen byte ocusec_2_year = . + label var ocusec_2_year "Sector of activity secondary job 12 month recall" + la de lblocusec_2_year 1 "Public Sector, Central Government, Army" 2 "Private, NGO" 3 "State owned" 4 "Public or State-owned, but cannot distinguish" + label values ocusec_2_year lblocusec_2_year +* + + + +*<_industry_orig_2_year_> + gen industry_orig_2_year = . + label var industry_orig_2_year "Original survey industry code, secondary job 12 month recall" +* + + + +*<_industrycat_isic_2_year_> + gen industrycat_isic_2_year = . + label var industrycat_isic_2_year "ISIC code of secondary job 12 month recall" +* + + +*<_industrycat10_2_year_> + gen byte industrycat10_2_year = . + label var industrycat10_2_year "1 digit industry classification, secondary job 12 month recall" + label values industrycat10_2_year lblindustrycat10_year +* + + +*<_industrycat4_2_year_> + gen byte industrycat4_2_year=industrycat10_2_year + recode industrycat4_2_year (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4_2_year "Broad Economic Activities classification, secondary job 12 month recall" + label values industrycat4_2_year lblindustrycat4_year +* + + +*<_occup_orig_2_year_> + gen occup_orig_2_year = . + label var occup_orig_2_year "Original occupation record secondary job 12 month recall" +* + + +*<_occup_isco_2_year_> + gen occup_isco_2_year = "" + label var occup_isco_2_year "ISCO code of secondary job 12 month recall" +* + + +*<_occup_2_year_> + gen byte occup_2_year = . + label var occup_2_year "1 digit occupational classification, secondary job 12 month recall" + label values occup_2_year lbloccup_year +* + + +*<_occup_skill_2_year_> + gen occup_skill_2_year = . + replace occup_skill_2_year = 3 if inrange(occup_2_year, 1, 3) + replace occup_skill_2_year = 2 if inrange(occup_2_year, 4, 8) + replace occup_skill_2_year = 1 if occup_2_year == 9 + la de lblskilly2 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill_2_year lblskilly2 + label var occup_skill_2_year "Skill based on ISCO standard secondary job 12 month recall" +* + + +*<_wage_no_compen_2_year_> + gen double wage_no_compen_2_year = . + label var wage_no_compen_2_year "Last wage payment secondary job 12 month recall" +* + + +*<_unitwage_2_year_> + gen byte unitwage_2_year = . + label var unitwage_2_year "Last wages' time unit secondary job 12 month recall" + label values unitwage_2_year lblunitwage_year +* + + +*<_whours_2_year_> + gen whours_2_year = . + label var whours_2_year "Hours of work in last week secondary job 12 month recall" +* + + +*<_wmonths_2_year_> + gen wmonths_2_year = . + label var wmonths_2_year "Months of work in past 12 months secondary job 12 month recall" +* + + +*<_wage_total_2_year_> + gen wage_total_2_year = . + label var wage_total_2_year "Annualized total wage secondary job 12 month recall" +* + +*<_firmsize_l_2_year_> + gen firmsize_l_2_year = . + label var firmsize_l_2_year "Firm size (lower bracket) secondary job 12 month recall" +* + + +*<_firmsize_u_2_year_> + gen firmsize_u_2_year = . + label var firmsize_u_2_year "Firm size (upper bracket) secondary job 12 month recall" +* + +} + + +*----------8.9: 12 month reference additional jobs------------------------------* + + +*<_t_hours_others_year_> + gen t_hours_others_year = . + label var t_hours_others_year "Annualized hours worked in all but primary and secondary jobs 12 month recall" +* + +*<_t_wage_nocompen_others_year_> + gen t_wage_nocompen_others_year = . + label var t_wage_nocompen_others_year "Annualized wage in all but 1st & 2nd jobs excl. bonuses, etc. 12 month recall" +* + +*<_t_wage_others_year_> + gen t_wage_others_year = . + label var t_wage_others_year "Annualized wage in all but primary and secondary jobs 12 month recall" +* + + +*----------8.10: 12 month total summary------------------------------* + + +*<_t_hours_total_year_> + gen t_hours_total_year = . + label var t_hours_total_year "Annualized hours worked in all jobs 12 month month recall" +* + + +*<_t_wage_nocompen_total_year_> + gen t_wage_nocompen_total_year = . + label var t_wage_nocompen_total_year "Annualized wage in all jobs excl. bonuses, etc. 12 month recall" +* + + +*<_t_wage_total_year_> + gen t_wage_total_year = . + label var t_wage_total_year "Annualized total wage for all jobs 12 month recall" +* + + +*----------8.11: Overall across reference periods------------------------------* + + +*<_njobs_> + gen njobs = . + label var njobs "Total number of jobs" +* + + +*<_t_hours_annual_> + gen t_hours_annual = . + label var t_hours_annual "Total hours worked in all jobs in the previous 12 months" +* + + +*<_linc_nc_> + gen linc_nc = . + label var linc_nc "Total annual wage income in all jobs, excl. bonuses, etc." +* + + +*<_laborincome_> + gen laborincome = t_wage_total_year + label var laborincome "Total annual individual labor income in all jobs, incl. bonuses, etc." +* + + +*----------8.13: Labour cleanup------------------------------* + +{ +*<_% Correction min age_> + +** Drop info for cases under the age for which questions to be asked (do not need a variable for this) + local lab_var "minlaborage lstatus nlfreason unempldur_l unempldur_u empstat ocusec industry_orig industrycat_isic industrycat10 industrycat4 occup_orig occup_isco occup_skill occup wage_no_compen unitwage whours wmonths wage_total contract healthins socialsec union firmsize_l firmsize_u empstat_2 ocusec_2 industry_orig_2 industrycat_isic_2 industrycat10_2 industrycat4_2 occup_orig_2 occup_isco_2 occup_skill_2 occup_2 wage_no_compen_2 unitwage_2 whours_2 wmonths_2 wage_total_2 firmsize_l_2 firmsize_u_2 t_hours_others t_wage_nocompen_others t_wage_others t_hours_total t_wage_nocompen_total t_wage_total lstatus_year nlfreason_year unempldur_l_year unempldur_u_year empstat_year ocusec_year industry_orig_year industrycat_isic_year industrycat10_year industrycat4_year occup_orig_year occup_isco_year occup_skill_year occup_year unitwage_year whours_year wmonths_year wage_total_year contract_year healthins_year socialsec_year union_year firmsize_l_year firmsize_u_year empstat_2_year ocusec_2_year industry_orig_2_year industrycat_isic_2_year industrycat10_2_year industrycat4_2_year occup_orig_2_year occup_isco_2_year occup_skill_2_year occup_2_year wage_no_compen_2_year unitwage_2_year whours_2_year wmonths_2_year wage_total_2_year firmsize_l_2_year firmsize_u_2_year t_hours_others_year t_wage_nocompen_others_year t_wage_others_year t_hours_total_year t_wage_nocompen_total_year t_wage_total_year njobs t_hours_annual linc_nc laborincome" + + foreach v of local lab_var { + cap confirm numeric variable `v' + if _rc == 0 { // is indeed numeric + replace `v'=. if ( age < minlaborage & !missing(age) ) + } + else { // is not + replace `v'= "" if ( age < minlaborage & !missing(age) ) + } + + } + +* +} + + +/*%%============================================================================================= + 9: Final steps +==============================================================================================%%*/ + +quietly{ + +*<_% KEEP VARIABLES - ALL_> + + keep countrycode survname survey icls_v isced_version isco_version isic_version year vermast veralt harmonization int_year int_month hhid pid weight weight_m weight_q psu ssu strata wave panel visit_no urban subnatid1 subnatid2 subnatid3 subnatidsurvey subnatid1_prev subnatid2_prev subnatid3_prev gaul_adm1_code gaul_adm2_code gaul_adm3_code hsize age male relationharm relationcs marital eye_dsablty hear_dsablty walk_dsablty conc_dsord slfcre_dsablty comm_dsablty migrated_mod_age migrated_ref_time migrated_binary migrated_years migrated_from_urban migrated_from_cat migrated_from_code migrated_from_country migrated_reason ed_mod_age school literacy educy educat7 educat5 educat4 educat_orig educat_isced vocational vocational_type vocational_length_l vocational_length_u vocational_field_orig vocational_financed minlaborage lstatus potential_lf underemployment nlfreason unempldur_l unempldur_u empstat ocusec industry_orig industrycat_isic industrycat10 industrycat4 occup_orig occup_isco occup_skill occup wage_no_compen unitwage whours wmonths wage_total contract healthins socialsec union firmsize_l firmsize_u empstat_2 ocusec_2 industry_orig_2 industrycat_isic_2 industrycat10_2 industrycat4_2 occup_orig_2 occup_isco_2 occup_skill_2 occup_2 wage_no_compen_2 unitwage_2 whours_2 wmonths_2 wage_total_2 firmsize_l_2 firmsize_u_2 t_hours_others t_wage_nocompen_others t_wage_others t_hours_total t_wage_nocompen_total t_wage_total lstatus_year potential_lf_year underemployment_year nlfreason_year unempldur_l_year unempldur_u_year empstat_year ocusec_year industry_orig_year industrycat_isic_year industrycat10_year industrycat4_year occup_orig_year occup_isco_year occup_skill_year occup_year wage_no_compen_year unitwage_year whours_year wmonths_year wage_total_year contract_year healthins_year socialsec_year union_year firmsize_l_year firmsize_u_year empstat_2_year ocusec_2_year industry_orig_2_year industrycat_isic_2_year industrycat10_2_year industrycat4_2_year occup_orig_2_year occup_isco_2_year occup_skill_2_year occup_2_year wage_no_compen_2_year unitwage_2_year whours_2_year wmonths_2_year wage_total_2_year firmsize_l_2_year firmsize_u_2_year t_hours_others_year t_wage_nocompen_others_year t_wage_others_year t_hours_total_year t_wage_nocompen_total_year t_wage_total_year njobs t_hours_annual linc_nc laborincome + +* + +*<_% ORDER VARIABLES_> + + order countrycode survname survey icls_v isced_version isco_version isic_version year vermast veralt harmonization int_year int_month hhid pid weight weight_m weight_q psu ssu strata wave panel visit_no urban subnatid1 subnatid2 subnatid3 subnatidsurvey subnatid1_prev subnatid2_prev subnatid3_prev gaul_adm1_code gaul_adm2_code gaul_adm3_code hsize age male relationharm relationcs marital eye_dsablty hear_dsablty walk_dsablty conc_dsord slfcre_dsablty comm_dsablty migrated_mod_age migrated_ref_time migrated_binary migrated_years migrated_from_urban migrated_from_cat migrated_from_code migrated_from_country migrated_reason ed_mod_age school literacy educy educat7 educat5 educat4 educat_orig educat_isced vocational vocational_type vocational_length_l vocational_length_u vocational_field_orig vocational_financed minlaborage lstatus potential_lf underemployment nlfreason unempldur_l unempldur_u empstat ocusec industry_orig industrycat_isic industrycat10 industrycat4 occup_orig occup_isco occup_skill occup wage_no_compen unitwage whours wmonths wage_total contract healthins socialsec union firmsize_l firmsize_u empstat_2 ocusec_2 industry_orig_2 industrycat_isic_2 industrycat10_2 industrycat4_2 occup_orig_2 occup_isco_2 occup_skill_2 occup_2 wage_no_compen_2 unitwage_2 whours_2 wmonths_2 wage_total_2 firmsize_l_2 firmsize_u_2 t_hours_others t_wage_nocompen_others t_wage_others t_hours_total t_wage_nocompen_total t_wage_total lstatus_year potential_lf_year underemployment_year nlfreason_year unempldur_l_year unempldur_u_year empstat_year ocusec_year industry_orig_year industrycat_isic_year industrycat10_year industrycat4_year occup_orig_year occup_isco_year occup_skill_year occup_year wage_no_compen_year unitwage_year whours_year wmonths_year wage_total_year contract_year healthins_year socialsec_year union_year firmsize_l_year firmsize_u_year empstat_2_year ocusec_2_year industry_orig_2_year industrycat_isic_2_year industrycat10_2_year industrycat4_2_year occup_orig_2_year occup_isco_2_year occup_skill_2_year occup_2_year wage_no_compen_2_year unitwage_2_year whours_2_year wmonths_2_year wage_total_2_year firmsize_l_2_year firmsize_u_2_year t_hours_others_year t_wage_nocompen_others_year t_wage_others_year t_hours_total_year t_wage_nocompen_total_year t_wage_total_year njobs t_hours_annual linc_nc laborincome + +* + +*<_% DROP UNUSED LABELS_> + + * Store all labels in data + label dir + local all_lab `r(names)' + + * Store all variables with a label, extract value label names + local used_lab = "" + ds, has(vallabel) + + local labelled_vars `r(varlist)' + + foreach varName of local labelled_vars { + local y : value label `varName' + local used_lab `"`used_lab' `y'"' + } + + * Compare lists, `notused' is list of labels in directory but not used in final variables + local notused : list all_lab - used_lab // local `notused' defines value labs not in remaining vars + local notused_len : list sizeof notused // store size of local + + * drop labels if the length of the notused vector is 1 or greater, otherwise nothing to drop + if `notused_len' >= 1 { + label drop `notused' + } + else { + di "There are no unused labels to drop. No value labels dropped." + } + + +* + +} + + +*<_% DELETE MISSING VARIABLES_> + +quietly: describe, varlist +local kept_vars `r(varlist)' + +foreach var of local kept_vars { + capture assert missing(`var') + if !_rc drop `var' +} + +* + + +*<_% COMPRESS_> + +compress + +* + + +*<_% SAVE_> + +save "`path_output'/`out_file'", replace + +* diff --git a/GLD/ARM/ARM_2012_ILCS/ARM_2012_ILCS_V01_M_V01_A_GLD/Programs/ARM_2012_ILCS_V01_M_V01_A_GLD_ALL.do b/GLD/ARM/ARM_2012_ILCS/ARM_2012_ILCS_V01_M_V01_A_GLD/Programs/ARM_2012_ILCS_V01_M_V01_A_GLD_ALL.do new file mode 100644 index 000000000..368a0bdbc --- /dev/null +++ b/GLD/ARM/ARM_2012_ILCS/ARM_2012_ILCS_V01_M_V01_A_GLD/Programs/ARM_2012_ILCS_V01_M_V01_A_GLD_ALL.do @@ -0,0 +1,1818 @@ + +/*%%============================================================================================= + 0: GLD Harmonization Preamble +==============================================================================================%%*/ + +/* ----------------------------------------------------------------------- + +<_Program name_> ARM_2012_ILCS_V01_M_V01_A_GLD_ALL.do +<_Application_> Stata 18 <_Application_> +<_Author(s)_> World Bank Jobs Group (gld@worldbank.org) +<_Date created_> 2024-09-11 + +------------------------------------------------------------------------- + +<_Country_> Armenia +<_Survey Title_> Integrated Living Conditions Survey +<_Survey Year_> 2012 +<_Study ID_> https://microdatalib.worldbank.org/index.php/catalog/2615 +<_Data collection from_> [MM/YYYY] +<_Data collection to_> [MM/YYYY] +<_Source of dataset_> [Source of data, e.g. NSO] +<_Sample size (HH)_> [#] +<_Sample size (IND)_> [#] +<_Sampling method_> [Brief description] +<_Geographic coverage_> [To what level is data significant] +<_Currency_> [Currency used for wages] + +----------------------------------------------------------------------- + +<_ICLS Version_> [Version of ICLS for Labor Questions] +<_ISCED Version_> [Version of ICLS for Labor Questions] +<_ISCO Version_> [Version of ICLS for Labor Questions] +<_OCCUP National_> [Version of ICLS for Labor Questions] +<_ISIC Version_> [Version of ICLS for Labor Questions] +<_INDUS National_> [Version of ICLS for Labor Questions] + +----------------------------------------------------------------------- +<_Version Control_> + +* Date: [YYYY-MM-DD] - [Description of changes] +* Date: [YYYY-MM-DD] - [Description of changes] + + + +-------------------------------------------------------------------------*/ + + +/*%%============================================================================================= + 1: Setting up of program environment, dataset +==============================================================================================%%*/ + +*----------1.1: Initial commands------------------------------* + +clear +set more off +set mem 800m +set varabbrev off + +*----------1.2: Set directories------------------------------* + +* Define path sections +local server "Y:/GLD-Harmonization/529026_MG/Countries" +local country "ARM" +local year "2012" +local survey "ILCS" +local vermast "V01" +local veralt "V01" + +* From the definitions, set path chunks +local level_1 "`country'_`year'_`survey'" +local level_2_mast "`level_1'_`vermast'_M" +local level_2_harm "`level_1'_`vermast'_M_`veralt'_A_GLD" + +* From chunks, define path_in, path_output folder +local path_in_stata "`server'/`country'/`level_1'/`level_2_mast'/Data/Stata" +local path_in_other "`server'/`country'/`level_1'/`level_2_mast'/Data/Original" +local path_output "`server'/`country'/`level_1'/`level_2_harm'/Data/Harmonized" + +* Define Output file name +local out_file "`level_2_harm'_ALL.dta" + +*----------1.3: Database assembly------------------------------* + +* All steps necessary to merge datasets (if several) to have all elements needed to produce +* harmonized output in a single file + +* Check whether there is a weight file +local has_wf = fileexists("`path_in_stata/weight.dta'") + +* Start with HH +use "`path_in_stata'/hh.dta" + +* If there is a weight file, merge it in +if `has_wf' { + merge 1:1 recno using "`path_in_stata/weight.dta'", assert(match) nogen +} + +* Add member roster +merge 1:m recno using "`path_in_stata'/mem.dta", assert(match) nogen + +* Add employment section +merge 1:1 recno memnum using "`path_in_stata'/d1", assert(match master) nogen + +* Add number labels +numlabel, add force + +/*%%============================================================================================= + 2: Survey & ID +==============================================================================================%%*/ + +{ + +*<_countrycode_> + gen str4 countrycode = "ARM" + label var countrycode "Country code" +* + + +*<_survname_> + gen survname = "ILCS" + label var survname "Survey acronym" +* + + +*<_survey_> + gen survey = "GLD" + label var survey "Survey type" +* + + +*<_icls_v_> + gen icls_v = "ICLS-13" + label var icls_v "ICLS version underlying questionnaire questions" +* + + +*<_isced_version_> + gen isced_version = "" + label var isced_version "Version of ISCED used for educat_isced" +* + + +*<_isco_version_> + gen isco_version = "" + label var isco_version "Version of ISCO used" +* + + +*<_isic_version_> + gen isic_version = "isic_4" + label var isic_version "Version of ISIC used" +* + + +*<_year_> + gen int year = 2012 + label var year "Year of survey" +* + + +*<_vermast_> + gen vermast = "`vermast'" + label var vermast "Version of master data" +* + + +*<_veralt_> + gen veralt = "`veralt'" + label var veralt "Version of the alt/harmonized data" +* + + +*<_harmonization_> + gen harmonization = "GLD" + label var harmonization "Type of harmonization" +* + + +*<_int_year_> + gen int_year= 2012 + label var int_year "Year of the interview" +* + + +*<_int_month_> + gen int_month = date + label de lblint_month 1 "January" 2 "February" 3 "March" 4 "April" 5 "May" 6 "June" 7 "July" 8 "August" 9 "September" 10 "October" 11 "November" 12 "December" + label value int_month lblint_month + label var int_month "Month of the interview" +* + + +*<_hhid_> +/* <_hhid_note> + + Values are 1-5184 running. Would have preferred making it a string with 0001 to 5184, but leave as is since + GMD has it this way. For PID concatenate this with 01-12 but leave as is. + + */ + gen hhid = recno + label var hhid "Household ID" +* + + +*<_pid_> + gen pid = memnum + label var pid "Individual ID" +* + + +*<_weight_> + *gen weight = . + label var weight "Survey sampling weight" +* + + +*<_weight_m_> + gen weight_m = . + label var weight_m "Survey sampling weight to obtain national estimates for each month" +* + + +*<_weight_q_> + gen weight_q = . + label var weight_q "Survey sampling weight to obtain national estimates for each quarter" +* + + +*<_psu_> + +/* <_psu_note> + + We have (at the moment) no documentation on 2012. The variable PSU only has 9 distinct values, roughtly equal + (each number is ~2,200). If you look at the start (list in 1/20) you can see it aligns with the households + (where recno's 1 to 9 are equal to psu, then with recno's 10-18 it is 1-9 again and so forth). It further + aligns with the weights (that is, a block of PSUs has a different weight). It thus seems that PSU does not + directly denote the PSU but rather the numbering of the HHs within the PSU (where 9 HHs are interviewed per + PSU). In 2009, when we do have an accurate PSU (and a methodology text to confirm this) they had always 8 HHs + per PSU. It seems most plausible that this is the case. hence we use the ordering to create a PSU + + */ + + * Sort by recno and memnum (as data is in file already, just in case) to have the order of 9 households/block + rename psu PSU + sort recno memnum + + * Generate a new variable to identify PSUs + gen psu = . + + * Initialize the block counter + local psu_counter = 0 + + * Loop through the data to identify the start of each block + forvalues i = 1/`=_N' { + if PSU[`i'] == 1 & (PSU[`i'-1] != 1 | `i' == 1) { + local psu_counter = `psu_counter' + 1 + } + quietly : replace psu = `psu_counter' if _n == `i' + } + + label var psu "Primary sampling units" +* + + +*<_ssu_> + gen ssu = . + label var ssu "Secondary sampling units" +* + + +*<_strata_> + gen strata = recno + label var strata "Strata" +* + + +*<_wave_> + gen wave = . + label var wave "Survey wave" +* + + +*<_panel_> + gen panel = "" + label var panel "Panel individual belongs to" +* + + +*<_visit_no_> + gen visit_no = . + label var visit_no "Visit number in panel" +* + +} + + +/*%%============================================================================================= + 3: Geography +==============================================================================================%%*/ + +{ + +*<_urban_> + * typev is 0 if Yerevan, 1 if urban (other), rural is 2 + gen byte urban = inrange(typev, 0,1) + replace urban = 0 if typev == 2 + label var urban "Location is urban" + la de lblurban 1 "Urban" 0 "Rural" + label values urban lblurban +* + + +*<_subnatid1_> +/* <_subnatid1_note> + + The variable is string and country-specific categorical. Numeric entries are coded in string format using the following naming convention: "1 – Hatay". That is, the variable itself is to be string, not a labelled numeric vector. + + Example of entries would be "1 - Alaska", "2 - Arkansas", ... + + */ + gen str subnatid1 = "" + replace subnatid1 = "1 - Yerevan" if marz == 1 + replace subnatid1 = "2 - Aragatsotn" if marz == 2 + replace subnatid1 = "3 - Ararat" if marz == 3 + replace subnatid1 = "4 - Armavir" if marz == 4 + replace subnatid1 = "5 - Gegharkunik" if marz == 5 + replace subnatid1 = "6 - Lori" if marz == 6 + replace subnatid1 = "7 - Kotayk" if marz == 7 + replace subnatid1 = "8 - Shirak" if marz == 8 + replace subnatid1 = "9 - Syunik" if marz == 9 + replace subnatid1 = "10 - Vayoc Dzor" if marz == 10 + replace subnatid1 = "11 - Tavush" if marz == 11 +* + + +*<_subnatid2_> + gen str subnatid2 = "" + label var subnatid2 "Subnational ID at Second Administrative Level" +* + + +*<_subnatid3_> + gen str subnatid3 = "" + label var subnatid3 "Subnational ID at Third Administrative Level" +* + + +*<_subnatidsurvey_> +/* <_subnatidsurvey_note> + + Variable denoting lowest administrative info to which the survey is still significat. + See entry in GLD Guidelines (https://github.com/worldbank/gld/blob/main/Support/A%20-%20Guides%20and%20Documentation/GLD_1.0_Guidelines.docx) for more details + + */ + decode urban, generate(helper) + generate subnatidsurvey = string(urban) + " - " + helper + drop helper + label var subnatidsurvey "Administrative level at which survey is representative" +* + + +*<_subnatid1_prev_> +/* <_subnatid1_prev_note> + + subnatid1_prev is coded as missing unless the classification used for subnatid1 has changed since the previous survey. + + */ + gen subnatid1_prev = . + label var subnatid1_prev "Classification used for subnatid1 from previous survey" +* + + +*<_subnatid2_prev_> + gen subnatid2_prev = . + label var subnatid2_prev "Classification used for subnatid2 from previous survey" +* + + +*<_subnatid3_prev_> + gen subnatid3_prev = . + label var subnatid3_prev "Classification used for subnatid3 from previous survey" +* + + +*<_gaul_adm1_code_> + gen gaul_adm1_code = . + label var gaul_adm1_code "Global Administrative Unit Layers (GAUL) Admin 1 code" +* + + +*<_gaul_adm2_code_> + gen gaul_adm2_code = . + label var gaul_adm2_code "Global Administrative Unit Layers (GAUL) Admin 2 code" +* + + +*<_gaul_adm3_code_> + gen gaul_adm3_code = . + label var gaul_adm3_code "Global Administrative Unit Layers (GAUL) Admin 3 code" +* + +} + + +/*%%============================================================================================= + 4: Demography +==============================================================================================%%*/ + +{ + +*<_hsize_> + * If keep all + gen hsize = members + /* * If drop absentees + gen helper = 1 + egen hh_abs_no = total(helper), by(recno) + replace hsize = hsize - hh_abs_no + drop helper hh_abs_no + */ + label var hsize "Household size" +* + + + +*<_age_> + * Already in there + *gen age = . + label var age "Individual age" +* + + +*<_male_> + gen male = a1_1 + recode male (2 = 0) + label var male "Sex - Ind is male" + la de lblmale 1 "Male" 0 "Female" + label values male lblmale +* + + +*<_relationharm_> + gen relationharm = a1_2 + recode relationharm (4 = 3) (6 = 4) (7 = 5) (8 = 6) + label var relationharm "Relationship to the head of household - Harmonized" + la de lblrelationharm 1 "Head of household" 2 "Spouse" 3 "Children" 4 "Parents" 5 "Other relatives" 6 "Other and non-relatives" + label values relationharm lblrelationharm +* + + +*<_relationcs_> + clonevar relationcs = a1_2 + label var relationcs "Relationship to the head of household - Country original" +* + + +*<_marital_> + gen byte marital = a1_5 + recode marital (3 = 5) (5 = 3) + label var marital "Marital status" + la de lblmarital 1 "Married" 2 "Never Married" 3 "Living together" 4 "Divorced/Separated" 5 "Widowed" + label values marital lblmarital +* + + +*<_eye_dsablty_> + gen eye_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all" + label values eye_dsablty dsablty + label var eye_dsablty "Disability related to eyesight" +* + + +*<_hear_dsablty_> + gen hear_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values hear_dsablty dsablty + label var hear_dsablty "Disability related to hearing" +* + + +*<_walk_dsablty_> + gen walk_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values walk_dsablty dsablty + label var walk_dsablty "Disability related to walking or climbing stairs" +* + + +*<_conc_dsord_> + gen conc_dsord = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values conc_dsord dsablty + label var conc_dsord "Disability related to concentration or remembering" +* + + +*<_slfcre_dsablty_> + gen slfcre_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values slfcre_dsablty dsablty + label var slfcre_dsablty "Disability related to selfcare" +* + + +*<_comm_dsablty_> + gen comm_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values comm_dsablty dsablty + label var comm_dsablty "Disability related to communicating" +* + +} + + +/*%%============================================================================================= + 5: Migration +==============================================================================================%%*/ + + +{ + +* Migration is not done as it is much more narrowly defined as migrated and returned. Thus anyone who +* migrated from their home town to the capital city would not be included. + + +*<_migrated_mod_age_> + gen migrated_mod_age = . + label var migrated_mod_age "Migration module application age" +* + + +*<_migrated_ref_time_> + gen migrated_ref_time = . + label var migrated_ref_time "Reference time applied to migration questions (in years)" +* + + +*<_migrated_binary_> + gen migrated_binary = . + label de lblmigrated_binary 0 "No" 1 "Yes" + label values migrated_binary lblmigrated_binary + label var migrated_binary "Individual has migrated" +* + + +*<_migrated_years_> + gen migrated_years = . + label var migrated_years "Years since latest migration" +* + + +*<_migrated_from_urban_> + gen migrated_from_urban = . + label de lblmigrated_from_urban 0 "Rural" 1 "Urban" + label values migrated_from_urban lblmigrated_from_urban + label var migrated_from_urban "Migrated from area" +* + + +*<_migrated_from_cat_> + gen migrated_from_cat = . + label de lblmigrated_from_cat 1 "From same admin3 area" 2 "From same admin2 area" 3 "From same admin1 area" 4 "From other admin1 area" 5 "From other country" + label values migrated_from_cat lblmigrated_from_cat + label var migrated_from_cat "Category of migration area" +* + + +*<_migrated_from_code_> + gen migrated_from_code = . + *label de lblmigrated_from_code + *label values migrated_from_code lblmigrated_from_code + label var migrated_from_code "Code of migration area as subnatid level of migrated_from_cat" +* + + +*<_migrated_from_country_> + gen migrated_from_country = . + label var migrated_from_country "Code of migration country (ISO 3 Letter Code)" +* + + +*<_migrated_reason_> + gen migrated_reason = . + label de lblmigrated_reason 1 "Family reasons" 2 "Educational reasons" 3 "Employment" 4 "Forced (political reasons, natural disaster, …)" 5 "Other reasons" + label values migrated_reason lblmigrated_reason + label var migrated_reason "Reason for migrating" +* + + +} + + +/*%%============================================================================================= + 6: Education +==============================================================================================%%*/ + + +{ + +*<_ed_mod_age_> + +/* <_ed_mod_age_note> + +Education module is only asked to those XX and older. + + */ + +gen byte ed_mod_age = 6 +label var ed_mod_age "Education module application age" + +* + +*<_school_> + gen byte school = 0 + replace school = 1 if e2_7 == 1 + label var school "Attending school" + la de lblschool 0 "No" 1 "Yes" + label values school lblschool +* + + +*<_literacy_> + gen byte literacy = 1 + replace literacy = 0 if e2_2 == 0 + replace literacy = . if mi(e2_2) + label var literacy "Individual can read & write" + la de lblliteracy 0 "No" 1 "Yes" + label values literacy lblliteracy +* + + +*<_educy_> + * Number of years is a combination of level (e2_2) and years in that course (e2_3) + gen byte educy =. + replace educy = 0 if e2_2 == 0 + replace educy = e2_3 if e2_2 == 1 & inrange(e2_3,0,4) + replace educy = 4 + e2_3 if e2_2 == 2 & inrange(e2_3,0,5) + replace educy = 9 + e2_3 if e2_2 == 3 & inrange(e2_3,0,3) + replace educy = 9 + e2_3 if e2_2 == 4 & inrange(e2_3,0,2) + replace educy = 9 + e2_3 if e2_2 == 5 & inrange(e2_3,0,5) + replace educy = 12 + e2_3 if e2_2 == 6 & inrange(e2_3,0,7) + replace educy = 16 + e2_3 if e2_2 == 7 & inrange(e2_3,0,4) + label var educy "Years of education" +* + + +*<_educat7_> + gen byte educat7 =. + replace educat7 = 1 if e2_2 == 0 + replace educat7 = 2 if e2_2 == 1 & e2_3 < 4 + replace educat7 = 3 if e2_2 == 1 & e2_3 == 4 + replace educat7 = 4 if e2_2 == 2 + replace educat7 = 5 if inrange(e2_2, 3, 4) + replace educat7 = 6 if e2_2 == 5 + replace educat7 = 7 if inrange(e2_2, 6, 7) + label var educat7 "Level of education 1" + la de lbleducat7 1 "No education" 2 "Primary incomplete" 3 "Primary complete" 4 "Secondary incomplete" 5 "Secondary complete" 6 "Higher than secondary but not university" 7 "University incomplete or complete", replace + label values educat7 lbleducat7 +* + + +*<_educat5_> + gen byte educat5 = educat7 + recode educat5 4=3 5=4 6 7=5 + label var educat5 "Level of education 2" + la de lbleducat5 1 "No education" 2 "Primary incomplete" 3 "Primary complete but secondary incomplete" 4 "Secondary complete" 5 "Some tertiary/post-secondary" + label values educat5 lbleducat5 +* + + +*<_educat4_> + gen byte educat4 = educat7 + recode educat4 (2 3 4 = 2) (5=3) (6 7=4) + label var educat4 "Level of education 3" + la de lbleducat4 1 "No education" 2 "Primary" 3 "Secondary" 4 "Post-secondary" + label values educat4 lbleducat4 +* + + +*<_educat_orig_> + clonevar educat_orig = e2_2 + label var educat_orig "Original survey education code" +* + + +*<_educat_isced_> + gen educat_isced = . + label var educat_isced "ISCED standardised level of education" +* + + +*----------6.1: Education cleanup------------------------------* + +*<_% Correction min age_> + +** Drop info for cases under the age for which questions to be asked (do not need a variable for this) +local ed_var "school literacy educy educat7 educat5 educat4 educat_orig educat_isced" + +foreach v of local ed_var { + cap confirm numeric variable `v' + if _rc == 0 { // is indeed numeric + replace `v'=. if ( age < ed_mod_age & !missing(age) ) + } + else { // is not + replace `v'= "" if ( age < ed_mod_age & !missing(age) ) + } +} + + +* + + +} + + +/*%%============================================================================================= + 7: Training +==============================================================================================%%*/ + + +{ + +*<_vocational_> + gen vocational = . + label de lblvocational 0 "No" 1 "Yes" + label var vocational "Ever received vocational training" +* + + +*<_vocational_type_> + gen vocational_type = . + label de lblvocational_type 1 "Inside Enterprise" 2 "External" + label values vocational_type lblvocational_type + label var vocational_type "Type of vocational training" +* + + +*<_vocational_length_l_> + gen vocational_length_l = . + label var vocational_length_l "Length of training in months, lower limit" +* + + +*<_vocational_length_u_> + gen vocational_length_u = . + label var vocational_length_u "Length of training in months, upper limit" +* + + +*<_vocational_field_orig_> + gen str vocational_field_orig = "" + label var vocational_field_orig "Original field of training information" +* + + +*<_vocational_financed_> + gen vocational_financed = . + label de lblvocational_financed 1 "Employer" 2 "Government" 3 "Mixed Employer/Government" 4 "Own funds" 5 "Other" + label var vocational_financed "How training was financed" +* + +} + + +/*%%============================================================================================= + 8: Labour +==============================================================================================%%*/ + + +*<_minlaborage_> + gen byte minlaborage = 15 + label var minlaborage "Labor module application age" +* + + +*----------8.1: 7 day reference overall------------------------------* + +{ + +*<_lstatus_> + + * Logic is either have a job (yes to D1_1a) or returning (D1_2a) + * However the returning is subject to reasons (D1_3a) that are not + * a skip pattern but upon probing of the enumerator + * The below tab shows that some go to main job, others don't + * tab d1_3a d1_4a,m + gen byte lstatus = 1 if !mi(d1_4a) + + * For unemployed we need looking for a job (d2_5) and willing to accept (d2_10) + * Ensured all who looked answer the willing question + count if inrange(d2_5,1,2) & mi(d2_10) + assert `r(N)' == 0 + replace lstatus = 2 if lstatus == . & inrange(d2_5, 1, 2) & d2_10 == 1 + + * Normally, I would set all others to NLF, but given that we have the absentees, assign only to no in d2_5 + replace lstatus = 3 if lstatus == . & d2_5 == 3 + replace lstatus = 3 if lstatus == . & inrange(d2_5, 1, 2) & d2_10 == 2 + + replace lstatus = . if age < minlaborage + label var lstatus "Labor status" + la de lbllstatus 1 "Employed" 2 "Unemployed" 3 "Non-LF" + label values lstatus lbllstatus +* + + +*<_potential_lf_> + gen byte potential_lf = 0 + * Either not looking but would accept or looking but would not accept + replace potential_lf = 1 if (d2_5 == 3 & d2_10 == 1) | (inrange(d2_5,1,2) & d2_10 == 2) + replace potential_lf = . if age < minlaborage & age != . + replace potential_lf = . if lstatus != 3 + label var potential_lf "Potential labour force status" + la de lblpotential_lf 0 "No" 1 "Yes" + label values potential_lf lblpotential_lf +* + + +*<_underemployment_> + gen byte underemployment = 0 + replace underemployment = 1 if d1_24a == 7 + replace underemployment = . if age < minlaborage & age != . + replace underemployment = . if lstatus != 1 + label var underemployment "Underemployment status" + la de lblunderemployment 0 "No" 1 "Yes" + label values underemployment lblunderemployment +* + + +*<_nlfreason_> + gen byte nlfreason=. + label var nlfreason "Reason not in the labor force" + la de lblnlfreason 1 "Student" 2 "Housekeeper" 3 "Retired" 4 "Disabled" 5 "Other" + label values nlfreason lblnlfreason +* + + +*<_unempldur_l_> + gen byte unempldur_l=. + replace unempldur_l = 0 if d2_9 == 1 + replace unempldur_l = 1 if d2_9 == 2 + replace unempldur_l = 4 if d2_9 == 3 + replace unempldur_l = 7 if d2_9 == 4 + replace unempldur_l = 13 if d2_9 == 5 + replace unempldur_l = 25 if d2_9 == 6 + replace unempldur_l = 49 if d2_9 == 7 + replace unempldur_l = . if lstatus != 2 + label var unempldur_l "Unemployment duration (months) lower bracket" +* + + +*<_unempldur_u_> + gen byte unempldur_u=. + replace unempldur_u = 1 if d2_9 == 1 + replace unempldur_u = 3 if d2_9 == 2 + replace unempldur_u = 6 if d2_9 == 3 + replace unempldur_u = 12 if d2_9 == 4 + replace unempldur_u = 24 if d2_9 == 5 + replace unempldur_u = 48 if d2_9 == 6 + replace unempldur_u = 999 if d2_9 == 7 + replace unempldur_u = . if lstatus != 2 + label var unempldur_u "Unemployment duration (months) upper bracket" +* +} + + +*----------8.2: 7 day reference main job------------------------------* + + +{ +*<_empstat_> + gen byte empstat = d1_7a + recode empstat (2 3 = 1) (4 = 3) (5 6 8 = 4) (7 = 2) + replace empstat = . if lstatus != 1 + label var empstat "Employment status during past week primary job 7 day recall" + la de lblempstat 1 "Paid employee" 2 "Non-paid employee" 3 "Employer" 4 "Self-employed" 5 "Other, workers not classifiable by status" + label values empstat lblempstat +* + + +*<_ocusec_> + gen byte ocusec = d1_9a + recode ocusec (2 = 1) (3/5 = 2) + replace ocusec = . if lstatus != 1 + label var ocusec "Sector of activity primary job 7 day recall" + la de lblocusec 1 "Public Sector, Central Government, Army" 2 "Private, NGO" 3 "State owned" 4 "Public or State-owned, but cannot distinguish" + label values ocusec lblocusec +* + + +*<_industry_orig_> + gen industry_orig = string(d1_5a, "%02.0f") + replace industry_orig = "" if industry_orig == "." + replace industry_orig = "" if lstatus != 1 + label var industry_orig "Original survey industry code, main job 7 day recall" +* + + +*<_industrycat_isic_> + gen industrycat_isic = industry_orig + "00" if !mi(industry_orig) + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + drop if missing(industrycat_isic) + int_classif_universe, var(industrycat_isic) universe(ISIC) + count + list + *assert `r(N)' == 0 + restore + + label var industrycat_isic "ISIC code of primary job 7 day recall" +* + + +*<_industrycat10_> + gen byte industrycat10 = . + replace industrycat10 = 1 if inrange(industry_orig, "01", "03") + replace industrycat10 = 2 if inrange(industry_orig, "05", "09") + replace industrycat10 = 3 if inrange(industry_orig, "10", "33") + replace industrycat10 = 4 if inrange(industry_orig, "35", "39") + replace industrycat10 = 5 if inrange(industry_orig, "41", "43") + replace industrycat10 = 6 if inrange(industry_orig, "45", "47") | inrange(industry_orig, "55", "56") + replace industrycat10 = 7 if inrange(industry_orig, "49", "53") | inrange(industry_orig, "58", "63") + replace industrycat10 = 8 if inrange(industry_orig, "64", "82") + replace industrycat10 = 9 if inrange(industry_orig, "84", "84") + replace industrycat10 = 10 if inrange(industry_orig, "85", "99") + label var industrycat10 "1 digit industry classification, primary job 7 day recall" + la de lblindustrycat10 1 "Agriculture" 2 "Mining" 3 "Manufacturing" 4 "Public utilities" 5 "Construction" 6 "Commerce" 7 "Transport and Comnunications" 8 "Financial and Business Services" 9 "Public Administration" 10 "Other Services, Unspecified" + label values industrycat10 lblindustrycat10 +* + + +*<_industrycat4_> + gen byte industrycat4 = industrycat10 + recode industrycat4 (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4 "Broad Economic Activities classification, primary job 7 day recall" + la de lblindustrycat4 1 "Agriculture" 2 "Industry" 3 "Services" 4 "Other" + label values industrycat4 lblindustrycat4 +* + + +*<_occup_orig_> + gen occup_orig = . + label var occup_orig "Original occupation record primary job 7 day recall" +* + + + +*<_occup_isco_> + gen occup_isco = "" + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + *drop if missing(occup_isco) + *int_classif_universe, var(occup_isco) universe(ISCO) + count + *list + *assert `r(N)' == 0 + restore + + label var occup_isco "ISCO code of primary job 7 day recall" +* + + +*<_occup_> + gen byte occup = . + label var occup "1 digit occupational classification, primary job 7 day recall" + la de lbloccup 1 "Managers" 2 "Professionals" 3 "Technicians" 4 "Clerks" 5 "Service and market sales workers" 6 "Skilled agricultural" 7 "Craft workers" 8 "Machine operators" 9 "Elementary occupations" 10 "Armed forces" 99 "Others" + label values occup lbloccup +* + + +*<_occup_skill_> + gen occup_skill = . + replace occup_skill = 3 if inrange(occup, 1, 3) + replace occup_skill = 2 if inrange(occup, 4, 8) + replace occup_skill = 1 if occup == 9 + la de lblskill 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill lblskill + label var occup_skill "Skill based on ISCO standard primary job 7 day recall" +* + + +*<_wage_no_compen_> + egen double wage_no_compen = rowtotal(d1_14a d1_16a), missing + replace wage_no_compen = . if lstatus != 1 | empstat == 2 | wage_no_compen == 0 + label var wage_no_compen "Last wage payment primary job 7 day recall" +* + + +*<_unitwage_> + gen byte unitwage = 5 + replace unitwage = . if mi(wage_no_compen) + label var unitwage "Last wages' time unit primary job 7 day recall" + la de lblunitwage 1 "Daily" 2 "Weekly" 3 "Every two weeks" 4 "Bimonthly" 5 "Monthly" 6 "Trimester" 7 "Biannual" 8 "Annually" 9 "Hourly" 10 "Other" + label values unitwage lblunitwage +* + + +*<_whours_> + gen whours = d1_22a + replace whours = . if whours == 0 | lstatus != 1 + label var whours "Hours of work in last week primary job 7 day recall" +* + + +*<_wmonths_> + gen wmonths = . + label var wmonths "Months of work in past 12 months primary job 7 day recall" +* + + +*<_wage_total_> +/* <_wage_total_note> + + Use gross wages when available and net wages only when gross wages are not available. + This is done to make it easy to compare earnings in formal and informal sectors. + + */ + gen wage_total = . + label var wage_total "Annualized total wage primary job 7 day recall" +* + + +*<_contract_> + gen byte contract = 0 + replace contract = 1 if d1_7a == 1 | d1_7a == 2 + replace contract = . if lstatus != 1 + label var contract "Employment has contract primary job 7 day recall" + la de lblcontract 0 "Without contract" 1 "With contract" + label values contract lblcontract +* + + +*<_healthins_> + gen byte healthins = . + label var healthins "Employment has health insurance primary job 7 day recall" + la de lblhealthins 0 "Without health insurance" 1 "With health insurance" + label values healthins lblhealthins +* + + +*<_socialsec_> + gen byte socialsec = . + label var socialsec "Employment has social security insurance primary job 7 day recall" + la de lblsocialsec 1 "With social security" 0 "Without social secturity" + label values socialsec lblsocialsec +* + + +*<_union_> + gen byte union = . + label var union "Union membership at primary job 7 day recall" + la de lblunion 0 "Not union member" 1 "Union member" + label values union lblunion +* + + +*<_firmsize_l_> + gen firmsize_l = . + replace firmsize_l = 1 if d1_11a == 1 + replace firmsize_l = 6 if d1_11a == 2 + replace firmsize_l = 16 if d1_11a == 3 + replace firmsize_l = 31 if d1_11a == 4 + replace firmsize_l = 50 if d1_11a == 5 + replace firmsize_l = 100 if d1_11a == 6 + + + * Add in public sector workers (skip firm size as largest bracket) + replace firmsize_l = 100 if ocusec == 1 & mi(firmsize_l) + + replace firmsize_l = . if lstatus != 1 + label var firmsize_l "Firm size (lower bracket) primary job 7 day recall" +* + + +*<_firmsize_u_> + gen firmsize_u= . + replace firmsize_u = 5 if d1_11a == 1 + replace firmsize_u = 15 if d1_11a == 2 + replace firmsize_u = 30 if d1_11a == 3 + replace firmsize_u = 49 if d1_11a == 4 + replace firmsize_u = 99 if d1_11a == 5 + replace firmsize_u = 9999 if d1_11a == 6 + + * Add in public sector workers (skip firm size as largest bracket) + replace firmsize_u = 9999 if ocusec == 1 & mi(firmsize_u) + + replace firmsize_u = . if lstatus != 1 + label var firmsize_u "Firm size (upper bracket) primary job 7 day recall" +* + +} + + +*----------8.3: 7 day reference secondary job------------------------------* +* Since labels are the same as main job, values are labelled using main job labels + + +{ +*<_empstat_2_> + gen byte empstat_2 = d1_7b + recode empstat_2 (2 3 = 1) (4 = 3) (5 6 8 = 4) (7 = 2) (0 = .) + label var empstat_2 "Employment status during past week secondary job 7 day recall" + label values empstat_2 lblempstat +* + + +*<_ocusec_2_> + gen byte ocusec_2 = d1_9b + recode ocusec_2 (2 = 1) (3/5 = 2) (0 = .) + replace ocusec_2 = . if mi(empstat_2) + label var ocusec_2 "Sector of activity secondary job 7 day recall" + label values ocusec_2 lblocusec +* + + +*<_industry_orig_2_> + gen industry_orig_2 = string(d1_5b, "%02.0f") + replace industry_orig_2 = "" if industry_orig_2 == "." + replace industry_orig_2 = "" if industry_orig_2 == "00" + replace industry_orig_2 = "" if mi(empstat_2) + label var industry_orig_2 "Original survey industry code, secondary job 7 day recall" +* + + +*<_industrycat_isic_2_> + gen industrycat_isic_2 = industry_orig_2 + "00" if !mi(industry_orig_2) + label var industrycat_isic_2 "ISIC code of secondary job 7 day recall" +* + + +*<_industrycat10_2_> + gen byte industrycat10_2 = . + replace industrycat10_2 = 1 if inrange(industry_orig_2, "01", "03") + replace industrycat10_2 = 2 if inrange(industry_orig_2, "05", "09") + replace industrycat10_2 = 3 if inrange(industry_orig_2, "10", "33") + replace industrycat10_2 = 4 if inrange(industry_orig_2, "35", "39") + replace industrycat10_2 = 5 if inrange(industry_orig_2, "41", "43") + replace industrycat10_2 = 6 if inrange(industry_orig_2, "45", "47") | inrange(industry_orig_2, "55", "56") + replace industrycat10_2 = 7 if inrange(industry_orig_2, "49", "53") | inrange(industry_orig_2, "58", "63") + replace industrycat10_2 = 8 if inrange(industry_orig_2, "64", "82") + replace industrycat10_2 = 9 if inrange(industry_orig_2, "84", "84") + replace industrycat10_2 = 10 if inrange(industry_orig_2, "85", "99") + label var industrycat10_2 "1 digit industry classification, secondary job 7 day recall" + label values industrycat10_2 lblindustrycat10 +* + + +*<_industrycat4_2_> + gen byte industrycat4_2 = industrycat10_2 + recode industrycat4_2 (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4_2 "Broad Economic Activities classification, secondary job 7 day recall" + label values industrycat4_2 lblindustrycat4 +* + + +*<_occup_orig_2_> + gen occup_orig_2 = . + label var occup_orig_2 "Original occupation record secondary job 7 day recall" +* + + +*<_occup_isco_2_> + gen occup_isco_2 = "" + label var occup_isco_2 "ISCO code of secondary job 7 day recall" +* + + +*<_occup_2_> + gen byte occup_2 = . + label var occup_2 "1 digit occupational classification secondary job 7 day recall" + label values occup_2 lbloccup +* + + +*<_occup_skill_2_> + gen occup_skill_2 = . + replace occup_skill_2 = 3 if inrange(occup_2, 1, 3) + replace occup_skill_2 = 2 if inrange(occup_2, 4, 8) + replace occup_skill_2 = 1 if occup_2 == 9 + la de lblskill2 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill_2 lblskill2 + label var occup_skill_2 "Skill based on ISCO standard secondary job 7 day recall" +* + + +*<_wage_no_compen_2_> + egen double wage_no_compen_2 = rowtotal(d1_14b d1_16b), missing + replace wage_no_compen_2 = . if mi(empstat_2) | empstat_2 == 2 | wage_no_compen_2 == 0 + label var wage_no_compen_2 "Last wage payment secondary job 7 day recall" +* + + +*<_unitwage_2_> + gen byte unitwage_2 = 5 + replace unitwage_2 = . if mi(wage_no_compen_2) + label var unitwage_2 "Last wages' time unit secondary job 7 day recall" + label values unitwage_2 lblunitwage +* + + +*<_whours_2_> + gen whours_2 = d1_22b + replace whours_2 = . if whours_2 == 0 | mi(empstat_2) + label var whours_2 "Hours of work in last week secondary job 7 day recall" +* + + +*<_wmonths_2_> + gen wmonths_2 = . + label var wmonths_2 "Months of work in past 12 months secondary job 7 day recall" +* + + +*<_wage_total_2_> + gen wage_total_2 = . + label var wage_total_2 "Annualized total wage secondary job 7 day recall" +* + + +*<_firmsize_l_2_> + gen firmsize_l_2 = . + replace firmsize_l_2 = 1 if d1_11b == 1 + replace firmsize_l_2 = 6 if d1_11b == 2 + replace firmsize_l_2 = 16 if d1_11b == 3 + replace firmsize_l_2 = 31 if d1_11b == 4 + replace firmsize_l_2 = 50 if d1_11b == 5 + replace firmsize_l_2 = 100 if d1_11b == 6 + + * Add in public sector workers (skip firm size as largest bracket) + replace firmsize_l_2 = 100 if ocusec_2 == 1 & mi(firmsize_l_2) + + replace firmsize_l_2 = . if mi(empstat_2) + label var firmsize_l_2 "Firm size (lower bracket) secondary job 7 day recall" +* + + +*<_firmsize_u_2_> + gen firmsize_u_2 = . + replace firmsize_u_2 = 5 if d1_11b == 1 + replace firmsize_u_2 = 15 if d1_11b == 2 + replace firmsize_u_2 = 30 if d1_11b == 3 + replace firmsize_u_2 = 49 if d1_11b == 4 + replace firmsize_u_2 = 99 if d1_11b == 5 + replace firmsize_u_2 = 9999 if d1_11b == 6 + + * Add in public sector workers (skip firm size as largest bracket) + replace firmsize_u_2 = 9999 if ocusec_2 == 1 & mi(firmsize_u_2) + + replace firmsize_u_2 = . if mi(empstat_2) + label var firmsize_u_2 "Firm size (upper bracket) secondary job 7 day recall" +* + +} + +*----------8.4: 7 day reference additional jobs------------------------------* + +*<_t_hours_others_> + gen t_hours_others = . + label var t_hours_others "Annualized hours worked in all but primary and secondary jobs 7 day recall" +* + + +*<_t_wage_nocompen_others_> + gen t_wage_nocompen_others = . + label var t_wage_nocompen_others "Annualized wage in all but 1st & 2nd jobs excl. bonuses, etc. 7 day recall" +* + + +*<_t_wage_others_> + gen t_wage_others = . + label var t_wage_others "Annualized wage in all but primary and secondary jobs (12-mon ref period)" +* + + +*----------8.5: 7 day reference total summary------------------------------* + + +*<_t_hours_total_> + gen t_hours_total = . + label var t_hours_total "Annualized hours worked in all jobs 7 day recall" +* + + +*<_t_wage_nocompen_total_> + gen t_wage_nocompen_total = . + label var t_wage_nocompen_total "Annualized wage in all jobs excl. bonuses, etc. 7 day recall" +* + + +*<_t_wage_total_> + gen t_wage_total = . + label var t_wage_total "Annualized total wage for all jobs 7 day recall" +* + + +*----------8.6: 12 month reference overall------------------------------* + +{ + +*<_lstatus_year_> + gen byte lstatus_year = . + replace lstatus_year=. if age < minlaborage & age != . + label var lstatus_year "Labor status during last year" + la de lbllstatus_year 1 "Employed" 2 "Unemployed" 3 "Non-LF" + label values lstatus_year lbllstatus_year +* + +*<_potential_lf_year_> + gen byte potential_lf_year = . + replace potential_lf_year=. if age < minlaborage & age != . + replace potential_lf_year = . if lstatus_year != 3 + label var potential_lf_year "Potential labour force status" + la de lblpotential_lf_year 0 "No" 1 "Yes" + label values potential_lf_year lblpotential_lf_year +* + + +*<_underemployment_year_> + gen byte underemployment_year = . + replace underemployment_year = . if age < minlaborage & age != . + replace underemployment_year = . if lstatus_year == 1 + label var underemployment_year "Underemployment status" + la de lblunderemployment_year 0 "No" 1 "Yes" + label values underemployment_year lblunderemployment_year +* + + +*<_nlfreason_year_> + gen byte nlfreason_year=. + label var nlfreason_year "Reason not in the labor force" + la de lblnlfreason_year 1 "Student" 2 "Housekeeper" 3 "Retired" 4 "Disabled" 5 "Other" + label values nlfreason_year lblnlfreason_year +* + + +*<_unempldur_l_year_> + gen byte unempldur_l_year=. + label var unempldur_l_year "Unemployment duration (months) lower bracket" +* + + +*<_unempldur_u_year_> + gen byte unempldur_u_year=. + label var unempldur_u_year "Unemployment duration (months) upper bracket" +* + +} + +*----------8.7: 12 month reference main job------------------------------* + +{ + +*<_empstat_year_> + gen byte empstat_year = . + label var empstat_year "Employment status during past week primary job 12 month recall" + la de lblempstat_year 1 "Paid employee" 2 "Non-paid employee" 3 "Employer" 4 "Self-employed" 5 "Other, workers not classifiable by status" + label values empstat_year lblempstat_year +* + +*<_ocusec_year_> + gen byte ocusec_year = . + label var ocusec_year "Sector of activity primary job 12 month recall" + la de lblocusec_year 1 "Public Sector, Central Government, Army" 2 "Private, NGO" 3 "State owned" 4 "Public or State-owned, but cannot distinguish" + label values ocusec_year lblocusec_year +* + +*<_industry_orig_year_> + gen industry_orig_year = . + label var industry_orig_year "Original industry record main job 12 month recall" +* + + +*<_industrycat_isic_year_> + gen industrycat_isic_year = . + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + *drop if missing(industrycat_isic_year) + *int_classif_universe, var(industrycat_isic_year) universe(ISIC) + count + *list + *assert `r(N)' == 0 + restore + + label var industrycat_isic_year "ISIC code of primary job 12 month recall" +* + +*<_industrycat10_year_> + gen byte industrycat10_year = . + label var industrycat10_year "1 digit industry classification, primary job 12 month recall" + la de lblindustrycat10_year 1 "Agriculture" 2 "Mining" 3 "Manufacturing" 4 "Public utilities" 5 "Construction" 6 "Commerce" 7 "Transport and Comnunications" 8 "Financial and Business Services" 9 "Public Administration" 10 "Other Services, Unspecified" + label values industrycat10_year lblindustrycat10_year +* + + +*<_industrycat4_year_> + gen byte industrycat4_year=industrycat10_year + recode industrycat4_year (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4_year "Broad Economic Activities classification, primary job 12 month recall" + la de lblindustrycat4_year 1 "Agriculture" 2 "Industry" 3 "Services" 4 "Other" + label values industrycat4_year lblindustrycat4_year +* + + +*<_occup_orig_year_> + gen occup_orig_year = . + label var occup_orig_year "Original occupation record primary job 12 month recall" +* + + +*<_occup_isco_year_> + gen occup_isco_year = "" + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + *drop if missing(occup_isco_year) + *int_classif_universe, var(occup_isco_year) universe(ISCO) + count + *list + *assert `r(N)' == 0 + restore + + label var occup_isco_year "ISCO code of primary job 12 month recall" +* + + +*<_occup_year_> + gen byte occup_year = . + label var occup_year "1 digit occupational classification, primary job 12 month recall" + la de lbloccup_year 1 "Managers" 2 "Professionals" 3 "Technicians" 4 "Clerks" 5 "Service and market sales workers" 6 "Skilled agricultural" 7 "Craft workers" 8 "Machine operators" 9 "Elementary occupations" 10 "Armed forces" 99 "Others" + label values occup_year lbloccup_year +* + + +*<_occup_skill_year_> + gen occup_skill_year = . + replace occup_skill_year = 3 if inrange(occup_year, 1, 3) + replace occup_skill_year = 2 if inrange(occup_year, 4, 8) + replace occup_skill_year = 1 if occup_year == 9 + la de lblskillyear 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill_year lblskillyear + label var occup_skill_year "Skill based on ISCO standard primary job 12 month recall" +* + + +*<_wage_no_compen_year_> --- this var has the same name as other and when quoted in the keep and order codes is repeated. + gen double wage_no_compen_year = . + label var wage_no_compen_year "Last wage payment primary job 12 month recall" +* + + +*<_unitwage_year_> + gen byte unitwage_year = . + label var unitwage_year "Last wages' time unit primary job 12 month recall" + la de lblunitwage_year 1 "Daily" 2 "Weekly" 3 "Every two weeks" 4 "Bimonthly" 5 "Monthly" 6 "Trimester" 7 "Biannual" 8 "Annually" 9 "Hourly" 10 "Other" + label values unitwage_year lblunitwage_year +* + + +*<_whours_year_> + gen whours_year = . + label var whours_year "Hours of work in last week primary job 12 month recall" +* + + +*<_wmonths_year_> + gen wmonths_year = . + label var wmonths_year "Months of work in past 12 months primary job 12 month recall" +* + + +*<_wage_total_year_> + gen wage_total_year = . + label var wage_total_year "Annualized total wage primary job 12 month recall" +* + + +*<_contract_year_> + gen byte contract_year = . + label var contract_year "Employment has contract primary job 12 month recall" + la de lblcontract_year 0 "Without contract" 1 "With contract" + label values contract_year lblcontract_year +* + + +*<_healthins_year_> + gen byte healthins_year = . + label var healthins_year "Employment has health insurance primary job 12 month recall" + la de lblhealthins_year 0 "Without health insurance" 1 "With health insurance" + label values healthins_year lblhealthins_year +* + + +*<_socialsec_year_> + gen byte socialsec_year = . + label var socialsec_year "Employment has social security insurance primary job 7 day recall" + la de lblsocialsec_year 1 "With social security" 0 "Without social secturity" + label values socialsec_year lblsocialsec_year +* + + +*<_union_year_> + gen byte union_year = . + label var union_year "Union membership at primary job 12 month recall" + la de lblunion_year 0 "Not union member" 1 "Union member" + label values union_year lblunion_year +* + + +*<_firmsize_l_year_> + gen firmsize_l_year = . + label var firmsize_l_year "Firm size (lower bracket) primary job 12 month recall" +* + + +*<_firmsize_u_year_> + gen firmsize_u_year = . + label var firmsize_u_year "Firm size (upper bracket) primary job 12 month recall" +* + +} + + +*----------8.8: 12 month reference secondary job------------------------------* + +{ + +*<_empstat_2_year_> + gen byte empstat_2_year = . + label var empstat_2_year "Employment status during past week secondary job 12 month recall" + label values empstat_2_year lblempstat_year +* + + +*<_ocusec_2_year_> + gen byte ocusec_2_year = . + label var ocusec_2_year "Sector of activity secondary job 12 month recall" + la de lblocusec_2_year 1 "Public Sector, Central Government, Army" 2 "Private, NGO" 3 "State owned" 4 "Public or State-owned, but cannot distinguish" + label values ocusec_2_year lblocusec_2_year +* + + + +*<_industry_orig_2_year_> + gen industry_orig_2_year = . + label var industry_orig_2_year "Original survey industry code, secondary job 12 month recall" +* + + + +*<_industrycat_isic_2_year_> + gen industrycat_isic_2_year = . + label var industrycat_isic_2_year "ISIC code of secondary job 12 month recall" +* + + +*<_industrycat10_2_year_> + gen byte industrycat10_2_year = . + label var industrycat10_2_year "1 digit industry classification, secondary job 12 month recall" + label values industrycat10_2_year lblindustrycat10_year +* + + +*<_industrycat4_2_year_> + gen byte industrycat4_2_year=industrycat10_2_year + recode industrycat4_2_year (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4_2_year "Broad Economic Activities classification, secondary job 12 month recall" + label values industrycat4_2_year lblindustrycat4_year +* + + +*<_occup_orig_2_year_> + gen occup_orig_2_year = . + label var occup_orig_2_year "Original occupation record secondary job 12 month recall" +* + + +*<_occup_isco_2_year_> + gen occup_isco_2_year = "" + label var occup_isco_2_year "ISCO code of secondary job 12 month recall" +* + + +*<_occup_2_year_> + gen byte occup_2_year = . + label var occup_2_year "1 digit occupational classification, secondary job 12 month recall" + label values occup_2_year lbloccup_year +* + + +*<_occup_skill_2_year_> + gen occup_skill_2_year = . + replace occup_skill_2_year = 3 if inrange(occup_2_year, 1, 3) + replace occup_skill_2_year = 2 if inrange(occup_2_year, 4, 8) + replace occup_skill_2_year = 1 if occup_2_year == 9 + la de lblskilly2 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill_2_year lblskilly2 + label var occup_skill_2_year "Skill based on ISCO standard secondary job 12 month recall" +* + + +*<_wage_no_compen_2_year_> + gen double wage_no_compen_2_year = . + label var wage_no_compen_2_year "Last wage payment secondary job 12 month recall" +* + + +*<_unitwage_2_year_> + gen byte unitwage_2_year = . + label var unitwage_2_year "Last wages' time unit secondary job 12 month recall" + label values unitwage_2_year lblunitwage_year +* + + +*<_whours_2_year_> + gen whours_2_year = . + label var whours_2_year "Hours of work in last week secondary job 12 month recall" +* + + +*<_wmonths_2_year_> + gen wmonths_2_year = . + label var wmonths_2_year "Months of work in past 12 months secondary job 12 month recall" +* + + +*<_wage_total_2_year_> + gen wage_total_2_year = . + label var wage_total_2_year "Annualized total wage secondary job 12 month recall" +* + +*<_firmsize_l_2_year_> + gen firmsize_l_2_year = . + label var firmsize_l_2_year "Firm size (lower bracket) secondary job 12 month recall" +* + + +*<_firmsize_u_2_year_> + gen firmsize_u_2_year = . + label var firmsize_u_2_year "Firm size (upper bracket) secondary job 12 month recall" +* + +} + + +*----------8.9: 12 month reference additional jobs------------------------------* + + +*<_t_hours_others_year_> + gen t_hours_others_year = . + label var t_hours_others_year "Annualized hours worked in all but primary and secondary jobs 12 month recall" +* + +*<_t_wage_nocompen_others_year_> + gen t_wage_nocompen_others_year = . + label var t_wage_nocompen_others_year "Annualized wage in all but 1st & 2nd jobs excl. bonuses, etc. 12 month recall" +* + +*<_t_wage_others_year_> + gen t_wage_others_year = . + label var t_wage_others_year "Annualized wage in all but primary and secondary jobs 12 month recall" +* + + +*----------8.10: 12 month total summary------------------------------* + + +*<_t_hours_total_year_> + gen t_hours_total_year = . + label var t_hours_total_year "Annualized hours worked in all jobs 12 month month recall" +* + + +*<_t_wage_nocompen_total_year_> + gen t_wage_nocompen_total_year = . + label var t_wage_nocompen_total_year "Annualized wage in all jobs excl. bonuses, etc. 12 month recall" +* + + +*<_t_wage_total_year_> + gen t_wage_total_year = . + label var t_wage_total_year "Annualized total wage for all jobs 12 month recall" +* + + +*----------8.11: Overall across reference periods------------------------------* + + +*<_njobs_> + gen njobs = . + label var njobs "Total number of jobs" +* + + +*<_t_hours_annual_> + gen t_hours_annual = . + label var t_hours_annual "Total hours worked in all jobs in the previous 12 months" +* + + +*<_linc_nc_> + gen linc_nc = . + label var linc_nc "Total annual wage income in all jobs, excl. bonuses, etc." +* + + +*<_laborincome_> + gen laborincome = t_wage_total_year + label var laborincome "Total annual individual labor income in all jobs, incl. bonuses, etc." +* + + +*----------8.13: Labour cleanup------------------------------* + +{ +*<_% Correction min age_> + +** Drop info for cases under the age for which questions to be asked (do not need a variable for this) + local lab_var "minlaborage lstatus nlfreason unempldur_l unempldur_u empstat ocusec industry_orig industrycat_isic industrycat10 industrycat4 occup_orig occup_isco occup_skill occup wage_no_compen unitwage whours wmonths wage_total contract healthins socialsec union firmsize_l firmsize_u empstat_2 ocusec_2 industry_orig_2 industrycat_isic_2 industrycat10_2 industrycat4_2 occup_orig_2 occup_isco_2 occup_skill_2 occup_2 wage_no_compen_2 unitwage_2 whours_2 wmonths_2 wage_total_2 firmsize_l_2 firmsize_u_2 t_hours_others t_wage_nocompen_others t_wage_others t_hours_total t_wage_nocompen_total t_wage_total lstatus_year nlfreason_year unempldur_l_year unempldur_u_year empstat_year ocusec_year industry_orig_year industrycat_isic_year industrycat10_year industrycat4_year occup_orig_year occup_isco_year occup_skill_year occup_year unitwage_year whours_year wmonths_year wage_total_year contract_year healthins_year socialsec_year union_year firmsize_l_year firmsize_u_year empstat_2_year ocusec_2_year industry_orig_2_year industrycat_isic_2_year industrycat10_2_year industrycat4_2_year occup_orig_2_year occup_isco_2_year occup_skill_2_year occup_2_year wage_no_compen_2_year unitwage_2_year whours_2_year wmonths_2_year wage_total_2_year firmsize_l_2_year firmsize_u_2_year t_hours_others_year t_wage_nocompen_others_year t_wage_others_year t_hours_total_year t_wage_nocompen_total_year t_wage_total_year njobs t_hours_annual linc_nc laborincome" + + foreach v of local lab_var { + cap confirm numeric variable `v' + if _rc == 0 { // is indeed numeric + replace `v'=. if ( age < minlaborage & !missing(age) ) + } + else { // is not + replace `v'= "" if ( age < minlaborage & !missing(age) ) + } + + } + +* +} + + +/*%%============================================================================================= + 9: Final steps +==============================================================================================%%*/ + +quietly{ + +*<_% KEEP VARIABLES - ALL_> + + keep countrycode survname survey icls_v isced_version isco_version isic_version year vermast veralt harmonization int_year int_month hhid pid weight weight_m weight_q psu ssu strata wave panel visit_no urban subnatid1 subnatid2 subnatid3 subnatidsurvey subnatid1_prev subnatid2_prev subnatid3_prev gaul_adm1_code gaul_adm2_code gaul_adm3_code hsize age male relationharm relationcs marital eye_dsablty hear_dsablty walk_dsablty conc_dsord slfcre_dsablty comm_dsablty migrated_mod_age migrated_ref_time migrated_binary migrated_years migrated_from_urban migrated_from_cat migrated_from_code migrated_from_country migrated_reason ed_mod_age school literacy educy educat7 educat5 educat4 educat_orig educat_isced vocational vocational_type vocational_length_l vocational_length_u vocational_field_orig vocational_financed minlaborage lstatus potential_lf underemployment nlfreason unempldur_l unempldur_u empstat ocusec industry_orig industrycat_isic industrycat10 industrycat4 occup_orig occup_isco occup_skill occup wage_no_compen unitwage whours wmonths wage_total contract healthins socialsec union firmsize_l firmsize_u empstat_2 ocusec_2 industry_orig_2 industrycat_isic_2 industrycat10_2 industrycat4_2 occup_orig_2 occup_isco_2 occup_skill_2 occup_2 wage_no_compen_2 unitwage_2 whours_2 wmonths_2 wage_total_2 firmsize_l_2 firmsize_u_2 t_hours_others t_wage_nocompen_others t_wage_others t_hours_total t_wage_nocompen_total t_wage_total lstatus_year potential_lf_year underemployment_year nlfreason_year unempldur_l_year unempldur_u_year empstat_year ocusec_year industry_orig_year industrycat_isic_year industrycat10_year industrycat4_year occup_orig_year occup_isco_year occup_skill_year occup_year wage_no_compen_year unitwage_year whours_year wmonths_year wage_total_year contract_year healthins_year socialsec_year union_year firmsize_l_year firmsize_u_year empstat_2_year ocusec_2_year industry_orig_2_year industrycat_isic_2_year industrycat10_2_year industrycat4_2_year occup_orig_2_year occup_isco_2_year occup_skill_2_year occup_2_year wage_no_compen_2_year unitwage_2_year whours_2_year wmonths_2_year wage_total_2_year firmsize_l_2_year firmsize_u_2_year t_hours_others_year t_wage_nocompen_others_year t_wage_others_year t_hours_total_year t_wage_nocompen_total_year t_wage_total_year njobs t_hours_annual linc_nc laborincome + +* + +*<_% ORDER VARIABLES_> + + order countrycode survname survey icls_v isced_version isco_version isic_version year vermast veralt harmonization int_year int_month hhid pid weight weight_m weight_q psu ssu strata wave panel visit_no urban subnatid1 subnatid2 subnatid3 subnatidsurvey subnatid1_prev subnatid2_prev subnatid3_prev gaul_adm1_code gaul_adm2_code gaul_adm3_code hsize age male relationharm relationcs marital eye_dsablty hear_dsablty walk_dsablty conc_dsord slfcre_dsablty comm_dsablty migrated_mod_age migrated_ref_time migrated_binary migrated_years migrated_from_urban migrated_from_cat migrated_from_code migrated_from_country migrated_reason ed_mod_age school literacy educy educat7 educat5 educat4 educat_orig educat_isced vocational vocational_type vocational_length_l vocational_length_u vocational_field_orig vocational_financed minlaborage lstatus potential_lf underemployment nlfreason unempldur_l unempldur_u empstat ocusec industry_orig industrycat_isic industrycat10 industrycat4 occup_orig occup_isco occup_skill occup wage_no_compen unitwage whours wmonths wage_total contract healthins socialsec union firmsize_l firmsize_u empstat_2 ocusec_2 industry_orig_2 industrycat_isic_2 industrycat10_2 industrycat4_2 occup_orig_2 occup_isco_2 occup_skill_2 occup_2 wage_no_compen_2 unitwage_2 whours_2 wmonths_2 wage_total_2 firmsize_l_2 firmsize_u_2 t_hours_others t_wage_nocompen_others t_wage_others t_hours_total t_wage_nocompen_total t_wage_total lstatus_year potential_lf_year underemployment_year nlfreason_year unempldur_l_year unempldur_u_year empstat_year ocusec_year industry_orig_year industrycat_isic_year industrycat10_year industrycat4_year occup_orig_year occup_isco_year occup_skill_year occup_year wage_no_compen_year unitwage_year whours_year wmonths_year wage_total_year contract_year healthins_year socialsec_year union_year firmsize_l_year firmsize_u_year empstat_2_year ocusec_2_year industry_orig_2_year industrycat_isic_2_year industrycat10_2_year industrycat4_2_year occup_orig_2_year occup_isco_2_year occup_skill_2_year occup_2_year wage_no_compen_2_year unitwage_2_year whours_2_year wmonths_2_year wage_total_2_year firmsize_l_2_year firmsize_u_2_year t_hours_others_year t_wage_nocompen_others_year t_wage_others_year t_hours_total_year t_wage_nocompen_total_year t_wage_total_year njobs t_hours_annual linc_nc laborincome + +* + +*<_% DROP UNUSED LABELS_> + + * Store all labels in data + label dir + local all_lab `r(names)' + + * Store all variables with a label, extract value label names + local used_lab = "" + ds, has(vallabel) + + local labelled_vars `r(varlist)' + + foreach varName of local labelled_vars { + local y : value label `varName' + local used_lab `"`used_lab' `y'"' + } + + * Compare lists, `notused' is list of labels in directory but not used in final variables + local notused : list all_lab - used_lab // local `notused' defines value labs not in remaining vars + local notused_len : list sizeof notused // store size of local + + * drop labels if the length of the notused vector is 1 or greater, otherwise nothing to drop + if `notused_len' >= 1 { + label drop `notused' + } + else { + di "There are no unused labels to drop. No value labels dropped." + } + + +* + +} + + +*<_% DELETE MISSING VARIABLES_> + +quietly: describe, varlist +local kept_vars `r(varlist)' + +foreach var of local kept_vars { + capture assert missing(`var') + if !_rc drop `var' +} + +* + + +*<_% COMPRESS_> + +compress + +* + + +*<_% SAVE_> + +save "`path_output'/`out_file'", replace + +* diff --git a/GLD/ARM/ARM_2013_ILCS/ARM_2013_ILCS_V01_M_V01_A_GLD/Programs/ARM_2013_ILCS_V01_M_V01_A_GLD_ALL.do b/GLD/ARM/ARM_2013_ILCS/ARM_2013_ILCS_V01_M_V01_A_GLD/Programs/ARM_2013_ILCS_V01_M_V01_A_GLD_ALL.do new file mode 100644 index 000000000..152cbc836 --- /dev/null +++ b/GLD/ARM/ARM_2013_ILCS/ARM_2013_ILCS_V01_M_V01_A_GLD/Programs/ARM_2013_ILCS_V01_M_V01_A_GLD_ALL.do @@ -0,0 +1,1904 @@ + +/*%%============================================================================================= + 0: GLD Harmonization Preamble +==============================================================================================%%*/ + +/* ----------------------------------------------------------------------- + +<_Program name_> ARM_2013_ILCS_V01_M_V01_A_GLD_ALL.do +<_Application_> Stata 18 <_Application_> +<_Author(s)_> World Bank Jobs Group (gld@worldbank.org) +<_Date created_> 2024-09-11 + +------------------------------------------------------------------------- + +<_Country_> Armenia +<_Survey Title_> Integrated Living Conditions Survey +<_Survey Year_> 2013 +<_Study ID_> https://microdatalib.worldbank.org/index.php/catalog/2615 +<_Data collection from_> [MM/YYYY] +<_Data collection to_> [MM/YYYY] +<_Source of dataset_> [Source of data, e.g. NSO] +<_Sample size (HH)_> [#] +<_Sample size (IND)_> [#] +<_Sampling method_> [Brief description] +<_Geographic coverage_> [To what level is data significant] +<_Currency_> [Currency used for wages] + +----------------------------------------------------------------------- + +<_ICLS Version_> [Version of ICLS for Labor Questions] +<_ISCED Version_> [Version of ICLS for Labor Questions] +<_ISCO Version_> [Version of ICLS for Labor Questions] +<_OCCUP National_> [Version of ICLS for Labor Questions] +<_ISIC Version_> [Version of ICLS for Labor Questions] +<_INDUS National_> [Version of ICLS for Labor Questions] + +----------------------------------------------------------------------- +<_Version Control_> + +* Date: [YYYY-MM-DD] - [Description of changes] +* Date: [YYYY-MM-DD] - [Description of changes] + + + +-------------------------------------------------------------------------*/ + + +/*%%============================================================================================= + 1: Setting up of program environment, dataset +==============================================================================================%%*/ + +*----------1.1: Initial commands------------------------------* + +clear +set more off +set mem 800m +set varabbrev off + +*----------1.2: Set directories------------------------------* + +* Define path sections +local server "Y:/GLD-Harmonization/529026_MG/Countries" +local country "ARM" +local year "2013" +local survey "ILCS" +local vermast "V01" +local veralt "V01" + +* From the definitions, set path chunks +local level_1 "`country'_`year'_`survey'" +local level_2_mast "`level_1'_`vermast'_M" +local level_2_harm "`level_1'_`vermast'_M_`veralt'_A_GLD" + +* From chunks, define path_in, path_output folder +local path_in_stata "`server'/`country'/`level_1'/`level_2_mast'/Data/Stata" +local path_in_other "`server'/`country'/`level_1'/`level_2_mast'/Data/Original" +local path_output "`server'/`country'/`level_1'/`level_2_harm'/Data/Harmonized" + +* Define Output file name +local out_file "`level_2_harm'_ALL.dta" + +*----------1.3: Database assembly------------------------------* + +* All steps necessary to merge datasets (if several) to have all elements needed to produce +* harmonized output in a single file + +* Check whether there is a weight file +local has_wf = fileexists("`path_in_stata/weight.dta'") + +* Start with HH +use "`path_in_stata'/hh.dta" + +* If there is a weight file, merge it in +if `has_wf' { + merge 1:1 recno using "`path_in_stata/weight.dta'", assert(match) nogen +} + +* Add member roster +merge 1:m recno using "`path_in_stata'/mem.dta", assert(match) nogen + +* Add employment section +merge 1:1 recno memnum using "`path_in_stata'/d1", assert(match master) nogen + +* Add number labels +numlabel, add force + +/* + +There is an issue with the data. When merging, there are 1,329 individuals who should have answers to +section d1 (employment section for those aged 15 to 75 - inclusive) but do not merge + +gen miss_emp = inrange(age,15,75) & mi(d1_1a) + +Additionally, there are 229 individuals who answer no to the first question but then have the follow up missing. + +gen wrong_emp = inrange(age,15,75) & mi(d1_2a) & d1_1a == 2 + +Note that these all respond to the unemployment question (d2_1) with "Compulsory military" + +If we make a variable that contains either case + +gen either = miss_emp | wrong_emp + +and compare this to the people who state that they have been missing from the household (a1_7) we get the following + + . tab either a1_7 if inrange(age,15,75),m + + | If during the whole survey month + | some members of the household + | are absent, then + either | 1. .up to 2. 3 mont . | Total + -----------+---------------------------------+---------- + 0 | 1 0 13,500 | 13,501 + 1 | 299 1,252 7 | 1,558 + -----------+---------------------------------+---------- + Total | 300 1,252 13,507 | 15,059 + + . + . + . tab either a1_7 if inrange(age,15,75),m col nofreq + + | If during the whole survey month + | some members of the household + | are absent, then + either | 1. .up to 2. 3 mont . | Total + -----------+---------------------------------+---------- + 0 | 0.33 0.00 99.95 | 89.65 + 1 | 99.67 100.00 0.05 | 10.35 + -----------+---------------------------------+---------- + Total | 100.00 100.00 100.00 | 100.00 + +As can be seen, nearly all cases where employment is missing are the cases where people are declared absent. + +The full dataset contains 19,831 individuals. If the people absent are dropped we get to 18,200. The ILO dataset states +has 18,196 rows (https://webapps.ilo.org/surveyLib/index.php/catalog/6540/data-dictionary/FA_ARM_HILCS_2013_FULL?file_name=ARM_HILCS_2013_FULL - they call is "cases") + +Hence it would seem that they have trimmed these cases. + +However, the population numbers do not align. + +Total population for the full 19,831 is 3,127,434 +Total population accroding to WB Data is 2,901,385 (https://data.worldbank.org/indicator/SP.POP.TOTL?locations=AM) +Total + +ILOSTAT has working age pop 15+ + +The full dataset for 15+ gives us 2,560,389 +The reduced (not absent) 15+ is 2,336,590 +ILOSTAT has (same source claimed) 2,155,400 (https://rshiny.ilo.org/dataexplorer56/?lang=en&id=POP_XWAP_SEX_AGE_GEO_NB_A) + +So despite being very close in the number of observations between non-absent and ILO, the weighted numbers are different. + +The data from the ARMStat site (https://armstat.am/en/?nid=965) is for the LFS series. +A bit confusing but the data from 2008 to 2013 is actually from ILCS so we may compare it + +There they use the concept of "permanent/resident" population which excludes the absentees. +Without them the numbers agree (exxcept for small disagreements between unemployed and NLF) + +Hence drop absentees from data +*/ +*drop if !mi(a1_7) + + +/*%%============================================================================================= + 2: Survey & ID +==============================================================================================%%*/ + +{ + +*<_countrycode_> + gen str4 countrycode = "ARM" + label var countrycode "Country code" +* + + +*<_survname_> + gen survname = "ILCS" + label var survname "Survey acronym" +* + + +*<_survey_> + gen survey = "GLD" + label var survey "Survey type" +* + + +*<_icls_v_> + gen icls_v = "ICLS-13" + label var icls_v "ICLS version underlying questionnaire questions" +* + + +*<_isced_version_> + gen isced_version = "" + label var isced_version "Version of ISCED used for educat_isced" +* + + +*<_isco_version_> + gen isco_version = "" + label var isco_version "Version of ISCO used" +* + + +*<_isic_version_> + gen isic_version = "isic_4" + label var isic_version "Version of ISIC used" +* + + +*<_year_> + gen int year = 2013 + label var year "Year of survey" +* + + +*<_vermast_> + gen vermast = "`vermast'" + label var vermast "Version of master data" +* + + +*<_veralt_> + gen veralt = "`veralt'" + label var veralt "Version of the alt/harmonized data" +* + + +*<_harmonization_> + gen harmonization = "GLD" + label var harmonization "Type of harmonization" +* + + +*<_int_year_> + gen int_year= 2013 + label var int_year "Year of the interview" +* + + +*<_int_month_> + gen int_month = date + label de lblint_month 1 "January" 2 "February" 3 "March" 4 "April" 5 "May" 6 "June" 7 "July" 8 "August" 9 "September" 10 "October" 11 "November" 12 "December" + label value int_month lblint_month + label var int_month "Month of the interview" +* + + +*<_hhid_> +/* <_hhid_note> + + Values are 1-5184 running. Would have preferred making it a string with 0001 to 5184, but leave as is since + GMD has it this way. For PID concatenate this with 01-12 but leave as is. + + */ + gen hhid = recno + label var hhid "Household ID" +* + + +*<_pid_> + gen pid = memnum + label var pid "Individual ID" +* + + +*<_weight_> + *gen weight = weight + label var weight "Survey sampling weight" +* + + +*<_weight_m_> + gen weight_m = . + label var weight_m "Survey sampling weight to obtain national estimates for each month" +* + + +*<_weight_q_> + gen weight_q = . + label var weight_q "Survey sampling weight to obtain national estimates for each quarter" +* + + +*<_psu_> + +/* <_psu_note> + + We have (at the moment) no documentation on 2013. The variable PSU only has 9 distinct values, roughtly equal + (each number is ~2,200). If you look at the start (list in 1/20) you can see it aligns with the households + (where recno's 1 to 9 are equal to psu, then with recno's 10-18 it is 1-9 again and so forth). It further + aligns with the weights (that is, a block of PSUs has a different weight). It thus seems that PSU does not + directly denote the PSU but rather the numbering of the HHs within the PSU (where 9 HHs are interviewed per + PSU). In 2009, when we do have an accurate PSU (and a methodology text to confirm this) they had always 8 HHs + per PSU. It seems most plausible that this is the case. hence we use the ordering to create a PSU + + */ + + * Sort by recno and memnum (as data is in file already, just in case) to have the order of 9 households/block + sort recno memnum + + * Generate a new variable to identify PSUs + gen psu = . + + * Initialize the block counter + local psu_counter = 0 + + * Loop through the data to identify the start of each block + forvalues i = 1/`=_N' { + if PSU[`i'] == 1 & (PSU[`i'-1] != 1 | `i' == 1) { + local psu_counter = `psu_counter' + 1 + } + quietly : replace psu = `psu_counter' if _n == `i' + } + + label var psu "Primary sampling units" +* + + +*<_ssu_> + gen ssu = recno + label var ssu "Secondary sampling units" +* + + +*<_strata_> + gen strata = . + label var strata "Strata" +* + + +*<_wave_> + gen wave = . + label var wave "Survey wave" +* + + +*<_panel_> + gen panel = "" + label var panel "Panel individual belongs to" +* + + +*<_visit_no_> + +* There seems to be visit no info in the questionnaire, but nothing in the data, cannot confirm, leave missing + gen visit_no = . + label var visit_no "Visit number in panel" +* + +} + + +/*%%============================================================================================= + 3: Geography +==============================================================================================%%*/ + +{ + +*<_urban_> + * typev is 0 if Yerevan, 1 if urban (other), rural is 2 + gen byte urban = inrange(typev, 0,1) + replace urban = 0 if typev == 2 + label var urban "Location is urban" + la de lblurban 1 "Urban" 0 "Rural" + label values urban lblurban +* + + +*<_subnatid1_> +/* <_subnatid1_note> + + The variable is string and country-specific categorical. Numeric entries are coded in string format using the following naming convention: "1 – Hatay". That is, the variable itself is to be string, not a labelled numeric vector. + + Example of entries would be "1 - Alaska", "2 - Arkansas", ... + + */ + gen str subnatid1 = "" + replace subnatid1 = "1 - Yerevan" if marz == 1 + replace subnatid1 = "2 - Aragatsotn" if marz == 2 + replace subnatid1 = "3 - Ararat" if marz == 3 + replace subnatid1 = "4 - Armavir" if marz == 4 + replace subnatid1 = "5 - Gegharkunik" if marz == 5 + replace subnatid1 = "6 - Lori" if marz == 6 + replace subnatid1 = "7 - Kotayk" if marz == 7 + replace subnatid1 = "8 - Shirak" if marz == 8 + replace subnatid1 = "9 - Syunik" if marz == 9 + replace subnatid1 = "10 - Vayoc Dzor" if marz == 10 + replace subnatid1 = "11 - Tavush" if marz == 11 +* + + +*<_subnatid2_> + gen str subnatid2 = "" + label var subnatid2 "Subnational ID at Second Administrative Level" +* + + +*<_subnatid3_> + gen str subnatid3 = "" + label var subnatid3 "Subnational ID at Third Administrative Level" +* + + +*<_subnatidsurvey_> +/* <_subnatidsurvey_note> + + Variable denoting lowest administrative info to which the survey is still significat. + See entry in GLD Guidelines (https://github.com/worldbank/gld/blob/main/Support/A%20-%20Guides%20and%20Documentation/GLD_1.0_Guidelines.docx) for more details + + */ + decode urban, generate(helper) + generate subnatidsurvey = string(urban) + " - " + helper + drop helper + label var subnatidsurvey "Administrative level at which survey is representative" +* + + +*<_subnatid1_prev_> +/* <_subnatid1_prev_note> + + subnatid1_prev is coded as missing unless the classification used for subnatid1 has changed since the previous survey. + + */ + gen subnatid1_prev = . + label var subnatid1_prev "Classification used for subnatid1 from previous survey" +* + + +*<_subnatid2_prev_> + gen subnatid2_prev = . + label var subnatid2_prev "Classification used for subnatid2 from previous survey" +* + + +*<_subnatid3_prev_> + gen subnatid3_prev = . + label var subnatid3_prev "Classification used for subnatid3 from previous survey" +* + + +*<_gaul_adm1_code_> + gen gaul_adm1_code = . + label var gaul_adm1_code "Global Administrative Unit Layers (GAUL) Admin 1 code" +* + + +*<_gaul_adm2_code_> + gen gaul_adm2_code = . + label var gaul_adm2_code "Global Administrative Unit Layers (GAUL) Admin 2 code" +* + + +*<_gaul_adm3_code_> + gen gaul_adm3_code = . + label var gaul_adm3_code "Global Administrative Unit Layers (GAUL) Admin 3 code" +* + +} + + +/*%%============================================================================================= + 4: Demography +==============================================================================================%%*/ + +{ + +*<_hsize_> + * If keep all + gen hsize = members + /* * If drop absentees + gen helper = 1 + egen hh_abs_no = total(helper), by(recno) + replace hsize = hsize - hh_abs_no + drop helper hh_abs_no + */ + label var hsize "Household size" +* + + +*<_age_> + * Already in there + *gen age = . + label var age "Individual age" +* + + +*<_male_> + gen male = a1_1 + recode male (2 = 0) + label var male "Sex - Ind is male" + la de lblmale 1 "Male" 0 "Female" + label values male lblmale +* + + +*<_relationharm_> + gen relationharm = a1_2 + recode relationharm (4 = 3) (6 = 4) (7 = 5) (8 = 6) + label var relationharm "Relationship to the head of household - Harmonized" + la de lblrelationharm 1 "Head of household" 2 "Spouse" 3 "Children" 4 "Parents" 5 "Other relatives" 6 "Other and non-relatives" + label values relationharm lblrelationharm +* + + +*<_relationcs_> + clonevar relationcs = a1_2 + label var relationcs "Relationship to the head of household - Country original" +* + + +*<_marital_> + gen byte marital = a1_5 + recode marital (3 = 5) (5 = 3) + label var marital "Marital status" + la de lblmarital 1 "Married" 2 "Never Married" 3 "Living together" 4 "Divorced/Separated" 5 "Widowed" + label values marital lblmarital +* + + +*<_eye_dsablty_> + gen eye_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all" + label values eye_dsablty dsablty + label var eye_dsablty "Disability related to eyesight" +* + + +*<_hear_dsablty_> + gen hear_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values hear_dsablty dsablty + label var hear_dsablty "Disability related to hearing" +* + + +*<_walk_dsablty_> + gen walk_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values walk_dsablty dsablty + label var walk_dsablty "Disability related to walking or climbing stairs" +* + + +*<_conc_dsord_> + gen conc_dsord = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values conc_dsord dsablty + label var conc_dsord "Disability related to concentration or remembering" +* + + +*<_slfcre_dsablty_> + gen slfcre_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values slfcre_dsablty dsablty + label var slfcre_dsablty "Disability related to selfcare" +* + + +*<_comm_dsablty_> + gen comm_dsablty = . + label define dsablty 1 "No – no difficulty" 2 "Yes – some difficulty" 3 "Yes – a lot of difficulty" 4 "Cannot do at all", replace + label values comm_dsablty dsablty + label var comm_dsablty "Disability related to communicating" +* + +} + + +/*%%============================================================================================= + 5: Migration +==============================================================================================%%*/ + + +{ + +* Migration is not done as it is much more narrowly defined as migrated and returned. Thus anyone who +* migrated from their home town to the capital city would not be included. For example, while 31% of the +* population is in Yerevan, only 22% of migrants are. + +*<_migrated_mod_age_> + gen migrated_mod_age = . + label var migrated_mod_age "Migration module application age" +* + + +*<_migrated_ref_time_> + gen migrated_ref_time = . + label var migrated_ref_time "Reference time applied to migration questions (in years)" +* + + +*<_migrated_binary_> + gen migrated_binary = . + label de lblmigrated_binary 0 "No" 1 "Yes" + label values migrated_binary lblmigrated_binary + label var migrated_binary "Individual has migrated" +* + + +*<_migrated_years_> + gen migrated_years = . + label var migrated_years "Years since latest migration" +* + + +*<_migrated_from_urban_> + gen migrated_from_urban = . + label de lblmigrated_from_urban 0 "Rural" 1 "Urban" + label values migrated_from_urban lblmigrated_from_urban + label var migrated_from_urban "Migrated from area" +* + + +*<_migrated_from_cat_> + gen migrated_from_cat = . + label de lblmigrated_from_cat 1 "From same admin3 area" 2 "From same admin2 area" 3 "From same admin1 area" 4 "From other admin1 area" 5 "From other country" + label values migrated_from_cat lblmigrated_from_cat + label var migrated_from_cat "Category of migration area" +* + + +*<_migrated_from_code_> + gen migrated_from_code = . + *label de lblmigrated_from_code + *label values migrated_from_code lblmigrated_from_code + label var migrated_from_code "Code of migration area as subnatid level of migrated_from_cat" +* + + +*<_migrated_from_country_> + gen migrated_from_country = . + label var migrated_from_country "Code of migration country (ISO 3 Letter Code)" +* + + +*<_migrated_reason_> + gen migrated_reason = . + label de lblmigrated_reason 1 "Family reasons" 2 "Educational reasons" 3 "Employment" 4 "Forced (political reasons, natural disaster, …)" 5 "Other reasons" + label values migrated_reason lblmigrated_reason + label var migrated_reason "Reason for migrating" +* + + +} + + +/*%%============================================================================================= + 6: Education +==============================================================================================%%*/ + +* Education looks tricky. There are responses in the HH roster section (a1_9) +* and in a separate education section (e2). They do not agree 100% - odd +* Information about the education system to confirm the data is from +* https://www.aacrao.org/edge/country/armenia and +* https://www.unicef.org/armenia/media/15496/file/Education%20Sector%20Analysis%20for%20Armenia.pdf +* visited in September 2024 + +{ + +*<_ed_mod_age_> + +/* <_ed_mod_age_note> + +Education module is only asked to those XX and older. + + */ + +gen byte ed_mod_age = 6 +label var ed_mod_age "Education module application age" + +* + +*<_school_> + gen byte school = 0 + replace school = 1 if e2_7 == 1 + label var school "Attending school" + la de lblschool 0 "No" 1 "Yes" + label values school lblschool +* + + +*<_literacy_> + gen byte literacy = 1 + replace literacy = 0 if e2_2 == 0 + replace literacy = . if mi(e2_2) + label var literacy "Individual can read & write" + la de lblliteracy 0 "No" 1 "Yes" + label values literacy lblliteracy +* + + +*<_educy_> + * Number of years is a combination of level (e2_2) and years in that course (e2_3) + gen byte educy =. + replace educy = 0 if e2_2 == 0 + replace educy = e2_3 if e2_2 == 1 & inrange(e2_3,0,4) + replace educy = 4 + e2_3 if e2_2 == 2 & inrange(e2_3,0,5) + replace educy = 9 + e2_3 if e2_2 == 3 & inrange(e2_3,0,3) + replace educy = 9 + e2_3 if e2_2 == 4 & inrange(e2_3,0,2) + replace educy = 9 + e2_3 if e2_2 == 5 & inrange(e2_3,0,5) + replace educy = 12 + e2_3 if e2_2 == 6 & inrange(e2_3,0,7) + replace educy = 16 + e2_3 if e2_2 == 7 & inrange(e2_3,0,4) + label var educy "Years of education" +* + + +*<_educat7_> + gen byte educat7 =. + replace educat7 = 1 if e2_2 == 0 + replace educat7 = 2 if e2_2 == 1 & e2_3 < 4 + replace educat7 = 3 if e2_2 == 1 & e2_3 == 4 + replace educat7 = 4 if e2_2 == 2 + replace educat7 = 5 if inrange(e2_2, 3, 4) + replace educat7 = 6 if e2_2 == 5 + replace educat7 = 7 if inrange(e2_2, 6, 7) + label var educat7 "Level of education 1" + la de lbleducat7 1 "No education" 2 "Primary incomplete" 3 "Primary complete" 4 "Secondary incomplete" 5 "Secondary complete" 6 "Higher than secondary but not university" 7 "University incomplete or complete", replace + label values educat7 lbleducat7 +* + + +*<_educat5_> + gen byte educat5 = educat7 + recode educat5 4=3 5=4 6 7=5 + label var educat5 "Level of education 2" + la de lbleducat5 1 "No education" 2 "Primary incomplete" 3 "Primary complete but secondary incomplete" 4 "Secondary complete" 5 "Some tertiary/post-secondary" + label values educat5 lbleducat5 +* + + +*<_educat4_> + gen byte educat4 = educat7 + recode educat4 (2 3 4 = 2) (5=3) (6 7=4) + label var educat4 "Level of education 3" + la de lbleducat4 1 "No education" 2 "Primary" 3 "Secondary" 4 "Post-secondary" + label values educat4 lbleducat4 +* + + +*<_educat_orig_> + clonevar educat_orig = e2_2 + label var educat_orig "Original survey education code" +* + + +*<_educat_isced_> + gen educat_isced = . + label var educat_isced "ISCED standardised level of education" +* + + +*----------6.1: Education cleanup------------------------------* + +*<_% Correction min age_> + +** Drop info for cases under the age for which questions to be asked (do not need a variable for this) +local ed_var "school literacy educy educat7 educat5 educat4 educat_orig educat_isced" + +foreach v of local ed_var { + cap confirm numeric variable `v' + if _rc == 0 { // is indeed numeric + replace `v'=. if ( age < ed_mod_age & !missing(age) ) + } + else { // is not + replace `v'= "" if ( age < ed_mod_age & !missing(age) ) + } +} + + +* + + +} + + +/*%%============================================================================================= + 7: Training +==============================================================================================%%*/ + + +{ + +*<_vocational_> + gen vocational = . + label de lblvocational 0 "No" 1 "Yes" + label var vocational "Ever received vocational training" +* + + +*<_vocational_type_> + gen vocational_type = . + label de lblvocational_type 1 "Inside Enterprise" 2 "External" + label values vocational_type lblvocational_type + label var vocational_type "Type of vocational training" +* + + +*<_vocational_length_l_> + gen vocational_length_l = . + label var vocational_length_l "Length of training in months, lower limit" +* + + +*<_vocational_length_u_> + gen vocational_length_u = . + label var vocational_length_u "Length of training in months, upper limit" +* + + +*<_vocational_field_orig_> + gen str vocational_field_orig = "" + label var vocational_field_orig "Original field of training information" +* + + +*<_vocational_financed_> + gen vocational_financed = . + label de lblvocational_financed 1 "Employer" 2 "Government" 3 "Mixed Employer/Government" 4 "Own funds" 5 "Other" + label var vocational_financed "How training was financed" +* + +} + + +/*%%============================================================================================= + 8: Labour +==============================================================================================%%*/ + + +*<_minlaborage_> + gen byte minlaborage = 15 + label var minlaborage "Labor module application age" +* + + +*----------8.1: 7 day reference overall------------------------------* + +{ +*<_lstatus_> + + * Logic is either have a job (yes to D1_1a) or returning (D1_2a) + * However the returning is subject to reasons (D1_3a) that are not + * a skip pattern but upon probing of the enumerator + * The below tab shows that some go to main job, others don't + * tab d1_3a d1_4a,m + gen byte lstatus = 1 if !mi(d1_4a) + + * For unemployed we need looking for a job (d2_5) and willing to accept (d2_9) + * Ensured all who looked answer the willing question + count if inrange(d2_5,1,2) & mi(d2_9) + assert `r(N)' == 0 + replace lstatus = 2 if lstatus == . & inrange(d2_5, 1, 2) & d2_9 == 1 + + * Normally, I would set all others to NLF, but given that we have the absentees, assign only to no in d2_5 + replace lstatus = 3 if lstatus == . & d2_5 == 3 + replace lstatus = 3 if lstatus == . & inrange(d2_5, 1, 2) & d2_9 == 2 + + replace lstatus = . if age < minlaborage + label var lstatus "Labor status" + la de lbllstatus 1 "Employed" 2 "Unemployed" 3 "Non-LF" + label values lstatus lbllstatus +* + + +*<_potential_lf_> + gen byte potential_lf = 0 + * Either not looking but would accept or looking but would not accept + replace potential_lf = 1 if (d2_5 == 3 & d2_9 == 1) | (inrange(d2_5,1,2) & d2_9 == 2) + replace potential_lf = . if age < minlaborage & age != . + replace potential_lf = . if lstatus != 3 + label var potential_lf "Potential labour force status" + la de lblpotential_lf 0 "No" 1 "Yes" + label values potential_lf lblpotential_lf +* + + +*<_underemployment_> + gen byte underemployment = 0 + replace underemployment = 1 if d1_24a == 7 + replace underemployment = . if age < minlaborage & age != . + replace underemployment = . if lstatus != 1 + label var underemployment "Underemployment status" + la de lblunderemployment 0 "No" 1 "Yes" + label values underemployment lblunderemployment +* + + +*<_nlfreason_> + gen byte nlfreason = . + label var nlfreason "Reason not in the labor force" + la de lblnlfreason 1 "Student" 2 "Housekeeper" 3 "Retired" 4 "Disabled" 5 "Other" + label values nlfreason lblnlfreason +* + + +*<_unempldur_l_> + gen byte unempldur_l = . + replace unempldur_l = 0 if d2_8 == 1 + replace unempldur_l = 3 if d2_8 == 2 + replace unempldur_l = 12 if d2_8 == 3 + replace unempldur_l = 24 if d2_8 == 4 + replace unempldur_l = 48 if d2_8 == 5 + replace unempldur_l = . if lstatus != 2 + label var unempldur_l "Unemployment duration (months) lower bracket" +* + + +*<_unempldur_u_> + gen byte unempldur_u=. + replace unempldur_u = 3 if d2_8 == 1 + replace unempldur_u = 12 if d2_8 == 2 + replace unempldur_u = 24 if d2_8 == 3 + replace unempldur_u = 48 if d2_8 == 4 + replace unempldur_u = 9999 if d2_8 == 5 + replace unempldur_u = . if lstatus != 2 + label var unempldur_u "Unemployment duration (months) upper bracket" +* +} + + +*----------8.2: 7 day reference main job------------------------------* + + +{ +*<_empstat_> + gen byte empstat = d1_7a + recode empstat (2 = 1) (5 = 4) (6 = 2) + replace empstat = . if lstatus != 1 + label var empstat "Employment status during past week primary job 7 day recall" + la de lblempstat 1 "Paid employee" 2 "Non-paid employee" 3 "Employer" 4 "Self-employed" 5 "Other, workers not classifiable by status" + label values empstat lblempstat +* + + +*<_ocusec_> + gen byte ocusec = d1_9a + recode ocusec (2 = 1) (3/5 = 2) + replace ocusec = . if lstatus != 1 + label var ocusec "Sector of activity primary job 7 day recall" + la de lblocusec 1 "Public Sector, Central Government, Army" 2 "Private, NGO" 3 "State owned" 4 "Public or State-owned, but cannot distinguish" + label values ocusec lblocusec +* + + +*<_industry_orig_> + gen industry_orig = string(d1_5a, "%02.0f") + replace industry_orig = "" if industry_orig == "." + replace industry_orig = "" if lstatus != 1 + label var industry_orig "Original survey industry code, main job 7 day recall" +* + + +*<_industrycat_isic_> + gen industrycat_isic = industry_orig + "00" if !mi(industry_orig) + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + drop if missing(industrycat_isic) + int_classif_universe, var(industrycat_isic) universe(ISIC) + count + list + *assert `r(N)' == 0 + restore + + label var industrycat_isic "ISIC code of primary job 7 day recall" +* + + +*<_industrycat10_> + gen byte industrycat10 = . + replace industrycat10 = 1 if inrange(industry_orig, "01", "03") + replace industrycat10 = 2 if inrange(industry_orig, "05", "09") + replace industrycat10 = 3 if inrange(industry_orig, "10", "33") + replace industrycat10 = 4 if inrange(industry_orig, "35", "39") + replace industrycat10 = 5 if inrange(industry_orig, "41", "43") + replace industrycat10 = 6 if inrange(industry_orig, "45", "47") | inrange(industry_orig, "55", "56") + replace industrycat10 = 7 if inrange(industry_orig, "49", "53") | inrange(industry_orig, "58", "63") + replace industrycat10 = 8 if inrange(industry_orig, "64", "82") + replace industrycat10 = 9 if inrange(industry_orig, "84", "84") + replace industrycat10 = 10 if inrange(industry_orig, "85", "99") + label var industrycat10 "1 digit industry classification, primary job 7 day recall" + la de lblindustrycat10 1 "Agriculture" 2 "Mining" 3 "Manufacturing" 4 "Public utilities" 5 "Construction" 6 "Commerce" 7 "Transport and Comnunications" 8 "Financial and Business Services" 9 "Public Administration" 10 "Other Services, Unspecified" + label values industrycat10 lblindustrycat10 +* + + +*<_industrycat4_> + gen byte industrycat4 = industrycat10 + recode industrycat4 (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4 "Broad Economic Activities classification, primary job 7 day recall" + la de lblindustrycat4 1 "Agriculture" 2 "Industry" 3 "Services" 4 "Other" + label values industrycat4 lblindustrycat4 +* + + +*<_occup_orig_> + gen occup_orig = d1_6a + label var occup_orig "Original occupation record primary job 7 day recall" +* + + +*<_occup_isco_> + gen occup_isco = "" + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + *drop if missing(occup_isco) + *int_classif_universe, var(occup_isco) universe(ISCO) + count + *list + *assert `r(N)' == 0 + restore + + label var occup_isco "ISCO code of primary job 7 day recall" +* + + +*<_occup_> + gen byte occup = d1_6a + recode occup (51 52 = 5) (99 = 10) + label var occup "1 digit occupational classification, primary job 7 day recall" + la de lbloccup 1 "Managers" 2 "Professionals" 3 "Technicians" 4 "Clerks" 5 "Service and market sales workers" 6 "Skilled agricultural" 7 "Craft workers" 8 "Machine operators" 9 "Elementary occupations" 10 "Armed forces" 99 "Others" + label values occup lbloccup +* + + +*<_occup_skill_> + gen occup_skill = . + replace occup_skill = 3 if inrange(occup, 1, 3) + replace occup_skill = 2 if inrange(occup, 4, 8) + replace occup_skill = 1 if occup == 9 + la de lblskill 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill lblskill + label var occup_skill "Skill based on ISCO standard primary job 7 day recall" +* + + +*<_wage_no_compen_> + egen double wage_no_compen = rowtotal(d1_14a d1_16a), missing + replace wage_no_compen = . if lstatus != 1 | empstat == 2 | wage_no_compen == 0 + label var wage_no_compen "Last wage payment primary job 7 day recall" +* + + +*<_unitwage_> + +/* <_unitwage_note> + Unitwage refers to the unit used to record wage_no_compen, *not* the unit of + general wage payent. For example, PHL LFS asks about wage periodicity, then + asks for basic daily pay. The value of that pay would be wage_no_compen, + while unitwage is code 1 ("Daily") for all, regardless of the periodicity. + */ + + gen byte unitwage = 5 + replace unitwage = . if mi(wage_no_compen) + label var unitwage "Last wages' time unit primary job 7 day recall" + la de lblunitwage 1 "Daily" 2 "Weekly" 3 "Every two weeks" 4 "Bimonthly" 5 "Monthly" 6 "Trimester" 7 "Biannual" 8 "Annually" 9 "Hourly" 10 "Other" + label values unitwage lblunitwage +* + + +*<_whours_> + gen whours = d1_22a + replace whours = . if whours == 0 | lstatus != 1 + label var whours "Hours of work in last week primary job 7 day recall" +* + + +*<_wmonths_> + gen wmonths = . + label var wmonths "Months of work in past 12 months primary job 7 day recall" +* + + +*<_wage_total_> +/* <_wage_total_note> + + Use gross wages when available and net wages only when gross wages are not available. + This is done to make it easy to compare earnings in formal and informal sectors. + + */ + gen wage_total = . + label var wage_total "Annualized total wage primary job 7 day recall" +* + + +*<_contract_> + gen byte contract = 0 + replace contract = 1 if d1_7a == 1 + replace contract = . if lstatus != 1 + label var contract "Employment has contract primary job 7 day recall" + la de lblcontract 0 "Without contract" 1 "With contract" + label values contract lblcontract +* + + +*<_healthins_> + gen byte healthins = . + label var healthins "Employment has health insurance primary job 7 day recall" + la de lblhealthins 0 "Without health insurance" 1 "With health insurance" + label values healthins lblhealthins +* + + +*<_socialsec_> + gen byte socialsec = . + label var socialsec "Employment has social security insurance primary job 7 day recall" + la de lblsocialsec 1 "With social security" 0 "Without social secturity" + label values socialsec lblsocialsec +* + + +*<_union_> + gen byte union = . + label var union "Union membership at primary job 7 day recall" + la de lblunion 0 "Not union member" 1 "Union member" + label values union lblunion +* + + +*<_firmsize_l_> + gen firmsize_l = . + replace firmsize_l = 1 if d1_11a == 1 + replace firmsize_l = 6 if d1_11a == 2 + replace firmsize_l = 16 if d1_11a == 3 + replace firmsize_l = 31 if d1_11a == 4 + replace firmsize_l = 50 if d1_11a == 5 + replace firmsize_l = 100 if d1_11a == 6 + + * Add in public sector workers (skip firm size as largest bracket) + replace firmsize_l = 100 if ocusec == 1 & mi(firmsize_l) + + replace firmsize_l = . if lstatus != 1 + label var firmsize_l "Firm size (lower bracket) primary job 7 day recall" +* + + +*<_firmsize_u_> + gen firmsize_u= . + replace firmsize_u = 5 if d1_11a == 1 + replace firmsize_u = 15 if d1_11a == 2 + replace firmsize_u = 30 if d1_11a == 3 + replace firmsize_u = 49 if d1_11a == 4 + replace firmsize_u = 99 if d1_11a == 5 + replace firmsize_u = 9999 if d1_11a == 6 + + * Add in public sector workers (skip firm size as largest bracket) + replace firmsize_u = 9999 if ocusec == 1 & mi(firmsize_u) + + replace firmsize_u = . if lstatus != 1 + label var firmsize_u "Firm size (upper bracket) primary job 7 day recall" +* + +} + + +*----------8.3: 7 day reference secondary job------------------------------* +* Since labels are the same as main job, values are labelled using main job labels + + +{ +*<_empstat_2_> + gen byte empstat_2 = d1_7b + recode empstat_2 (2 = 1) (5 = 4) (6 = 2) + label var empstat_2 "Employment status during past week secondary job 7 day recall" + label values empstat_2 lblempstat +* + + +*<_ocusec_2_> + gen byte ocusec_2 = d1_9b + recode ocusec_2 (2 = 1) (3/5 = 2) + replace ocusec_2 = . if mi(empstat_2) + label var ocusec_2 "Sector of activity secondary job 7 day recall" + label values ocusec_2 lblocusec +* + + +*<_industry_orig_2_> + gen industry_orig_2 = string(d1_5b, "%02.0f") + replace industry_orig_2 = "" if industry_orig_2 == "." + replace industry_orig_2 = "" if mi(empstat_2) + label var industry_orig_2 "Original survey industry code, secondary job 7 day recall" +* + + +*<_industrycat_isic_2_> + gen industrycat_isic_2 = industry_orig_2 + "00" if !mi(industry_orig_2) + label var industrycat_isic_2 "ISIC code of secondary job 7 day recall" +* + + +*<_industrycat10_2_> + gen byte industrycat10_2 = . + replace industrycat10_2 = 1 if inrange(industry_orig_2, "01", "03") + replace industrycat10_2 = 2 if inrange(industry_orig_2, "05", "09") + replace industrycat10_2 = 3 if inrange(industry_orig_2, "10", "33") + replace industrycat10_2 = 4 if inrange(industry_orig_2, "35", "39") + replace industrycat10_2 = 5 if inrange(industry_orig_2, "41", "43") + replace industrycat10_2 = 6 if inrange(industry_orig_2, "45", "47") | inrange(industry_orig_2, "55", "56") + replace industrycat10_2 = 7 if inrange(industry_orig_2, "49", "53") | inrange(industry_orig_2, "58", "63") + replace industrycat10_2 = 8 if inrange(industry_orig_2, "64", "82") + replace industrycat10_2 = 9 if inrange(industry_orig_2, "84", "84") + replace industrycat10_2 = 10 if inrange(industry_orig_2, "85", "99") + label var industrycat10_2 "1 digit industry classification, secondary job 7 day recall" + label values industrycat10_2 lblindustrycat10 +* + + +*<_industrycat4_2_> + gen byte industrycat4_2 = industrycat10_2 + recode industrycat4_2 (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4_2 "Broad Economic Activities classification, secondary job 7 day recall" + label values industrycat4_2 lblindustrycat4 +* + + +*<_occup_orig_2_> + gen occup_orig_2 = d1_6b + label var occup_orig_2 "Original occupation record secondary job 7 day recall" +* + + +*<_occup_isco_2_> + gen occup_isco_2 = "" + label var occup_isco_2 "ISCO code of secondary job 7 day recall" +* + + +*<_occup_2_> + gen byte occup_2 = d1_6b + recode occup_2 (51 52 = 5) (99 = 10) + label var occup_2 "1 digit occupational classification secondary job 7 day recall" + label values occup_2 lbloccup +* + + +*<_occup_skill_2_> + gen occup_skill_2 = . + replace occup_skill_2 = 3 if inrange(occup_2, 1, 3) + replace occup_skill_2 = 2 if inrange(occup_2, 4, 8) + replace occup_skill_2 = 1 if occup_2 == 9 + la de lblskill2 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill_2 lblskill2 + label var occup_skill_2 "Skill based on ISCO standard secondary job 7 day recall" +* + + +*<_wage_no_compen_2_> + egen double wage_no_compen_2 = rowtotal(d1_14b d1_16b), missing + replace wage_no_compen_2 = . if mi(empstat_2) | empstat_2 == 2 | wage_no_compen_2 == 0 + label var wage_no_compen_2 "Last wage payment secondary job 7 day recall" +* + + +*<_unitwage_2_> + gen byte unitwage_2 = 5 + replace unitwage_2 = . if mi(wage_no_compen_2) + label var unitwage_2 "Last wages' time unit secondary job 7 day recall" + label values unitwage_2 lblunitwage +* + + +*<_whours_2_> + gen whours_2 = d1_22b + replace whours_2 = . if whours_2 == 0 | mi(empstat_2) + label var whours_2 "Hours of work in last week secondary job 7 day recall" +* + + +*<_wmonths_2_> + gen wmonths_2 = . + label var wmonths_2 "Months of work in past 12 months secondary job 7 day recall" +* + + +*<_wage_total_2_> + gen wage_total_2 = . + label var wage_total_2 "Annualized total wage secondary job 7 day recall" +* + + +*<_firmsize_l_2_> + gen firmsize_l_2 = . + replace firmsize_l_2 = 1 if d1_11b == 1 + replace firmsize_l_2 = 6 if d1_11b == 2 + replace firmsize_l_2 = 16 if d1_11b == 3 + replace firmsize_l_2 = 31 if d1_11b == 4 + replace firmsize_l_2 = 50 if d1_11b == 5 + replace firmsize_l_2 = 100 if d1_11b == 6 + + * Add in public sector workers (skip firm size as largest bracket) + replace firmsize_l_2 = 100 if ocusec_2 == 1 & mi(firmsize_l_2) + + replace firmsize_l_2 = . if mi(empstat_2) + label var firmsize_l_2 "Firm size (lower bracket) secondary job 7 day recall" +* + + +*<_firmsize_u_2_> + gen firmsize_u_2 = . + replace firmsize_u_2 = 5 if d1_11b == 1 + replace firmsize_u_2 = 15 if d1_11b == 2 + replace firmsize_u_2 = 30 if d1_11b == 3 + replace firmsize_u_2 = 49 if d1_11b == 4 + replace firmsize_u_2 = 99 if d1_11b == 5 + replace firmsize_u_2 = 9999 if d1_11b == 6 + + * Add in public sector workers (skip firm size as largest bracket) + replace firmsize_u_2 = 9999 if ocusec_2 == 1 & mi(firmsize_u_2) + + replace firmsize_u_2 = . if mi(empstat_2) + label var firmsize_u_2 "Firm size (upper bracket) secondary job 7 day recall" +* + +} + + +*----------8.4: 7 day reference additional jobs------------------------------* + +*<_t_hours_others_> + gen t_hours_others = . + label var t_hours_others "Annualized hours worked in all but primary and secondary jobs 7 day recall" +* + + +*<_t_wage_nocompen_others_> + gen t_wage_nocompen_others = . + label var t_wage_nocompen_others "Annualized wage in all but 1st & 2nd jobs excl. bonuses, etc. 7 day recall" +* + + +*<_t_wage_others_> + gen t_wage_others = . + label var t_wage_others "Annualized wage in all but primary and secondary jobs (12-mon ref period)" +* + + +*----------8.5: 7 day reference total summary------------------------------* + + +*<_t_hours_total_> + gen t_hours_total = . + label var t_hours_total "Annualized hours worked in all jobs 7 day recall" +* + + +*<_t_wage_nocompen_total_> + gen t_wage_nocompen_total = . + label var t_wage_nocompen_total "Annualized wage in all jobs excl. bonuses, etc. 7 day recall" +* + + +*<_t_wage_total_> + gen t_wage_total = . + label var t_wage_total "Annualized total wage for all jobs 7 day recall" +* + + +*----------8.6: 12 month reference overall------------------------------* + +{ + +*<_lstatus_year_> + gen byte lstatus_year = . + replace lstatus_year=. if age < minlaborage & age != . + label var lstatus_year "Labor status during last year" + la de lbllstatus_year 1 "Employed" 2 "Unemployed" 3 "Non-LF" + label values lstatus_year lbllstatus_year +* + +*<_potential_lf_year_> + gen byte potential_lf_year = . + replace potential_lf_year=. if age < minlaborage & age != . + replace potential_lf_year = . if lstatus_year != 3 + label var potential_lf_year "Potential labour force status" + la de lblpotential_lf_year 0 "No" 1 "Yes" + label values potential_lf_year lblpotential_lf_year +* + + +*<_underemployment_year_> + gen byte underemployment_year = . + replace underemployment_year = . if age < minlaborage & age != . + replace underemployment_year = . if lstatus_year == 1 + label var underemployment_year "Underemployment status" + la de lblunderemployment_year 0 "No" 1 "Yes" + label values underemployment_year lblunderemployment_year +* + + +*<_nlfreason_year_> + gen byte nlfreason_year=. + label var nlfreason_year "Reason not in the labor force" + la de lblnlfreason_year 1 "Student" 2 "Housekeeper" 3 "Retired" 4 "Disabled" 5 "Other" + label values nlfreason_year lblnlfreason_year +* + + +*<_unempldur_l_year_> + gen byte unempldur_l_year=. + label var unempldur_l_year "Unemployment duration (months) lower bracket" +* + + +*<_unempldur_u_year_> + gen byte unempldur_u_year=. + label var unempldur_u_year "Unemployment duration (months) upper bracket" +* + +} + +*----------8.7: 12 month reference main job------------------------------* + +{ + +*<_empstat_year_> + gen byte empstat_year = . + label var empstat_year "Employment status during past week primary job 12 month recall" + la de lblempstat_year 1 "Paid employee" 2 "Non-paid employee" 3 "Employer" 4 "Self-employed" 5 "Other, workers not classifiable by status" + label values empstat_year lblempstat_year +* + +*<_ocusec_year_> + gen byte ocusec_year = . + label var ocusec_year "Sector of activity primary job 12 month recall" + la de lblocusec_year 1 "Public Sector, Central Government, Army" 2 "Private, NGO" 3 "State owned" 4 "Public or State-owned, but cannot distinguish" + label values ocusec_year lblocusec_year +* + +*<_industry_orig_year_> + gen industry_orig_year = . + label var industry_orig_year "Original industry record main job 12 month recall" +* + + +*<_industrycat_isic_year_> + gen industrycat_isic_year = . + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + *drop if missing(industrycat_isic_year) + *int_classif_universe, var(industrycat_isic_year) universe(ISIC) + count + *list + *assert `r(N)' == 0 + restore + + label var industrycat_isic_year "ISIC code of primary job 12 month recall" +* + +*<_industrycat10_year_> + gen byte industrycat10_year = . + label var industrycat10_year "1 digit industry classification, primary job 12 month recall" + la de lblindustrycat10_year 1 "Agriculture" 2 "Mining" 3 "Manufacturing" 4 "Public utilities" 5 "Construction" 6 "Commerce" 7 "Transport and Comnunications" 8 "Financial and Business Services" 9 "Public Administration" 10 "Other Services, Unspecified" + label values industrycat10_year lblindustrycat10_year +* + + +*<_industrycat4_year_> + gen byte industrycat4_year=industrycat10_year + recode industrycat4_year (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4_year "Broad Economic Activities classification, primary job 12 month recall" + la de lblindustrycat4_year 1 "Agriculture" 2 "Industry" 3 "Services" 4 "Other" + label values industrycat4_year lblindustrycat4_year +* + + +*<_occup_orig_year_> + gen occup_orig_year = . + label var occup_orig_year "Original occupation record primary job 12 month recall" +* + + +*<_occup_isco_year_> + gen occup_isco_year = "" + + * Check that no errors --> using our universe check function, count should be 0 (no obs wrong) + * https://github.com/worldbank/gld/tree/main/Support/Z%20-%20GLD%20Ecosystem%20Tools/ISIC%20ISCO%20universe%20check + preserve + *drop if missing(occup_isco_year) + *int_classif_universe, var(occup_isco_year) universe(ISCO) + count + *list + *assert `r(N)' == 0 + restore + + label var occup_isco_year "ISCO code of primary job 12 month recall" +* + + +*<_occup_year_> + gen byte occup_year = . + label var occup_year "1 digit occupational classification, primary job 12 month recall" + la de lbloccup_year 1 "Managers" 2 "Professionals" 3 "Technicians" 4 "Clerks" 5 "Service and market sales workers" 6 "Skilled agricultural" 7 "Craft workers" 8 "Machine operators" 9 "Elementary occupations" 10 "Armed forces" 99 "Others" + label values occup_year lbloccup_year +* + + +*<_occup_skill_year_> + gen occup_skill_year = . + replace occup_skill_year = 3 if inrange(occup_year, 1, 3) + replace occup_skill_year = 2 if inrange(occup_year, 4, 8) + replace occup_skill_year = 1 if occup_year == 9 + la de lblskillyear 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill_year lblskillyear + label var occup_skill_year "Skill based on ISCO standard primary job 12 month recall" +* + + +*<_wage_no_compen_year_> --- this var has the same name as other and when quoted in the keep and order codes is repeated. + gen double wage_no_compen_year = . + label var wage_no_compen_year "Last wage payment primary job 12 month recall" +* + + +*<_unitwage_year_> + gen byte unitwage_year = . + label var unitwage_year "Last wages' time unit primary job 12 month recall" + la de lblunitwage_year 1 "Daily" 2 "Weekly" 3 "Every two weeks" 4 "Bimonthly" 5 "Monthly" 6 "Trimester" 7 "Biannual" 8 "Annually" 9 "Hourly" 10 "Other" + label values unitwage_year lblunitwage_year +* + + +*<_whours_year_> + gen whours_year = . + label var whours_year "Hours of work in last week primary job 12 month recall" +* + + +*<_wmonths_year_> + gen wmonths_year = . + label var wmonths_year "Months of work in past 12 months primary job 12 month recall" +* + + +*<_wage_total_year_> + gen wage_total_year = . + label var wage_total_year "Annualized total wage primary job 12 month recall" +* + + +*<_contract_year_> + gen byte contract_year = . + label var contract_year "Employment has contract primary job 12 month recall" + la de lblcontract_year 0 "Without contract" 1 "With contract" + label values contract_year lblcontract_year +* + + +*<_healthins_year_> + gen byte healthins_year = . + label var healthins_year "Employment has health insurance primary job 12 month recall" + la de lblhealthins_year 0 "Without health insurance" 1 "With health insurance" + label values healthins_year lblhealthins_year +* + + +*<_socialsec_year_> + gen byte socialsec_year = . + label var socialsec_year "Employment has social security insurance primary job 7 day recall" + la de lblsocialsec_year 1 "With social security" 0 "Without social secturity" + label values socialsec_year lblsocialsec_year +* + + +*<_union_year_> + gen byte union_year = . + label var union_year "Union membership at primary job 12 month recall" + la de lblunion_year 0 "Not union member" 1 "Union member" + label values union_year lblunion_year +* + + +*<_firmsize_l_year_> + gen firmsize_l_year = . + label var firmsize_l_year "Firm size (lower bracket) primary job 12 month recall" +* + + +*<_firmsize_u_year_> + gen firmsize_u_year = . + label var firmsize_u_year "Firm size (upper bracket) primary job 12 month recall" +* + +} + + +*----------8.8: 12 month reference secondary job------------------------------* + +{ + +*<_empstat_2_year_> + gen byte empstat_2_year = . + label var empstat_2_year "Employment status during past week secondary job 12 month recall" + label values empstat_2_year lblempstat_year +* + + +*<_ocusec_2_year_> + gen byte ocusec_2_year = . + label var ocusec_2_year "Sector of activity secondary job 12 month recall" + la de lblocusec_2_year 1 "Public Sector, Central Government, Army" 2 "Private, NGO" 3 "State owned" 4 "Public or State-owned, but cannot distinguish" + label values ocusec_2_year lblocusec_2_year +* + + + +*<_industry_orig_2_year_> + gen industry_orig_2_year = . + label var industry_orig_2_year "Original survey industry code, secondary job 12 month recall" +* + + + +*<_industrycat_isic_2_year_> + gen industrycat_isic_2_year = . + label var industrycat_isic_2_year "ISIC code of secondary job 12 month recall" +* + + +*<_industrycat10_2_year_> + gen byte industrycat10_2_year = . + label var industrycat10_2_year "1 digit industry classification, secondary job 12 month recall" + label values industrycat10_2_year lblindustrycat10_year +* + + +*<_industrycat4_2_year_> + gen byte industrycat4_2_year=industrycat10_2_year + recode industrycat4_2_year (1=1)(2 3 4 5 =2)(6 7 8 9=3)(10=4) + label var industrycat4_2_year "Broad Economic Activities classification, secondary job 12 month recall" + label values industrycat4_2_year lblindustrycat4_year +* + + +*<_occup_orig_2_year_> + gen occup_orig_2_year = . + label var occup_orig_2_year "Original occupation record secondary job 12 month recall" +* + + +*<_occup_isco_2_year_> + gen occup_isco_2_year = "" + label var occup_isco_2_year "ISCO code of secondary job 12 month recall" +* + + +*<_occup_2_year_> + gen byte occup_2_year = . + label var occup_2_year "1 digit occupational classification, secondary job 12 month recall" + label values occup_2_year lbloccup_year +* + + +*<_occup_skill_2_year_> + gen occup_skill_2_year = . + replace occup_skill_2_year = 3 if inrange(occup_2_year, 1, 3) + replace occup_skill_2_year = 2 if inrange(occup_2_year, 4, 8) + replace occup_skill_2_year = 1 if occup_2_year == 9 + la de lblskilly2 1 "Low skill" 2 "Medium skill" 3 "High skill" + label values occup_skill_2_year lblskilly2 + label var occup_skill_2_year "Skill based on ISCO standard secondary job 12 month recall" +* + + +*<_wage_no_compen_2_year_> + gen double wage_no_compen_2_year = . + label var wage_no_compen_2_year "Last wage payment secondary job 12 month recall" +* + + +*<_unitwage_2_year_> + gen byte unitwage_2_year = . + label var unitwage_2_year "Last wages' time unit secondary job 12 month recall" + label values unitwage_2_year lblunitwage_year +* + + +*<_whours_2_year_> + gen whours_2_year = . + label var whours_2_year "Hours of work in last week secondary job 12 month recall" +* + + +*<_wmonths_2_year_> + gen wmonths_2_year = . + label var wmonths_2_year "Months of work in past 12 months secondary job 12 month recall" +* + + +*<_wage_total_2_year_> + gen wage_total_2_year = . + label var wage_total_2_year "Annualized total wage secondary job 12 month recall" +* + +*<_firmsize_l_2_year_> + gen firmsize_l_2_year = . + label var firmsize_l_2_year "Firm size (lower bracket) secondary job 12 month recall" +* + + +*<_firmsize_u_2_year_> + gen firmsize_u_2_year = . + label var firmsize_u_2_year "Firm size (upper bracket) secondary job 12 month recall" +* + +} + + +*----------8.9: 12 month reference additional jobs------------------------------* + + +*<_t_hours_others_year_> + gen t_hours_others_year = . + label var t_hours_others_year "Annualized hours worked in all but primary and secondary jobs 12 month recall" +* + +*<_t_wage_nocompen_others_year_> + gen t_wage_nocompen_others_year = . + label var t_wage_nocompen_others_year "Annualized wage in all but 1st & 2nd jobs excl. bonuses, etc. 12 month recall" +* + +*<_t_wage_others_year_> + gen t_wage_others_year = . + label var t_wage_others_year "Annualized wage in all but primary and secondary jobs 12 month recall" +* + + +*----------8.10: 12 month total summary------------------------------* + + +*<_t_hours_total_year_> + gen t_hours_total_year = . + label var t_hours_total_year "Annualized hours worked in all jobs 12 month month recall" +* + + +*<_t_wage_nocompen_total_year_> + gen t_wage_nocompen_total_year = . + label var t_wage_nocompen_total_year "Annualized wage in all jobs excl. bonuses, etc. 12 month recall" +* + + +*<_t_wage_total_year_> + gen t_wage_total_year = . + label var t_wage_total_year "Annualized total wage for all jobs 12 month recall" +* + + +*----------8.11: Overall across reference periods------------------------------* + + +*<_njobs_> + gen njobs = . + label var njobs "Total number of jobs" +* + + +*<_t_hours_annual_> + gen t_hours_annual = . + label var t_hours_annual "Total hours worked in all jobs in the previous 12 months" +* + + +*<_linc_nc_> + gen linc_nc = . + label var linc_nc "Total annual wage income in all jobs, excl. bonuses, etc." +* + + +*<_laborincome_> + gen laborincome = t_wage_total_year + label var laborincome "Total annual individual labor income in all jobs, incl. bonuses, etc." +* + + +*----------8.13: Labour cleanup------------------------------* + +{ +*<_% Correction min age_> + +** Drop info for cases under the age for which questions to be asked (do not need a variable for this) + local lab_var "minlaborage lstatus nlfreason unempldur_l unempldur_u empstat ocusec industry_orig industrycat_isic industrycat10 industrycat4 occup_orig occup_isco occup_skill occup wage_no_compen unitwage whours wmonths wage_total contract healthins socialsec union firmsize_l firmsize_u empstat_2 ocusec_2 industry_orig_2 industrycat_isic_2 industrycat10_2 industrycat4_2 occup_orig_2 occup_isco_2 occup_skill_2 occup_2 wage_no_compen_2 unitwage_2 whours_2 wmonths_2 wage_total_2 firmsize_l_2 firmsize_u_2 t_hours_others t_wage_nocompen_others t_wage_others t_hours_total t_wage_nocompen_total t_wage_total lstatus_year nlfreason_year unempldur_l_year unempldur_u_year empstat_year ocusec_year industry_orig_year industrycat_isic_year industrycat10_year industrycat4_year occup_orig_year occup_isco_year occup_skill_year occup_year unitwage_year whours_year wmonths_year wage_total_year contract_year healthins_year socialsec_year union_year firmsize_l_year firmsize_u_year empstat_2_year ocusec_2_year industry_orig_2_year industrycat_isic_2_year industrycat10_2_year industrycat4_2_year occup_orig_2_year occup_isco_2_year occup_skill_2_year occup_2_year wage_no_compen_2_year unitwage_2_year whours_2_year wmonths_2_year wage_total_2_year firmsize_l_2_year firmsize_u_2_year t_hours_others_year t_wage_nocompen_others_year t_wage_others_year t_hours_total_year t_wage_nocompen_total_year t_wage_total_year njobs t_hours_annual linc_nc laborincome" + + foreach v of local lab_var { + cap confirm numeric variable `v' + if _rc == 0 { // is indeed numeric + replace `v'=. if ( age < minlaborage & !missing(age) ) + } + else { // is not + replace `v'= "" if ( age < minlaborage & !missing(age) ) + } + + } + +* +} + + +/*%%============================================================================================= + 9: Final steps +==============================================================================================%%*/ + +quietly{ + +*<_% KEEP VARIABLES - ALL_> + + keep countrycode survname survey icls_v isced_version isco_version isic_version year vermast veralt harmonization int_year int_month hhid pid weight weight_m weight_q psu ssu strata wave panel visit_no urban subnatid1 subnatid2 subnatid3 subnatidsurvey subnatid1_prev subnatid2_prev subnatid3_prev gaul_adm1_code gaul_adm2_code gaul_adm3_code hsize age male relationharm relationcs marital eye_dsablty hear_dsablty walk_dsablty conc_dsord slfcre_dsablty comm_dsablty migrated_mod_age migrated_ref_time migrated_binary migrated_years migrated_from_urban migrated_from_cat migrated_from_code migrated_from_country migrated_reason ed_mod_age school literacy educy educat7 educat5 educat4 educat_orig educat_isced vocational vocational_type vocational_length_l vocational_length_u vocational_field_orig vocational_financed minlaborage lstatus potential_lf underemployment nlfreason unempldur_l unempldur_u empstat ocusec industry_orig industrycat_isic industrycat10 industrycat4 occup_orig occup_isco occup_skill occup wage_no_compen unitwage whours wmonths wage_total contract healthins socialsec union firmsize_l firmsize_u empstat_2 ocusec_2 industry_orig_2 industrycat_isic_2 industrycat10_2 industrycat4_2 occup_orig_2 occup_isco_2 occup_skill_2 occup_2 wage_no_compen_2 unitwage_2 whours_2 wmonths_2 wage_total_2 firmsize_l_2 firmsize_u_2 t_hours_others t_wage_nocompen_others t_wage_others t_hours_total t_wage_nocompen_total t_wage_total lstatus_year potential_lf_year underemployment_year nlfreason_year unempldur_l_year unempldur_u_year empstat_year ocusec_year industry_orig_year industrycat_isic_year industrycat10_year industrycat4_year occup_orig_year occup_isco_year occup_skill_year occup_year wage_no_compen_year unitwage_year whours_year wmonths_year wage_total_year contract_year healthins_year socialsec_year union_year firmsize_l_year firmsize_u_year empstat_2_year ocusec_2_year industry_orig_2_year industrycat_isic_2_year industrycat10_2_year industrycat4_2_year occup_orig_2_year occup_isco_2_year occup_skill_2_year occup_2_year wage_no_compen_2_year unitwage_2_year whours_2_year wmonths_2_year wage_total_2_year firmsize_l_2_year firmsize_u_2_year t_hours_others_year t_wage_nocompen_others_year t_wage_others_year t_hours_total_year t_wage_nocompen_total_year t_wage_total_year njobs t_hours_annual linc_nc laborincome + +* + +*<_% ORDER VARIABLES_> + + order countrycode survname survey icls_v isced_version isco_version isic_version year vermast veralt harmonization int_year int_month hhid pid weight weight_m weight_q psu ssu strata wave panel visit_no urban subnatid1 subnatid2 subnatid3 subnatidsurvey subnatid1_prev subnatid2_prev subnatid3_prev gaul_adm1_code gaul_adm2_code gaul_adm3_code hsize age male relationharm relationcs marital eye_dsablty hear_dsablty walk_dsablty conc_dsord slfcre_dsablty comm_dsablty migrated_mod_age migrated_ref_time migrated_binary migrated_years migrated_from_urban migrated_from_cat migrated_from_code migrated_from_country migrated_reason ed_mod_age school literacy educy educat7 educat5 educat4 educat_orig educat_isced vocational vocational_type vocational_length_l vocational_length_u vocational_field_orig vocational_financed minlaborage lstatus potential_lf underemployment nlfreason unempldur_l unempldur_u empstat ocusec industry_orig industrycat_isic industrycat10 industrycat4 occup_orig occup_isco occup_skill occup wage_no_compen unitwage whours wmonths wage_total contract healthins socialsec union firmsize_l firmsize_u empstat_2 ocusec_2 industry_orig_2 industrycat_isic_2 industrycat10_2 industrycat4_2 occup_orig_2 occup_isco_2 occup_skill_2 occup_2 wage_no_compen_2 unitwage_2 whours_2 wmonths_2 wage_total_2 firmsize_l_2 firmsize_u_2 t_hours_others t_wage_nocompen_others t_wage_others t_hours_total t_wage_nocompen_total t_wage_total lstatus_year potential_lf_year underemployment_year nlfreason_year unempldur_l_year unempldur_u_year empstat_year ocusec_year industry_orig_year industrycat_isic_year industrycat10_year industrycat4_year occup_orig_year occup_isco_year occup_skill_year occup_year wage_no_compen_year unitwage_year whours_year wmonths_year wage_total_year contract_year healthins_year socialsec_year union_year firmsize_l_year firmsize_u_year empstat_2_year ocusec_2_year industry_orig_2_year industrycat_isic_2_year industrycat10_2_year industrycat4_2_year occup_orig_2_year occup_isco_2_year occup_skill_2_year occup_2_year wage_no_compen_2_year unitwage_2_year whours_2_year wmonths_2_year wage_total_2_year firmsize_l_2_year firmsize_u_2_year t_hours_others_year t_wage_nocompen_others_year t_wage_others_year t_hours_total_year t_wage_nocompen_total_year t_wage_total_year njobs t_hours_annual linc_nc laborincome + +* + +*<_% DROP UNUSED LABELS_> + + * Store all labels in data + label dir + local all_lab `r(names)' + + * Store all variables with a label, extract value label names + local used_lab = "" + ds, has(vallabel) + + local labelled_vars `r(varlist)' + + foreach varName of local labelled_vars { + local y : value label `varName' + local used_lab `"`used_lab' `y'"' + } + + * Compare lists, `notused' is list of labels in directory but not used in final variables + local notused : list all_lab - used_lab // local `notused' defines value labs not in remaining vars + local notused_len : list sizeof notused // store size of local + + * drop labels if the length of the notused vector is 1 or greater, otherwise nothing to drop + if `notused_len' >= 1 { + label drop `notused' + } + else { + di "There are no unused labels to drop. No value labels dropped." + } + + +* + +} + + +*<_% DELETE MISSING VARIABLES_> + +quietly: describe, varlist +local kept_vars `r(varlist)' + +foreach var of local kept_vars { + capture assert missing(`var') + if !_rc drop `var' +} + +* + + +*<_% COMPRESS_> + +compress + +* + + +*<_% SAVE_> + +save "`path_output'/`out_file'", replace + +* diff --git a/Support/B - Country Survey Details/ARM/ILCS/1. Introduction to ARM ILCS.md b/Support/B - Country Survey Details/ARM/ILCS/1. Introduction to ARM ILCS.md index fb9c9b366..189117005 100644 --- a/Support/B - Country Survey Details/ARM/ILCS/1. Introduction to ARM ILCS.md +++ b/Support/B - Country Survey Details/ARM/ILCS/1. Introduction to ARM ILCS.md @@ -87,4 +87,28 @@ The only exception are 228 individuals in 2013 who are coded as absent but answe ### Coding of education variables -Text \ No newline at end of file +The Armenian education system has a 4 + 5 + 3 structure where the first four years represent primary, the middle five years general secondary, and the latter three upper secondary. + +Specific to Armenia are the different paths and academic levels of vocational training, some requiring upper secondary education, others available to graduates of general education. + +[This UNESCO website](https://unevoc.unesco.org/home/Dynamic+TVET+Country+Profiles/country=ARM) summarises the (current) education situation in Armenia, including tertiary education. + +The Armenian ICLS questionnaire asks household members in the roster module about education and in the specific education module for people aged 6 and above. The GLD harmonization uses the latter, with the screenshot below showing the relevant questionnaire section. +

+ +![education questions](utilities/education_vars.png) + +The coding of the GLD variable `educat7` uses the following coding logic: + + +| Q2 - Ed level | Q3 - Ed year | GLD Educat 7 | +|-------------------------------------|------------------|---------------------------------------------| +| 0. Illiterate | Any value | 1. No education | +| 1. Primary (1-4 forms) | Under four years | 2. Primary incomplete | +| 1. Primary (1-4 forms) | If four years | 3. Primary complete | +| 2. Basic secondary (5-9 forms) | Any value | 4. Secondary incomplete | +| 3. Advanced secondary (10-12 forms) | Any value | 5. Secondary complete | +| 4. Secondary vocation | Any value | 5. Secondary complete | +| 5. College (vocational) | Any value | 6. Higher than secondary but not university | +| 6. Higher | Any value | 7. University incomplete or complete | +| 7. Post-graduate | Any value | 7. University incomplete or complete | \ No newline at end of file diff --git a/Support/B - Country Survey Details/ARM/ILCS/utilities/education_vars.png b/Support/B - Country Survey Details/ARM/ILCS/utilities/education_vars.png new file mode 100644 index 0000000000000000000000000000000000000000..7d5bd911fd59dc4b473fd0ce2bcb50f7bed665e9 GIT binary patch literal 18161 zcmZU4b97|Qy7$EP#I|i46Whkb6Wg|JJDJ#aGO=yj*4Oi%d(XM|et-1p-o5s!wb!ny zr+#|EKi?1@MRt6| zXMS{-E}w|j+sTe$$B913=F-db69h3+HBj}=r3k@g{YW?1xmVGOMazgohJ}h$!CV$4 zV0m7(h*WBiJpuSbrnU%u#xe|ADok~Yh|MuXGG8SKDXB@(^WvK|sYtyu`%DCVyW~-A z;u`xZn&>>2l5r=5ISqF)hm0V?VYtBIasEJ+9YG9ur$ zvOot+cBSXsYRB?)9Cv5SB48ba+Jd+gfF6aOm11)22v$O&bzxys?_Ak$vY zo(99VjNZ9uk@s#d7PnnRFxyFP%zi_rbX)_18sV5*Ht;gY5c_>W(7oB?%lZ7ljK6Jr zV=AFh3&zTAh=`aOOmsrgbHb8OLmu?C2?8ESL|1?z!^#=Dr{}QsQ5`b)OY68Uh%i3H zacehj8X9}zmSsQA7z{G;M8wn#1)CEVOr%P?$B9^N@RBQ#BK}SSq`OP;T$e7PW1j)J za4`<;GDo+)Vb59mTE~_|BSTGe_1T(+Bz^WQu;DnAYovh}WTq^s?>^I}#g z)ZUtIrg>({GgZVwQbKFZEk8;v-u1$5cIe6mamhPA(M(w=MIwcMOWKikx2vo{_S8S% z`JocO_-bAZw#_kre{WU@mUJyl5=kunjxM1|5iU%*lGF`OyW^Py^5ULdqdnQ%=1CYU zCOZcVAtPG!ha{*dZ!o3zMTRBq2bvZ=pMNOjr?$(-x9sQ)2s63e^V}T_P7!UW07lP! z`J2{}&OJo^T3pLZ;pcsiZRWsVdrYUWv%)h3kCcBjRG?uCO>nK-m3@j9bI_A?|mpF4e0^pCQ6Ou`e{T#UMT|4KjcI^k%HZ#T&Vs&^BUQkxDwD}Ow*gT z*L;1|9^X1XEeA;x1sl^dJ31>ptKq#$7R5*beQypGacJj-=CU(3_;g`)WA^9(BFq+k);(j4}_5S?TA(TQH%A_GB`BJL`!afvE4!zpsj6U;A z-hM2}IEyO{G;9rNC=gBEJK6$QVJtfBm^9t8P_jL9tx2@q5J-X6Tfno5$f8lw6K^2q zZuP#^xJr?*fpQ7i`h;Gj+l71O(bNwA<>PQj*AZu^svvYJo+^#7oc7q++KBgaue(`A zI>>9^IsSWL#lRKnkN8H?Ln*yJ3~ijZFe3|t^|Ne=y&V%JyJq>$Bb4L5oI%eUt9A9{ zpm{^mMe&#ey(iXeY^fuHs1S!?UoV-xC)X=Eal7BI=+klJk*w1f)dM03mxQ=kM~!Ymv$hHM^1LCH`Z+KGmARuG=BF!;tfWA~pMn$>#^mX; z(#=dX<}!J0riDcxJ4N7V(FQW?Q-T{4dci3(CF#42a5LlN>eEgQ=q-kh)G9IhE2aVz zo)Q=~-JZ+lrhHA$(Q9}dSpiPeup$d$f=k}_kttQ>Rpp+BT{H{mW&%22Do$X;ID14^ zu`#w^+)$jQY;3#Zk4v>gdl2WLt?0czngQr1_6{zT1!#;g+$jXK{S9)v-dL9M&(1i& z0}m+nbdV|5uUIQy;{pZ-!Pg%X<+!b>4KUUzh1Rw5FPXp4TW@a|tBwYCyKDF{XAS7LESWl;I@d% z`@}FQ%0=1|8jdlU0&2zIo|xA$ETDD+y*rZi$M232rupY#*o%`R!ltsW@ej7_ymD$o z-}jK$B{%%uhkhpFR}1fF3N+)`Jm}{XQpJm6kkg%@rIb2KdQK`$IbqtVyKiF^4^{PTL4|R115w(QYrb zkVFAWc$m6-gi3$DO)r%1N=4VCuR8>P3{vvvwB1Y-u81|>UPJS+jeF8N^%vfy;INIo z1yTky)-RvQ&z>l)Rxh=I1nYJ-$UTt>@H6Z1t@@JbiP1I~9 z(Q!E@M#jOo-*XBF{rxeuqJs??0#7r@Y^X=Z+E`;l{SqsX9Ub1uYdAnfH@3relm%)n zL8rnYzU1C}i?g1|zPcfC+}A|}`aP~Z6%hjYx4&vPcnx%F5)5h^f}MI{oBIZ#mjB32 zK+V}lc8Qm3*6q|AwLxuSN)oPuN!8A*gZ)lWjMB{H+OwUOE3%0_uSl@vN%jKup$yeU zX5Km^k+P9dlH8lA5En3dP;;ej)b>2s^rl*TJI!kFSZiT4B+@h}SOFf>q8rpg#Rh$Y zd&P1MC9#oWr-yh-QIdb*{lQMFMnk?@epX0mL+f*sDx0fU;$z^rvJ1Dakf1w`Mt(ej zZi$Z4__N9uP&I|2p;`JKQTFGW~fA#mnOenJ%B%8Gp>a|+YsWlm|low zhOdlj+P3kCLIuZf6p)j`byIaEowJweWsyOVOy+Y;qBY?Pm8pm9Yr|;{MX`=t83R;! zU`a(XXa=lnEr1j_b|8=Sfmh{C)ip{rUdte-UfxvPz#!1&KP@`94~QuE%u-rn1(fHm zN6laRbmSw~3oX(K2y4Me;UA(~S4Y`o-cEVAB8qZ>k-dIBV|4WKAFUN_9Zkd25ptKi z23`qWtp5&Qi*;X{PLfWY7iKCat+-5`l=2`|@lQ&%+Ko37gkWbzYSigsp znCPTy(%Oy4`y}@D5N6b1R3G}&pKVwO)(F-*Qo8J)%IKnR=8Al4hb$gZ?OZ3b)XyDB z%1W$q2Z9xKWcTigaR~bM$0rB82p4q<0~Gw(?h8T4SH}iB!CgYE(HM&VOFO1CHKc{( z%}6qEmeRrw0;Q(?6qYzWd~>j)NUy+d)v!|OCE}t}x)8j`I-e^fk$6s&y}$**N7{=D zD^DXtK9@U;>wp-;`c4|5a0(fN*N%%x@FA`#mEIz^60cA zAdWs!R>djYc-BW)F${-9&$Qe)L)c)4VTq|W8owY84PAtnNW>?0sB^rW+lKJ8H0Hy)Ka2b&Jfyg@R9t;9nS91Znwa@QL+U;d=IQmsU;+6bO_ZK6|xoRwc6 zIF&HYOf<=he>swB4X7h0+jokMLG32N-|2~OeaO=X(;7uy>ZoF-j2w}sv2k_c#bSTp z5={zMWa&g%Sh%L{nhcge!oTpyqdBFZ{+ieLm5s`HnpS3vtYn ztP1^|8#S$Rp8M8jPw$YzCXjQlaJuTiJL(f4rw1vCEx5Rx5N@ zb8HWl_PRi5mKKiXMNOZEKkP0}GLrvHzp>(15Arl|ZHX9GxW`qM$f=f|hU1uvEkq}> zEd=`~77pP&sO0YX$rCmYDmRt}#3%H|jio#vqpAcvxmvp+)Uib+6|WPL25bC}3udId zr7r|FBi?KodJz;cBI85j{ht>-mrT8uHSTh3x7bCBAH9&-cd&;)C;I(!0ucGehy5(n z;0f*r7MIO_a`=9zYpP1-@3my0K@2OBK7tkPxlKC#gN=}7xrm)1f^38>8q9?T9jW(iKFbH3|$7T5$M|N<>5kVf8S>EmNvAozj&@-EXGTq9taIL%XgF^0Kxd#=;fJs?#^c zu@Ia=9m%D=X^;?l5c(NTPDn!s?J{|&_l|6@I6$B6_;ail%9)-=+-_Jt;UMZRQFxp^ zhX^$t#{0Sk>hkAJ=ACTwY~g8uHsE0l{8hr3JtQhrX?x@|bb0L2$bScr=5p_F!_OJ| zR*rwHV^peKTVuX`CnD4QnO7779|9QK##VbWVwfJ1`7pUbsxi{EW$G2F*-AO_6y-Tu z-9PGQFo+|TRG7F-#%ABhoU-2^V8I8PQeA1P{b-en(^VDLpY(XA5E9Kct#nJOFP&z# zqr8QvMVZ@K63y078Q~6pcdo=4HcJ`ilTNnRtB8%8nDainH`d zDuoJ_HIIVUANxF`9RDHn5qrU-J0JD$^!*OLf%8DxGEWJ=K>j{6LZe4&*OAhXU_f6i zxDi3d*kv#lTcsLa?T()8OIJ*8fe}+0I1dGwfIk|N*0!N+^Aa#j|9G<%NqiHj}kc9vCKZG$NVYBBx6G6j^Cq~{<4?>$R-1ImWi zfD1J1*9?rD76>@EJ6nc!ME7nDSBL6R_Y3ep-JhTfVPFK-ZW1^)-Do+r?)Zx6Df*vb zXAH-?3Tf9|_Q8BH1*-@0rO35`Z_-;eTLwzEKaKhMf!`FB6nK2_S7E^<$~{5o&uIdf zm0|(YWvH=ImJbhJ0ef7D98X%sMkT?je~&T~%3CZ9$G!@<%oqVc}>$a6?i;u{+HYmzpkZ5uG|l%tA8M90oUuwHp%J>hq(4 z2vtRu8-632R2pv2Se>TIzyjm%_WUoM3t9>wYyGn-*rxn3VNDIv?9Z7Z{{d<`!3Hg; z(d48VpF8B!~6#5eeck>ASZ+1LDUM0IP)|PpxxY47X`W6@1k2p=F)QlcO zA6};lTCBbh%lc{Kv3(-5}tYKz1hbbEeWNQ}c`QnE3)hm%tj2M3rJheuM!ehgarpQ@hcztAnt>qspY*%R%xDse31MBWsDD~y7}--YX!ufh$d z_bYeq1f@nuN3g%A2D5hDwid*gW(0Ay{tv`#3yT z$ZWY73+hD(-Md2MyXvnEYzj(_Ci}-U0k%Ic)lI~r^886&%qy@M>x#53*4N~NA9mDV69td1{ zIg_7W#SFVIfWj7OJ$|49;{(xU@ds92Z3s#4XFV(Y(jmtE+OWEsG=G^sUQkyoA6m?J z?;7;D8J;i6M@n~s1ZztuRpRrXDb^D$H;%3pTe?RK$^&ZbuwOj>Z4d zspT;0#Fcacf)(HFS^qFFXPE{F}km`XQ4O#~v?CpVF8GJfn zGdij_2d%AZ=F8I%ln>tQ3tzOax5UvM;f1^A?^Jku&}9w9mqf(~B0e~xX+29ODUv!& zAmqDqWm~N^`b8*_XuM6()%EUQp%)$wdC-d3s4-q>0w9HwooumX?f%ew2)hBXcg#cm zCE8jC3IKjZW6{gaPu)I#aoSZd3#TrK6$^PIoz2) z<}XnMUVkHKCSK|D)A_9;@Em6bKN2T_*b36_-3%Tn^{$H*Fu z>dofQnRP=d{lb-Wa6<<$eOJ)JdVFytEN*nA4>1C(A3Q%zas7XzJNhlI3q4#;NK`dl zeOo|XucsKQ||tH;HT)@1C|V@i2Bp32_ACmM#(otbv@~_2WDy3@;L>y?-P1;V?v}CaO_;3c@=f zS%2@a$X61^>qRnh^@$7(eQG$YsbZRRfoLZP1S7oxM0270TOPeWeHOh}1Gv_F!Of3; z)u3sOGM9|gDEu7?*iC};JIuZet;J)5~`U>;pNL9j;Pn?ctLZ+`1S-9Nlq2P>+zxfnQkY+nhmqxJ%3WUjR6dIc$h;uuF0T~Lhw*G7h*(Lt zgO43a#(0~EGzn+0SW%q?8T$y2(w2^3dq3vzgzipYw&!xt-PVQ18|-Y2z*MStw~=Dq z$9Mw+u6+FRi@DyPP2gpR`TT4>)NWs>BGHN@I4j=|U9Y$=NyL8g`o%$}abmV=aM!d) z>XvWI%0C(tf0YA0qzqWZ;#3uF{h<9nOJ~s+qBp$;bwXd!hbXYI&=&lG5QY70}ycG`wfKBgHayyLSZntM_8<2-&A_ zb)$dQE`NF~47<{nS(FjESrQK(#F1!dN!-p$-ZaLSI)TG<^TG^5s_dz&6tOHnj-Qzv zcdZhq=dCjLCV-q93 z&G>52bZ2)@4LhhtJ=-d~2a~SIB?RUOx}G~%H2HRohHHi5QiX}&8~%n$zr545DMiM6 zi#q${-AM*x?kEW9v)r>;MNnvCm;A0}ystH;&u+>b-E%O7Hg1hEG1K@0akp@u2&830 z={4XGVGPrS5TOy&2K|7YD=-R@Sb8wtQ0}+woJ8AjEe(g+oLQ5S_ac(kc3ZX{6ycJD?9b6KM#aGvDk17 z=>k4pZK;|sZ@j>;8zmkd5_W5#8OA7b4bfp<3kP^}q9#K@^Dtr8XfX-Y;rCu49+(P z4h|*uW=t(G+!r}dTm&A|ROlWn+Wq?}zd$-NBQ?BiK^?_tcrnd+URz+$L`&!f)IVsQ z4co9CyJ01_-l17JC2~QI(&1cr?AR>^4*8017#2ZcdwNXej1=-+bpBi$rxGmum!)!>emvXZ$pSbg1mm>-2`Jfoa+ta@GtIgwGr{#TOsK_C#1)I}|b29e==O z*kC9IC4cp(9y5y^dl(<138y*=QV)V57^-x^0Qyj&Gt^Lg1FdHfLDw1GJ3MBGV(|vZ zkh+6>aXcbz3IoD=9@+s7$QvvK$~9AX%qi`uyJG;^Z%bYl%(0{<%f1=&Qs%>xVq$gH z8`vhgiN2AB96{KUT6pu+hhX@p>bm=&ygB8hb<6D$bNj#6*^} zZb5VEr{TK?@={rvZ{}mdyU)%?v^jtE@TNEYd$4Fy{WE^MOAH44XZ_l|3R`kKeB7ay z1BbPUT1TMGi|t+Fj(BiygzXcKONk=huzJsI_2<6pXQRh=jnsX1(0*}vuuHf><3W9e zAHuatKSJ9)!IE|}voTR0P@_q6)q%8~B!`8Ai|uPn$L)A9{tzVBabq@{{qz^WV;!1Eo%kl6bVidEGF>%u#w0 zJ#6H?6EEFDhGQ@pO|#3`Pg26YqPu6x#KrD2beDn_2yG_E9)JMuNh-aWuXe9oTNGUz z)+kd=+OZn21@9$qGSTQf7`if6;{?X8J}>>en^^aJ}3mJErcpfAc4JvfLTN zUu@ryr2ou=v>C}7mlp`ppNAMt7^ppKKG6YYpcZ!ZV(Hq(qheaM5z|kDI(9^vBzgwU zfyijZ`#keGOr2C9q`4!ng_Rd3*|1;*ya9Yo2so(;{j}8$|IvtYaXn%_R`K(coz+2Y zwZ$ZHQxea?@i5!fV?(9Ne(}vQdFz9 zTo!{pySukRx}h9uEF!>vB&}WBA7 z$&+H_%xqxj(#8yVAA)bC+zlA+)=jbKr#c!EsGhE-NxUXhu;_QoIXtyB&-+BccpBbv z?ki;2Hb3PC@=tW-XCwGg}~?o8zE*eeiy}ze$w;Fm$|F-(qvlye^3T_G@3zd*S5>^DK`^j41+QlNif!dQA8| zQXK|bgGS7YT3_7`Dn*?f^psz2K~9Sc>Xs{YULb_Gepe$et8@Xg&V>TQ!Q; zW`#&tkcg7IPUa7!U(Plav+>Wl2O?TdI?p`bxB>E;eoG{qBr2;1Bow+*<*UaNhYA<< zEOfbd>W}n=H@4@H%g^jMBW(zO-NKwH4iU>}Lgv?BYk$x_WwO%1p+Il0@L>myc0$&>WXLh?vjUpJFc^3GGewb0PG6@b=}@ZKdVK z09nl2q~Zi^E3mRlm4Is@#^Ns$mf%czHyQ*ZyWCc#L@GMF-vL7n>i9m4JpGSkNAOTp zEiVJcu#Rb_`jhgqzQXEcoJB%?*0T-cK&Hx!>w)%>oj=h0DI+?jfkut`5-KfvWZlZl zIcH}$Wat!RWW2e9GX#rVM(o!j{5f5L5&tEq2|(w)K=u3C0^dcPtY5Ga&gMm@QBi2p zOb~taYj#LBk@itKfJJ1iszjb@wEwG_rLS)=_2BkpXON;T|Zxb$)98^Y=l4UhAzapdU zBt3#Ks`VD2*?gN}xiff4TX#mbm$zmqvneF)Xo2tvU`J_bLjhFJ8=NlhGbZE*S~Kn& z@<~Kl~+OoQOz!nbh6jKz^XJ(MI8_ENC*&4Y`UVfYgKyk15>8dMLzAIeidB`cpEYQiCH4F zm(4AK^X){2@B#6;q(}(JPx9l)!3=upX=4#mBStKjAwW|-TD>9kxmyt=Q#oa{|eSJYhS&0xCL zT%|1=|1wo{!4DN~dWzL%4WS?oj&!i9Bhud6fGa3!9sF7WS_Ozed6CCl@+5!201)kx zvi6=qp%tjEE`P;Tw689<6hz!m0e)1!P2TG?;WiYv?C(gv5`2=}|LHLsk^}zj3Mw^FbMJA}a7FO>(Gt~1&sNs{gm06}hR3rFo+6Ot59=(I!XIQfU zKHYdbsUm5_<2Tw0|FJcR#ncVJ>3D_3MeZzo3>NPtm4X07`wVpI^eUhGJLU2u$y5@sx`rT$BND^66rF@`J;0;Ywp4JwPxfK)mN4U>lkhQRW$B zhYy?4i03X$$t3I}lzB^vt@D!_)+uGphUc~wdk-IHamU+0Gu%M&*+N;lQta7UxpCG^ zoR?UobNMcpku^$n%E_{a88J^=Fy2ygP>Xn(;;YPIrbSMv)x83IXY;UNzzLW_0_M%j?_Md*SQ9fqXy^QuaLIIL?vOdCA`W)DRD*dDe z=^4lk&$j%T_iHZ#J$)cY=xJnYc!wQo#s+sgTJ`8=^u67d@e^|#Dp|@Hsxv=3?-?Lw zk?x~biEO{b=WnuJ=bqzQTSgivZjo>dGnqGQI8oeS?F3kvwU#HK+MG z(P*^Z;TW}^<=>C}IY16?0#E(t5Jqae!YcHvI`_FRnVHM&SypcjJT8lyzgG=Rd%Xf! z@OV?hQGSDT$zz2*>1p^vy|2`i2+_OSi0o#Exw=TvuzR0(Ud=YDKjH)M$BuT*bw6oV zMDH&Iw(t4OgfPz0!fhy@vFgB@b7N2=$FTo|Vz2kT6L!FAK#g0z10+WW#QU`M54F=XjIF{9t7=ElQAl-XlvU=FiXhG)qE?dmx^ecZF z#K5Fm7uoz4a9Z6HT%_h^SRJ^If0 z7DV`2q#^$d>u+dJaR~=Egb~wqPdeRiBS7DOF3>x^pw5z)a6(-m`am=%+*Gd6$l*nP zge1&9cgfoC^6?NPw8TXKY-e}x1+W!Twl2j{YVy6xCoar}RuYC8jUT^*-gXb@V4z!Q zXo&_FGmp4^k&k;mnM+^4zn}d8o^{)NNySJAmw}=;vQ+3?rjt91$uX>TXW=t9^Ak*g zFEXUPmHpjQ>SbeScjK99)()+sNQD&>RfqFotGste1`Qn{b zL67aaD~x@PazR z`^p@6j}_4KjSDsx&mTXRrWd011Uoj}BTMfT)pl=LNV zFC5eL=O^(l_1bf!H*kg0Z==D~HAY)QHoW!9zIy|ZR?>|siv~nM_I9^zotPO5+Ai!{ z(noiMn^d>hUc;bz$u0WYMjT;_&#JH)pBIp4E#qJ3s3R!Ve6Poe9q!-^;q|4TX=ARfx6N;tdet+^&g^k4wVL0hmRZ_^__ zyO$mZSP~KTV=_L*2NkQV5jaEX%+orr{O|5~2v1<#e~H4UF8s`uXdcn&`s|~mh&!#q z4K&(W2In(XN=N$OJtX1H>Rn-#jOIdV?EcDqXj!7`L?!8J_YtxaqRu4mvxmg$Y6V#t zTY}Chm_PYMm|W`z^3q;~#UtGP-MP_DLP02bI`Ye#x$8q*%h%&oyPXYS1J}3e1Hw_u zm2a%7(yt zMB)YJmMG;1Lj4-vH~>mo^y-o}IPA=pNO6 z(LhCjN9HP>|pQKtZWepwUt{=WKwl52~1~XJ&aZa{vh=Y;dMcZNjTMV5r&Q5KNNN)9Nx6| z9g{&NS3-qC=Z=pt3kc>a#FcDa3=mTnU5Gr%JASYbn+&{UF2FVCac4k1l1Ylsgvbc5 zFGerf4K`4GC+pxB4k@g!VJI@kB4R;P`f{sB7YW*>7~guFSBn*L za_jdb@bV_&IRK+Qm@yU?ay8Z|ig28(ITE2P7)?q*n`$oxaR~`|2^o5;BFNF`M7xRq z0uEaUM0)0{{G0ma@iXaJwms29m_zllYFDuv%>DIsL_;7cD!9XqBee#;eYiWiJeX$y zZ#~+pXo4Xbzej69D(|Q*10~Gw!U&h|x(Gl_r)Zw^IwVl%0~m9`I)nvz^NH|$@jC@R z?vXDgoN&me*kH!4a6`V0rNyr(q;ikyHSD(_>?BhvuJ^z%=&Yj48wuOgBwB{0rUTtF1QRYRI<%PtiS#MtEWXvp?otTx6A8VLoWSKdZr zs#3+(s|*kPBrN;j(c)2G#)1(Tt+L0bG9$9!NMs@E272=AyKfpH@k_HS-$q&Deo;BW zj`jc+_QZucrJgiuWEc5KhbhdG7&S%`n{7qe55(^1++VG~UNnn{U-8no=7qAWp_vGyLPEyD<{~!RZ^R7g$hz90ZW4HgwfjE|PXJ!* zb)H|aqX=$D`#X;n07_Q(P;wn(=*3XAWo4NF7%C0} z1`c3JQ;%#Z`jcnp1pOYD!mxzDU5NRwm$Pm`|F5F>igKuRIu8T zrdq|N&_4CMSM4>AVS;hV`ahDF0Ol-lMAF@pckL5ozbsHYfyXZY`5)ofRZ}_etjnc4 zY;f?-F8_kc5dhj;YGj+~jv$eW4`?kiqBL<@e6`Sy<%z5VFV zUi@H$=ifJsuSAr%ixI1$YR`@nPDz{9XwnZ%XV>!Ulr4ebL2%$e`}DDdJdOSd_rb&Vs=Xi=R0<6JDuBXFAn_g{&Qs+we9KI z8e0Mys%+uYsEtub6L3y_>QhI*Kqou=@1GjhU!6FdNbpe`vH(xa-$HWg8}-wz@G1DX zQA8A#)?F%Q4lRG{Um#mSU0H$1`me}B^5u3IE*0O@=%&)K+uyZH7Fs%g)-qKz)fyrx zRX&cIPV__Z*6`B7{4FP}DTbPQ=7MQ8ZYW>^Y^?yDin>-^lQ;?jTWu{+a!bR6)U+SD z2Bfl1QLpcRBm#mUNC-Lu>nmaSW_5;Hf|fGY95a8r_sjp@zD~FOq+rq);8?`zB5Lwr zX!xrlw_fEgqFB11bUxQTofHzt($AXHoD|`Sepfj2M*7vJxZHI812feSaIT6+uWaZeGE@X&4MK-gA3GMQxeDV#sPm!V`IV!Kn>|nHwJw|?^>%s ziEd%}BYB`K74jlMp(-h41)6yn|7!cnkBoQSF=Ur!7U z)QfF*{f(En@tCf?C_GN7`?`IP%yAg|@YlF|1!C|lOJKGx*ugDLulR63pzqGBUv;*p5vONkQ=0L??_J0{OZ@{kTeJ~dfV_k%&;i7pHHBCOV=oYMI zE3W@vPRu$c6%)a5XdSt*>mi8&oH=`E@db%pvU^aKCt5VZJ7UL4JB0>@m4qqx#U3QR zeP0mZO4b&61N>M@J{P!+n_#4^KE0;Vp^O!jTC+Cv@7CXCgR1~Je56lg|3>k!Obbyn z_A({2w+a$Dp9DliU4f~LWdz>#^Ha9-2mW_V5^jQsOf<5 z=!mn?Yhe+S90=LuL_3asoR2l+3XbVOBdIejt{v^#T@R4?fw9J}2PeZuY*2oyoNU>@ zcR^A9jU`&Ad*8wJN37_cU(7B@{x~Qy({$+bgrUyTjKn&K;T}B54hLwIxF5GJ1P}d3 zx$n)*cGJ|BEe~KiYW>gBsWC}EP2T}hOc!Ez_TI}=1xKnc9|oHx?|rbMaqwp#$AMH9 zBqgUYuU_d>ec5)NXc39W$jj*U1eyi*jbQt=7TSf*s&~$=ei6x@n`h1)wQ4E2HwuHt zLi=)ta>RU$lk<@8eJJJL%WPr)Vvz<$+9Px54$C4TT>a)qb3HC6e;U2~PpiI|oMIu~ zQymt>-#WNpqV{;QWE)XlWn~oE-3Zpfz$7YNe(280b{=~x7-K#HlhsL(ra=}IpQ*3P zEJE}Pd+E!wae&Yl&eiq{Q~V^Do+l`h(tE41_cyuWi2|Qb4$HeKy-B%Z#KA^B4Af^! z*jAyl7}%j{qgCP)va+c+d3@ZDjZ&+Ut1qf^09(L z7SX+fMBJ{Ue$2YMhG7NcLGk<1y=#o4ThB+DXh_hi8g|MI|L*F&Gd$4-;FI?`3d#R8 z!5KuFSNi?(AtiH{Q4qcw7?rJ1C+vuv0kTFba5fm( zO?M*L_(F(kk*vZMWy4}+y zmUCdR{+0XQb2QSUa<2FCZHafXH$9VCD2S*X!}jv*Yrg^s>QACixU`Y6{-;l zQ*CL0w7$X|hA+{mkpKyU4sj_{K9DCu&s*N>9a>hp0$Ga%Kf&8_wCpuIn`e^CJ8+}t z5kWw>2E0J0aSYH1<0=IRRP5exHtc<(!gN&X1EO-rZ`7cC_FxclDp1S_oe1XmwXwAsB=^YXP*O4SO6DC9uhk7S!rWs9nxQsLLuHWd zRN8u$OH>K%3plO5R<+>#%G|-d7aDTxr6?hTuxrSG|3u+iP49VYYj|t;r@vfnq(O~i zmqB%pp~{`*8jr#!Co~5B%lAK>DQnTbNjnO*I%WV_e@qw#My%6NPh^ykV?}A_K*jEn zC{)Dala6DTdM<2o`u{e07d`>qJ-v5H&N>C-g=^{vHyf@X0CEPy;sUE5KflHTQrD9% z*(FBbdY&opgrw)ymFIQ(ro_7j21|z-2B*-y6Y>$!sgHLefe2G|TJh*hKER3y>3514 zY!sRpXif}(XD`_iQeVDZB5C2|ZTJUBRt4WqZL{N6+&&tbY>OIG;R_1ErzG|vXFvLf zHCR5WJ}F<7gg{9Im32LD6cjV*WKC=PD;=yuiOx-N)aCq%7P{_f2>HhtSK+w3_{SID zO6OHi(2Vp2qrS#JBilP}rB;P9YmZ0lPdEnn@c`w5p1I0I{T(W#%F^F7Hi-cWB$#ab zUMb@`|5gp7SbE@cp-Li)C)3ggECq#KUn7;j`4UmOqZ)%g2FcMcBfAa1OL&+-`GwT5 zPgexq#(v=1@zshd+Bq%38^So}L{FUBbYM0C02M-XY}pw-fS53Vy&OObH|zyqou`i) z5F5ou4?V!Sf&b#?|7r{dXkcr9!%f?}pjHR&M<(xjV0x%OtW56lwKIJI3BeLU)AI0n z>r}3xxtn9U)G{L;{E+`Q;ed08kN)Y1XtH?qQ0V*q3!-^~YmV>u*3cpo!d))CHQa-% z<7l;g+{0U^7WQ&KySCWQ@awhM&7o751|&xH?fM+OGWk_N@;@E!P~O993k?{b+QvwE zaDTbA^vohHzWvDakcpa6Ke;@;j@Xz<+12qYC}l0$(6If7 zz`Q6>ESVpISsL& z3xJEoqGYDY?P$v^)ZV#xYO{%`Qf{0OpGi^d>s=Ka1KT`!y?nQGPAE#LdU5v6Uru)6 z3vKP(~Ag zlknK0THA%^l5g$@jyoM(Y4QGZL7^CA%(6W>*5GqN;uj&{m=Ty}-oXxBtgY94awB+h za<4I4ia{0UdCvpD`GH8|_W#^c0u!5L_9a;zR`Wf2V#AvGhjs_-ke8d(U>>mSZtt)9 z+pL$$dAhE(@5q`c7LvcW!8Wk*=I2o5{4)gm*`r zbgt%?RZp+DeteQxvybcF`kIak^BrCfMUx#stId{5Tx2gRn8#;YcdM~!=IV_neDx<* zKG4r_N$%u3o;1IpPj=3Ahtqe?9X~Q7B*&{lGP?WK(X#J{KG!)uc9pR*VY(gnW!b=7l2?}xFbm*=$hC$Y_&`M=}G zslOic}7+Pcm~KL;2`|IWn3Z~y$$CkuW{`>*AP+7wrE`oc#p;#Cn=Yi(-gi6 z$#His`(m~I%-+>2cdJahVqy}c6Td7#uryE8@B?>LN8Iiy4d(w!crR6KSZM*SJHlhy z5-a$@JDg5#l+bIHh3|FR3|Uog4V)Pk1