Notes
Variable créée à partir des variables sexe, gf9, gf9m, gf9a, gf9nm, gf9na, cttact_r et dateinter
Programme Stata :
capture drop samplegf9
gen samplegf9= sexe==1 & cttact_r==1
capture drop date1
gen date1= mdy(gf9m,1,gf9a)
replace date1= mdy(7,1,gf9a) if gf9m==.
capture drop s1
gen s1 = dateinter - date1
capture drop s2
gen s2 = gf9nm*30.4
capture drop s3
gen s3 = gf9na*365.25
capture drop dureecontra_f
egen dureecontra_f= rowtotal(s1 s2 s3)
replace dureecontra_f =1826 if gf9==6
replace dureecontra_f =1827 if gf9==7
replace dureecontra_f =. if inlist(gf9,8,9)
replace dureecontra_f =. if samplegf9==0
replace dureecontra_f = dureecontra_f/365.25