Announcement

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

  • STATA Codebook and Do file

    A client has requested that we prepare a STATA Codebook and Do file. We never had this question before, just send the STATA file. What are these files and can they be generated from STATA?

  • #2
    Stata has a codebook command. It’s not clear that they want something like what this shows in output. You would be best to clarify with the client what they exactly want.

    Comment


    • #3
      A .do file is what in other programs is sometimes called a script, or a program, or a macro; It is a plain text file in which you type a set of commands, and you can ask Stata to run that script, and it will execute those commands one after another. It is good practice to do any analysis and data preparation in a .do file. That way you keep track of what you have done and it is easy to fix any mistakes that may happen (none of us are perfect).

      I am not so sure what your client meant with a Stata codebook. There is the codebook command, that will print on screen a basic codebook of the data in memory. There are community contributed commands that let you export codebooks in other formats, e.g. ssc desc htmlcb . Stata can write to other formats like LaTex, Word, and Excel, and that way you can let Stata create a codebook from data in memory.
      ---------------------------------
      Maarten L. Buis
      University of Konstanz
      Department of history and sociology
      box 40
      78457 Konstanz
      Germany
      http://www.maartenbuis.nl
      ---------------------------------

      Comment

      Working...
      X