Announcement

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

  • Dropping observations is missing values

    Hello community,

    I've downloaded a big dataset with data missing across multiple variables in no real pattern. I want to drop all observations with missing data regardless of the variable with missing data (I have over 300 variables and a couple of thousand observations.

    Thanks for your help.

  • #2
    If that is what you want to do, then this example should show you a useful direction.
    Code:
    . sysuse auto
    (1978 automobile data)
    
    . egen todrop = rowmiss(*)
    
    . tab todrop
    
         todrop |      Freq.     Percent        Cum.
    ------------+-----------------------------------
              0 |         69       93.24       93.24
              1 |          5        6.76      100.00
    ------------+-----------------------------------
          Total |         74      100.00
    
    . drop if todrop>0
    (5 observations deleted)
    
    .
    Others here may suggest statistical approaches to dealing with missing values.

    Comment

    Working...
    X