Statalist


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

Re: st: why no 'undo' option in Stata


From   Martin Weiss <martin.weiss@uni-tuebingen.de>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: why no 'undo' option in Stata
Date   Sun, 24 Aug 2008 19:15:07 +0200

On top of what Maarten has already said, let me add that you can have two log files, one for recording screen output and one for commands only open at any one time. An expedient place to tell Stata to open those is the profile.do -h profile-. Just put

*********
log using C:/Users/`c(username)'/Documents/Stata/log/mydefaultlog, append
cmdlog using C:/Users/`c(username)'/Documents/Stata/log/mydefaultcmdlog, append
*********

in there (construct a dir "Stata/log" in your Documents first), and any changes are reversible if you refrain from overwriting dta files. The command log can be used as a do-file to replicate anything you have done in the past...


HTH
Martin


Quoting Steven Samuels <sjhsamuels@earthlink.net>:


You should never save the data.


I think Maarten meant: never "save, replace".  Save the data only under
a different name.

-Steve
On Aug 24, 2008, at 11:13 AM, Maarten buis wrote:

--- Shehzad Ali <sia500@york.ac.uk> wrote:
I am sure there must be a good reason why Stata doesn't have an
'undo' option like spreadsheets do, but I was wondering if someone
can shed some light on this.
I don't know, but you should never need one. The way to do any analysis
is to start a .do-file, within that .do-file open the raw data, change
the data as required for the analysis you want to run, and than run the
analysis. You should never save the data. This way when you make a
mistake (and I always make many mistakes), this is easily solved by
changing the .do-file and re-run the .do-file. The interactive mode is
just for playing around and trying stuff, never for serious analysis,
as you cannot reproduce an analysis once you have closed Stata, and no
one should ever even consider changing the data in the "spreadsheet
mode".

-- Maarten

BTW, notice that there is an undo button in the .do-file editor.

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

Send instant messages to your online friends http://uk.messenger.yahoo.com
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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