Announcement

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

  • Calculating incidence rate if I only have summary data

    I have the number of cases (528 cases) and the person time (7613 person years of observation) and need to calculate an incidence rate per 1,000 PYO and 95% CI. It's easy to get a rate of 69.4 cases/1,000 PYO but harder (for me) to get the 95% CI.

    I had thought Stata had an IR calculator, a little like iri (which is the Incidence-rate ratios calculator, and doesn't give me 95% CI of the incidence rates themselves), but I can no longer find it.

    Am I misremembering this? Can Stata give me an incidence rate if I only have summary data?

    Thank you

  • #2
    your situation is not completely clear to me, but I suggesting starting here:
    Code:
    h immediate

    Comment


    • #3
      I have taken a look at the Stata tables for epidemiologists, but I can't quite find what I'm looking for. They present ratios of rates (incident rate ratio, odds ratio) and things like the attributable / prevented risk fraction... But there is no 95% confidence interval around my incidence rate (just around the ratios).

      But without running stptime (I have summary data, not the actual data) I can't figure out how to take this information:
      528 cases
      7613 person years of observation

      and get this information:
      6.94 cases per 100 person years of observation (95% CI: X-Y)

      Is there a calculator on Stata that will get me X and Y? I suspect maybe not...

      Comment


      • #4
        can you treat this as a proportion and use -cii-? see
        Code:
        h cii

        Comment


        • #5
          I wasn't able to find a Stata program that would do this for a single rate. The challenge is deciding which method of confidence interval construction is useful. Below I illustrate the Rothman and Greenland method, which is a refinement of the Normal approximation. Therefore it's an asymptotic method. Exact methods are more complicated and need iterative solutions.

          Code:
          scalar a = 528
          scalar py = 7613 / 1000
          
          scalar rate = a/py
          scalar lower = exp( ln(rate) - invnormal(0.975)/sqrt(a) )
          scalar upper = exp( ln(rate) + invnormal(0.975)/sqrt(a) )
          
          di "Rate per 1,000 PY (95% CI): " strofreal(rate, "%8.2f") " (" strofreal(lower, "%8.2f") ", " strofreal(upper, "%8.2f") ")"
          Result

          Code:
          Rate per 1,000 PY (95% CI): 69.36 (63.68, 75.53)
          Rothman KJ, Greenland S. Modern Epidemiology, 2nd Edition. Lippincott-Raven Publishers, Philadelphia, 1998.

          Comment


          • #6
            -cii proportions- will do this for a single rate. It offers a variety of methods for calculating a confidence interval, which you can specify as options. The Rothman-Greenland method is not among them. But, as one would expect for relatively large numbers, the results from the different methods do not differ very much:
            Code:
            . foreach x in exact wald wilson agresti jeffreys {
              2. display "`x'"
              3. cii proportions 7613 528, `x'
              4. }
            exact
            
                                                                        Binomial exact   
                Variable |        Obs  Proportion    Std. err.       [95% conf. interval]
            -------------+---------------------------------------------------------------
                         |      7,613    .0693551    .0029117        .0637482    .0752943
            wald
            
                                                                        Binomial Wald    
                Variable |        Obs  Proportion    Std. err.       [95% conf. interval]
            -------------+---------------------------------------------------------------
                         |      7,613    .0693551    .0029117        .0636481     .075062
            wilson
            
                                                                            Wilson       
                Variable |        Obs  Proportion    Std. err.       [95% conf. interval]
            -------------+---------------------------------------------------------------
                         |      7,613    .0693551    .0029117        .0638626    .0752818
            agresti
            
                                                                        Agresti–Coull    
                Variable |        Obs  Proportion    Std. err.       [95% conf. interval]
            -------------+---------------------------------------------------------------
                         |      7,613    .0693551    .0029117        .0638585     .075286
            jeffreys
            
                                                                           Jeffreys      
                Variable |        Obs  Proportion    Std. err.       [95% conf. interval]
            -------------+---------------------------------------------------------------
                         |      7,613    .0693551    .0029117        .0638113    .0752261
            Worth noting, -cii proportions- returns the estimate in -r(proportion)- and the confidence limits in -r(lb)- and -r(ub)-.

            Comment

            Working...
            X