Announcement

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

  • Export Standard Errors in T Test using Esttab

    I have been running the following code. I am using the Card and Krueger (1994) dataset, attached here.

    Code:
    local vars bk kfc roys wendys co_owned emptot wage_st ///
    pmeal hrsopen emptot2 wage_st2 pmeal2 hrsopen2
    
    estpost ttest `vars', by(pa)
    
    esttab using "$outputs\table2.csv", replace cells("mu_1(fmt(1)) mu_2(fmt(1)) t(fmt(1))") ///
    title(Table 2: Means of Key Variables) ///
    wide nonumber noobs label ///
    addnotes("Notes: Standard errors are given in parentheses")
    I would like to get the standard errors by states, in this case, New Jersey and Pennsylvania. However, I can only export the combined standard error of the ttest. Is there any way to export these standard errors and put them below the mean value per column?

    Best Regards,
    Rony
    Attached Files

  • #2
    You can use the mean command and then eststo it.
    Code:
    sysuse auto
    eststo: mean price, over(foreign)
    esttab, se

    Comment


    • #3
      Originally posted by Ariel Karlinsky View Post
      You can use the mean command and then eststo it.
      Code:
      sysuse auto
      eststo: mean price, over(foreign)
      esttab, se
      Thanks Ariel, but I would like to get the t values as well. When I run the estpost, I can export only the Standard Error combined. I would like to get both in order to get a complete and direct excel table.

      Comment


      • #4
        According to the help files, I fear that may not be possible:

        se[(fmt)] display standard errors instead of t-statistics
        Best regards,

        Marcos

        Comment


        • #5
          Originally posted by Marcos Almeida View Post
          According to the help files, I fear that may not be possible:
          Thank you Marcos. I had to do it separately with mean command.

          Best,
          Rony

          Comment

          Working...
          X