Statalist


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

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


From   "Rajesh Tharyan" <[email protected]>
To   <[email protected]>
Subject   RE: st: why no 'undo' option in Stata
Date   Mon, 25 Aug 2008 11:34:29 +0100

Also, preserve and restore does that partly.. of course it dosen't allow you
to go back one command at a time. But stata gives you the ability to view
the commands and easily select them from the review window and in 10.1 to
send it to a do file (that I found very useful!). 

Also, if you run commands from macro in excel.. it wont let you undo it. I
suppose all this still dosen't properly answer your question, but I suppose
it has something to do with the fact that for the undo to work stata will
have to save temp files after each command is issued to revert back with
undo. 

rajesh

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin Weiss
Sent: 24 August 2008 18:15
To: [email protected]
Subject: Re: st: why no 'undo' option in Stata

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 <[email protected]>:

> 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 <[email protected]> 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/

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index