Announcement

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

  • How to drop some observations based on tab results ?



    Hi Everyone,

    I would like to drop some countries with percent value <0.10. I dont know how to drop observations based on tab results. Could you please help me to solve this?



    . tab country_

    country_ | Freq. Percent Cum.
    -----------------------+-----------------------------------
    Albania | 1,041 0.63 0.63
    Angola | 785 0.48 1.1
    Antiguaandbarbuda | 151 0.09 1.20
    Argentina | 3,108 1.89 3.09
    Armenia | 1,280 0.78 3.87
    Azerbaijan | 995 0.61 4.48
    Bahamas | 150 0.09 4.57
    Bangladesh | 2,946 1.79 6.36
    Barbados | 150 0.09 6.45


    Thank you.



  • #2
    Code:
    qui sum country_
    bys country_: drop if _N<0.1*r(N)

    Comment

    Working...
    X