Announcement

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

  • asdoc command

    Hello everybody,
    I am using this formula "asdoc estimates table est1 est2 est3 est4 est5 est6 est7, stats(chi2 N) star(.05 .01 .001) b(%9,3g) stfmt(%9.3g)" but to my surprise in the output I cannot see the number of observations N. Does anyone know why is this?
    Thank you,
    Lourdes.

  • #2
    As per the FAQs, you need to tell that asdoc is from SSC.
    For those who are not yet familiar with asdoc, asdoc can be downloaded from SSC and can be used with almost all Stata commands. Here is a short blog post that shows how asdoc can be used with any Stata command. You can also watch several YouTube videos that show the use of asdoc

    Concerning the issue at hand, this is a parsing issue on part of asdoc. Since asdoc has its own option stat(), therefore, it overrides the Stata option stat(). The trick is to change the stat() to statist(), see the following example
    Code:
    asdoc estimates table est1 est2 est3 est4 est5 est6 est7, statist(chi2 N) star(.05 .01 .001) b(%9,3g) stfmt(%9.3g)
    On a side note, it seems you are building a nested regression table using the estimates store command and then use asdoc to export the output to MS Word. You might have your own reasons, however, asdoc offers a better solution for creating nested regression tables. See the following example, which I have copied from the asdoc help file

    *Example 25 : Make a nested table of four regressions
    Code:
       *Load auto data set and estimate the first regression
            sysuse auto, clear
            asdoc reg price mpg rep78, nest replace
    
        *Add variable headroom and then nest with existing table
            
            asdoc reg price mpg rep78 headroom, nest append
    
        *Add variable weight and then nest with existing table
            
            asdoc reg price mpg rep78 headroom weight, nest append
    
        *Adding text legend with option add(Foreign, yes) and drop the coefficient of foreign from table
           
            asdoc reg price mpg rep78 weight foreign, nest append text(Foreign dummy, yes) drop(foreign)
    Click image for larger version

Name:	nested.png
Views:	1
Size:	55.6 KB
ID:	1481652
    Last edited by Attaullah Shah; 01 Feb 2019, 20:59.
    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

    Working...
    X