I once was asked what is wrong about the code similar to the one below: gen asean4 = 1 if countryname == “Indonesia” | “Malaysia” | “Philippines” | “Thailand” This is a common mistake. Understandably, the assumption that repeating the left side of the expression, in this case ‘countryname’, is redundant is not far-off. Alas, [...]
Continue reading Functions: inlist()