Announcement

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

  • Summary tables of descriptive statistics

    Good morning everyone,

    I am having some problems with creating an "elegant" descriptive statics table for my analysis to put in my thesis.

    I have a panel data set (in long format), and I would like to make a preliminary summary statistics table, containing the mean, standard deviation and min and max of my main variables, by wave. For instance I would need to have a table with variables on the rows, and statistics as columns, and also have them separated by waves, but column-wise.

    I have used the following command:

    tabstat lfsato selfesteem unemployed satHEALTH satINCOME satSOCIAL satLEISURE age age2 redundant fired retired startschool, stat(mean sd min max) col(stat) by(wave) long

    but the output is divided by wave, as separate "rows" (I have uploaded my table - Fig 1.docx)

    What I would like to obtain is instead something of the kind - see second attachment "example table"

    Thank you,

    Giulia Slater


    Attached Files

  • #2
    See if this is helpful to you https://www.youtube.com/watch?v=zdI65G6AhdU
    Regards
    --------------------------------------------------
    Attaullah Shah, PhD.
    Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
    FinTechProfessor.com
    https://asdocx.com
    Check out my asdoc program, which sends outputs to MS Word.
    For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

    Comment


    • #3
      as the FAQ advises (do read it please), do not attach word (or spreadsheet) files - many of us will not download binary files from strangers

      assuming that rows v columns is your "only" issue with the -tabstat- results, why not add "columns(statistics)" as an option?

      note that there are a sizable number of user-written routines for producing these kinds of descriptive stats; some are at SSC, some at Stata Journal; use -search- to find and download; here are some names: table1, table1_mc, basetable, partchart, sumtable, baselinetable and summtab

      Comment


      • #4

        Thank you Rich and Attaullah,

        I did try to post my picture not as a word file but I did not manage to do so, hence the word file. I am sorry for the inconvenience, I will try not to do that anymore.

        Concerning the table, I did add the col(stat) option, but still the "waves" of my panel were one under the other and not one next to the other.

        This is the output (part of it) I got, it is not particularly clear and it is very long since I have 9 waves to describe. I would, for instance, like to have the descriptive statistics by wave one next to the other, for each variable.

        wave variable | mean sd min max
        -----------------------+----------------------------------------
        1 lfsato | 5.239925 1.324416 1 7
        selfesteem | 3.577519 .6651987 1 4
        unemployed | .0417109 .1999383 0 1
        satHEALTH | 5.015054 1.638136 1 7
        satINCOME | 4.424404 1.705921 1 7
        satSOCIAL | 5.044926 1.547097 1 7
        satLEISURE | 4.997121 1.590668 1 7
        age | 43.70587 18.46407 15 97
        age2 | 2251.089 1808.977 225 9409
        redundant | .0916306 .2886079 0 1
        fired | .0238095 .1525104 0 1
        retired | .038961 .193572 0 1
        startschool | .02886 .1674735 0 1
        -----------------------+----------------------------------------
        2 lfsato | 5.23215 1.339484 1 7
        selfesteem | 3.560218 .6906258 1 4
        unemployed | .0370139 .1888042 0 1
        satHEALTH | 5.045258 1.669527 1 7
        satINCOME | 4.505503 1.695199 1 7
        satSOCIAL | 4.955537 1.585077 1 7
        satLEISURE | 4.955828 1.583296 1 7
        age | 44.69829 18.74539 15 99
        age2 | 2349.296 1859.433 225 9801
        redundant | .0848344 .2787161 0 1
        fired | .0151075 .122016 0 1
        retired | .0354445 .1849542 0 1
        startschool | .0232423 .1507159 0 1
        -----------------------+----------------------------------------
        3 lfsato | 5.307507 1.263086 1 7
        selfesteem | 3.573964 .6669925 1 4
        unemployed | .0345935 .1827563 0 1
        satHEALTH | 5.096237 1.628776 1 7
        satINCOME | 4.586582 1.618963 1 7
        satSOCIAL | 5.054114 1.498235 1 7
        satLEISURE | 4.985751 1.563161 1 7
        age | 44.96763 18.74188 15 99
        age2 | 2373.314 1866.768 225 9801
        redundant | .0829045 .2758167 0 1
        fired | .0188679 .1360975 0 1
        retired | .0434534 .2039338 0 1
        startschool | .0308748 .1730279 0 1
        -----------------------+----------------------------------------
        4 lfsato | 5.211834 1.348441 1 7
        selfesteem | 3.584322 .6752155 1 4
        unemployed | .0383679 .192089 0 1
        satHEALTH | 4.967931 1.682955 1 7
        satINCOME | 4.485023 1.69828 1 7
        satSOCIAL | 4.930997 1.568576 1 7
        ....




        I will have a look at the video and the tables suggestions and see if I get somewhere.

        Regrads,

        Giulia

        Comment

        Working...
        X