Announcement

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

  • Combining two tables

    Click image for larger version

Name:	Screen Shot 2021-04-06 at 15.53.25.png
Views:	1
Size:	92.7 KB
ID:	1601860
    Hi,

    I am currently creating some descriptive statistics for my thesis. I have created a table, but I would like to get two superrows into my table. I am struggling to know how to do it as I can only specify one content option. Please see below:

    table region period1, c(mean f_yschool)

    I've attached the table as a picture. I would also like to add the mean numbers of years schooling for males into the same table, next to the females for each region. Is this possible?

    TIA.




  • #2
    I am struggling to know how to do it as I can only specify one content option.
    I don't think so, try something like:

    table region preiod1, contents(mean f_yschool sd f_yschool n f_yschool)

    Also, regarding

    but I would like to get two superrows into my table
    it would be helpful to explain what is the final structure that you're looking for.

    Comment


    • #3
      Hi Ken,

      Thanks for your help! Sorry I didn't make it clear, I would like to be able to get male and female education mean years of schooling per period. Something that looks similar to below:

      In my panel data male and female years of schooling are separate numerical variables, so I am not sure how to do it. All I've read about using the 'table function' to add another variable needs to be a categorical variable.

      Click image for larger version

Name:	Screen Shot 2021-04-06 at 19.10.29.png
Views:	1
Size:	141.4 KB
ID:	1601903

      Comment


      • #4
        the above table can be done using the -table- command - when you have two column variables, as in your #3, then you need to use both a "colvar" and a "supercolvar" as per the syntax command in the help file; an example is shown (3-way table) towards the bottom of the help file; see
        Code:
        help table

        Comment

        Working...
        X