Announcement

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

  • Asdoc gives me "messed up" tables

    Hi,

    I'm using asdoc to export a correlation table to word.

    Here's what I get:
    Screenshot 2021-05-13 at 18.04.32.png


    The issue? It's all "messed up". Not even with word skills is it fixable.


    My question: Is there a way to properly export tables from STATA or do I need to be a word wizard?


    Thank you. Any help is gratefully appreciated.
    Manel

  • #2
    Please post the code that you are using with 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


    • #3
      asdoc spearman var1 var2 var3 ...

      Comment


      • #4
        asdoc supports the cor and pwcorr commands to export their correlation matrices. However, there is no dedicated routine for the spearman command. The workaround is to write the matrices left behind by the spearman command with asdoc using the asdoc's sub-command wmat. Here is an example:

        Code:
        sysuse auto, clear
        
        spearman price trunk mpg rep78
        
                     |    price    trunk      mpg    rep78
        -------------+------------------------------------
               price |   1.0000
               trunk |   0.4240   1.0000
                 mpg |  -0.5555  -0.6456   1.0000
               rep78 |   0.1028  -0.2235   0.3098   1.0000
        
        . ret li
        
        matrices:
                       r(Nobs) :  4 x 4
                        r(Rho) :  4 x 4
                          r(P) :  4 x 4
        
        * Write the r(Rho) matrix to matrix A
        matrix A = r(Rho)
        
        * Now export matrix A to Word with asdoc
        asdoc wmat, mat(A)


        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

        https://fintechprofessor.com/asdocx



        Last edited by Attaullah Shah; 16 May 2021, 03:29.
        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


        • #5
          Another work-around is to push the variables through egen, rank() and then apply Pearson correlation to the ranks.

          Comment


          • #6
            Thank you for the input Nick Cox and Attaullah Shah

            Comment

            Working...
            X