Dear all,
I want to erase the information of my dataset for some individuals and only for a set of variables.
I identified the individuals in a dummy var (zuwpre) and I used 'foreach' to a varlist as follows:
gen zuwpre= 1 if fallnum>10000 & f1_dispos==1003
foreach c of varlist f3_dispos- f3_elthaus {
replace `c'=. if zuwpre== 1
}
drop zuwpre
However, I get an error message because I have some string variables in the varlist. Can anyone help me to improve this sintaxis to solve the error.
Thanks in advance!
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/