Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Help: Stata wont save a file!


From   "Wallace, John" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   RE: st: Help: Stata wont save a file!
Date   Tue, 7 Sep 2004 17:21:12 -0700

As a "me too" to Ron�n's comment, I recently took the Stata Netcourse NC151,
the opening lectures of which teaches you how to document your analysis
thoroughly using Stata's log function and do-files.  Although it was a
pretty major shift for me in terms of working style, I am now a thorough
convert to the spirit of those methods.  These include:

Having specific .do files for creating datasets distinct from those
producing analytical output (so you can always go back)

Having a "master.do" which is sort of a root program that steps through the
data creation and analysis steps with the other .do files as subroutines;
and most importantly, only entering a new .do in the list once you have
decided its purpose is achieved

Creating a profile.do and template.do files that take care of such tedium as
making a current directory (and a distinct directory!) for each analytical
project, initiating logs for each .do file run, turning -more- off and on,
etc.

I have multiple, concurrent, and divergent tasks for which I use Stata.
This system of documenting the analysis has allowed me to work much more
efficiently, and with a lot less re-learning when I return to a task I had
put aside (I just look at my .do files and logs in the directory which I
created the last time I worked the analysis.)

You still may lose work, but its much less painful when zipping through a
few, well commented .do files is all it takes to regenerate it.

John Wallace | Research Associate | Test Method Development
AFFYMETRIX, INC. | 3380 Central Expressway | Santa Clara, CA 95051 | Tel:
408-731-5574 | Fax:  408-481-0435


-----Original Message-----
Ron�n Conroy [mailto:[email protected]] wrote:

The implication is that Andrew lost a lot of work. This highlights the 
importance of being able to reconstruct any changes you make to a data 
file.

One solution, in this case, would be to right-click the review window 
and get Stata to save all the commands. Or, if Stata was in a wobbly 
state, to save the commands to the clipboard and paste them into some 
other application.

Ultimately, however, the solution is to build a do-file as you work. 
Each time I make a significant addition to the do-file, I re-run it from 
the beginning to make sure that the results are exactly as I thought. 
All changes to the original data are commented, and any rationale that 
needs explaining likewise. That way, if I should be bisected by the 
tram, anyone can follow the progress of the data from raw file to final 
dataset. I know this sounds goody-goody, but it is, as we say in Gaelic, 
c�all ceannaithe (wisdom that came at a price).

[email protected] wrote:
> I have been working on a file all day and just tried to save it.  I use:
> . save "C:\Documents and Settings\Andrew.King\Desktop\AK_data_work.dta"
> and I get:
> unrecognized command:  save
> r(199);

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