Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Allan Reese (Cefas)" <allan.reese@cefas.co.uk> |
From | Louis Boakye-Yiadom <lby_kw@yahoo.co.uk> asked |
To | <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: Knowing how a variable was generated |
Date | Mon, 1 Nov 2010 17:25:02 -0000 |
"If some of the variables in a dataset were generated by a transformation or combination of some other variable(s) in the data, is it possible to know this without seeing the relevant log or do file?" It would be possible for software to record "created" and "last modified" dates for each variable, but it doesn't. It seems rather onerous to record the complete history: a variable might be generated, subsequently recoded or specified values replaced (with if or in), or edited as individual values (each of which creates a replace for that unit. It is unsafe to rely on the user having recorded all actions in the label. That is why I have advocated having a profile.do that creates a daily log file so that all user commands are captured, including those created by edits. I have hundreds of text files logYYYY-MM-DD.txt. * Sprinkle with comments as it is otherwise hard, weeks later, to work out *why* you wrote specific commands, and of course the log contains all mistakes and blind alleys as well as the yellow brick road to happiness. I regularly remind myself how variables came about by searching the logs for variable or file names. The one operation that creates no log is pasting data from an arbitrary range of an Excel spreadsheet. That needs a comment, then wash you hands. Allan *********************************************************************************** This email and any attachments are intended for the named recipient only. Its unauthorised use, distribution, disclosure, storage or copying is not permitted. If you have received it in error, please destroy all copies and notify the sender. In messages of a non-business nature, the views and opinions expressed are the author's own and do not necessarily reflect those of the organisation from which it is sent. All emails may be subject to monitoring. *********************************************************************************** * * 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/