Hi all. I am using -dummieslab- to create country dummies, by first using -encode- to make a string variable containing country names into a numeric variable with value labels showing countries:
encode country_name, gen(cc)
Then, I use this straightforward command:
dummieslab cc, template("cn_@")
I get the error message "implied variable names contain duplicates"
Notice that I don't use the -word()- option, or the -truncate()- options; these could create duplicates, e.g. if I truncated both the value label "Korea, South" and "Korea, North" to the first 5 letters. Since I am doing none of that, I don't understand why I'm getting the error message? I tried using dummieslab in the system's auto data so that I could replicate the problem for you to try out, but there it works fine. I would so much appreciate any leads on what is going wrong!
Hewan
encode country_name, gen(cc)
Then, I use this straightforward command:
dummieslab cc, template("cn_@")
I get the error message "implied variable names contain duplicates"
Notice that I don't use the -word()- option, or the -truncate()- options; these could create duplicates, e.g. if I truncated both the value label "Korea, South" and "Korea, North" to the first 5 letters. Since I am doing none of that, I don't understand why I'm getting the error message? I tried using dummieslab in the system's auto data so that I could replicate the problem for you to try out, but there it works fine. I would so much appreciate any leads on what is going wrong!
Hewan
Comment