Announcement

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

  • Export xtsum output (using asdoc)

    Good morning,

    I am trying to export the result of an xtsum command using asdoc but the Word output is not ideal, the columns are shifted and it's almost impossible to read.
    Any recommendations on what to do?
    For the moment, I am simply using asdoc xtsum var1

    Thank you very much in advance!
    Best,

    Jeanne
    Last edited by Jeanne Roche; 27 Jul 2021, 05:34.

  • #2
    I had a similar issue with the formatting and I encountered an error using asdocx as well. Perhaps it's something Attaullah Shah could add to his list. It looks like there's a community-contributed command called xtsum2docx, available from SSC. You might give that a shot.

    Comment


    • #3
      Justin Niakamal
      I have now added xtsum to asdocx. An example is presented below.
      Code:
      webuse abdata.dta, clear
      asdocx xtsum emp k wage cap , replace
      And appreciate the output table
      Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	79.7 KB
ID:	1620868


      or send the output to Excel

      Code:
      asdocx xtsum emp k wage cap , replace save(Myfile.xlsx)
      Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	133.4 KB
ID:	1620869

      Last edited by Attaullah Shah; 27 Jul 2021, 09:43.
      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
        Thanks, Attaullah. It's working on my end.

        Comment


        • #5
          Dear Justin and Attaullah,

          Thank you for your prompt responses, and forgive the delay on my side!
          The output is indeed very neat on adocx. I don't have adocx but I will consider it.

          Thank you for your help!
          Jeanne

          Comment


          • #6
            Dear Attaullah Shah ,

            I acquired asdocx and it works very well, however, I was under the impression that other xt- commands would be available on asdocx, which is why I acquired it. More specifically, I thought that the xttab command would be available – is there any way to make that possible?

            Thank you in advance!

            Code:
            asdocx xttab NoofCEOs, replace
            (File /Users/jeanneroche/Documents/PhD IE/MyFile.docx already exists, option append was assumed)
            Unknown sub-command xttab
            If xttab is a community contributed program
            You can post a request on the asdocx forum for addition of this program to asdocx
            Forum link:  https://fintechprofessor.com/asdocx/forums/forum/asdocx-forum/
            r(199);
            Last edited by Jeanne Roche; 30 Sep 2021, 02:39.

            Comment


            • #7
              Jeanne Roche On your request, I have added the xttab command to asdocx. To get the latest version of asdocx, type:
              Code:
              asdocx_update
              Here is a working example:

              Code:
              webuse nlswork
              xtset id year
              asdocx xttab race, replace
              Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	57.9 KB
ID:	1629707
              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
                Dear Attaullah,

                Thank you so much, this is working perfectly!

                Best regards,
                Jeanne

                Comment


                • #9
                  Dear all,

                  I am using the asdocx command to export my panel data output and I'm very happy about it.
                  I just encounter one issue. asdocx doesn't recognise certain continuous variables as continuous and mistake them for categorical variables.

                  For example, I am trying to export the summary table of SCI, a continuous variable that is a ratio between 0 and 1.
                  Stata stores this variable as "float" - but I encounter the same problem with continuous variables store as "int".

                  Here you can see that the asdocx command doesn't work for xtsum
                  Code:
                   asdocx xtsum SCI
                  (Route to MyFile/MyFile.docx already exists, option append was assumed)
                  factor-variable and time-series operators not allowed
                  r(101);
                  Although the xtsum command works on this variable
                  Code:
                   xtsum SCI
                  
                  Variable         |      Mean   Std. Dev.       Min        Max |    Observations
                  -----------------+--------------------------------------------+----------------
                  SCI      overall |  .6168472    .301839         .2          1 |     N =    2679
                           between |             .3052474         .2          1 |     n =     716
                           within  |                    0   .6168472   .6168472 | T-bar = 3.74162
                  What can I do to export the xtsum output using asdocx?

                  Thank you so much in advance!
                  Best regards,
                  Jeanne

                  [Using Stata 16 for Mac]
                  Last edited by Jeanne Roche; 25 Oct 2021, 07:57.

                  Comment


                  • #10
                    Thanks for reporting this. The issue would appear only when you would append to an existing file. This has been fixed. You can update asdocx by
                    Code:
                     
                     asdocx_update
                    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


                    • #11
                      Dear Attaullah,

                      It is working perfectly, thank you so much!
                      Best regards,

                      Jeanne

                      Comment

                      Working...
                      X