1. I would like to add a percentage column after each column generated by the following code. So the table would include six columns in total: N (Domestic), %(Domestic),N (Foreign), %(Foreign), and N (Total), %(Total)
Repair |
Record | Car type
1978 | Domestic Foreign | Total
-----------+----------------------+----------
1 | 2 0 | 2
2 | 8 0 | 8
3 | 27 3 | 30
4 | 9 9 | 18
5 | 2 9 | 11
-----------+----------------------+----------
Total | 48 21 | 69
2. Would there be a way to reverse the displayed order? For example, from 5 to 1 in Repair column. Similarly from Foreign to Domestic.
Code:
sysuse auto.dta, replace tab rep foreign
Record | Car type
1978 | Domestic Foreign | Total
-----------+----------------------+----------
1 | 2 0 | 2
2 | 8 0 | 8
3 | 27 3 | 30
4 | 9 9 | 18
5 | 2 9 | 11
-----------+----------------------+----------
Total | 48 21 | 69
2. Would there be a way to reverse the displayed order? For example, from 5 to 1 in Repair column. Similarly from Foreign to Domestic.
Comment