Announcement

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

  • Esttab Output File not generated properly

    I am writing the following code:

    local variables= "taxratesales taxrateVAT"
    estpost tabstat `variables', statistics(mean p50 sd min max count) columns(statistics)
    esttab using temp.csv, replace cells("mean p50 sd min max count") nomtitle nonumber

    The output file gives me an additional row at the end of the total no of observations 'N'

    How can I delete that?
    mean p50 sd min max count
    taxratesales 8.288876 8 4.568087 0 115 88935
    taxrateVAT 7.30818 5 4.8678 0 65 93709
    N 96652

    Thanks

    Dhruv
    Last edited by Dhruv Jain DSE; 30 Apr 2019, 22:58.

  • #2
    The output of help esttab suggests that adding the noobs option to your esttab command will eliminate additional row with the observations, as indeed it does.
    Code:
    . sysuse auto, clear
    (1978 Automobile Data)
    
    . local variables weight length
    
    . estpost tabstat `variables', statistics(mean p50 sd min max count) columns(statistics) 
    
    Summary statistics: mean p50 sd min max count
         for variables: weight length
    
                 |   e(mean)     e(p50)      e(sd)     e(min)     e(max)   e(count) 
    -------------+------------------------------------------------------------------
          weight |  3019.459       3190   777.1936       1760       4840         74 
          length |  187.9324      192.5   22.26634        142        233         74 
    
    . esttab using temp.csv, replace cells("mean p50 sd min max count") nomtitle nonumber noobs
    (output written to temp.csv)
    
    . type temp.csv
    ="",="mean",="p50",="sd",="min",="max",="count"
    ="weight",="3019.459",="3190",="777.1936",="1760",="4840",="74"
    ="length",="187.9324",="192.5",="22.26634",="142",="233",="74"
    
    .

    Comment

    Working...
    X