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

From |
"Mandy fu" <mandy.fu1@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

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

Date |
Thu, 27 Nov 2008 19:53:26 -0500 |

Hi all, I was wondering if anyone could give me some suggestion of how to decide to keep or delete the commands which need to revise when editing the do files. For example, my project usually involves the following steps: 1. read the original data into stata 2. clean the data and get the original complete data set 3. analyze data, create some new variables(such as dummy variables), and create some data sets (such as data set 1 is only for full-time year round workers, data set 2 is for part-time workers, data set 3 is for those who don't work at all) 4. analyze data , like run regressions,etc. sometimes when I have started step 4 for sometime, I find there's something need to revise in step 3. For example, some people in data set 3 whom I defined as not work at all should be in data set 2 "part-time workers". So, I need to correct it. At least there're two ways to do this: 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. Thanks for your help! Mandy * * 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/

- Prev by Date:
**st: RE: RE: re: if-sentences in Stata** - Next by Date:
**st: re: calculating the mean of x til X[_n+t]** - Previous by thread:
**st: calculating the mean of x til X[_n+t]** - Next by thread:
**Re: st: keep or delete the commands which need to revise when editing do files?** - Index(es):

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