Announcement

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

  • #16
    Thank you All,
    When I used
    Code:
    poisson glioma_cases ibn.dg_y ibn.AgeGroup, irr noconstant
    It gave me output as:
    poisson glioma_cases ibn.dg_y ibn.AgeGroup, irr noconstant
    note: 18.AgeGroup omitted because of collinearity

    Iteration 0: log likelihood = -4712.7613
    Iteration 1: log likelihood = -3879.0241
    Iteration 2: log likelihood = -3872.1993
    Iteration 3: log likelihood = -3872.1943
    Iteration 4: log likelihood = -3872.1943

    Poisson regression Number of obs = 1584
    Wald chi2(61) = 50379.35
    Log likelihood = -3872.1943 Prob > chi2 = 0.0000

    ------------------------------------------------------------------------------
    glioma_cases | IRR Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    dg_y |
    1970 | .386133 .0599448 -6.13 0.000 .2848348 .5234567
    1971 | .3693446 .057729 -6.37 0.000 .2718867 .5017363

    IRR is calculated for all years (not shown above) 1970-2013. Non of the year is omitted.

    Then I made another analysis:
    Code:
    poisson glioma_cases i.dg_y i.AgeGroup i.sex, ir
    poisson glioma_cases i.dg_y i.AgeGroup i.sex, ir

    Iteration 0: log likelihood = -3845.3136
    Iteration 1: log likelihood = -3835.2889
    Iteration 2: log likelihood = -3835.1744
    Iteration 3: log likelihood = -3835.1744

    Poisson regression Number of obs = 1584
    LR chi2(61) = 4564.99
    Prob > chi2 = 0.0000
    Log likelihood = -3835.1744 Pseudo R2 = 0.3731

    ------------------------------------------------------------------------------
    glioma_cases | IRR Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    dg_y |
    1971 | .9565217 .1164529 -0.37 0.715 .7534671 1.214298
    1972 | 1.065217 .126259 0.53 0.594 .8443962 1.343786


    And finally,

    Code:
    margins dg_y, predict(ir)

    margins dg_y, predict(ir)

    Predictive margins Number of obs = 1584
    Model VCE : OIM

    Expression : Predicted incidence rate, predict(ir)

    ------------------------------------------------------------------------------
    | Delta-method
    | Margin Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    dg_y |
    1970 | 3.833333 .326315 11.75 0.000 3.193768 4.472899
    1971 | 3.666667 .3191424 11.49 0.000 3.041159 4.292174

    It matches with the IRR in the above table.

    I am not still getting how I could interpret margins as predicted incidence rates(per what???)

    Comment


    • #17
      It matches with the IRR in the above table.
      No, it doesn't. Nor should it.

      In the output you got from
      poisson glioma_cases ibn.dg_y ibn.AgeGroup, irr noconstant the incidence rate ratios for each year are the incidence rates conditional on AgeGroup = the age-group that was dropped from the model to provide a reference category, in this case AgeGroup = 18. Moreover, sex does not appear in that model, so the results are marginal with respect to sex.

      In the output from the analysis using -poisson- followed by -margins-, you are getting incidence rates that are adjusted for the distributions of Age Group and sex. These are completely different constructs from the above, and any resemblance between their numeric results is coincidental.

      The units of the predicted incidence rates depend on how your data is structured. Assuming that each observation in your data set reflects the number of cases of glioma diagnosed in a particular age group and sex in a given year with some fixed number of members of people sampled for each such grouping. Let's say, for example, that each observation represents 10,000 people. Then the units for the incidence rates are cases per 10,000 person-years. If each observation represents 100,000 people, then it's cases per 100,000 person-years. And so on.

      Now, if in fact each age group-sex-year combination has a different size population underlying it (which would be more typical of epidemiologic data), then your modeling is incomplete and the results are uninterpretable. In that case, you need to add a variable to your data set showing for each observation the number of people who were observed, and add that variable's name as an -exposure()- option in your -poisson- command.

      Comment


      • #18
        I'll just add that Clyde has better eyes than me or is less lazy at deciphering things. Put ALL the code and output between code tags, not just the command. It is really hard to read the output otherwise, and by the time something has gotten to post 17 I (unlike Clyde!) am not willing to put in the effort.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        StataNow Version: 19.5 MP (2 processor)

        EMAIL: [email protected]
        WWW: https://www3.nd.edu/~rwilliam

        Comment


        • #19
          This is a rare occation where Clyde made a mistake: In #12 you get the incidence rates when adding the irr option not the incidence rate ratios because he left out the constant and used the ibn. prefix.

          This only applies to year, as that is the variable that was completely added. Age had a reference category (as year already captured the constant, so a reference category was required for age)

          I know it is somewhat confusing that something labeled incidence rate ratios is actual an incidence rate (or ratio of incidence ratios for interaction terms). For a long time this was the reason that Stata refused to give the constant whenever you asked for some irr, or or or rrr: that coefficient is not an incidence rate ratio, odds ratio or relative risk ratio, but a incidence rate, odds, or relative risk. I think it is right that the constant is now reported, but it does require that the user know the difference in meaning between these parameters.
          Last edited by Maarten Buis; 03 Nov 2015, 01:42.
          ---------------------------------
          Maarten L. Buis
          University of Konstanz
          Department of history and sociology
          box 40
          78457 Konstanz
          Germany
          http://www.maartenbuis.nl
          ---------------------------------

          Comment


          • #20
            Thank you all for your comments and suggestions.

            In # 16; I meant to say the predicted count of 1971 is (3.666667/3.833333)=0.956521 higher than the year 1970.I mean this matches with the table showing IRR as below:

            Code:
            poisson glioma_cases i.dg_y i.AgeGroup i.sex, irr
            
            Iteration 0:   log likelihood = -3845.3136  
            Iteration 1:   log likelihood = -3835.2889  
            Iteration 2:   log likelihood = -3835.1744  
            Iteration 3:   log likelihood = -3835.1744  
            
            Poisson regression                                Number of obs   =       1584
                                                              LR chi2(61)     =    4564.99
                                                              Prob > chi2     =     0.0000
            Log likelihood = -3835.1744                       Pseudo R2       =     0.3731
            
            ------------------------------------------------------------------------------
            glioma_cases |        IRR   Std. Err.      z    P>|z|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                    dg_y |
                   1971  |   .9565217   .1164529    -0.37   0.715     .7534671    1.214298
                   1972  |   1.065217    .126259     0.53   0.594     .8443962    1.343786


            I am receiving different options to calculate age/sex adjusted incidence rates. I have tried both, the results are not same, so its dragging me in the pool of confusions.

            First, I tried with

            Code:
             poisson glioma_cases i.dg_y i.AgeGroup i.sex, exposure (pop) irr
            
            Iteration 0:   log likelihood = -3616.7325  
            Iteration 1:   log likelihood = -3596.5893  
            Iteration 2:   log likelihood = -3596.4588  
            Iteration 3:   log likelihood = -3596.4588  
            
            Poisson regression                                Number of obs   =       1584
                                                              LR chi2(61)     =    4290.15
                                                              Prob > chi2     =     0.0000
            Log likelihood = -3596.4588                       Pseudo R2       =     0.3736
            
            ------------------------------------------------------------------------------
            glioma_cases |        IRR   Std. Err.      z    P>|z|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                    dg_y |
                   1971  |   .9458415   .1151529    -0.46   0.647     .7450537    1.200741
                   1972  |   1.041913   .1234982     0.35   0.729     .8259203    1.314391
            followed by margins:

            Code:
            margins dg_y, predict(ir)
            
            Predictive margins                                Number of obs   =       1584
            Model VCE    : OIM
            
            Expression   : Predicted incidence rate, predict(ir)
            
            ------------------------------------------------------------------------------
                         |            Delta-method
                         |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                    dg_y |
                   1970  |   .0000358   3.05e-06    11.71   0.000     .0000298    .0000418
                   1971  |   .0000338   2.95e-06    11.46   0.000     .0000281    .0000396

            Then,again

            Code:
            poisson glioma_cases ibn.dg_y ibn.AgeGroup ibn.sex, exposure(pop) irr nocons
            note: 18.AgeGroup omitted because of collinearity
            note: 2.sex omitted because of collinearity
            
            Iteration 0:   log likelihood = -4365.3937  
            Iteration 1:   log likelihood =  -3602.199  
            Iteration 2:   log likelihood = -3596.4625  
            Iteration 3:   log likelihood = -3596.4588  
            Iteration 4:   log likelihood = -3596.4588  
            
            Poisson regression                                Number of obs   =       1584
                                                              Wald chi2(62)   = 1005483.13
            Log likelihood = -3596.4588                       Prob > chi2     =     0.0000
            
            ------------------------------------------------------------------------------
            glioma_cases |        IRR   Std. Err.      z    P>|z|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                    dg_y |
                   1970  |   .0000182   2.85e-06   -69.78   0.000     .0000134    .0000248
                   1971  |   .0000172   2.71e-06   -69.67   0.000     .0000127    .0000235
            The incidence rates are not same. Please suggest me which one is correct way.

            Thank you.

            Comment


            • #21
              It's not a question of which is "correct." They are different incidence rates. In the first instance (poisson glioma_case i.dgy..., followed by margins) you are getting yearly incidence rates that are adjusted for age-group and sex. In the second instance (poisson glioma_cases ibn.dg_y...), you are getting yearly incidence rates conditional on AgeGroup = 18 and sex = 2 (i.e. age-sex specific).

              So both are "correct" for particular purposes. It depends on which one you want/need.

              Comment


              • #22
                @Maarten, #16. You are, of course, correct.

                Comment


                • #23
                  Thank you so much Clyde. It helped me a lot.

                  Comment


                  • #24
                    Now, I have age/sex adjusted incidence rates for all years (1970-2013).
                    How could I get overall age adjusted incidence rates, not for individual years.

                    Comment


                    • #25
                      Rerun the -poisson- regresion, omitting the year variable. Then rerun margins (also without mentioning the year variable). (Note, if you want age-adjusted, and not age-sex adjusted, then also omit the sex variable.)

                      Comment

                      Working...
                      X