Announcement

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

  • Command not recoginized all of sudden: command labmask is unrecognized

    I was using labmask successfull yesterday, but today Stata SE 17 decides it does not recognize the same code. Here is an example that generates "command labmask is unrecognized" Any ideas?

    clear
    input y str2 state
    11 CA
    23 NV
    9 WA
    14 OR

    sort y
    gen state_n = _n
    labmask state_n, values(state)

  • #2
    I see two possible causes for this problem.

    -labmask- is not an official Stata command. If you originally ran this code on a computer that has installed it from its source, and then tried to run the same code on a different machine that has never installed it, the second machine will not find any such command and will give you the error message you describe. Alternatively, if both runs of the code were on the same machine, it is possible that you or somebody else intentionally or accidentally uninstalled it.

    To verify that the machine (no longer) has the -labmask- command installed, run -which labmask-. If the command is not installed, Stata will respond "command labmask not found as either built-in or ado-file." And the solution then is to install it: -ssc install labutil-.

    If, however, Stata responds to the -which labmask- command by showing you the path and filename for it, then you have a different problem. Sometimes code, particularly code that is copied from word processing documents or web pages (including Statalist), contains non-printing characters. These non-printing characters do not show up on your screen: but Stata's command processor sees them and gets confused by them. In this case, what you need to do is delete the entire line of code that caused the problem and manually type it back in using the do-file editor. Do not try to fix the problem using copy-paste from some other code: that will preserve the non-printing characters and fail to solve the problem.

    Comment


    • #3
      I agree with Clyde Schechter's analysis and merely add an orthogonal comment. The code for labmask is present on SSC and also available linked to a Stata Journal article. My preference as the author is that the Stata Journal article be regarded as the primary reference, largely because the article gives some discussion beyond the help file that may be interesting or useful.


      Code:
      SJ-8-2  gr0034  . . . . . . . . . .  Speaking Stata: Between tables and graphs
              (help labmask, seqvar if installed) . . . . . . . . . . . .  N. J. Cox
              Q2/08   SJ 8(2):269--289
              outlines techniques for producing table-like graphs

      Comment


      • #4
        Clyde and NIck, you are both gems to the research world! I have no idea how the utility was deleted (I am using the same machine). But it had disappeared. I had tried to install labmask. Thanks Clyde for pointing me the right package.

        Comment


        • #5
          There is another possibility. Your adopath is the series of places where Stata will look for programs. Sometimes, especially on a network, Stata starts up with a minimal set so that you need to run adopath yourself to extend the places where Stata will look.

          Yet more, adopath doesn't mind being told about places that don't exist. So, watch out for typos in what you type.

          Comment

          Working...
          X