Announcement

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

  • #16
    Attaullah Shah please find the data here.
    Attached Files

    Comment


    • #17
      Seems to me an installation issue, perhaps your copy of asdoc did not install correctly. So try the following
      Code:
       ssc install asdoc, replace
      If the problem still exists, then please share details about your version of Stata.
      I am using version 2.1 of asdoc and it produced the following output.

      Code:
       use "C:\temp\simdat.dta" 
      asdoc reg energy_kcal_day accesstsjm
      Attached Files
      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


      • #18
        Attaullah Shah I followed your suggestion, and still getting the same error. I am using STATA SE 11.2

        Comment


        • #19
          asdoc requires version 12 or above for reporting regression results. The reason is that Stata does not have the r(table) in versions lower than 12. asdoc can work with other commands of Stata even if you have Stata 11, but not with the regression commands.
          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


          • #20
            Attaullah Shah Thank you so much. This works great on an updated version of stata.

            Comment


            • #21
              Attaullah, I really appreciate your work - it helped me a lot. I spent hours searching a solution to build a table of means by two categorial variables. This was so easy and user-friendly. Great work!

              Yet, I have one question: Is it possible to predetermine the folder the file will be saved in? I found the way to name the file with
              Code:
              save(filename)
              but no option for the folder, i.e. my global path.
              Thank you!

              Comment


              • #22
                Rebecca Water I can propose two ways in which files can be written to folders using asdoc.



                Method 1. Include the folder name on the fly. For example

                Code:
                *Load example dataset
                sysuse auto, clear
                
                * Create a folder in C drive if not already created
                cap mkdir C:/results
                
                * Now write files directly to this folder
                asdoc sum, save(C:/results/filename.doc) replace


                Method 2: Use global
                Code:
                *Save the directory path to a global
                global folder1 C:/results
                
                * Use this global in the save option
                asdoc sum, save($folder1/filename.doc)
                Alternatively, you can write both the filename and directory name to a global.

                Code:
                global folder1 C:/results/filename.doc
                
                asdoc sum, save($folder1)

                Similarly, you can declare many globals for different directories and write files to these directors with asdoc.
                Last edited by Attaullah Shah; 04 Nov 2018, 09:32.
                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


                • #23
                  Just want to say first of all thank you for a very great tool!

                  I do have a question please:

                  I use the following command bys Group: asdoc tabstat var1 var2 var3 var4, replace stat (N mean min max tstat)

                  The command works fine but when it exports to work it only shows the results for one group and not the other group (Note: group is a dummy variable taking on the variable 0 or 1).

                  How do I export results of both groups please?

                  Thanks
                  Sarah

                  Comment


                  • #24
                    I have revised asdoc. The new version of asdoc can be installed from SSC. This specific issue was fixed on June 15, 2019 update.
                    Code:
                    ssc install asdoc, replace
                    After installation of the new version, then restart Stata.

                    Here is one example
                    Code:
                    sysuse auto, clear
                    bys foreign : asdoc tabstat price mpg rep78 headroom trunk , replace stat(N mean min max tstat)
                    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	41.1 KB
ID:	1505058


                    Correction:
                    In your code, there is a space between stat and (N mean min max). This will not work.
                    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.
                    Last edited by Attaullah Shah; 26 Jun 2019, 15:12.
                    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


                    • #25
                      Thank you Mr Shah! That solved the issue.

                      Kind regards
                      Sarah

                      Comment


                      • #26
                        Dear Professor Attaullah

                        I formatting my pc frequently and install your ado continually, I have some old do file with the next command that now I dont have the expected result when I run it:

                        Code:
                        asdoc tabulate rep78 foreign,  cell   replace
                        
                        The result with stata is:
                        
                            Repair |
                            Record |       Car type
                              1978 |  Domestic    Foreign |     Total
                        -----------+----------------------+----------
                                 1 |         2          0 |         2
                                   |      2.90       0.00 |      2.90
                        -----------+----------------------+----------
                                 2 |         8          0 |         8
                                   |     11.59       0.00 |     11.59
                        -----------+----------------------+----------
                                 3 |        27          3 |        30
                                   |     39.13       4.35 |     43.48
                        -----------+----------------------+----------
                                 4 |         9          9 |        18
                                   |     13.04      13.04 |     26.09
                        -----------+----------------------+----------
                                 5 |         2          9 |        11
                                   |      2.90      13.04 |     15.94
                        -----------+----------------------+----------
                             Total |        48         21 |        69
                                   |     69.57      30.43 |    100.00
                        But lamentably my word file results its different, option cell was not recognize:
                        Click image for larger version

Name:	Sin título.png
Views:	1
Size:	8.3 KB
ID:	1508945


                        I now that you make changes and improvements frequently to asdoc, this is one of these?
                        Regards

                        Comment


                        • #27
                          Hello everyone,

                          I have an issue while I am running the asdoc command. Every time I try to summarize a variable that takes values between 0 and 1, the asdoc command rounds up all the stats (like sd, max, and min) to the nearest integer (0 or 1). The code in STATA works fine, the problem occurs when it has to replicate the table in Word.

                          I will provide you with an example:

                          bcuse mathpnl, clear
                          asdoc sum grexpp, save(example) tzok dec(2) stat(N sd mean)

                          Could anyone help me to fix this problem?
                          Thank you so much in advance!

                          Comment


                          • #28
                            Sorry, posted twice.
                            Last edited by Alessandro Di Mattia; 13 May 2021, 02:42.

                            Comment


                            • #29
                              I could not get the bcuse command to work. But using the auto dataset, I can confirm that the values are reported as intended.
                              Code:
                              sysuse auto, clear
                              asdoc sum foreign , save(example) tzok dec(2) stat(N sd mean)
                              Please try the beta version available on my website. If the problem still exists, then please post a data using dataex to reproduce the issue.

                              To install the beta version
                              Code:
                              net install asdoc, from(https://fintechprofessor.com) 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


                              • #30
                                Thank you so much, Professor! After installing the beta version, the issue was solved!

                                Comment

                                Working...
                                X