Announcement

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

  • Mario Sum perhaps you can try
    Code:
    bysort id (foreign): asdoc sum trunk

    Comment


    • Thank you for the hint.
      This results in the stratification only by id, though. The presort by foreign invoked by
      Code:
      (foreign)
      is not considered for the calculation of statistics.

      Comment


      • Mario Sum
        Thanks for your kind words. And I like the suggested use of asdoc as a verb. So to asdoc summary statistics using two variables in the bysort prefix, there is a workaround, though this approach is not a preferred one due to additional lines of coding. I have this on my agenda for the next update of asdoc to add support for more than one variable in the bysort prefix. The workaround is to create a grouping variable from two or more variables and then use the grouping variable in the bysort prefix.

        Code:
        egen group = group(foreign  id)
        label define idl 1 "domestic - small" 2 "domestic - big" 3 "Foreign - small" 4 "Foreign - big"
        label value group idl
        bys group : asdoc sum trunk, replace
        Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	27.5 KB
ID:	1511596
        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 have been trying to export the results of mixed (multilevel models) with asdoc.
          However, an error
          Code:
          func_nested_reg():  3200  conformability error
                           <istmt>:     -  function returned error
          r(3200);
          appeared when I tried this:
          Code:
          asdoc mixed cci opeind_lag1w gdpcapitaw fhouseprw rentsw ///
          opeind_lag1_mean cgdpcapita_mean cfhousepr_mean crents_mean cconflict_mean ///
          ccomlaw_mean clandlock_mean cprotestant_mean || cntrynum: opeind_lag1, vce(robust), ///
          save(Table4.doc) title(Table 4. Effect of political/operational independence on CCI) ///
          nest append stars cnames(Model 8) add(Operational independence, YES, Random slope, YES)
          I would really appreciate it if you could tell me what's wrong with my code! Thank you.

          Comment


          • The mixed command has a complex syntax structure. To simply parsing the syntax, asdoc offers the replay sub-command. So first we shall run the mixed command without asdoc, and then run asdoc with sub-command replay. See this example

            Code:
            webuse nlswork
            
            mixed ln_w grade age c.age#c.age ttl_exp tenure c.tenure#c.tenure || id:
            
            asdoc replay, replace  nest
            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,
              thank you so much for even posting a workaround - this is the icing on the cake.

              Comment


              • Mario Sum thanks for the appreciation.
                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


                • Is there a way to export value labels of factor variables when creating the detailed regression table?

                  Comment


                  • Youshida Koki the mentioned feature has been added to asdoc. You can try the new version. 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


                    • Hello
                      thanks a lot for this amazing tool. is there a way to use asdoc with robust regression? the followinng syntax report an error : asdoc nestreg:regress HADSDEP (Age Sexe) (c.rmssdc c.dersc) c.DERSXHRV, vce(hc3) beta replace

                      error : option hc3 not allowed
                      thanks a lot for your help

                      Comment


                      • Dear Professor Shah,

                        First of all thank you for this excellent programme.

                        I was running this:

                        sysuse auto,clear
                        asdoc table price mpg foreign if mpg>20, replace

                        But there is some issue with this command, the if condition is not being taken into the account and the output shows all the values of mpg.

                        Comment


                        • Shoummo Sen Gupta Support for the IN and IF conditions has been added. 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.

                          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


                          • Originally posted by Attaullah Shah View Post
                            Shoummo Sen Gupta Support for the IN and IF conditions has been added. 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.

                            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.
                            Thank you.

                            Comment


                            • Thank you so mcuh, Attaullah!

                              It's a command and helps a lot.

                              My feedback: it would be very good if we could export in xlsx file as well.

                              Thanks again for you great initiative.

                              Dimitri

                              Comment


                              • Yes, that is on my agenda for the premium version of asdoc. https://fintechprofessor.com/stata-programs/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

                                Working...
                                X