Announcement

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

  • Standardized incidence ratio

    Dear all,

    I was wondering how to calculate the standardized incidence ratio for a number of variables (age, year and gender) in Stata. Thereby, what is a commenly used statistical test to compare the standardized incidence to an other incidence?

    Thank you in advance!
    Kind regards,

    Reinout Heijboer

  • #2
    Take a look at the following commands to calculate SIRs:
    Code:
    strate, istdize, poisson

    Comment


    • #3
      Code:
      strate age , smr(rate)
      Should give you the SIRs by age (assuming you have different categories in age) and rate is the 'expected' rate from the general population. Note that you need to stset and stplit your data first by sex, age and calender year and then merge in the general population incidence rates before using the above command.

      Also have a look at the command smrby, which has a test for trend and heterogeneity. Alternatively, you could fit a Poisson model with the expected as the log-offset.

      Comment


      • #4
        Here is an example:

        Code:
        // stset by attained age (dox=date study exit, doe= date of cohort entry; dob=date of birth)
        .stset dox , enter(doe) failure(status==1) origin(dob) scale(365.25)   id(id)
        
        //(1) stsplit by attained age using 5-year age bands; (2) stsplit on calendar year using 1-year bands from 1970 to 2012
        .stsplit _age, at(20(5)85 110) after(time=dob) 
        .stsplit _year, after(time=d(1/1/1900)) at(70(1)112)  
        .replace _year = _year +1900 
        
        //Merge with Population Rates
        merge m:1 _year sex _age using "poprates"
        assert inlist(_merge, 2,3)
        keep if _merge==3
        drop _merge
        
        //use strate to obtain SIRs by specific factors (e.g. sex, age at diagnosis etc)
        .strate sex  , smr(rate) 
        .strate agedx  , smr(rate)
        Hope this helps


        Comment


        • #5
          Thank you so much mr Reulen! It is definitely helpful!!
          I don't really understand what stsplit _age and stsplit _year did.

          Could you elaborate?

          Comment


          • #6
            You first stset your data using attained age as the time metric, then because one person can contribute person-years to multiple attained age categories you need to use stsplit to create a separate record for each age category so that you can merge in the general population incidence rates. You then want to multiply the person-years within each record with the corresponding incidence rate of the general population to get the expected. Have a look at the actual data to see what happens once you have done one stsplit, try to understand what Stata has done, that is probably easiest way to understand it.

            Also, have a look at the Stata manual under stsplit. Perhaps also google Lexis diagram as this is essentially what you are creating. Most epidemiology books cover it as well.

            Comment


            • #7
              Thank you so much Raoul!!! It took me a while to figure it all out, but I could never have done it without your help!

              One last question, when obtaining SIRs by different factors such as gender, how do I need to define the Population Rates? My comparison population rates are incidence per 100.000 persons. If I use for example strate agedx, per(100000) smr(rate) I get a very small SIR.

              Comment


              • #8
                Glad you figured it out! It can be tricky! You dont need the "per" option when using the strate command, if you leave it out do you get the correct SIRs?

                Comment

                Working...
                X