Announcement

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

  • Good work! Can an option to generate tables in TeX be added?

    Comment


    • danishussalam
      asdocx can export tables in tex (LaTeX), Excel, Word (docx) formats. Good news is that, there is a huge discount on it for a short period of time. https://fintechprofessor.com/asdocx/order-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


      • Dear professor Attaullah Shah, thanks for you answer, but still the problem is present. I have downloaded the new version (as you advice in #165) and restart the computer, but the command gives error if I ask for the row total. Just try to do the next command:
        Code:
        asdoc table workplace smokes race, by(sex) c(mean prob n pop) tzok row replace
        sex
        (32 observations deleted)
        
        ----------------------------------------------------
        Dustiness |             Race and Smokes             
        of        | ------ other -----    ------ white -----
        workplace |       no       yes          no       yes
        ----------+-----------------------------------------
            least | .0020325  .0030612    .0077802  .0194138
                  |        4         4           5         4
                  | 
             less | .0069444  .0045351     .018559  .0141844
                  |        3         4           5         3
                  | 
             most |      .07  .1115747           .         .
                  |        3         4           .         1
                  | 
            Total | .0187737  .0429226    .0131696  .0171726
                  |       10        12          10         8
        ----------------------------------------------------
                       astable():  3301  subscript invalid
                         <istmt>:     -  function returned error
        r(3301);
        As you see, it gives error. This does not happen when only asking for the "col" option. However, I need both, col and row total. What I am doing wrong? Also, is there any way to put (in the Word) 0.95 instead of .95?

        Thanks a lot in advance for your help.

        Comment


        • Doris Rivera

          I have fixed the issue. The new version of asdoc can be installed from my site. Copy and paste the following line in Stata and press enter.
          net install asdoc, from(http://fintechprofessor.com) replace

          Please note that the above line has to be copied in full. After installation of the new version, then restart Stata.
          Here is an example.

          Code:
          sysuse nlsw88
          asdoc table industry south married , c(n wage mean wage sd wage) row col replace
          Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	69.4 KB
ID:	1578188



          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. It is currently available at a significant 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


          • Dear Professor Attaullah Shah, you are very kind for your patience and help. I am so sorry for continiuing bothering you with this (maybe) small problem, but, even though now including the row total does not gives error, it seems that it is changing columns. Seing from your table in #169 for the "single" category, I see that the number of cases (n wage) in total is smaller than for the subsamples single-south==0 or single-south==1 which should not be. Also, in the category married, the row total (n wage, but the same happen for the rest of variables) as far as the command appear in Stata (not in Word) should be married-south(0)==835 and married-south(1)==599 which should sum up to 1434. So, it seem that only for the row total option, columns are changed between the output in Stata and Word. Finally, you can see that even though the sort of categories in my Word table follows the same as in your table (first column is single-south==0 second column is single-south==1 and third column is single-south==total) the row total for these categories in my Word (see at the end) are not the same as in your Word.
            I apologize again for bothering you with this issue, just hope it is helpul for you.

            Thanks again.
            Code:
            . asdoc table industry south married , c(n wage mean wage sd wage) row col replace
            
            --------------------------------------------------------------------------------------
                                    |                  married and lives in south                 
                                    | ---------- single ----------    ---------- married ---------
                           industry |        0         1     Total           0         1     Total
            ------------------------+-------------------------------------------------------------
              Ag/Forestry/Fisheries |        .         3         3           9         5        14
                                    |        .  2.339072  2.339072    6.132845  6.669248  6.324417
                                    |        .  .4664714  .4664714    3.315386  3.084026  3.124395
                                    | 
                             Mining |        3         .         3           .         1         1
                                    | 17.24014         .  17.24014           .  9.677936  9.677936
                                    | 19.89609         .  19.89609           .         .         .
                                    | 
                       Construction |        4         8        12           7        10        17
                                    |  7.94864   8.14834  8.081773    5.285298  8.540472  7.200106
                                    | 3.413319  2.402194  2.619027    1.900588  8.032533  6.354126
                                    | 
                      Manufacturing |       89        73       162         112        93       205
                                    | 8.833642  6.345379  7.712388    8.565445  5.853144  7.334987
                                    |  5.80576  3.866272  5.162436    6.032962  4.460701  5.532619
                                    | 
             Transport/Comm/Utility |       31        12        43          34        13        47
                                    | 12.04227  11.90651  12.00438    11.37165  9.775175  10.93007
                                    | 7.115003  9.340002  7.681842    4.291639  4.140745  4.266955
                                    | 
             Wholesale/Retail Trade |       70        56       126         122        85       207
                                    |  7.03069   5.77359  6.471979    6.385848  5.239774  5.915238
                                    | 6.719845  6.845956  6.777989    4.594006  4.494423  4.577424
                                    | 
            Finance/Ins/Real Estate |       48        10        58          77        57       134
                                    | 10.27306  14.80551  11.05452    9.641628  8.882838  9.318859
                                    | 8.238971  11.91625   9.02081    8.706106  6.980108  7.998027
                                    | 
                Business/Repair Svc |       18        10        28          39        19        58
                                    | 6.528289  3.828125  5.563944    9.253201  6.825929  8.458061
                                    | 4.179373  1.106867  3.625211    8.452779  3.579834   7.28014
                                    | 
                  Personal Services |       26        23        49          22        26        48
                                    |  5.21605  3.444807   4.38465    4.599596  4.264118  4.417879
                                    | 4.086683  1.299436  3.204685     1.93248  1.790133  1.844368
                                    | 
              Entertainment/Rec Svc |        3         6         9           4         4         8
                                    | 9.681746  6.949812  7.860456    5.978025  4.914684  5.446355
                                    | 5.969273  4.032128  4.575501     3.10937  3.736009  3.232408
                                    | 
              Professional Services |      134       100       234         352       238       590
                                    | 9.447906  7.176556  8.477243    7.991952  7.096702  7.630817
                                    | 6.620956  4.943632  6.055987    4.613311  4.717637   4.67241
                                    | 
              Public Administration |       37        34        71          57        48       105
                                    | 9.059635  9.889779  9.457169    9.510747  8.261418  8.939625
                                    | 2.387472  6.563184  4.838682     5.91685  4.066081  5.168537
                                    | 
                              Total |      463       335       798         835       599     1,434
                                    | 8.880502  7.053103   8.11336    8.144785  6.840288   7.59988
                                    | 6.544851   5.91092  6.347179    5.668725  4.920767   5.40564
            --------------------------------------------------------------------------------------
            Click to Open File:  Myfile.doc
            In Word:

            Click image for larger version

Name:	Captura.PNG
Views:	1
Size:	41.1 KB
ID:	1578274



            Comment


            • Thanks for reporting it. It was just a sorting issue, which I have fixed now. The new version of asdoc can be installed from my site. Copy and paste the following line in Stata and press enter.
              Code:
              net install asdoc, from(http://fintechprofessor.com) replace
              Please note that the above line has to be copied in full. After installation of the new version, then restart Stata.

              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, now is perfect. Thanks for your help.

                Comment


                • Hi. Its a great programme.. But I am facing an issue.
                  I am using a dataset that has 3 years. I am using the command tabulate to do analysis. So I am writing, say, tabulate work_availability education_category if year==2004. I do it for other two years as well.
                  I want to export the results in table format in word file for all three years in one table. How can I get using asdoc? I tried, but I am not able to put it all in one table..
                  Please help. Thanks

                  Comment


                  • kashif mansoor asdocx has a new sub-command, tabmany, that can tabulate many variables in one table.
                    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


                    • Hello, I was trying to use asdoc in this example: (correlation by groups)

                      by Groupingvariable, sort: asdoc pwcorr var1 var2 , star(all) replace nonum

                      but i just get the table for the whole sample, do you know it this can be done?

                      Thanks

                      Comment


                      • Dear Professor Shah,

                        I have a problem when trying to use asdoc in combination with "svy: tabulate variable1 variable2, percent column" (svyset defining pweights). I get different results when I use the command with and without asdoc.
                        First of all, "asdoc svy: tabulate variable1 variable2, percent column" produces counts (in addition to percents) even though I did not ask for it and they do not match the weighted counts I get by using "svy: tabulate variable1 variable2, percent column count".
                        Second of all, the percentages differ.
                        The results (counts and percentages) of "asdoc svy: tabulate variable1 variable2, percent column" instead match "tabulate variable1 variable2, column", so it seems I get the unweighted results.
                        This problem also occurs when I just use one variable. However, when using proportion instead of tabulate, there are no discrepancies between the command with and without asdoc.

                        I did not find a solution (nor a similar problem) through google, so I'm hoping you are able to help.

                        Background information:
                        Just reinstalling asdoc is not a possibility as my computer does not allow Stata access to the internet. I would have to manually download and replace all the relevant files where the problem might be located. My asdoc-version is Version 2.3.9.5. I am using Stata 16, in case that is relevant.

                        Kind regards,
                        Judith Hauber

                        Comment


                        • Hello Judith
                          As you have noted, asdoc has a limited (and in some cases no) support for svy commands. I am working on asdocx, it will have all these missing features. More on asdocx can be found here https://fintechprofessor.com/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


                          • Hello there,

                            Could you please help me how I can have frequencies and percentages in separate columns while I am conducting cross tabulation. Eg:
                            sysuse auto
                            asdoc tab rep78 foreign, row

                            so that to find results like
                            Domestic Foreign Total
                            N % ​​​​​​​N % ​​​​​​​N %
                            Last edited by Anagaw Derseh; 19 Oct 2021, 08:43.

                            Comment


                            • #178 is a duplicate of https://www.statalist.org/forums/for...parate-columns

                              Please don't post the same question twice.

                              Comment


                              • Help with word output formatting - usable column width --

                                I love asdoc

                                making work easier

                                And

                                I have code that outputs to word but the column width is so narrow in the word doc that it is unusable.


                                here is usable output:

                                Click image for larger version

Name:	Screen Shot 2021-10-21 at 7.47.56 AM.png
Views:	1
Size:	90.9 KB
ID:	1632747


                                absolutely lovely thank you!

                                However when I run this code - with more vars- uh oh --

                                asdoc correlate prepsum whywithd12 whywithd7 whywithd8 prep1 prep2 prep3 prep4 prep5 prep6 prep7 prep8 prep9 prep10 prep11 prep12 prep13 prep14 prep15 prep16 prep17 prep18 prep19 prep20 prep21 prep22 prep23 prep24 prep25 prep26 prep27 prep28 prep29 prep30 prep31 prep32 prep33 prep34 prep35 prep36 prep37 prep38 prep39 prep40 prep41

                                I get this. yikes:

                                Click image for larger version

Name:	Screen Shot 2021-10-21 at 7.47.50 AM.png
Views:	1
Size:	99.9 KB
ID:	1632748


                                no no no this will not work!

                                please help me - and - I am total stata newbie so can you tell me the exact code to use for my do file (something about appending autofit maybe?)

                                THANKS SO MUCH!!

                                Comment

                                Working...
                                X