Notes
Variable créée à partir des variables d10m_14 et d10a_14
Programme Stata :
gen sampled10= inlist(gross_r,2,3)
local i= 0
capture drop d10_r*
foreach var of newlist d10_r1 - d10_r15 {
gen `var'= mdy( d10m_`i',15,d10a_`i' ) if inrange(d10m_`i',1,12) & inrange(d10a_`i',1950,2011) & sampled10==1
replace `var'= mdy( 6,15,d10a_`i' ) if !inrange(d10m_`i',1,12) & inrange(d10a_`i',1950,2011) & sampled10==1
replace `var'= . if !inrange(d10m_`i',1,12) & !inrange(d10a_`i',1950,2011) & sampled10==1
format `var' %td
local i= `i' + 1