Announcement

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

  • asdocx : Stata – Export Codebook to Word, Excel or LaTeX

    Here is an update for asdocx users. With the recent update of asdocx, its users can now easily export a compact codebook to Word, Excel, and LaTeX. Examples and details of the syntax are given here.

    Please note that asdocx is a premium version of asdoc. It is currently available at 80% discount.
    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
    Is there a way to tell asdocx not to send SE rows to a regression nested table output? Somewhat like this:

    Further, while this can be done easily manually, it would be nice to also be able to tell asdoc not to send the _cons row to the output.
    Thank you for your help!

    Stata SE/17.0, Windows 10 Enterprise

    Comment


    • #3
      Consider this example. I am using the notse option to suppress the standard errors. If the empty lines bother you, then you may drop them as well with flexmat, which is a great tool to further modify asdocx tables.

      Code:
        asdocx reg price trunk length weight rep78 turn , replace nest notse
      asdocx reg price trunk length weight rep78 , nest notse
      asdocx reg price trunk weight rep78 , nest  notse
      
                                Table: Regression results
        0 |1                                2             3             4
      ----+---------------------------------------------------------------
        1 |                               (1)           (2)           (3)
        2 |                             price         price         price
      ----+---------------------------------------------------------------
        3 |trunk                        5.282         6.652       -91.215
        4 |                                                              
        5 |length                    -86.016*    -104.805**              
        6 |                                                              
        7 |weight                    5.591***      5.259***      2.769***
        8 |                                                              
        9 |rep78                    678.549**    841.723***     844.113**
       10 |                                                              
       11 |turn                      -190.673                            
       12 |                                                              
       13 |_cons                   10593.805*      6975.441   -3853.203**
       14 |                                                              
       15 |Observations                    69            69            69
       16 |R2                           0.445         0.427         0.371
      ---------------------------------------------------------------------
      Click to Open File:  C:\ado\plus\l\a.docx
      If you need to drop rows or the empty lines, just pass the row number to flexmat.

      Code:
      flexmat droprow, row(4)
      flexmat droprow, row(5)
      flexmat droprow, row(6)
      flexmat droprow, row(7)
      flexmat droprow, row(8)
      asdocx export
      
       0 |1                                                      2
      ----+-----------------------------------------------------------------------------
        1 |                                                     (1)
      ----+-----------------------------------------------------------------------------
        2 |                                                   price
        3 |trunk                                              5.282
        4 |length                                          -86.016*
        5 |weight                                          5.591***
        6 |rep78                                          678.549**
        7 |turn                                            -190.673
        8 |_cons                                         10593.805*
        9 |                                                        
       10 |Observations                                          69
       11 |R\super2                                           0.445
      ----------------------------------------------------------------------------------
      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
        How can I export to Word, the output of -median- command?
        asdocx median age, by(grp) exact
        returns
        Unknown sub-command median

        Thanks for the help.
        Thank you for your help!

        Stata SE/17.0, Windows 10 Enterprise

        Comment


        • #5
          Same question/issue for -kwallis-
          Thank you for your help!

          Stata SE/17.0, Windows 10 Enterprise

          Comment


          • #6
            Can asdocx show the statistics values when building the baseline table?

            Comment


            • #7
              Pratap Pundir I am working on it to add these two.
              Ya Chen Yes, you can see the details here :

              Baseline table with asdocx : https://fintechprofessor.com/asdocx/...tients-asdocx/

              Regression template for epidemiology : https://fintechprofessor.com/asdocx/...-epidemiology/
              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


              • #8
                Originally posted by Attaullah Shah View Post
                Pratap Pundir I am working on it to add these two.
                Ya Chen Yes, you can see the details here :

                Baseline table with asdocx : https://fintechprofessor.com/asdocx/...tients-asdocx/

                Regression template for epidemiology : https://fintechprofessor.com/asdocx/...-epidemiology/
                Sorry. I did not find the option than can output the statistics-value (Chi-square, t-value, et al)

                Comment


                • #9
                  I have added both the median and kwallis commands to asdocx. First update asdocx by
                  Code:
                  asdodcx_update
                  For the median command, see this post https://fintechprofessor.com/asdocx/...-asdocx-stata/
                  For the kwallis command, see this post https://fintechprofessor.com/asdocx/...d-with-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


                  • #10
                    Thank you!

                    I was also wondering whether there's a way to use asdocx to receive nicely formatted compact/nested tables in Word for commands like:
                    Code:
                    bysort region: tabstat age, stat(count mean min max p25 median p75)
                    bysort region: tab race
                    In the above example, region is a categorical variable with regions, age is a continuous variable with age in years, and race is a categorical variable with ethnicity.

                    Stata's default response to bysort x: tabstat/tab y is to create n tables, one for each value of x (where x has n values).

                    Ideal asdocx output to Word would be a single table which merges all the aforementioned tables, with a single row of column headers,
                    and an additional column added to the beginning of the table, which contains the value of x relevant for the respective row.
                    Thank you for your help!

                    Stata SE/17.0, Windows 10 Enterprise

                    Comment


                    • #11
                      There is a typo in #9 above. The correct code to update asdocx
                      Code:
                      asdocx_update
                      Why do you consider bysort for this. You can use the two-way table here.
                      Code:
                      sysuse nlsw88
                      
                      asdocx tab industry race, replace
                      
                                                Tabulation of industry race
                        0 |1                                2             3             4             5
                      ----+-----------------------------------------------------------------------------
                        1 | industry                     race                                          
                        2 |                             white         black         other         Total
                      ----+-----------------------------------------------------------------------------
                        3 |Ag/Forestry/Fisher~s            13             4             0            17
                        4 |Mining                           4             0             0             4
                        5 |Construction                    24             4             1            29
                        6 |Manufacturing                  229           134             4           367
                        7 |Transport/Comm/Uti~y            62            27             1            90
                        8 |Wholesale/Retail T~e           267            66             0           333
                        9 |Finance/Ins/Real E~e           165            25             2           192
                       10 |Business/Repair Svc             64            20             2            86
                       11 |Personal Services               51            45             1            97
                       12 |Entertainment/Rec ~c            14             3             0            17
                       13 |Professional Servi~s           616           197            11           824
                       14 |Public Administrat~n           118            54             4           176
                       15 |Total                         1627           579            26          2232
                      ----------------------------------------------------------------------------------
                      Notes:
                      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:
                        bysort region: tab race
                        gives me percents, which is what I need when I care about the distribution.
                        Code:
                        bysort region: tabstat age, stat(count mean min max p25 median p75)
                        For continuous variables, multiway sort is not a feasible option.
                        Thank you for your help!

                        Stata SE/17.0, Windows 10 Enterprise

                        Comment


                        • #13
                          Perhaps, you can post an example table/output for some dummy data.
                          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


                          • #14
                            I think you are interested in something like this https://fintechprofessor.com/asdocx/...t-tab-example/
                            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