Announcement

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

  • Age Standarized Rates

    Hello i need some help im having troubleshuting doing this
    Im doing a Population Based Cancer Registrie in Honduras

    *
    *POBLATION 2017 AGES
    * . Total Men Women
    *ALL 394,890 194,970 199,920
    *<14 136,201 68,952 67,249
    *15-39 168,233 82,886 85,347
    *40-44 19,501 9,396 10,105
    *45-54 29,414 14,086 15,328
    *55-64 20,118 9,566 10,552
    *>65 21,423 10,084 11,339
    I have all the cancers registered in a variable called loc_prim

    Code:
    tabulate loc_prim
    
      Sitio del |
          tumor |
       primario |
            (Si |
     metastasis |
    es el sitio |
          de la |
      neoplasia |
    primaria no |      Freq.     Percent        Cum.
    ------------+-----------------------------------
            C00 |          2        0.79        0.79
            C15 |          2        0.79        1.59
            C16 |         42       16.67       18.25
            C17 |          5        1.98       20.24
            C18 |          2        0.79       21.03
            C19 |          5        1.98       23.02
            C20 |          5        1.98       25.00
            C22 |          2        0.79       25.79
            C23 |          1        0.40       26.19
            C26 |          2        0.79       26.98
            C32 |          2        0.79       27.78
            C40 |          3        1.19       28.97
            C41 |          1        0.40       29.37
            C44 |         82       32.54       61.90
            C48 |          3        1.19       63.10
            C49 |          4        1.59       64.68
            C50 |         18        7.14       71.83
            C51 |          2        0.79       72.62
            C53 |         28       11.11       83.73
            C54 |         10        3.97       87.70
            C56 |          3        1.19       88.89
            C60 |          2        0.79       89.68
            C61 |          3        1.19       90.87
            C64 |          4        1.59       92.46
            C71 |          2        0.79       93.25
            C73 |         13        5.16       98.41
            C77 |          4        1.59      100.00
    ------------+-----------------------------------
          Total |        252      100.00
    This are new cases in 2017
    i have age, sex, agecat with the categories shown above how ever i cant manage to calculate:

    Crude Incidence Rate
    Incide Rate by Sex
    and most important: AGE STANDARIZED RATES

    Can someone give me a hand?

    Thanks!

  • #2
    You'll increase your chances of a helpful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data. With readily usable data, someone might make and test a program for you.

    First, if what you're dealing with is loc_prim, you can't do anything until you convert it to numerical variables. Means, incidence etc. are not meaningful with string variables. Use generate with a string funcation to get rid of the C's and then generate with real or destring to generate numerical variables. It is not clear what the C's mean. If the variable is really values, then you can use the following.

    You need to use egen by age and year. Egen will calculate totals, averages, etc. by whatever categories you like. So you probable want something like:
    bysort age : egen ageloc_prim=mean(loc_prim)
    g stdloc_prim = loc_prim - ageloc_prim

    At least that's what I think you intend.

    Comment

    Working...
    X