Announcement

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

  • Drop certain observation if certain criteria meets a condition (Panel data)

    Hello!

    I have a panel data which consists from the year 2010 to 2019
    I want drop all the observations if the observation was not a welfare reciepient in the first year 2010.

    the variable names are as follow:
    year: year (contitnuous)
    welfare recipient: welfare recipient(yes=1/ no=0)

    thanks!

  • #2
    see #3
    Last edited by Øyvind Snilsberg; 08 Nov 2021, 03:49.

    Comment


    • #3
      Code:
      bys panelid (year): drop if recipient[1] == 0

      Comment


      • #4
        Originally posted by Fei Wang View Post
        Code:
        bys panelid (year): drop if recipient[1] == 0
        thank you! the code worked perfectly!

        Comment

        Working...
        X