I'm trying to tabulate frequencies of the same variable in multiple columns of a table such as:
column 1:
Code:
tabstat smpl_mean , by(year) stat(count)
Code:
tabstat smpl_mean if control==1, by(year) stat(count)
A basic wanted result would look a little like the following:
Year | Full Data | Control |
1991 | 50 | 0 |
1992 | 55 | 2 |
1993 | 61 | 5 |
Obs | 166 | 7 |
Clarification
Using commands such as outreg2 or esttab can be an option, I just couldn't find a way to do what I wanted in both (I get the total obs only and not rows of obs by year)
My purpose is to create a summary table using in-stata commands as much as possible (as opposed to tinkering with the results in Excel).
0 Response to Tabulating same variable with different restrictions in the same table
Post a Comment