Announcement

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

  • Calculation of Rates

    I have a data set that looks like this:
    yoc agegroup ipd denominator
    1995 <6mo 18 3036.63
    1995 6mo-<1 18 3036.63
    1995 1-<2 27 6073.25
    1995 2-<5 17 18219.8
    1995 5-<18 12 68150.8
    1995 18-<40 21 78148.2
    1995 40-<65 27 44356
    1995 65+ 19 13803
    1996 <6mo 3 2846.88
    1996 6mo-<1 8 2846.88
    1996 1-<2 23 5693.75
    1996 2-<5 17 17081.3
    1996 5-<18 5 69015
    1996 18-<40 27 78065
    1996 40-<65 36 45527
    1996 65+ 31 14166
    1997 <6mo 7 2687.25
    1997 6mo-<1 12 2687.25
    1997 1-<2 23 5374.5

    etc. I would like to calculate a rate of disease for each age group (agegroup) and year (yoc) using the IPD (case count) and the denominator (denominator). Can this be done with an ir command to also generate p values and confidence intervals? I've tried using IR but it gives me one overall rate, I need it broken down by both age group and year.

  • #2
    The -ir- command does not seem appropriate for your needs. That command is designed to calculate incidence rate differences and ratios and test hypotheses comparing incidence rates in an exposed and unexposed cohort. You do not show any exposure variable in your data.

    It also seems that you have a single observation for each year and age-group in your data. If so, you can get the incidence rates and confidence intervals by looping -cii- over observations:

    Code:
    forvalues j = 1/`=_N' {
         display _newline(3) as result yoc[`j'], agegroup[`j']
         cii denominator[`j'] ipd[`j'], poisson
    }
    If your real data has multiple observations for a given year-agegroup combination, you would first want to -collapse- taking sums of ipd and denominator by year and agegroup before doing the above.

    As for p-values, I have no idea what hypothesis you might want to test, so I have nothing to advise on that.

    Comment

    Working...
    X