Statalist


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

RE: st: how to use data editor with do-files in STATA11


From   Amado David Quezada Sanchez <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: how to use data editor with do-files in STATA11
Date   Tue, 26 Jan 2010 11:27:19 -0600

Hello Neil

I do document changes even when using the data editor. I use this interactive approach when the corrections need to be done by other specialists who may not know very much how to use stata.

I use it as well when I write programs or commands which ask the user to input some parameters in a windowed fashion. 

Thank you.




-----Mensaje original-----
De: [email protected] [mailto:[email protected]] En nombre de Neil Shephard
Enviado el: Martes, 26 de Enero de 2010 11:12 a.m.
Para: [email protected]
Asunto: Re: st: how to use data editor with do-files in STATA11

Whilst feasible (at least under older versions of Stata), your
strategy is ill-advised.

You should document in your do-file all manipulations/edits that are
done to the data, so instead of having -edit if()- statements in your
do-file that bring up the editor and making the changes by hand you
should write statements such as (based on your example...

replace mpg_class = . if(mpg_class == 3 & foreign == 1)

..this way you...

a) document the changes you are making to your data.
b) make your do-file self-contained and your work reprodicible.
c) avoid errors when editing by hand
c) avoid the tedious task of editing data by hand (which is also very boring!)

Neil



-- 
"... no scientific worker has a fixed level of significance at which
from year to year, and in all circumstances, he rejects hypotheses; he
rather gives his mind to each particular case in the light of his
evidence and his ideas." - Sir Ronald A. Fisher (1956)

Email - [email protected]
Website - http://slack.ser.man.ac.uk/
Photos - http://www.flickr.com/photos/slackline/
*
*   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/

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