Announcement

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

  • Export summary statistics to LaTeX from Stata

    Hi!

    I want to export this simple summary statistics to LaTeX. I have exported many tables and regressions results, but somehow I cannot get this one right.
    I use
    PHP Code:
    eststoestpost tabstat sum_totalby(importerstat(mean sd count
    And it looks how I want it, but when I try to export it I use
    PHP Code:
    esttab using sumres.texbooktabs cells(mean sd count
    This is an example of my data
    PHP Code:
    [CODE]
    Example generated by -dataex-. To installssc install dataex
    clear
    input str32 importer int year float
    (sum_total gdp_imp lgdp_imp)
    "Algeria"             2002  2  56760037376   24.7621
    "Algeria"             1989  0  55630036992  24.74199
    "Algeria"             1999  0  48639987712  24.60771
    "Algeria"             2007  0 134999924736  25.62854
    "Algeria"             1991  0  45719977984   24.5458
    "Algeria"             1993  0  49950023680  24.63429
    "Algeria"             1997  0  48179978240  24.59821
    "Algeria"             1998  0    4.819e+10  24.59842
    "Algeria"             2011  0 2.000001e+11 26.021584
    "Algeria"             1995  0  41759969280 24.455204
    "Algeria"             2000  0  54790037504 24.726774 
    (I only have one exporter)

    The mean, sd and count are under each other in rows, instead of a wide format, like it is displayed in Stata.
    So what I want is that there are four columns in total, "importer" "mean" "sd" "observations".
    I tried adding "wide" etc. but I cant get it to work.


  • #2
    https://stackoverflow.com/questions/...r-mean-differe
    Eric A. Booth | Senior Director of Research | Far Harbor | Austin TX

    Comment

    Working...
    X