Announcement

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

  • Adding a New Row That Shows the Mean Difference and T-stat of Top and Bottom Quintiles

    Dear All,

    I am creating a summary statistics table of a dataset with the code:

    tabstat _b_annual_rank_lag1 _b_alag1SP8 _b_alag1SPm4, by(Quintile_Dollar_rank) statistics(n mean sd)

    The result of my code is the table above. As you can see, I have 5 Quintiles and in the last row, instead of showing the total value, I would like to show the mean difference and t-stat of the 5th and 1st Quintiles.
    Is there any way to make it?

    Thank you in advance,
    Mahmut
    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	15.0 KB
ID:	1681036


  • #2
    I don't this is possible with the tabstat command. In Stata 17, you could get your desired result with the new -table- and -collect- system, but it would take some work to get it to that form. A data example (using dataex) would help figure this out.

    Comment


    • #3
      Hi, After a while, I realized I had forgotten this post. Thank you so much. As you said, I couldn't find a way so tailored the table while exporting excel with -put excel- commands.

      Comment

      Working...
      X