Announcement

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

  • Svyset command "unrecognized" in Stata 15

    Hi everyone,

    I have a puzzling problem. I'm using Stata 15 and when I try to svyset, I get an error: "command svyset is unrecognized".

    Has anyone encountered this issue before and know how to download/restore built-in commands? I've checked my ado file and don't see it there, but do see a bunch of other commands with "svy" in the prefix.

    Thanks very much!


  • #2
    So the first thing is to determine whether -svyset- is really missing from your setup. The easiest way is to type -which svyset- in the Command window, and Stata will tell you whether it can find it or not. If Stata says it is not found, then first re-boot your computer and try again. If Stata still can't find it, run -update all, force- and Stata will probably fix it for you that way. If after that Stata still can't find it, do a complete uninstall of Stata and re-install it from start, followed by -update, all-. If -which svyset- still turns up nothing, then you need to contact technical support.

    There is, however, another possible cause for your problem. If Stata tells you that it can find -svyset- but you still get that same error message when you try to use it, it probably means that the command you are running was copy/pasted from some source (often a word processing document, but it could also be a PDF, or even a code block here on Statalist) that is contaminated with "non-printing" characters. These characters show nothing to the human eye when displayed on the screen, but Stata sees them. In other words, the command that Stata says it can't find may not actually be -svyset- but just something that looks like svyset to you, but actually has other invisible characters embedded in it or around it. If that is the problem, you need to purge the non-printing characters from the code. That is not easy to do. Sometimes if you copy the code and paste it into a very primitive text editor (not a word processor, nor a fancy text editor that has special formatting features) and then paste back into a new do-file that will solve the problem. If that trick doesn't work, the only other thing I know to do is to manually type the code you need into a fresh do-file.

    Comment


    • #3
      Clyde's advice is good. My guess also would be a corrupted installation.

      I would also suggest copying and pasting the code and output here, using code tags (see pt 12 of the statalist FAQ). Sometimes there is an obvious error that we can't see because the poster hasn't shown it. For example, if you actually typed Svyset instead of syset you would get an error.
      -------------------------------------------
      Richard Williams, Notre Dame Dept of Sociology
      Stata Version: 17.0 MP (2 processor)

      EMAIL: [email protected]
      WWW: https://www3.nd.edu/~rwilliam

      Comment

      Working...
      X