Announcement

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

  • Missing data - general research

    Hello everyone!
    I´m a Medical Student, from Brazil, and it´s the first time I´m using Stata.
    I am part of a research group, and we are at the beginning of the data analysis process. However, we have a issue. There´s a lot of missing data, from the same register. We are looking for it, variable by variable... E.g

    List Id if Age ==.
    and then
    List Id If Sex ==.
    ...

    It works, but it generates me different list, that i have to try to merge somehow in another moment...
    I wonder if you guys could help me.

    Is there a way to do a general search in the database and return all records where there is any missing data? Thank s a lot!!

  • #2
    -egen- with the "rowmiss" option will tell you how many variables (in your varlist) have missing values for each observation; note that I am assuming here that this is not panel data or otherwise in some form where the observation would not be correct unit; see
    Code:
    help egen
    and skip down to the "rowmiss" function (or the "rownonmiss" function if preferred)

    Comment


    • #3
      Thanks for your help, but I typed "help egen" and got desesperated with the ammount of information :/
      Is there a chance of mailing you a sample of my DB, and you send me back for better learning?

      Comment


      • #4
        Gil:
        getting yourself familiar with Stata command it's easy if you're willing to dedicate it a bit of your time.
        From -help egen-:
        rowmiss(varlist)
        may not be combined with by. It gives the number of missing values in varlist for each observation (row).

        rownonmiss(varlist) [, strok]
        may not be combined with by. It gives the number of nonmissing values in varlist for each observation (row) -- this is the value used by rowmean() for the denominator in
        the mean calculation.
        Conversely, sending DB privately to listers is not the way this forum works: if you want to share an example/excerpt of your data on the General forum, you can do it via -dataex-.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          Sorry about that...

          Using Egen, it give mes the number of record with missing data, according to criteria, right?
          acctually, I have to know what record is... and what is the missing data... The problem is that I have 50 collumns.,..

          Comment


          • #6
            Welcome to Statalist.

            You will perhaps find useful commands for investigating the patterns of missing values in your data in the output of help missing.

            But also, some more general advice. I'm sympathetic to you as a new user of Stata - it's a lot to absorb. And even worse if perhaps you are under pressure to produce some output quickly. Nevertheless, I'd like to encourage you to take a step back from your immediate tasks.

            When I began using Stata in a serious way, I started, as have others here, by reading my way through the Getting Started with Stata manual relevant to my setup. Chapter 18 then gives suggested further reading, much of which is in the Stata User's Guide, and I worked my way through much of that reading as well. There are a lot of examples to copy and paste into Stata's do-file editor to run yourself, and better yet, to experiment with changing the options to see how the results change.

            All of these manuals are included as PDFs in the Stata installation (since version 11) and are accessible from within Stata - for example, through the PDF Documentation section of Stata's Help menu. The objective in doing the reading was not so much to master Stata as to be sure I'd become familiar with a wide variety of important basic techniques, so that when the time came that I needed them, I might recall their existence, if not the full syntax, and know how to find out more about them in the help files and PDF manuals.

            Stata supplies exceptionally good documentation that amply repays the time spent studying it - there's just a lot of it. The path I followed surfaces the things you need to know to get started in a hurry and to work effectively.


            Comment


            • #7
              first, unless you want to hire me, you cannot send me your data file
              second, the result of -egen- allows you to look and see which observations have any missing values, which is what I thought you wanted
              third, I don't know what you mean by "what is the missing data"

              Comment

              Working...
              X