Announcement

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

  • SumStats into Excel with -esttab- in long rather than wide table?

    Hi all,

    I have what seems a super basic question which unfortunately I yet haven't managed to solve so far:

    I would like to export a decently looking standard table of summary statistics into Excel.
    I hence used Ben Jann's nice -esttab- as follows:

    Code:
    eststo clear
    estpost sum var1 var2 var3
    esttab "$path/sumstats", replace scsv cells(count mean sd min max)
    Overall this works ok, except that the sum stats for each variable are posted below rather than next to each other, and since I have far more than 3 variables rearranging the table is a lot of manual work.
    Following e.g. the below post, I tried the esttab options "unstack", "wide", "long", and "longtable" but none of these solved the problem, nor could I find the solution in any other post I found on sumstats with esttab.
    Would anyone see how to do this better?

    Also, how can I adjust the above code to show the count with zero digits but thousands separator, and all other variables with 2 digits each?

    Thanks so mich!
    PM
    Hello, after reading through the forum I found that esttab often causes issues. I hope you can help me with my problem. I am trying to create a table in stata
Working...
X