Announcement

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

  • Table 1 problems

    Hi Statalist

    I want to make a baseline demographic table (table 1) but I am having some problems.
    I have an unexposed and an exposed group with this distribution:

    | exposed
    unexposed | 1 . | Total
    ----------------+---------------------------+---
    1 | 12,032 4,632 | 16,664
    . | 5,003 0 | 5,003
    --------------+------------------+----------
    Total | 17,035 4,632 | 21,667

    Exposed Total
    Unexposed 1 .
    1 12,032 4,632 16,664
    . 5,003 0 5,003
    Total 17,035 4,632 21,667




    I would like a table that has:
    Unexposed Exposed Total
    Sex
    - female
    - male
    Ethinicity
    -
    -
    ....
    ...

    My problem is that some of the unexposed will become exposed at some point and I therefore have two different variables for unexposed and exposed. When i try to make a table it looks like this:

    Click image for larger version

Name:	Skærmbillede 2022-05-31 kl. 13.16.54.png
Views:	1
Size:	43.5 KB
ID:	1667065




    This is a bit off from what I want. Any suggestions?
    Last edited by Morten Hans Jensen; 31 May 2022, 07:31.

  • #2
    Any help would be appreciated.

    Comment


    • #3
      see Chuck Huber's 7 part blog on the -table- command, esp. part 3 which discusses these types of tables in some detail

      Comment


      • #4
        I forgot to include the url above: https://blog.stata.com/2021/06/24/cu...assic-table-1/

        Comment


        • #5
          Hi Rich

          Thank you for the reply. I can however not see if it solve my problem. My problem is shown in the screenshot I put in. The exposed and unexposed groups have a significant overlap in people which gives some weird tables when I try to make one. I want an exposed and an unexposed group.

          Comment

          Working...
          X