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

Re: st: ci for ir after poisson

From (Roberto G. Gutierrez, StataCorp.)
Subject   Re: st: ci for ir after poisson
Date   Tue, 10 Sep 2002 17:03:56 -0500

Ali Karim <> 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.

*   For searches and help try:

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