clear
clear matrix

set more off
eststo clear
cd "${output_path}\tmp\"

*We first transform the dataset to a parent level dataset by dropping all variables referring to the children, and then dropping duplicate observations
use "Linked_data.dta", clear


xtset, clear
keep if age>=25 & age<=40


keep v* syear m*
drop vil* mil* mother_near 
drop merge*

drop month mother_known migback




duplicates drop

set more off
gen diff=vage-mage

kdensity diff, xtitle("Age differential") title("") scheme(s1mono) xline(0)
graph export "${output_path}\Results\FigA10.tif", replace
