[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: ci for ir after poisson
Ali Karim <firstname.lastname@example.org> 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
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: