Announcement

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

  • Ritika Khurana
    started a topic Exporting descriptive statistics table

    Exporting descriptive statistics table

    Hi all,

    I have a question related to exporting summary statistics table. I have been outreg2 to export summary statistics table until now. But my problem is I want only selected variables to be exported in the table. However, outreg2 exports all the variables on the list.

    Commands that I use are:
    Code:
    summ lpcincome dukeenergy gulfpower municipal solarresource pyamd4 lpopden age ///
    p2000_later p55orabove larea lnsales lpcper ofdemocracts ofrepublicans sjobs ///
    areainsqmiles morethan1unit pcadval unitdetached estab coast umploymentrate ///
    Code:
    outreg2 using Summ.doc, sideway sum(log) eqkeep(N mean sd min max) replace dec(2)
    Here in
    Code:
    outreg2
    even if I mention list of variables that I want it still exports all the variables.

    I tried other commands like esttab and estpost but it doesn't export variables.

    Is there a way to export only selected variables?

    Looking forward to hearing from one of the members.

    Thanks,

    Ritika

  • Attaullah Shah
    replied
    Use factor notation of i.
    See this example
    Code:
    sysuse auto
    asdoc sum i.foreign, replace
    
        Variable |        Obs        Mean    Std. Dev.       Min        Max
    -------------+---------------------------------------------------------
         foreign |
       Domestic  |         74    .7027027    .4601885          0          1
        Foreign  |         74    .2972973    .4601885          0          1

    Leave a comment:


  • Trust Gangaidzo
    replied
    Originally posted by Attaullah Shah View Post
    You can use asdoc (from SSC) for exporting :
    1. Default descriptive statistics
    2. Detailed descriptive Statistics
    3. Customized descriptive statistics
    4. Descriptive statistics for all variables
    5. Descriptive statistics for only selected variables

    This YouTube video explains these in detail. Following are some additional examples.


    See the following examples:
    Code:
    * install asdoc
    ssc install asdoc
    
    * use auto data 
    sysuse auto, clear
    
    * Default statistics for all variables
    asdoc sum, replace
    
    * Default statistics for selected variables
    asdoc sum price mpg trunk, replace
    
    * Detailed statistics for all variables
    asdoc sum, detail replace
    
    * Detailed statistics for selected variables
    asdoc sum price mpg trunk, detail replace
    
    * Customized statistics
    asdoc sum price mpg trunk, stat(N mean sd min max skewness ) replace

    Hi Dr Shah,

    How can one use the "asdoc sum" command with categorical variables.

    Thank you,

    Trust

    Leave a comment:


  • Attaullah Shah
    replied
    Please do not forget to cite asdoc.
    You may also like asdocx, that is a more advanced version of asdoc.

    Leave a comment:


  • Ritika Khurana
    replied
    Thank you Dr. Shah that was helpful.

    Leave a comment:


  • Attaullah Shah
    replied
    You can use asdoc (from SSC) for exporting :
    1. Default descriptive statistics
    2. Detailed descriptive Statistics
    3. Customized descriptive statistics
    4. Descriptive statistics for all variables
    5. Descriptive statistics for only selected variables

    This YouTube video explains these in detail. Following are some additional examples.


    See the following examples:
    Code:
    * install asdoc
    ssc install asdoc
    
    * use auto data 
    sysuse auto, clear
    
    * Default statistics for all variables
    asdoc sum, replace
    
    * Default statistics for selected variables
    asdoc sum price mpg trunk, replace
    
    * Detailed statistics for all variables
    asdoc sum, detail replace
    
    * Detailed statistics for selected variables
    asdoc sum price mpg trunk, detail replace
    
    * Customized statistics
    asdoc sum price mpg trunk, stat(N mean sd min max skewness ) replace


    Leave a comment:

Working...
X