Announcement

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

  • Listing missing values in each variable.

    Hello

    I have to browse cases with missing values in variables from entire data set which shows output one by one , flashing on screen and stops with last output.

    Is there a way to append all output generated from br command one by one internally , in a separate stata data file or excel file, so all comes as appended in one file.
    Below is my command.

    foreach var of varlist _all {
    br sitename pid dos dor `var' if missing(`var')
    }

    Or is there any other way to list observations with missing values by variables.

    Thanks

  • #2
    See missings from theStata Journal. A good search term is dm0085. See the 2015 paper for an overview and the latest update (2020 as I write) for code.


    Code:
    search for dm0085                                                                            (manual:  [R] search)
    ------------------------------------------------------------------------------------------------------------------
    
    Search of official help files, FAQs, Examples, and Stata Journals
    
    Search of web resources from Stata and other users
    
    (contacting http://www.stata.com)
    
    3 packages found (Stata Journal and STB listed first)
    -----------------------------------------------------
    
    dm0085_2 from http://www.stata-journal.com/software/sj20-4
        SJ20-4 dm0085_2. Update: A set of utilities for ... / Update: A set of
        utilities for managing missing / values / by Nicholas J. Cox, Department
        of Geography, / Durham University, Durham City, UK / Support:
        [email protected] / After installation, type help {cmd:missings} / DOI:
    
    dm0085_1 from http://www.stata-journal.com/software/sj17-3
        SJ17-3 dm0085_1. Update: A set of utilities for managing missing values /
        Update: A set of utilities for managing missing / values / by Nicholas J.
        Cox, Department of Geography, / Durham University, Durham City, UK /
        Support:  [email protected] / After installation, type help missings
    
    dm0085 from http://www.stata-journal.com/software/sj15-4
        SJ15-4 dm0085. A set of utilities for... / A set of utilities for managing
        missing values / by Nicholas J. Cox, Department of Geography, / Durham
        University, Durham City, UK / Support:  [email protected] / After
        installation, type help missings

    Code:
    missings report  
    
    local anymiss `r(varlist)' 
    
    missings list 
    
    missings tag, gen(ismiss) 
    
    browse sitename pid dos dor  `anymiss' if ismiss

    Comment

    Working...
    X