Announcement

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

  • Descriptive statistics on word

    Good morning,
    I would like to transfer the following table from stata to word for my thesis however, I do not know the command to do so,
    Code:
    . tabstat riskavers, statistics(mean sd) by(wave)
    
    Summary for variables: riskavers
         by categories of: wave 
    
         wave |      mean        sd
    ----------+--------------------
            1 |  1.748762  .5516792
            2 |  1.719628  .5518228
            3 |  1.739416  .5440446
            4 |  1.634218  .5705484
            5 |  1.653533  .5531243
            6 |  1.713028  .5553211
    ----------+--------------------
        Total |  1.695483  .5571508
    -------------------------------
    Thank you so much

  • #2
    Simple way: copy and paste as described here: https://www.stata.com/support/faqs/d...opying-tables/

    More automated way:
    Code:
    webuse grunfeld
    estpost tabstat invest, statistics(mean sd) by(company)
    esttab using example.rtf, cells("mean(fmt(a3)) sd(fmt(a3))")
    Edited output format to prevent getting points deducted by Nick
    Last edited by Jorrit Gosens; 06 Aug 2018, 07:21.

    Comment


    • #3
      Hi Luke,

      There are several ways to do this. The easiest way to do this is to select the output in the Stata window -> Right Click -> Copy table and then paste it in Word or Excel.

      This way the table gets copied as a table and Word/Excel allow you to apply Table styling options.

      If you feel this option is insufficient, you can use community-written commands to produce professional tables. Popular ones are outreg2 and tabout. You can install those by typing 'ssc install outreg2' and 'ssc install tabout'. Google should help you find manuals on how to use those. An added bonus of using these command is that if you change anything about your data, if you simply re-run the Stata Do-file your table will automatically update as well. Without the need for you to re-apply all the necessary styling.

      Edit: It seems Jorrit Gosens answered while I was typing my answer. His advice is excellent of course.
      Last edited by Jesse Tielens; 06 Aug 2018, 07:09.

      Comment


      • #4
        I would advise using fewer than 6 decimal places. I would reduce marks at any level (first, Master's, doctorate) for spurious precision in presentations.

        Comment

        Working...
        X