Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do you log? and why?

    In what format do you save your log? and why? (elaborate in the comments please)
    14
    log (plain text)
    42.86%
    6
    smcl (stata markup language)
    57.14%
    8

  • #2
    I don't use logs, but I liked the poll module! +1

    Comment


    • #3
      Usually if I log it's because I run my do-file in batchmode. If I log on purpose it is in smcl.

      Comment


      • #4
        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).
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          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.
          Best regards,

          Marcos

          Comment


          • #6
            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

            Comment


            • #7
              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.
              Alfonso Sanchez-Penalver

              Comment


              • #8
                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.

                Comment


                • #9
                  I only log to share results with other parties. E.g. I run a regression and send the smcl output to my co-author in a different institution.

                  Comment


                  • #10
                    All of my do-files* begin with:
                    Code:
                    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

                    Working...
                    X