Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: dangerous preserve


From   Phil Schumm <[email protected]>
To   [email protected]
Subject   Re: st: dangerous preserve
Date   Sun, 20 Apr 2008 12:43:21 -0500

On Apr 20, 2008, at 10:26 AM, Martin Weiss wrote:
I was wondering if anyone apart from me has been bitten by - preserve-? I recently preserved data, then dropped half my data to carry out some calculations and later forgot the preserve-status and saved.


I have no wish to enter a debate about whether the behavior of - preserve- should be changed (IMHO, it shouldn't), but I wanted to offer a few comments. Although I often work interactively in Stata, I would never make important and/or complicated changes to data interactively; I would make such changes with a do-file instead. This would especially be true of anything I might need to reproduce later on, such as changes to a dataset, analyses for publication, etc. In all such cases, I have one or more "raw" data files (which are *never* changed) and one or more do-files which make the necessary changes, all stored under version control (the use of VCS just came up on the list last week, and is optional but advised). Among the many advantages to working this way, you'll never "lose" any important work.

One more thing: I have my Stata configured so that I *always* have a log file open, regardless of what I am doing (unless I take special steps to turn it off). This is automatic, so that I don't have to remember. If you do this, then even work you perform interactively can never truly be lost, unless you save over your raw files (which, as I indicated above, I don't believe you should ever do).


-- Phil

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index