Announcement

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

  • asdoc: version update - New features of font, table header formatting, etc. Export results to Word from Stata

    Version 2.3.3.2, dated Feb 23, 2019, is finally here, thanks for Kit Baum for updating it on SSC. This new version brings significant improvements to existing routines and introduces a few new features. Summary of these is given below and details can be found on my webpage here. If you have not used asdoc previously, I would encourage you to read this half page quick start to asdoc.

    To update
    Code:
    ssc install asdoc, replace
    help asdoc
    New Features

    1. Font style

    2. Formatting the header row and header column

    3. Revamped the tabulation commands (really elegant tables now) - Watch YouTube Video

    4. Revamped the table command (really elegant tables now)

    5. Extending the detailed regression tables [ Read further details here]

    5.1 Added confidence intervals to the detailed regression tables
    5.2 Added an option for customizing the significance starts
    5.3 Added an option for suppressing significance stars
    5.4 Added an option for suppressing confidence intervals

    6. Adding support for macOS

    6. Improving the output from proportion command

    7. Support added for the logistic family of regressions

    8. Improving table outputs of non-standard outputs i.e. multilevel models

    9. eform() option added to nested tables




    Future Plans

    It is now almost a year in developing and constantly adding features to asdoc. I think I would stop here and start working on a premium version of asdoc that would be more flexible in making customized tables. It will also be able to export the output tables to Word, Excel, plain text, CSV, and LaTeX formats. I plan to name the premium version as asdocx.
    I would appreciate your suggestions and comments here on this post or sent directly to my email address [email protected]
    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.

  • #2
    Dear Dr Shah

    I am trying to create an output for my regression table using nest command. As my variables are not much, i would like to report t stat next to the coefficients not below them. I am not able to find the way to this. I have seen the wise command but i dont think thats suitable.

    Comment


    • #3
      If you have a single regression, it is better to report the detailed regression table, which is the default in asdoc. To make that table, you do not need to add the wide or the nest option to the regression command. If you need further customization of the detailed regressions table, see this link.

      See the following example:

      Code:
      sysuse auto, clear
      asdoc reg price mpg rep78 headroom trunk weight length turn
      Click image for larger version

Name:	Untitled.png
Views:	1
Size:	64.2 KB
ID:	1487106

      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


      • #4
        Any plans for supporting longitudinal analyses?
        Thank you for your help!

        Stata SE/17.0, Windows 10 Enterprise

        Comment


        • #5
          Pratap Pundir Can you specify which Stata command are referring to?
          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


          • #6
            I mean things such as longitudinal regressions (e.g. fixed effects) with xtreg.

            The output is exported, but not in publication ready format as promised. For one, in fixed effects models, what's the point of putting a constant in the table? Also, the table should indicate which fixed effects (e.g. in case of World Bank data, often countries and years are included). Similarly, for the R^2, a publication-ready table needs to show the isolated impact of the x variable, separate from the fixed effects. This is kind of what I expect to see when sending results of a fixed effects model to nested Word table (not talking about the aesthetics, but the content):
            Click image for larger version

