Announcement

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

  • Calculate Relative Risk with 95% CI from two-way table

    Hello,
    i have to variables (sex (male/female) & hypertens) and would like to calculate the 95% CI of the Relative Risk comparing female and male for hypertens. First I did a two-way table of both variables:
    Code:
     tab hypertens sex, row chi
    Is there now a way to calculate the CI of Relative Risk (positive male / positive female) with the stored results in r from the tab command above? I tried a few ways and could not figure it out.
    Thank you very much for your help!


    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float(sex_num hypertens)
    1 0
    1 1
    0 0
    1 0
    1 0
    0 0
    0 0
    0 0
    1 0
    1 1
    0 0
    0 1
    1 0
    1 1
    1 0
    0 1
    0 0
    0 0
    1 1
    1 0
    0 1
    0 0
    1 1
    1 0
    0 0
    0 0
    0 0
    0 1
    1 1
    1 1
    0 0
    1 0
    0 1
    1 0
    1 1
    1 0
    1 0
    1 1
    0 0
    end
    label values sex_num sex_num
    label def sex_num 0 "female", modify
    label def sex_num 1 "male", modify

  • #2
    What do you mean with "Relative Risk (positive male / positive female)". I would interpret your formula as meaning the number of positive males divided by the number of positive females, but that just gives the risk of being male given that someone is positive. But that is a risk and not a relative risk, and of all the risk you could compute, probably the least interesting one. So I assume I am misinterpreting your formula. Can you give us the full formula with a full description of the used symbols
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Also, have you looked at help epitab? This contains many commands in this area.
      ---------------------------------
      Maarten L. Buis
      University of Konstanz
      Department of history and sociology
      box 40
      78457 Konstanz
      Germany
      http://www.maartenbuis.nl
      ---------------------------------

      Comment


      • #4
        Thanks for your answer and the epitap option. I think I misstiped Relative Risk. Epitap is great for cacultation of Relative Risk. The question is how to calculate Relative Frequency with 95% CI for male and female?

        Comment


        • #5
          help proportion
          ---------------------------------
          Maarten L. Buis
          University of Konstanz
          Department of history and sociology
          box 40
          78457 Konstanz
          Germany
          http://www.maartenbuis.nl
          ---------------------------------

          Comment


          • #6
            Thank you very much, that is what I look for!!

            Comment

            Working...
            X