Announcement

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

  • Exporting Test Results to word from xttest0 and xttest3

    Dear all,

    may someone clarify, how I can export the results from xttest0 to word?

    If I write:
    xtreg dep indep, re
    xttest0
    outreg2 using new, word dec(3) replace ctitle(new)

    I'll just get the random effects regression but not the results of xttest0.

    If I write:
    asdoc xtreg dep indep, re , save(new) replace
    asdoc xttest0, save(new) append

    I get the error:
    invalid syntax
    r(198);

    I face the same problem when I do tests with xttest3.

    Thank you
    BR Eduard

  • #2
    Problem is solved, interested readers might check out this thread
    https://www.statalist.org/forums/for...e-from-xttest0

    Comment


    • #3
      Here is a solution based on asdoc

      Code:
      * Load some data
      webuse grunfeld,clear
      
      * Estimate random effects
      xtreg invest mvalue kstock, re
      
      * Now the xttest0
      xttest0
      
      * Store the relevant statistics in macros
      loc LM = round(r(lm), .00005)
      loc p = round(r(p), .0005)
      
      * Write the regression and the statistics with asdoc
      asdoc xtreg invest mvalue kstock, re nest replace add(LM , `LM', LM_p , `p')
      Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	41.5 KB
ID:	1637067



      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

      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

      Working...
      X