When running my Poisson regression model (dep var [dth]), STATA defaults the denominator of the relative risk calculation to the 'lowest'/'first' group of the independent categorical variable of interest (i.e., [age] --> 4 categories).
I want to generate relative risks using the 'highest'/'oldest' group of my categorical variable (or others, potentially) in the denominator. How do I do this? I have gone through STATA help documentation, STATA YouTube channel etc., etc. ad nauseum -- no luck...
I am using STATA v 13.1.
Examples of my attempts thus far:
---------------------------------------------------------------------
poisson dth age, exposure(personyrs) irr
*this just provides the IRRs with the 'first'/'lowest' group as the denominator...
*how to make 'highest'/'last' group the denominator in IRR??
xi: poisson dth i.age, exposure(personyrs) irr
*same results as above
xi: poisson dth i.age_75, exposure(personyrs) irr
*produces an error
*trying to specify which group I want in the denominator vs. default using poisson model... have generated reverse categories for age (i.e., agegrp) using oldest age as 'first' group...
xi: poisson dth i.agegrp_75, exposure(personyrs) irr
*error
*don't know what else to do...
xi: poisson dth i.age==75, exposure(personyrs) irr
*error
xi: poisson dth _Iage_75 , exposure(personyrs) irr
*error
*going to try lincom command as per an example that looks similar
xi: poisson dth i.age, exposure(personyrs) irr
lincom _Iage_75, irr
lincom _Iage_50, irr
*produces exact same results as regression model i.e., 'first'/'lowest' category is denominator... (??!??)
---------------------------------------------------------------------
Thanks in advance for any insight anyone might be able/willing to offer!!
D.
I want to generate relative risks using the 'highest'/'oldest' group of my categorical variable (or others, potentially) in the denominator. How do I do this? I have gone through STATA help documentation, STATA YouTube channel etc., etc. ad nauseum -- no luck...
I am using STATA v 13.1.
Examples of my attempts thus far:
---------------------------------------------------------------------
poisson dth age, exposure(personyrs) irr
*this just provides the IRRs with the 'first'/'lowest' group as the denominator...
*how to make 'highest'/'last' group the denominator in IRR??
xi: poisson dth i.age, exposure(personyrs) irr
*same results as above
xi: poisson dth i.age_75, exposure(personyrs) irr
*produces an error
*trying to specify which group I want in the denominator vs. default using poisson model... have generated reverse categories for age (i.e., agegrp) using oldest age as 'first' group...
xi: poisson dth i.agegrp_75, exposure(personyrs) irr
*error
*don't know what else to do...
xi: poisson dth i.age==75, exposure(personyrs) irr
*error
xi: poisson dth _Iage_75 , exposure(personyrs) irr
*error
*going to try lincom command as per an example that looks similar
xi: poisson dth i.age, exposure(personyrs) irr
lincom _Iage_75, irr
lincom _Iage_50, irr
*produces exact same results as regression model i.e., 'first'/'lowest' category is denominator... (??!??)
---------------------------------------------------------------------
Thanks in advance for any insight anyone might be able/willing to offer!!
D.
Comment