Announcement

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

  • Tabulate by group to show in a single table

    Hello

    I am running a frequency table for wethever a person is getting a new child, based on how many childs the person have, divided into age groups. Stata then creates a seperate table for each agegroup. Is there any way of getting everything in just one table?

    The code I am running:

    Code:
    so agegroup id year
    set m off
    by agegroup: ///
    tab number_of_children dmy_new_child , nofreq row
    I have 8 agegroups, so it then makes 8 seperate tables. Is there a way of getting it all into one table?

  • #2
    The very recent thread at https://www.statalist.org/forums/for...available-year may give you some ideas.

    See also https://www.statalist.org/forums/for...updated-on-ssc

    Comment


    • #3
      Thanks I had a look at it, and it looks promising, but it seems to be having issue with big datasets?

      I just tried the code to test, after quite some time it has still not produced anything:

      Code:
      groups number_of_children dmy_new_child
      Number of children can take value 0 to 8, the dmy takes 0 or 1.

      I have tens of millions of observations.

      Comment


      • #4
        If I understand you correctly, the tabulation is of at most 18 groups and shouldn't take long. But the reduction will take longer.

        Comment

        Working...
        X