Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • dummieslab: error message "implied variable names contain duplicates"

    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

  • #2
    dummieslab is from SSC, as you are asked to explain.

    You haven't given us any precise data example. Please show the results of

    Code:
    tab country_name

    Comment


    • #3
      Hi Nick, sorry that I forgot to add that -dummieslab- is from SSC.

      Your prompt for me to send the results of -tab country_name- actually did the trick for me! Before sending, I saw that there were two values that showed up as distinct string values in country_name, namely "Germany East" and "Germany, East". But of course the dummieslab command gets rid of commas and spaces, so the two ended up becoming duplicates. I fixed that, and now it runs beautifully. Thanks!!

      Hewan

      Comment


      • #4
        Good. Thanks for the closure.

        Comment

        Working...
        X