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

st: AW: RE: two steps of writting commands

From   "Martin Weiss" <>
To   <>
Subject   st: AW: RE: two steps of writting commands
Date   Thu, 12 Feb 2009 15:08:55 +0100


Mandy would probably find a wealth of information on her subject if she


-----Ursprüngliche Nachricht-----
[] Im Auftrag von Nick Cox
Gesendet: Donnerstag, 12. Februar 2009 15:04
Betreff: st: RE: two steps of writting commands

I don't have data on what most people do. In any case, what's best is to
work out what's best for you, given an overall goal of reproducible

I imagine however that many users write messy code and then clean up
afterwards (if at all). What's dominant for me with do files is sorting
out not any issue of ugliness, but outright syntax mistakes,
digressions, dead ends and repetitions.  

But equally many people have trained themselves to write do files that
are clean from the outset and to correct immediately any problem as it
arises. It's a good route to take but it requires more discipline. 


Mandy fu

I 'm curious about the steps  used to write do files. I find usually I
need to do two main steps:
First, write the original commands, check the outputs, test for
various models, compare the results, select some models and report the
results. This is like the draft version of commands.

Second, organize and edit the original commands for future use or
audit:simplify the commands(for example,using programming commands to
substitute similar commands) , delete the redundant ones, make the
commands neat.
When  working with step 1, my goal is to get the job done. Sometimes I
cannot think too much about how ugly the commands look like. This is
why I need the second step to polish  what I get from step 1.

I was wondering if I sould combine these two steps together.  Should I
take consideration of getting the commands simpler, more concise,and
more transparent in step 1 so that I don't need step 2 at all? Is the
two-step way usual or most people don't need the second step? 

*   For searches and help try:

*   For searches and help try:

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