Ali Karim <[email protected]> asks:
> I am using the poisson regression to compare rare events among two groups.
> Now, I need to get the confidence interval of my predicted ir. How do I do
> this?
The easiest way is probably:
. scalar zcrit = invnorm((100+$S_level)/200)
. predict xbeta, xb nooffset
. predict std_xb, stdp nooffset
. predict ir, ir
. gen ci_left = exp(xbeta - scalar(zcrit)*std_xb)
. gen ci_right = exp(xbeta + scalar(zcrit)*std_xb)
. list ci_left ir ci_right
which basically takes a CI for the linear predictor and transforms the
endpoints so that you have a CI for the incidence rate. Note, this only
works because the transformation from linear predictor to IR is monotone.
Use as is for default level, $S_level, or customize to taste.
--Bobby
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/