Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Datasignature and other boilerplate for do files


From   "Dalenberg, Douglas" <[email protected]>
To   <[email protected]>
Subject   st: Datasignature and other boilerplate for do files
Date   Wed, 31 May 2006 10:13:54 -0600

The recent update of Stata included the new command -datasignature- as
advertised by William Gould.  It has already saved me from one
potentially serious blunder.  I was cleaning up a small survey data set,
correcting typos and checking for obvious errors and I saved the data
file and copied it to my memory stick.  The next day, as I produced
histograms, I found another significant, but subtle, input error and I
corrected it and saved the data set (with the same name) but forgot to
copy it to my memory stick.  When I went to work with the data at home,
I was using the old data but fortunately I had tried out -datasignature-
and I noticed that the numbers didn't match, since at the end of the
previous session I had copied the number down.  My first reaction was
that -datasignature- didn't work, but then I realized my mistake.
Without it, I would have done my analysis with the wrong data set and
probably reported incorrect results.  No doubt that I can be criticized
for not taking more care with my file names and data management, things
that I chide my students about.  However, I now include -datasignature-
after each use and save.

This leads me to ask myself what other commands am I missing in my do
file boilerplate that I grab every time I start a new do file?
Currently I have:
// Project name and key word description
// data set to use
// date
// version 9.2
Capture log close
Set more off
Cd "copy from my documents"
// log using "name", text replace
Use data, clear
Datasignature
Summarize
 
In part it is a matter of taste, but am I missing something obvious or
important? 

Douglas Dalenberg
Department of Economics
University of Montana

 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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