Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Recreating Confidence Intervals after Poisson Regression


From   Tim Wade <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Recreating Confidence Intervals after Poisson Regression
Date   Wed, 10 Jul 2013 21:06:47 -0400

Not sure if this is what you are trying to do, but you can use lincom
to get the standard error of the coefficient directly if you don't
want to extract it from the variance matrix:

. sysuse auto.dta
(1978 Automobile Data)
. poisson gear_ratio mpg weight, robust
note: you are responsible for interpretation of noncount dep. variable
Iteration 0: log pseudolikelihood = -111.54809
Iteration 1: log pseudolikelihood = -111.54809

Poisson regression Number of obs = 74
Wald chi2(2) = 120.06
Prob > chi2 = 0.0000
Log pseudolikelihood = -111.54809 Pseudo R2 = 0.0129
------------------------------------------------------------------------------
| Robust
gear_ratio | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
mpg | -.0002266 .0032491 -0.07 0.944 -.0065947 .0061416
weight | -.0001508 .0000208 -7.26 0.000 -.0001915 -.0001101
_cons | 1.557136 .1248935 12.47 0.000 1.312349 1.801923
------------------------------------------------------------------------------
. lincom mpg
( 1) [gear_ratio]mpg = 0
------------------------------------------------------------------------------
gear_ratio | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
(1) | -.0002266 .0032491 -0.07 0.944 -.0065947 .0061416
------------------------------------------------------------------------------
. di r(estimate)+1.959964*r(se)
.00614156
. di r(estimate)-1.959964*r(se)
-.00659472

so you could store these as scalars

Tim


On Wed, Jul 10, 2013 at 7:35 PM, Garret Christensen
<[email protected]> wrote:
>
> I'm interested in working with (read: using as scalars) the confidence intervals created by a Poisson regression.
>
>
> If I were doing a linear regression, I'd just do what they say here
> http://www.maartenbuis.nl/publications/p-value.pdf, which is:
>
> reg outcome treatment, robust
> local l95=_b[treatment] -
>  invttail(e(df_r),0.025)*_se[treatment]
> local u95=_b[treatment] + invttail(e(df_r),0.025)*_se[treatment]
>
> But a Poisson regression like the following:
> poisson outcome treatment, robust
>
> doesn't have the residual degrees of freedom (e(df_r)), and even if it did, I
> don't think that's how Stata is creating the confidence intervals. There must be some other simple (complicated?) formula I can use to recreate
> CI's, given the stored values after a Poisson regression. Any
> suggestions?
>
> thanks,
> Garret Christensen
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index