You are not logged in. You can browse but not post. Login or Register by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the FAQ.
I usually log to help myself out remembering tomorrow what I did Yesterday for a given reseaerch project.
I save log file in .smcl mode (I'm accustomed to do so).
I seldom use it, for I prefer to save only commands and short comments under do-files. But when selecting this approach, I'd rather use the smcl option.
That said, for the analysis, I usually copy it and paste into Word just the chuncks I need to share with the team. There, I add whatever I wish: large comments, interpretation, figures, etc.
I voted but saw no place to add comments so here it is: I always log (I want an audit trail); for many purposes I set up a second log in a do file so I have a log specific to that do file; I use text format because sometimes I want to share the results with non-Stata users or easily incorporate it into an editor or other program that doesn't recognize smcl
I log in my projects to keep track of what I do, and because they are long do files and that way I don't have the risk of the output window cutting off output. I do in smcl. I used to do in text files, but I got used to the copy table part in smcl and now use that.
I log final versions so I can reference back to calculated results that would not automatically be saved in a estimates store command. I use text files so I can share them easily with colleagues.
capture log close
set more off
log using whatever, replace
While just keeping the do-file gives an audit trail of what was done, it doesn't show the results, and I usually want to be able to review those without rerunning everything, especially if the calculations run for a long time. Also, sometimes reviewing a log file I find that some result in the middle of the file is not what I expected it to be, in a way that casts doubt on the validity of subsequent results. So having all the results in the log file helps me chase down the source of the error.
I do nearly all my work in do-files: I seldom use the command window, and I never use the GUI. So I generate a lot of logs. I do them in .smcl because it distinguishes bold-face from ordinary type, which I find helpful when I read them. As for sharing with others who don't use Stata, I use the -translate- command to create a PDF.
*Well, not do-files that only run when called by another do-file, and not when I'm just working out an answer to a question on Statalist!
Comment