I want to create a treatment variable, say "Treat1" which should assign the value 1 for all counties if they fulfill a condition
gen Treat=1 for all counties if <some condition is true> and if <condition is false> then 0.
The following code does not work
foreach i in 1/3{
gen Treat_Min_t13 = cond(Hurr_Surface`i'>25 & Hurr_Surface`i'<49,1,0)
}
gen Treat=1 for all counties if <some condition is true> and if <condition is false> then 0.
The following code does not work
foreach i in 1/3{
gen Treat_Min_t13 = cond(Hurr_Surface`i'>25 & Hurr_Surface`i'<49,1,0)
}
Comment