Statalist


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

st: RE: RE: dangerous preserve


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: dangerous preserve
Date   Sun, 20 Apr 2008 17:55:15 +0200

Nick,

fair enough, but it should be possible to advise just the way Stata advises
if the change flag for the dataset is 1. Fortunately, it gives a warning as
to the changed nature of the data you are about to destroy and prevents you
from doing stupid things. I remember reading a section in the handbooks
about how Stata is so very careful with commands that may change your data
in undesirable ways. Should the same not happen for -preserve-d data?

Martin Weiss
_________________________________________________________________

Diplom-Kaufmann Martin Weiss
Mohlstrasse 36
Room 415
72074 Tuebingen
Germany

Fon: 0049-7071-2978184

Home: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1130

Publications: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1131

SSRN: http://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=669945


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Nick Cox
Sent: Sunday, April 20, 2008 5:46 PM
To: [email protected]
Subject: st: RE: dangerous preserve

I think this is mostly on the level of yes, sharp knives can cut you if
you are not careful. 

As I understand it, 

preserve
...
save 
...

does not rule out a subsequent -restore-. 

But otherwise yes, you can get bitten if you forget what you have done. 

It would be easy enough to write a command that -save-d while it
-preserve-d, but 
you would have to remember to use it. I can't see an advantage in
advising that 
over advising the use of -save- before -preserve- when that's a good
idea -- or indeed over recommending -save- and avoiding -preserve- if
you are going to forget what you have done. 

Nick
[email protected] 

Martin Weiss

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. Now call me
foolish, but in the heat of the action, it is easy to forget about the
status of your data, isn`t it?
So: is there a mechanism to alert me to this danger, and if not, should
there be one?

*
*   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/

*
*   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