Announcement

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

  • Remove firms from dataset

    Hi, i'm new to Stata and i'm trying to learn.
    I have a data set and would like to remove certain firms: firms are identified by the SIC variable.
    I would like to remove all firms between 4900-4999 and 6000-6999
    How does the code look?
    Thank you,
    Massimo


  • #2
    not clear whether SIC is numeric or string so choose one of the following:
    Code:
    drop if inrange(SIC,4900,4999) | inrange(SIC,6000,6999)
    drop if inrange(SIC,"4900","4999") | inrange(SIC,"6000","6999")

    Comment


    • #3
      The second works! Thank you

      Comment

      Working...
      X