As indicated in the title, I wonder how I can create a table to display a variable's summary stats by year and status. Specifically, the variable of interest is city, and staus takes 4 values, 0, 1, 2, and 3. I have two years, 2019 and 2020 in my sample.
I use this code:
Code:
bysort year status: sum(city)
Status | ||||
Year | = 0 | = 1 | = 2 | = 3 |
2019 | Obs: Mean: |
Obs: Mean: |
Obs: Mean: |
Obs: Mean: |
2020 | Obs: Mean: |
Obs: Mean: |
Obs: Mean: |
Obs: Mean: |
0 Response to how to create a table that display a variable's summary stats by year and status
Post a Comment