Announcement

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

  • how to export Summary Statistics to word

    Dear Sir/Madam
    I am working on my thesis on impact of informal credit on household welfare. I generated summary statistics for command of:
    "sum heads_child girl_cnt age_cnt if f07_observed==1 & treatment==1" and trying to export the output to word document.
    I used the command of "outreg2 using myresul.doc, replace keep( heads_child girl_cnt age_cnt ) eqkeep(Mean) dec(3)". But the STATA result is "==1 invalid name". Please may you help me?
    Thank you in Advance
    Last edited by Habitamu Asifawu; 30 Sep 2019, 00:40.

  • #2
    outreg2 is from SSC, as you are asked to explain. I don't use the command but it appears that it will output only the full summary stats and you need to specify a minimum of two statistics. You can use -preserve- and -restore- to obtain your sample or frames if you have Stata 16+.

    Code:
    preserve
    keep if f07_observed==1 & treatment==1
    keep  heads_child girl_cnt age_cnt
    outreg2 using myresul.doc, replace sum(log) eqkeep(mean sd) dec(3)
    restore
    Code:
    frame put heads_child girl_cnt age_cnt f07_observed treatment, into(stats)
    frame stats: keep if f07_observed==1 & treatment==1
    frame stats: drop f07_observed treatment
    frame stats: outreg2 using myresul.doc, replace sum(log) eqkeep(mean sd) dec(3)

    Comment


    • #3
      You can use asdoc (from SSC) with almost all Stata commands. using asdoc is super easy. See this example
      Code:
      ssc install asdoc
      sysuse auto, clear
      asdoc sum
      Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	36.3 KB
ID:	1518515


      You can also watch this YouTube video for more variations with summary statistics.

      For those who are not yet familiar with asdoc, asdoc can be downloaded from SSC and can be used with almost all Stata commands. Here is a short blog post that shows how asdoc can be used with any Stata command http://fintechprofessor.com/2018/02/...basic-example/. You can also watch several YouTube videos that show the use of asdoc https://www.youtube.com/watch?v=zdI6...LwodAk2oqLYhr-

      Code:
      * For installation of the stable version 
      ssc install asdoc
      
      * For installation of the new beta version
      net install asdoc, from(http://fintechprofessor.com) replace
      help 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

      Working...
      X