Announcement

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

  • Data disappearing from data browser

    In the midst of working with a panel data set, all of a sudden my data disappears from the data browser and Stata no longer recognizes any of the variables I've been working with. I've restarted this process twice, and twice this has happened after I try to generate and then xtsum a new variable. If anyone knows what the problem may be, would appreciate any advice re: how to address this.

  • #2
    It is a little difficult to see the image. But it seems you were working with a do-file, instead of a .dta.

    Best,

    Marcos
    Best regards,

    Marcos

    Comment


    • #3
      I agree with Marcos, it's difficult to tell anything from the screen shot. The FAQ linked at the top of this page strongly recommends copying your results and pasting them into a code block inside your posting, and it gives instructions for doing so.

      With that said, as Marcos noted the picture suggests that you ran a do file, the first step of which was to xtsum your new variable, which presumably you created before running the do file. You could try adding describe before the xtsum to confirm that data remains as you expect, that you didn't accidentally delete something along the way. Also codebook varname with the new variable (sorry, couldn't read its name on the photo) might be helpful.

      Comment


      • #4
        Hi Marcos ad William- This first command I have on my do file is to use a .dta.
        At some point after exactly the same command, I simply get
        variable __00000I not found
        And then I pretty much can't do anything from there except clear and restart.

        I tried checking that the relevant variables remain as expected and before hitting that command which is simply a cond generate command, all seems fine.
        Last edited by Ghia Osseiran; 22 Mar 2015, 15:46.

        Comment


        • #5
          Your screen shot is, indeed, had to read. But I can discern that prior to your -xtsum- you ran -drop if somethingtoosmallformetoread == 0- which resulted in the loss of illegible 5 digit number of observations. The command before that does not appear in the screenshot, but whatever it was, Stata responded to it by saying that illegible 6 digit number of observations were deleted. My best guess is that those two commands eliminated all of your data and you were left with nothing in memory. You should go back to the beginning, and then before those two commands run, do some tabs or counts to figure out whether any data should be left after those--I think there you will find the source of your problem.

          Comment


          • #6
            I agree that the error message from Stata is not immediately helpful. Clyde has offered advice that there may be no remaining data in the variable you are using in xtsum, and that is causing xtsum to fail gracelessly.

            Your screen shot shows that the drop command that Clyde quoted was the last step in a do-file (because the next line is "end of do-file"). The next line runs another do-file. Before running that second do-file, that's the time to do tabs or counts, as Clyde suggested, and/or describe or codebook as I suggested. I expect they will confirm that you have zero observations left in your data, because you have dropped all your observations.


            Comment


            • #7
              The drop command was indeed the problem. Sorted. Thank you!

              Comment


              • #8
                Just FYI, the screenshot is 1366x768 so is readable,but displayed in reduced dimensions by the forum software. This may also be browser- or OS-affected as well. If there is a difficulty reading the text, click the thumbnail first, then when the image pops up, right click it and select "open image in new tab" (or it's equivalent in your browser). The image then will be open in its native dimensions. Best, Sergiy

                Comment


                • #9
                  Sergiy,

                  Thanks for that suggestion. In my browser, there is no "open image in new tab" or equivalent option when I right click on the image. However, if I right click on the thumbnail without opening it, I do have an option to save the image. When I did that and then opened the saved image, it was readable.

                  All said and done, however, I think the message to forum users should still be: don't post screen shots unless you are trying to show us something that can't be captured any other way. They are just too much trouble for the reader and decrease your chance of getting a response. What Ghia wanted to show us could have been very easily captured by copying and pasting from her Results window into a code block--doing that is no harder than taking and posting a screen shot. In fact, I think it's fewer clicks. And it invariably produces easily readable copy.

                  Comment

                  Working...
                  X