Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: ci for ir after poisson


From   rgutierrez@stata.com (Roberto G. Gutierrez, StataCorp.)
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: ci for ir after poisson
Date   Tue, 10 Sep 2002 17:03:56 -0500

Ali Karim <mehryar@hotmail.com> 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
rgutierrez@stata.com
*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index