Announcement

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

  • #16
    Please post the Stata command for which you want an output, I shall then try to come up with an asdoc example.
    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


    • #17
      Okay. I am trying to create a descriptive table (command tab) for all of my variables (except my outcome of hemoglobin level) plus a column that includes the bivariate relationship between my independent variable of interest (indigenity) and my study variables. I am attaching a sample document to clearly demonstrate what I mean.

      code:

      sum indigenity relationship education i.employment gender age income smoker
      tab indigenity relationship, chi2
      tab indigenity education, chi2
      tab indigenity employment, chi2
      tab indigenity education, chi2
      tab indigenity gender, chi2
      ttest age, by (indigenity)
      ttest income, by (indigenity)
      tab indigenity smoker, chi2

      I want to combine these things into one table.
      Attached Files

      Comment


      • #18
        To combine different statistics in one document, we can use the append option of asdoc. So for the Stata commands that you have listed above, we can create all outputs just in one document.
        Code:
        asdoc  sum indigenity relationship education employment gender age income smoker, replace
        asdoc tab indigenity relationship, chi2 append
        asdoc tab indigenity education, chi2 append
        asdoc tab indigenity employment, chi2 append
        asdoc tab indigenity education, chi2 append
        asdoc tab indigenity gender, chi2 append
        asdoc ttest age, by (indigenity)  append
        asdoc ttest income, by (indigenity)  append
        asdoc tab indigenity smoker, chi2  append
        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


        • #19
          Yes, but is there a way to combine all of those outputs into one table at once?

          Comment


          • #20
            That would involve advanced coding. One method is to write your required statistics to a matrix and then export the matrix to Word. I have shown one such example in this post https://www.statalist.org/forums/for...-or-word/page2, page 2, post number 23
            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


            • #21
              Dear collegues,

              I want to create mean of variables in a loop and I use the following command

              foreach var of varlist x1 x2 x3 {
              asdoc table `var', c(mean y1)
              }



              I get result for x1 but ASDOC is not working and I get error message:

              astable(): 3301 subscript invalid
              <istmt>: - function returned error



              Any idea how I can make 'asdoc' to work?

              Comment


              • #22
                Please update your copy of asdoc
                Code:
                 ssc install asdoc, replace
                If that does not solve your problem, then please post your dataset using dataex (from SSC).
                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
                  Hello,

                  when I want to install xtabond 2 on stata 15.1 I get always this error: cannot write in directory D:\Stata\Stata15\ado\plus\x
                  r(603);
                  I using the program on the computer of my university.
                  Is this the problem that I'm only a user and not an admin with all permissions?

                  Comment

                  Working...
                  X