I made this table with the code "tabstat x1 x2 x3, statistics( count ) columns(statistics)"
variable | N
-------------+----------
x1 | 1645
x2 | 1645
x3 | 1645
------------------------
But I would like that the N column be renamed to a different name such as "Number of People". Also, instead of using the variable names x1, x2, and x3, I would like stata to use the labels instead. the lables are in the data and they are First, second, and third. How do i generate a single code to do that?
------------------ copy up to and including the previous line ----
variable | N
-------------+----------
x1 | 1645
x2 | 1645
x3 | 1645
------------------------
But I would like that the N column be renamed to a different name such as "Number of People". Also, instead of using the variable names x1, x2, and x3, I would like stata to use the labels instead. the lables are in the data and they are First, second, and third. How do i generate a single code to do that?
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte(x1 x2 x3) 1 1 2 1 1 2 1 2 2 3 3 2 1 1 2 2 2 2 2 2 2 1 1 2 1 1 2 2 2 2 2 2 2 2 2 2 1 1 2 1 1 2 1 2 4 1 1 4 2 2 4 2 2 4 1 1 4 2 2 4 end
Comment