Announcement

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

  • Relative Risk Ratio Calculation Help

    Hello

    I would like to compare two relative risks to see if they are different from one another.

    I have data on stunting (yes/no) and income status (high/low) for different rounds (R1 - R4) of a survey.
    I would like to see if the gradient of stunting by income status changes in different rounds of the survey. This could be between R1 and R2, or R1 and R4 etc.


    Example data:

    Round 1
    ***************** Stunted*******Not Stunted****Total
    Low Income 50 30 80
    High Income 70 50 120

    RR of stunting low income vs high income = 0.625/ 0.583 = 1.07

    Round 2
    ****************** Stunted******** Not Stunted****Total
    Low Income 40 40 80
    High Income 30 60 90

    RR of stunting low income vs high income = 0.5 / 0.33 = 1.515

    RRR between R1 ad R2 = 1.07 / 1.515 = 0.706

    I have been using the cs command to get RR with confidence intervals for each round, but need help comparing the RR between different rounds, to calculate CI and p value.

    Ive even done it by hand but it took ages! Sorry for my ignorance - There must be a simple way to do this!!!

    Many Thanks

    Joe

  • #2
    put this into a regression model with an interaction between income and round; you appear to want to do multiple tests so most will have to be post hoc tests; you can use binreg or glm or poisson

    Comment


    • #3
      Here's an example where the agegroup variable (age) plays the role of survey wave in your problem:

      Code:
      clear*
      webuse ugdp
      
      cs case exposed [freq=pop] if age == 1
      local rr1 = r(rr)
      cs case exposed [freq=pop] if age == 0
      local rr0 = r(rr)
      
      display "Relative Risk Ratio = " %3.2f =`rr0'/`rr1'

      Comment


      • #4
        Hi
        Thanks for getting back to me so quickly. Clyde - the code you sent is really useful, but do you know how to get a confidence interval around that relative risk ratio, so that I can reject the null hypothesis that it is = 1? i.e. there is a difference in relative risk by age group (in your example)?

        Here is an explanation from a medical journal about how to do this by hand -

        Many Thanks again

        Joe

        Click image for larger version

Name:	Screen Shot 2016-08-21 at 11.17.55.png
Views:	2
Size:	176.9 KB
ID:	1353894

        Attached Files

        Comment


        • #5
          Sorry, I hadn't noticed that you also wanted inferential statistics. I thought you just wanted the RRR. You would not be able to implement the method you show easily from -cs- or any other command. You would have to go back to calculate the logs of the risk ratios directly from the counts in each group in each stratum. That's more trouble than it's worth, when you can do it almost effortlessly following Rich Goldstein's advice. For example:

          Code:
          webuse ugdp, clear
          poisson case i.exposed##i.age [fweight = pop], irr
          The RRR will be given by the coefficient of the interaction term, and the CI accompanies it.

          Comment


          • #6
            Hi
            thats great - thank you both so much - sorry to bother you!

            Best Wishes

            Joe

            Comment

            Working...
            X