[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 <>
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:
*do file

command after revise
.   . . . .*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
An Introduction to Modern Econometrics Using Stata:

*   For searches and help try:

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