Announcement

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

  • how can write to code for decimal part with 5 digits? (0.00001)

    Is it possible to delete just 95%conf and interval from table?

    Can we drop dummies with this kind of reporting?

    # 95
    Code:
     asdoc reg price mpg rep78 headroom trunk weight
    Note: I dont want to use nest type of table.


    Thank u

    Comment


    • Confidence intervals can be suppressed using the noci option
      For reporting 5 decimal points, you dec(5)
      See examples and more options to control the output of detailed regression here
      https://fintechprofessor.com/2018/12...ing-stars-etc/
      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


      • Thank you so much Professor. You did really great job.
        but drop(varlist) doesnt work for dummies in this option.

        Comment


        • Thanks for making the tool available, Attaullah! Unfortunately, my results look like below. I have also attached the code I used. Could you check? Thanks!
          Also, sometimes it seems the regression results already exported to an earlier word document are being exported again. How shall I avoid this?

          Code:
          local common "save(Results3_2.doc) fs(12) font(Times New Roman) dec(4)"
          asdoc reg y c.x1##c.x2, `common' title(Table4 Panel B) nest label reset
          asdoc reg y c.x1##c.x2male ln_exp series_63 series_65, `common' nest label 
          asdoc reghdfe y c.x1##c.x2, absorb(year id), `common' nest label add(Year FE, YES, Firm FE, YES)
          asdoc reghdfe y c.x1##c.x2male ln_exp series_63 series_65 series_66, absorb(year id), `common' nest label add(Year FE, YES, Firm FE, YES)
          Click image for larger version

Name:	Results.PNG
Views:	1
Size:	49.3 KB
ID:	1524732

          Comment


          • To produce the said error, please post example data and full code. You are using the reset option in the very first line of code, usually, this option is used when we want to start a new table in the same document, ie once we have already made at least one nested 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


            • Dear Attaullah Shah,

              I want to add new table in exsiting doc, and I used the following code:

              asdoc reghdfe a b c d e, absorb (year) keepsing cluster(dscode) ////
              replace nest save(Doc) dec(3) add(Industry by Year FE, Yes, Control Variables, Yes)

              This code works fine. But when I run the following code:

              asdoc reghdfe a b c d e, absorb (year) keepsing cluster(dscode) ////
              nest save(Doc) dec(3) add(Industry by Year FE, Yes, Control Variables, Yes) reset

              I got the following error code in the word doc:

              {\b\qc\line Table : Regression results }{\par}
              {\trowd\trgaph108\trleft-108
              \clbrdrt\brdrw10\brdrs \cellx2000
              \fs21\pard\intbl\qc { }\cell
              \clbrdrt\brdrw10\brdrs \cellx3250
              \fs21\pard\intbl\qc {(1)}\cell
              \clbrdrt\brdrw10\brdrs \cellx4450
              \fs21\pard\intbl\qc {(2)}\cell
              \row}
              {\trowd\trgaph108\trleft-108
              \clbrdrb\brdrw25\brdrs \cellx2000
              \fs21\pard\intbl\qc { }\cell
              \clbrdrb\brdrw25\brdrs \cellx3250
              \fs21\pard\intbl\qc { NCSKEW}\cell
              \clbrdrb\brdrw25\brdrs \cellx4450
              \fs21\pard\intbl\qc { NCSKEW}\cell
              \row}
              {\trowd\trgaph108\trleft-108
              \cellx2000
              \fs21\pard\intbl\ql { IDV


              Can you please advice what is the problem and how to fix it? Thanks heaps!


              Comment


              • @Taro Tao
                Please install the latest version 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.

                I have tried the following code and it works for me. If the problem exists, please post a sample dataset to reproduce the error. Please also mention your version of Stata and operating system.
                Please do remember to cite asdoc. To cite:

                Code:
                sysuse auto
                asdoc reghdfe price weight length, absorb(rep78) nest add(Firm FE, Y, Industry X Year FE, Y, Controls, Y) stat(r2_a) reset save(myfile.doc)
                asdoc reghdfe price weight length, absorb(rep78) nest add(Firm FE, Y, Industry X Year FE, Y, Controls, Y) stat(r2_a) reset
                Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	20.9 KB
ID:	1526196


                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


                • Originally posted by Attaullah Shah View Post
                  The problem is that I forgot to add aseploc program in the asdoc files. In the next update, I shall add it. For time being, you can install the program from my website, type the following in Stata command window.

                  Code:
                  net install aseploc, from(http://FinTechProfessor.com)
                  Good morning & happy new year Professor.

                  I am attempting to run a series of t-tests using asdoc and I am receiving the "matrix accum not found" error. I attempted to install the aseploc package as you suggested, however Stata is unable to locate the package at the website. Additionally, I did not see the aseploc package on the website and I have updated my version of asdoc as of this morning in case you were able to add the aseploc code into the asdoc package.

                  Do you have any suggestions on how to correct this error?

                  Thanks in advance and more so for all of the work you do.

                  Comment


                  • Thomas Covington Can you please do the following

                    1. 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.

                    2. If the installation of the new version does not solve the problem, then post a sample of your dataset using dataex program (available on SSC), and the asdoc command that you are using.



                    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


                    • Thank you this is really helpful.
                      Last edited by Muserref Er; 24 Jan 2020, 04:16.

                      Comment


                      • Hi Professor Ataullah Shah,
                        I am using Stata 14,1 and using the Cox model for my analysis. I try to create a table with nest option but it gives me an error, look like below. I am quite new in Stata, what do you recommend to this?

                        . asdoc stcox i.migstatus,replace nest
                        depvar may not be a factor variable
                        r(198);

                        Comment


                        • Let me see the possibility of adding stcox to 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


                          • Hello Attaullah Shah ,
                            I have been unable to reduce the decimal points even after using the dec option.
                            The syntax is
                            asdoc ta sdistri age_at_marriage[aw=wt], nokey row replace dec(2)

                            for which I am getting the error:
                            (note: file Myfile.doc not found)
                            invalid 'dec'
                            stata(): 3598 Stata returned error
                            asdocrest(): - function returned error
                            <istmt>: - function returned error
                            r(3598);

                            Please advise what should be remedied here.

                            Thank you!

                            Comment


                            • ritam dubey

                              Please try tab instead of ta.

                              Code:
                              asdoc tab sdistri age_at_marriage[aw=wt], nokey row replace dec(2)
                              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 Attaullah Shah

                                I could not find an answer for my question, so I apologize if I missed it.

                                I am using NHAMCS emergency department survey data to analyze determinants of doctors prescribing a drug (outcome variable = med). I have put patient wait time into quantiles (4 categories: xtile waittime_4cat=waittime, nq(4)) so when I run my logit regressions I use i.waittime_4cat and it shows me results in 4 wait time categories. But, I am unable to get asdoc to create a table. Below is the code and the error:

                                asdoc logistic med i.waittime_4cat, replace or

                                file Myfile.doc could not be opened
                                fopen(): 603 file could not be opened
                                func_detailed_reg(): - function returned error
                                <istmt>: - function returned error
                                r(603);

                                STATA will run the regression and I can see the results, but the "Myfile.doc" says "could not be opened".

                                Any advice or feedback you may have would be appreciated. Thanks.
                                Last edited by Jacob Hesse; 24 Feb 2020, 17:13.

                                Comment

                                Working...
                                X