Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: re: keep or delete the commands which need to revise when editing do files?


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: re: keep or delete the commands which need to revise when editing do files?
Date   Thu, 27 Nov 2008 20:46:55 -0500

< >
Mandy said

1) In step 3. above  I replace the incorrect commands with the correct
ones, and then re-run the commands to update the data sets created
2) I append some extra commands to the existent do files to revise.
That is, the initial incorrect commands remain in the do-files.

So do files for these two ways seem like as follows:
(1)
------------------------------------------------
*do file

command after revise
------------------------------------------------
2)
------------------------------------------------
.   . . . .*do file
initial commands(Which need to revise)
..............................
extra command to revise
-----------------------------------------------
Which way is better? How should I  decide this? This question is
important to me since it's helpful for me to  get good habit of
managing data sets and do files.




Personally, if I want to keep track of what turned out to be the wrong commands (perhaps so I don't do that the next time!) I would use a variation on the second strategy: copy the wrong commands, comment them out, and correct their copies. That is, don't make all the corrections at the bottom, because that will only work if the incorrect variables are not used in any intermediate calculations.

I have not seen it, but with a ringing endorsement from Bill Gould at FNASUG, the new book on "The Workflow of Data Analysis in Stata" by Scott Long (Stata Press; see Stata's website) might be a good investment.

Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


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