Announcement

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

  • Error in parsing the levelsof command on Linux, Stata 18

    There seems to be an error in parsing the levelsof command with if in Stata 18 SE on Linux, consult the screenshot.
    The same command works well on other systems.
    Attached Files

  • #2
    This code (from StataCorp) will not work on any OS. The if statement (if ("`if'`in'" != "")) should have been in compound quotes, and I believe StataCorp has fixed this in an updated version.

    What do you get from

    Code:
    which levelsof
    should be

    Code:
    path\ado\base\l\levelsof.ado
    *! version 3.2.3  16aug2023
    If not, type

    Code:
    update query
    and follow the instructions.

    Comment


    • #3
      Dear Daniel,

      the code
      Code:
      (if ("`if'`in'" != ""))
      is the output of the trace, not my creation. So, you yourself confirm that there is a bug. No worries, I'll write it in a different way.

      Thank you for the quick response.

      Comment


      • #4
        Yes, it is a bug. Yes, it is from StataCorp (as I have noted). You do no not need to rewrite; you need to update your Stata.

        Comment

        Working...
        X