Announcement

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

  • Keeping first 5 observations per firm id number

    Hi,

    I have a dataset with multiple observations per variable. However, I want to keep the first 5 observations per variable.
    Does anybody knows a command for this?

    Regards,

    Rohan Kapoor

  • #2
    Code:
    by id: keep if _n < 6

    Comment


    • #3
      Tnx Scott

      Comment

      Working...
      X