Thank you All,
When I used
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:
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,
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???)
When I used
Code:
poisson glioma_cases ibn.dg_y ibn.AgeGroup, irr noconstant
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
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