Announcement

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

  • New Data old output

    I'm having a problem, I insert a new data set into a .do file and run the code but the .do file outputs results that are identical to the previous data set that was inputed into the .do file. I can't really post a picture of the commands because the .do file is thousandths of lines long and don't know at what point the old results are stored. The .do file wasn't originally written by me but by a previous research assistant I suspect that the issue is with stores results but I don't know how to override them. If anyone has any other ideas as to what might be causing this situation I would like to hear them. Again I would like to post a picture of the code but it's not possible.

  • #2
    The first thing I would do is check the -use- or -webuse- or -sysuse- commands in the do file. Are they reading in the old data set at any point? If so change them.

    Also, what do you mean by "insert a new data set"? Are you using -input- commands to enter the data as part of the do file?

    In short, my guess is you aren't using the data you think you are using. Even if you start off using the data you, subsequent commands in the do file may switch you back to the old data. So, check for the commands I mention and see if they are in the do file and if so see if they are correct.

    But without seeing the do file, I can't be sure.
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    Stata Version: 17.0 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://www3.nd.edu/~rwilliam

    Comment


    • #3
      I interpret your problem as: You ran a do-file that read an input dataset and created an output dataset with the results ("the old results are stored"). You replaced the name of the input datset in the do-file and ran the updated do-file. The contents of the output dataset that you looked at are the same as those from the first run.

      This could happen if the results from the second run were written into a different directory than the results from the first run. If you are looking in the same place that the results from the first run was written, you are looking in the wrong place.

      Open the dataset that you think is from the second run. Then run the command describe, short and you will see results like these.
      Code:
      . describe, short
      
      Contains data from /Applications/Stata/ado/base/a/auto.dta
        obs:            74                          1978 Automobile Data
       vars:            12                          13 Apr 2018 17:45
      Sorted by: foreign
      Check the date and time, which is when the dataset was created. Is it the time of the second run? Or is it the time of the first run?

      Comment

      Working...
      X