Dear Statalist,
I am using a negative binomial (nbreg) to model the number of events in geographical units, with exposure term for the number of individuals at risk in each unit. I am trying to better understand how exposure is constructed and interpreted:
1. I want to show substantive effect of some independent variables of interest. When I use postestimation commands such as margins and margins plot, will they automatically account for the exposure term?
In an earlier post about use of offset command, Sam said that:
So a predicted value from a nbreg with exposure term gives me rates per individual at risk and if I wanted to obtain a predicted number of events in each unit, I would need to multiply it by exposure_term?
2. If I wanted to construct predicted values by hand, is it correct to think that I can calculate it as y=exp(b_0+sum(b_i*x_i)+ln(exposure_term))? When entered through exposure command, the coefficient for exposure_term is set to be equal to 1, the coefficient for ln(exposure_term) is not exactly equal to 1, so I am not sure whether I need to adjust something else and how.
Any suggestions/hints would be greatly appreciated.
Thanks,
Juta
I am using a negative binomial (nbreg) to model the number of events in geographical units, with exposure term for the number of individuals at risk in each unit. I am trying to better understand how exposure is constructed and interpreted:
1. I want to show substantive effect of some independent variables of interest. When I use postestimation commands such as margins and margins plot, will they automatically account for the exposure term?
In an earlier post about use of offset command, Sam said that:
By constraining the coefficient of the exposure variable to equal one you transform the model into a model of rates (e.g., injuries per unit of exposure instead of the probability that the person will be injured).
2. If I wanted to construct predicted values by hand, is it correct to think that I can calculate it as y=exp(b_0+sum(b_i*x_i)+ln(exposure_term))? When entered through exposure command, the coefficient for exposure_term is set to be equal to 1, the coefficient for ln(exposure_term) is not exactly equal to 1, so I am not sure whether I need to adjust something else and how.
Any suggestions/hints would be greatly appreciated.
Thanks,
Juta
Comment