cap program drop Diabetes_Reduction_intervene0
program define Diabetes_Reduction_intervene0
	syntax [varlist] [if] [in], is_startyr(integer)


	marksample touse, zeroweight strok novarlist
* Diabetes Reduction Initial Intervention
* Parameter: init_intervene_diab_rd (scalar)
*	Treats diabetes in a fraction of the population given by (1-init_intervene_diab_rd parameter)


		replace treat_now = diabe == 1 & died == 0 if `touse'
		replace diabe = 0 if treat_now & normal(x_diabe2004) >= init_intervene_diab_rd & `touse'
		replace treat_effective = old_diabe == 1 & diabe == 0 if `touse'
		replace ldiabe = diabe

end