Notes
Variable créée à partir des variables sexe, gh6bis, gh18_r, gh19, gh19m, gh19a, gh19nm, gh19na, gf8_r, gf32_r, gf33, gf33m, gf33a, gf33nm et gf33na
Programme Stata :
capture drop samplegf33
gen samplegf33= samplegf32
capture drop date1
gen date1 = mdy(gf33m,1,gf33a)
replace date1= mdy(7,1,gf33a) if gf33m==.
capture drop s1
gen s1 = dateinter - date1
capture drop s2
gen s2 = gf33nm*30.4
capture drop s3
gen s3 = gf33na*365.25
capture drop dureefincttder
egen dureefincttder= rowtotal (s1 s2 s3)
replace dureefincttder=1826 if gf33==7
replace dureefincttder=1827 if gf33==8
replace dureefincttder=. if inlist(gf33,9,10)
replace dureefincttder =. if samplegf33==0
replace dureefincttder =dureefincttder/365.25
capture drop samplegh19
gen samplegh19= samplegh18
capture drop date1
gen date1= mdy(gh19m,1,gh19a)
replace date1= mdy(7,1,gh19a) if gh19m==.
capture drop s1
gen s1 = dateinter - date1
capture drop s2
gen s2 = gh19nm*30.4
capture drop s3
gen s3 = gh19na*365.25
capture drop dureefincttder_h
egen dureefincttder_h= rowtotal(s1 s2 s3)
replace dureefincttder_h=. if inlist(gh19,7,8)
replace dureefincttder_h=. if samplegh19==0
replace dureefincttder_h= dureefincttder_h/365.25
replace dureefincttder=dureefincttder_h if sexe==2
replace dureefincttder=. if dureefincttder==0
drop samplegh19 dureefincttder4_h