the code was ok, but in the second time is not working even though the variable is named differently[][Here is a picture of the error that I'm receiving]I'm working on bankscope database and there are some duplicates. Hence, I'm trying to overcome the duplication. I have tried this following code
foreach var of varlist address website phone fax {
qui duplicates tag `var' year cntrycde ///
if `var'~="", gen(dup_entry)
}
However, I kept receiving an error message which says
(invalid name)
r(198)
Can you help to overcome this issue?