Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Group tables from tabulate command

    I'm running tabulate command for 2 categorical variables in each province. Here is the example of the result:
    Click image for larger version

Name:	Screenshot 2023-08-31 172124.png
Views:	1
Size:	18.8 KB
ID:	1725587

    Is there anyway that I can combine 2 tabulate tables into 1 table for each province???

  • #2
    If the cumulative percents are not important (and I presume they are not since neither sex nor rthnic is an ordinal variable) you can do this with
    Code:
    dtable i.(sex rthnic) if MATINH == 95
    dtable i.(sex rthnic) if MATINH == 96
    In fact, you can even get a single table, with separate columns for the two provinces if you would like:
    Code:
    dtable i.(sex rthnic) if inlist(MATINH, 95, 96), by(MATINH)

    Comment

    Working...
    X