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: RE: Checking Goodness of Fit after Zero-inflated Poisson
From
Nick Cox <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
RE: st: RE: Checking Goodness of Fit after Zero-inflated Poisson
Date
Sun, 22 May 2011 19:56:54 +0100
You shouldn't need to ask. Your question was already answered in my post.
As the example output shows, -zip- already shows a LR chi-square statistic and a P-value.
Nick
[email protected]
[email protected]
Thanks Nick for your response.
First, sorry for not understanding the name policy. I will sincerely
follow the rules.
Ok, after I run a standard Poisson, I can compute the goodness-of-fit
by using the command -estat gof-. For instance, after I run Poisson,
-estat gof- reports as follows:
. poisson day windcat du50 du100 du150
Iteration 0: log likelihood = -186.58213
Iteration 1: log likelihood = -183.38329
Iteration 2: log likelihood = -183.34036
Iteration 3: log likelihood = -183.34036
Poisson regression Number of obs = 125
LR chi2(4) = 606.33
Prob > chi2 = 0.0000
Log likelihood = -183.34036 Pseudo R2 = 0.6231
------------------------------------------------------------------------------
day | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
windcat | .6731493 .0625124 10.77 0.000 .5506273 .7956713
du50 | 2.550244 .3132588 8.14 0.000 1.936268 3.16422
du100 | 2.144695 .3203497 6.69 0.000 1.516821 2.772568
du150 | 2.07342 .3292282 6.30 0.000 1.428144 2.718695
_cons | -2.008924 .2934786 -6.85 0.000 -2.584132 -1.433716
------------------------------------------------------------------------------
. estat gof
Goodness-of-fit chi2 = 118.6753
Prob > chi2(120) = 0.5170
But, that command does not work after zip. How may I compute the
goodnes-of-fit? Or, does zip already report the goodness-of-fit in its
result table?
Hope this clarifies my question.
Thanks again,
Sangyub Ryu
On Sun, May 22, 2011 at 2:18 PM, Nick Cox <[email protected]> wrote:
> Dear Spring [in?] Athens:
>
> Please note the request in the Statalist FAQ to use real names.
>
> From a -zip- I see output like this
>
> Zero-inflated Poisson regression Number of obs = 250
> Nonzero obs = 108
> Zero obs = 142
>
> Inflation model = logit LR chi2(2) = 506.48
> Log likelihood = -850.7014 Prob > chi2 = 0.0000
>
> ------------------------------------------------------------------------------
> count | Coef. Std. Err. z P>|z| [95% Conf. Interval]
> -------------+----------------------------------------------------------------
> count |
> persons | .8068853 .0453288 17.80 0.000 .7180424 .8957281
> livebait | 1.757289 .2446082 7.18 0.000 1.277866 2.236713
> _cons | -2.178472 .2860289 -7.62 0.000 -2.739078 -1.617865
> -------------+----------------------------------------------------------------
> inflate |
> child | 1.602571 .2797719 5.73 0.000 1.054228 2.150913
> camper | -1.015698 .365259 -2.78 0.005 -1.731593 -.2998038
> _cons | -.4922872 .3114562 -1.58 0.114 -1.10273 .1181558
> ------------------------------------------------------------------------------
>
> What else, precisely, do you have in mind by "goodness of fit"?
>
> Nick
> [email protected]
>
> [email protected]
>
> I am using zero-inflated Poisson regression.
> Unlike a standard Poisson regression, neither -estat gof- nor
> -poisgof- commands report the goodness of fit for a zero-inflated
> Poisson.
> How may I find the goodness of fit for zero-inflated Poisson regression?
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/