Announcement

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

  • Exporting out tabulated data

    How can we export out row tabulation in stata? I have these two variables ind and q29d. When I tabulate by row, This is what I get. The percentages sum up to 100% across.
    Click image for larger version

Name:	image_24860.png
Views:	1
Size:	18.5 KB
ID:	1637992

    However, I am only interested in the first column values. So my desired output into an excel is:
    ind| 1
    --- |-------
    1 | 53.99
    2 | 51.36
    3 | 50.88
    4 | 43.87
    5 | 45.66
    6 | 47.04

    I thought this would fairly be easy but I can't seem to export this tabulation. I have tried contract and egen and both don't give me what I need.

    Edit: The best option I have seen so far is using tab2xl. However this gives me a cluttered output. I would still need to format the excel sheet manually to remove unwanted colums/rows. I wouldn't mind manually fixing one table but I have more than 10 tables to do the same to.
    HTML Code:
    tab2xl ind q29d using test, col(1) row(1) percentage
    Last edited by Melat Kassa; 24 Nov 2021, 14:27.
Working...
X