/************************** STATA .DO-FILE FOR: Authors: Pavolini, E. & Van Lancker, W. Title: The Matthew Effect in childcare use: a matter of policies or preferences? Journal: 'Journal of European Public Policy' DOI: https://doi.org/10.1080/13501763.2017.1401108 Questions: wim.vanlancker@kuleuven.be August, 2017 ******/ /* Note: the analyses are based on microdata drawn from the EU-Labour Force Survey 2010 ad hoc module. This data can be requested from Eurostat. See procedure: http://ec.europa.eu/eurostat/web/microdata/european-union-labour-force-survey Note: the Scandinavian countries need to be added to the microdata file separately using the 'special files' included in the EU-LFS user database. The code below should be used with the dataset 'macro_database.dta' in which the macro variables derived from EU-LFS and EVS are stored. */ version 13 set more off cd "" // local directory with EU-LFS 2010 datafile use EULFS2010.dta // name of the datafile /* Pre-created variables used in the analyses: hhnum: household id coeff: weight country: country hhnbpers: number of persons in the household hhageyg: age of the youngest child */ /* Creation of the variables */ /* formal childcare use */ ge formalcare = cond(ahm2010_childcar > 0 & ahm2010_childcar < 6,1,0,.) replace formalcare = . if ahm2010_childcar == 9 bys country hhnum: egen hh_formalcare = max(formalcare) /* maternal employment */ ge mother = cond((hhlink == 1 | hhlink == 2) & sex == 2, 1, 0, .) ge work = (wstator == 1 | wstator == 2) ge matemp = work & mother bys country hhnum: egen hh_matemp = max(matemp) /* ratio employment for sensitivity checks */ recode hhnb0014 (99=.), gen(nbr_children) recode hhnbpers (99=.), gen(nbr_persons) ge nbr_adults = nbr_persons-nbr_children recode hhnbwork (99=.), gen(nbr_working) ge ratio = nbr_working / nbr_adults bys country hhnum : egen hh_workratio = max(ratio) /* social class */ replace isco1d = is881d if country=="FI" | country=="DK" | country=="SE" replace iscopr1d = is88pr1d if country=="FI" | country=="DK" | country=="SE" ge socialclass4 = . replace socialclass4 = 1 if isco1d == 100 | isco1d == 200 replace socialclass4 = 2 if isco1d > 200 & isco1d < 600 replace socialclass4 = 3 if isco1d > 500 & isco1d < 900 replace socialclass4 = 4 if isco1d == 900 replace socialclass4 = 2 if isco1d == 0 replace socialclass4 = 1 if isco1d == 999 & (iscopr1d == 100 | iscopr1d == 200) replace socialclass4 = 2 if isco1d == 999 & iscopr1d > 200 & iscopr1d < 600 replace socialclass4 = 3 if isco1d == 999 & iscopr1d > 500 & iscopr1d < 900 replace socialclass4 = 4 if isco1d == 999 & iscopr1d == 900 replace socialclass4 = 2 if isco1d == 999 & iscopr1d == 0 * not worked during ref week and no previous experience ge neverworked = (wstator == 5 & existpr == 0) ge ltu = (wstator == 5 & existpr ==1 & iscopr1d == 999) replace socialclass4 = 4 if neverworked & socialclass4 == . replace socialclass4 = 4 if ltu & socialclass4 == . * dominance criterion bys country hhnum: egen socialclass_hh = min(socialclass4 ) recode socialclass_hh (3/4=3), gen(hh_class) /* paid leave: currently on leave or having used paid leave */ recode ahm2010_parleave (1=0)(2/6=1)(9=.), gen(parentalleave) ge matleave_current = (nowkreas == 5) ge patleave_current = (nowkreas == 6) replace parentalleave = 1 if patleave_current == 1 replace parentalleave = 1 if matleave_current == 1 recode parentalleave (.=0) /* education */ encode hatlev1d, gen(educ) recode educ (1=.)(2=3)(3=1)(4=2) gen education = educ lab val education lbleduc drop educ bys country hhnum: egen hheduc = max(education) // dominance criterion /* single parent */ ge singleparent = (hhcomp>=11&hhcomp<=13) /* migration */ encode countryb, gen(countryb_num) ge var_ctry_birth = . replace var_ctry_birth = 1 if countryb_num == 1 replace var_ctry_birth = 2 if (countryb_num > 1 & countryb_num < 13) | countryb_num == 20 | countryb_num == 23 | countryb_num == 25 replace var_ctry_birth = 3 if (countryb_num > 12 & countryb_num < 20) | (countryb_num > 20 & countryb_num < 23) | (countryb_num > 23 & countryb_num < 27) recode var_ctry_birth (1=0)(2/3=1), gen(var_migrant) /* Macro variable 'structural reasons not to work or work parttime': to be added to macro_database.dta */ ge structural_reason = ahm2010_impfacil replace structural_reason = needcare if structural_reason == . replace structural_reason = needcare if structural_reason == 9 recode structural_reason (1/3=1)(4=0) recode structural_reason (9=.) table country [pw=coeff], c(mean structural_reason ) preserve collapse (mean) structural_reason [pw=coeff], by(country) encode country, gen(cid) save macro_database.dta, replace restore /* cultural values are drawn from EVS and added to macro_database.dta: see text for definition */ /* Final preparation of the dataset */ keep if pickone & hhageyg < 6 encode country, gen(cid) keep if hhageyg < 3 keep if !missing(hh_class) keep if !missing(hheduc) keep if !missing(hh_formalcare) save "working_file.dta", replace // save as working file /* Add macro-level variables */ merge m:1 cid using "macro_database.dta" /* Create country groups */ sum av_structure local yline = r(mean) sum evs_youngchildren local xline = r(mean) gen countrygroup = 1 if av_structure > `yline' & evs_youngchildren < `xline' replace countrygroup = 2 if av_structure > `yline' & evs_youngchildren > `xline' replace countrygroup = 3 if av_structure < `yline' & evs_youngchildren > `xline' replace countrygroup = 4 if av_structure < `yline' & evs_youngchildren < `xline' /* Descriptives */ levelsof country, local(countries) mat container = J(1,5,.) foreach ctry of local countries { mean formalcare if country=="`ctry'" [pw=coeff] mat a = e(b) mean formalcare if country=="`ctry'" [pw=coeff], over(hh_class ) mat b = e(b) mat c = a,b mat rowname c = "`ctry'" test [formalcare]1 = [formalcare]3 mat c = c, r(p) mat container = container\c } sum cid local maximum = r(max) + 1 mat FIG1 = container[2..`maximum',1..5] mat li FIG1 // Figure 1 is created using Excel twoway scatter av_structure av_culture, mlabel(cid) xline(`xline') yline(`yline') ytitle("% structural constraints") xtitle("% traditional norms on motherhood") scheme(lean1) graph save Graph "figure2.gph" /* Multilevel logistic regression */ melogit hh_formalcare i.hh_class hhageyg hhnbchld i.hheduc i.var_migrant i.singleparent i.parentalleave || cid: , est store m1a di -2*e(ll) margins hh_class melogit hh_formalcare i.hh_class##i.hh_matemp hhageyg hhnbchld i.hheduc i.var_migrant i.singleparent i.parentalleave || cid: , est store m1b di -2*e(ll) margins hh_class lrtest m1a m1b melogit hh_formalcare i.hh_class##c.av_structure i.hh_class##c.evs_youngchildren i.hh_matemp hhageyg hhnbchld i.hheduc i.var_migrant i.singleparent i.parentalleave || cid: , est store m2 di -2*e(ll) lrtest m1b m2 margins hh_class, at(av_structure==(5(5)40)) vsquish marginsplot, scheme(lean1) noci legend(pos(6)) graph save Graph "effect_structure.gph" margins hh_class, at(evs_youngchildren==(10(10)70)) vsquish marginsplot, scheme(lean1) noci legend(pos(6)) graph save Graph "effect_culture.gph" gr combine effect_structure.gph effect_culture.gph melogit hh_formalcare i.hh_class##i.countrygroup i.hh_matemp hhageyg hhnbchld i.hheduc i.var_migrant i.singleparent i.parentalleave || cid: , est store m3 di -2*e(ll) margins hh_class, at (countrygroup == (1 2 3 4)) vsquish marginsplot, scheme(lean1) noci legend(pos(6)) graph save Graph "figure4.gph"