Name:	asdoc.JPG
Views:	1
Size:	118.0 KB
ID:	1488299



            Finally, it would be nice if asdoc could:
            1. Export to docx, instead of doc
            2. Send graphs to the Word document. Internal command putdocx already does this, but if I am using asdoc, I don't expect to create a separate document with putdocx just for the charts...
            3. Support for UTF8. At the moment, any letters with accents get messed up, and text export gets confused by common text symbols such as ' and )
            Last edited by Pratap Pundir; 15 Mar 2019, 08:54.
            Thank you for your help!

            Stata SE/17.0, Windows 10 Enterprise

            Comment


            • #7
              Dear Attaullah Shah

              Thanks for asdoc!. I am working with ANOVA analysis.
              Lamentably when I try to get an anova table with asdoc I just get a regression table with p-value to each level from independient variable and not like stata result.
              I wonder if exist some method to get a similar result to Anova table from stata. Example:

              Code:
              webuse lifeexp.dta, clear
              asdoc anova popgrowth  region
              stata result

              Code:
                                         Number of obs =      68     R-squared     =  0.4345
                                         Root MSE      = .710934     Adj R-squared =  0.4171
              
                                Source |  Partial SS    df       MS           F     Prob > F
                            -----------+----------------------------------------------------
                                 Model |  25.2441263     2  12.6220631      24.97     0.0000
                                       |
                                region |  25.2441263     2  12.6220631      24.97     0.0000
                                       |
                              Residual |  32.8527857    65  .505427472   
                            -----------+----------------------------------------------------
                                 Total |  58.0969119    67  .867118089
              With asdoc:
              Code:
              Regression results   
              popgrowth Coef. St.Err. t-value p-value [95% Conf Interval] Sig
              1b.region 0.000 . . . . .
              2.region 1.168 0.218 5.35 0.000 0.732 1.604 ***
              3.region 1.405 0.249 5.64 0.000 0.908 1.902 ***
              Constant 0.525 0.107 4.90 0.000 0.311 0.739 ***
              Mean dependent var 0.972 SD dependent var 0.931
              R-squared 0.435 Number of obs 68.000
              F-test 24.973 Prob > F 0.000
              Akaike crit. (AIC) 149.508 Bayesian crit. (BIC) 156.166
              Thanks in advance
              Regards
              Rodrigo

              Comment


              • #8
                Greetings Dr Shah, VECM and VAR results cannot be displayed so easily in the current versions. It would be extremly useful to add this feature to asdoc as it could be able to show a decent output from VAR and VECM estimations.

                Comment


                • #9
                  Pratap Pundir These options are available in asdoc, you can read section 4. Regressions
                  Code:
                  help asdoc
                  In the following examples, I am using option add() to add additional text, keep() to keep only relevant variables and cnames() to change the column headers. `Option fe and re are options of xtreg command
                  Code:
                  webuse grunfeld
                  asdoc xtreg invest mvalue kstock , fe add(Year dummies, no) nest replace cnames(FE)
                  asdoc xtreg invest mvalue kstock i.year , re add(Year dummies, Yes) nest cnames(RE) keep(mvalue kstock )
                  Last edited by Attaullah Shah; 16 Mar 2019, 02:30.
                  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


                  • #10
                    Thank you!
                    Are the following also already available?
                    Originally posted by Pratap Pundir View Post
                    it would be nice if asdoc could:
                    1. Export to docx, instead of doc
                    2. Send graphs to the Word document. Internal command putdocx already does this, but if I am using asdoc, I don't expect to create a separate document with putdocx just for the charts...
                    3. Support for UTF8. At the moment, any letters with accents get messed up, and text export gets confused by common text symbols such as ' and )
                    Thank you for your help!

                    Stata SE/17.0, Windows 10 Enterprise

                    Comment


                    • #11
                      Pratap Pundir These options will be included in the premium version, called asdocx. For updates, please visit this page
                      https://fintechprofessor.com/stata-programs/asdocx/
                      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


                      • #12
                        Code:
                        asdoc reg d_ln_co2 l(0/2).d_ln_gdp i.year, vce(cluster country) add(Year FE, Yes) drop(i.year) save($wordfile) nest cnames(FD 2Lag)
                        returns
                        func_nested_reg(): 3301 subscript invalid
                        <istmt>: - function returned error
                        Code:
                        reg d_ln_co2 l(0/2).d_ln_gdp i.year, vce(cluster country)
                        runs fine.
                        Code:
                        asdoc reg d_ln_co2 d_ln_gdp i.year, vce(cluster country) add(Year FE, Yes) drop(i.year) save($wordfile) nest cnames(FD)
                        also runs fine
                        Last edited by Pratap Pundir; 18 Mar 2019, 13:10.
                        Thank you for your help!

                        Stata SE/17.0, Windows 10 Enterprise

                        Comment


                        • #13
                          I suspect this has to do more with the
                          Code:
                          add(Year FE, Yes)
                          in the nesting situation, than with anything else.
                          So, I guess my question should be - if I am adding row info, how do I nest the regression tables?

                          In your example, you have used the exact same options
                          Code:
                          add(Year dummies, no)
                          in consecutive nesting regressions. But it's clearly not working in my case.
                          Thank you for your help!

                          Stata SE/17.0, Windows 10 Enterprise

                          Comment


                          • #14
                            Pratap Pundir Please confirm that you have the latest version. It should be Version 2.3.3.3
                            Code:
                            which asdoc
                            will show the version.
                            If the version is up to date, then please either post a sample data set that produces the error or send it to me at [email protected]
                            I checked your example on the following dataset and it works fine.

                            Code:
                            webuse lutkepohl2
                            tsset
                            global wordfile Regressions
                            asdoc reg dln_inv dln_inc L(0/2).dln_consump i.qtr, add(Year FE, Yes) drop(i.qtr) save($wordfile) nest cnames(CS 2Lag) replace
                            asdoc reg dln_inv dln_inc L(0/2).dln_consump, add(Year FE, No)  save($wordfile) nest cnames(CS 2Lag)
                            Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	38.0 KB
ID:	1488868

                            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


                            • #15
                              Please find attached my code. The data set is from World Bank, being pulled directly.

                              Code:
                              which asdoc
                              returns
                              Code:
                              Version 2.3.3.3: Changes made March 6, 2019
                              Attached Files
                              Thank you for your help!

                              Stata SE/17.0, Windows 10 Enterprise

                              Comment

                              Working...
                              X