Announcement

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

  • Currently, asdoc does not support nested tables with margins, but I am working on it, the asdocx version will support it.
    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


    • Kudos to "Capain asdoc" for writing this command! It's been really irritating not being able to have a simple way to output correlation tables until this was written.

      Comment


      • Steve Bradley
        Your words mean a lot. Thanks for your appreciation and for spreading the word about asdoc among your colleagues. If you can find a chance, please cite asdoc in your research.

        In-text citation
        Tables were created using asdoc, a Stata program written by Shah (2018).

        Bibliography
        Shah, A. (2018). ASDOC: Stata module to create high-quality tables in MS Word from Stata output. Statistical Software Components S458466, Boston College Department of Economics.
        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


        • Originally posted by Attaullah Shah View Post
          Let me see the possibility of adding stcox to asdoc
          Attaullah Shah
          Is there a way to use the nest option with asdoc cmd for stcox and stcrreg?

          I get the error:
          depvar may not be a factor variable
          r(198);

          Comment


          • Hi @Attaullah Shah

            Thank you for creating this very useful code.
            I have been using asdoc however in Word document it looks very scattered and messy. I have tried a couple of things, and with every command that I use is the same
            For instance, I used this code:
            asdoc xtsum v2x_polyarchy eu_aid_capita allother_aid_capita

            I have tried options like "auto-fit in the table" but those don't work either.
            Thank you very much in advance
            Attached Files

            Comment


            • Hi,

              Is it possible to arrange how many decimals that we display using asdoc command? Appreciate your help

              Regards, Annur

              Comment


              • You can use the dec() option. For example, for 4 decimal points, use dec(4)
                Code:
                sysuse auto, clear
                asdoc sum, dec(4) replace
                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


                • Dear Prof. Shah, first of all many thanks for your excellent programme!!
                  I have come across with the following errors when I was trying to export out my resutls:
                  Code:
                         func_nested_reg():  3200  conformability error
                                   <istmt>:     -  function returned error
                  Before this code what I'm doing is:
                  Code:
                  asdoc reg self_cit $controls, r cluster(permno_adj) replace ///
                        add(clustering error at firm level, YES) title(Table 3) nest
                  asdoc reg self_cit $controls if industry ==0, r cluster(permno_adj) ///
                       add(clustering error at firm level, YES, CMM industry, YES) nest
                  it seems that the results matrix when industry =1 is incompatitable with the results matrix when industry =0. The whole code I aim to use is as following:
                  Code:
                  asdoc reg self_cit $controls, r cluster(permno_adj) replace ///
                        add(clustering error at firm level, YES) title(Table 3) nest
                  asdoc reg self_cit $controls if industry ==0, r cluster(permno_adj) ///
                       add(clustering error at firm level, YES, CMM industry, YES) nest
                  asdoc reg self_cit c.density##c.kd_cov_5  $controls if industry ==1, r cluster(permno_adj)  ///
                       add(clustering error at firm level, YES, Drug industry, YES) nest

                  Comment


                  • Dear Prof. Shah, You have done a superb job by developing 'asdoc' magical command. It saved me hell of time. I have a small question regarding the nested tables. Is there anyway that we could export more than one nested tables in the same doc file?

                    Comment


                    • Thanks for your appreciation. You can start a new table using the reset option

                      Code:
                      sysuse auto, clear
                      asdoc reg price mpg rep78 headroom, nest replace
                      asdoc reg price mpg rep78 gear_ratio , nest 
                      
                      * Start a new table
                      asdoc reg price mpg rep78 headroom, nest reset
                      asdoc reg price mpg rep78 gear_ratio , nest 
                      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


                      • Thank you Prof. Shah!

                        Comment


                        • Originally posted by Cassidy Perez View Post
                          Hi @Attaullah Shah

                          Thank you for creating this very useful code.
                          I have been using asdoc however in Word document it looks very scattered and messy. I have tried a couple of things, and with every command that I use is the same
                          For instance, I used this code:
                          asdoc xtsum v2x_polyarchy eu_aid_capita allother_aid_capita

                          I have tried options like "auto-fit in the table" but those don't work either.
                          Thank you very much in advance
                          "


                          I still have the same issue. Has anybody been able to solve this issue Attaullah Shah
                          Thank you

                          Comment


                          • You are right, xtsum is not yet added to asdoc.
                            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


                            • Dear Professor Attaullah Shah, I am trying to accomodate the "table" command to asdoc. However, I have some problems I would like to comment just for if you can help me with this.
                              First, the command is similar to the one in the help file:
                              Code:
                              asdoc table x1 x2 year if x3==1 & inlist(year,2008,2011), c(n x4 n x5 m x6) sc col row replace
                              However, I got the following error
                              Code:
                              . asdoc table x1 x2 year if x3==1 & inlist(year,2008,2011), c(n x4 n x5 m x6) sc col row replace
                              
                              ------------------------------------------------------------------------
                                        |                         year and x2                         
                                        | ----------- 2008 -----------    ----------- 2011 -----------
                                     x1 |        1         2     Total           1         2     Total
                              ----------+-------------------------------------------------------------
                                      1 |       25        25        50           7        18        25
                                        |       26        26        52           8        22        30
                                        | .9615384  .9615384  .9615384        .875  .8181818  .8333333
                                        | 
                                      2 |        .         .         .           1         7         8
                                        |        .         .         .           1         8         9
                                        |        .         .         .           1      .875  .8888889
                                        | 
                                      3 |       21        20        41          12        20        32
                                        |       22        21        43          12        23        35
                                        | .9545454   .952381  .9534883           1  .8695652  .9142857
                                        | 
                                  Total |       46        45        91          20        45        65
                                        |       48        47        95          21        53        74
                                        | .9583333  .9574468  .9578947     .952381  .8490566  .8783784
                              ------------------------------------------------------------------------
                                             astable():  3301  subscript invalid
                                               <istmt>:     -  function returned error
                              r(3301);
                              The problem is due to the "row" option in the command (if I only ask for "col" there is not problem). The same happen if you use the dataset and command from the asdoc help file (when asking more than a single variable). The following will work, but the next one will not.
                              Code:
                               webuse byssin1, clear
                                      asdoc table workplace smokes race [fw=pop], by(sex) c(mean prob) format(%9.3f) replace
                              Code:
                               webuse byssin1, clear
                                      asdoc table workplace smokes race, by(sex) c(mean prob n pop) format(%9.3f) replace
                              Is there any solution for this?

                              Another thing is that the output from the command in Stata is different from the one in Word (specifically the Total from the row option), the same will happen with the same row total using the previous dataset and command from the asdoc option:
                              Code:
                              . asdoc table x1 x2 year if x3==1 & inlist(year,2008,2011), c(n x4) sc col row replace
                              
                              ------------------------------------------------------
                                        |                year and x2                
                                        | ------- 2008 ------    ------- 2011 ------
                                     x1 |     1      2  Total        1      2  Total
                              ----------+-------------------------------------------
                                      1 |    25     25     50        7     18     25
                                      2 |     .      .      .        1      7      8
                                      3 |    21     20     41       12     20     32
                                        | 
                                  Total |    46     45     91       20     45     65
                              ------------------------------------------------------
                              Click to Open File:  Myfile.doc
                              In Word:
                              and
                              2008 2011
                              1 2 Total 1 2 Total
                              1 25 25 50 7 18 25
                              2 1 7 8
                              3 21 20 41 12 20 32
                              Total 23 22.5 45.5 6.667 15 21.667

                              One last question is, how to put a zero in front of the decimal numbers? (using 0.95 instead of .95)

                              Can you help me to solve this issues?

                              Thanks in advance.




                              Comment


                              • I think you have a slightly old version. The current version available on my website is
                                Code:
                                *!  Version 2.3.8.9 : Changes made on October 12, 2020
                                And it produces the table from the help file without any issue.
                                The new version of asdoc can be installed from my site. Copy and paste the following line in Stata and press enter.

                                Code:
                                * To check the version of asdoc
                                which asdoc
                                
                                * Install new version from my site
                                net install asdoc, from(http://fintechprofessor.com) replace
                                
                                webuse byssin1, clear
                                asdoc table workplace smokes race, by(sex) c(mean prob n pop) tzok replace
                                Please note that after installation of the new version, you need to restart Stata.
                                Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	38.7 KB
ID:	1577647


                                asdocx is now available
                                A more powerful and flexible version of asdoc is now available. I call it asdocx. You may like to check the details here. For a short period of time, it is available for a huge discount.

                                https://fintechprofessor.com/asdocx


                                Please do remember to cite asdoc. To cite:

                                In-text citation
                                Tables were created using asdoc, a Stata program written by Shah (2018).

                                Bibliography
                                Shah, A. (2018). ASDOC: Stata module to create high-quality tables in MS Word from Stata output. Statistical Software Components S458466, Boston College Department of Economics.

                                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