Hi!
I would like to create one single loop for these 3 sections... is that possible?
Many thanks!
gen lbWTP_ph = - AO_ph
replace lbWTP_ph = 75 if AO_ph == -76
replace lbWTP_ph = -1000 if AO_ph == 76
gen lbWTP_pa = - AO_pa
replace lbWTP_pa = 75 if AO_pa == -76
replace lbWTP_pa = -1000 if AO_pa == 76
gen lbWTP_pe = - AO_pe
replace lbWTP_pe = 75 if AO_pe == -76
replace lbWTP_pe = -1000 if AO_pe == 76
As well as a second loop for these 3 sections:
gen info_avoiding_ba = .
replace info_avoiding_ba = 1 if WTP_ba < 0
replace info_avoiding_ba = 0 if WTP_ba >= 0
gen info_avoiding_be = .
replace info_avoiding_be = 1 if WTP_be < 0
replace info_avoiding_be = 0 if WTP_be >= 0
gen info_avoiding_bh = .
replace info_avoiding_bh = 1 if WTP_bh < 0
replace info_avoiding_bh = 0 if WTP_bh >= 0
Is that possible?
I would like to create one single loop for these 3 sections... is that possible?
Many thanks!
gen lbWTP_ph = - AO_ph
replace lbWTP_ph = 75 if AO_ph == -76
replace lbWTP_ph = -1000 if AO_ph == 76
gen lbWTP_pa = - AO_pa
replace lbWTP_pa = 75 if AO_pa == -76
replace lbWTP_pa = -1000 if AO_pa == 76
gen lbWTP_pe = - AO_pe
replace lbWTP_pe = 75 if AO_pe == -76
replace lbWTP_pe = -1000 if AO_pe == 76
As well as a second loop for these 3 sections:
gen info_avoiding_ba = .
replace info_avoiding_ba = 1 if WTP_ba < 0
replace info_avoiding_ba = 0 if WTP_ba >= 0
gen info_avoiding_be = .
replace info_avoiding_be = 1 if WTP_be < 0
replace info_avoiding_be = 0 if WTP_be >= 0
gen info_avoiding_bh = .
replace info_avoiding_bh = 1 if WTP_bh < 0
replace info_avoiding_bh = 0 if WTP_bh >= 0
Is that possible?

Comment