Announcement

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

  • Dropping observations with a specific value but only for one year and specific country

    Hello everyone,

    I have panel data that include firm-years observations for many countries. I want to drop only observations that don't have a market return of -2556.27 but only if the country is "BR" and the year is "2009".

    I tries this code but it drops all of the observations in BR and 2009:
    drop if (year==2009 & CTRY=="BR" & markRET!=-2556.27)

    Thanks in advance

  • #2
    sounds like a precision problem to me - whatever the situation for your variable markRET, it is apparently never exactly equal to -2556.27; see
    Code:
    help precision

    Comment


    • #3
      Many thanks Rich, you are right, it turned is a precision problem. I have solved it by rounding the variable.

      Comment

      Working...
      X