Announcement

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

  • Exporting tables to excel

    Hi all, I am generating many tables in Stata 13 using the tabstat command:

    bysort state crop SizeGroup: tabstat var1...var 25 [w=we],by(year)

    Is there any way to take these tables to excel? Need to generate a lot of tables and its difficult to copy manually.

    Thanks

  • #2
    There are a great many ways to write tables into excel including putexcel, outreg2, estout, and xml_tab. Most are user written.

    Comment


    • #3
      Can we use the bysort command in any of them?

      Comment


      • #4
        In the case of outreg2 (SSC install outreg2) suggested by Phil Bromiley in #2, you can try:
        Code:
        sysuse auto, clear
        bys foreign: outreg2 using myfile.xlsx, replace sum(log) keep(price mpg turn)
        Last edited by Abdul Adam; 03 Mar 2018, 05:23. Reason: Added: SSC install outreg2

        Comment


        • #5
          Thanks Abdul!

          Comment


          • #6
            I was using xml_tab with the option pvalue, but still it shows standard errors, not the p values.

            Comment


            • #7
              Originally posted by Shoummo Sen Gupta View Post
              I was using xml_tab with the option pvalue, but still it shows standard errors, not the p values.
              Hello, do you have a solution for it? I also meet the same question. It always shows the standrad errors.

              Comment


              • #8
                I got the same issue. How can we use xml_tab to export t-statistics? It only shows standard errors in STATA18.

                Comment

                Working...
                X