Announcement

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

  • inquire about Stata rule for abbreviation of variables

    For example, in the dataset, the variable name is Armani_premium. And no var name is Armani.

    But sort Armani does the same work as sort Armani_premium.

    I never heard of this rule in Stata before.

    Can anyone explain it?

  • #2
    Yao:
    this occurs because Armani abbreviation does not conflict with another variable named -Armani-.
    Kind regards,
    Carlo
    (Stata 16.0 SE)

    Comment


    • #3
      When variable names are expected, Stata will check each of them to make sure they do not ambiguously identify more than one variable. If they do, Stata complains about it or a command doesn't work.

      When wildcards are used, Stata will first check that the pattern matches at least one variable, and if so, expand that into the list of all variables that match that pattern.

      Comment


      • #4
        Chapter 11 of the Stata User's Guide PDF (included with your Stata installation and accessible through Stata's Help menu) thoroughly discusses the syntax of the Stata language, and in particular section 11.2 discusses the various abbreviation rules.

        If you did not review the Stata User's Guide when you began using Stata, now is the time to do so and fill out (or refresh) your understanding of Stata basics.

        Comment

        Working...
        X