Hi everyone,
I am student, recently using stata, having touble with the use of the command tabout:
I need the output table be like this, in a txt file
The command i am using is this
tabout Gender using sales_by_gender.txt, cells(sum sales_2023 N sales_2023 sum sales_2022 N sales_2022) ptotal(none) format(0c) dpcomma sum
I am getting this table, the problem is that i can't figure how to create the title of the table and also edit the colum names so that the N and Sum appear inside the variables and not above the table
thanks for any help!
regards
Rob
I am student, recently using stata, having touble with the use of the command tabout:
I need the output table be like this, in a txt file
SALES BY GENDER | ||||
Gender | Sum Sales_2023 | N Sales_2023 | Sum Sales_2022 | N Sales_2022 |
Male | 33866790 | 2516 | 30866790 | 1835 |
Female | 2626634 | 849 | 1626634 | 606 |
The command i am using is this
tabout Gender using sales_by_gender.txt, cells(sum sales_2023 N sales_2023 sum sales_2022 N sales_2022) ptotal(none) format(0c) dpcomma sum
I am getting this table, the problem is that i can't figure how to create the title of the table and also edit the colum names so that the N and Sum appear inside the variables and not above the table
Sum | N | Sum | N | |
Gender | Sales_2023 | Sales_2023 | Sales_2022 | Sales_2022 |
Male | 33866790 | 2516 | 30866790 | 1835 |
Female | 2626634 | 849 | 1626634 | 606 |
regards
Rob
Comment