全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
8127 6
2016-08-14
stata 零膨胀负二项回归模型中,检验拟合优度,键入poisgof后显示. poisgof
last estimates for poisson not found
r(301);
这种情况要怎么操作。求指教,谢谢!急急~~

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2016-8-15 01:13:57
这个命令不适合零膨胀负二项泊松,只适用于标准的泊松回归。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2016-8-15 19:13:41
hua2007 发表于 2016-8-15 01:13
这个命令不适合零膨胀负二项泊松,只适用于标准的泊松回归。
那是说这个模型不行还是命令错误,命令错误的话是哪个命令?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2016-8-15 19:32:14

搜索和下载 spost13_ado
findit spost13_ado

http://www.indiana.edu/~jslsoc/web_spost13/sp13_install.htm

里面有fitstat命令




Title

    fitstat -- Scalar measures of fit for regression models


General syntax


    fitstat, [ save diff saving(name) using(name) force ic ]


Overview

    fitstat is a post-estimation command that computes measures of fit for the following regression models:
    clogit, cloglog, intreg, logistic, logit, mlogit, nbreg, ocratio, ologit, oprobit, poisson, probit, regress,
    tnbreg, tpoisson, zinb, zip, ztnb, ztp.  With the save and diff options (or saving() and using()), fitstat
    compares fit measures for two models.

    For all models, fitstat reports the log-likelihoods of the full and intercept-only models, the deviance (D),
    the likelihood ratio or Wald chi-square, Akaike's Information Criterion (AIC), AIC/N, and the Bayesian
    Information Criterion (BIC).

    Except for regress, fitstat reports McFadden's R2, McFadden's adjusted R2, the maximum likelihood R2, and
    Cragg & Uhler's R2.  These measures equal R2 for OLS regression.  fitstat reports R2 and the adjusted R2 after
    regress.  fitstat reports the regular and adjusted count R2 for models with categorical outcomes.  For ordered
    or binary logit or probit models, as well as models for censored data (tobit, cnreg, or intreg), it reports
    McKelvey and Zavoina's R2.  In addition, it reports Efron's R2 for logit or probit, and reports Tjur's
    Coefficient of Discrimination for binary outcome models.

    Not all measures are provided for models estimated with pweights or iweights.


Options

    save          saves the computed measures in a matrix for subsequent comparisons.

    saving(name)  is equivalent to save but allows you to save the current model with a name of 16 characters of
                  less.

    diff          compares the fit measures for the current model (i.e., the model in memory) with those saved using
                  save.  If a likelihood-ratio test comparing the two models is permitted by Stata's lrtest command,
                  the results will be presented in the row labeled "p-value".

    using(name)   is equivalent to diff but allow you to refer to saved results by name used with saving().

    force         will provide comparisons and likelihood-ratio test results even if number of observations differs
                  or other differences suggest the comparison is invalid.

    ic            only presents information measures.


Examples

    Compute fit statistics for a single model

        . use mroz,clear
        . logit lfp k5 k618 age wc hc lwg inc
        . fitstat

    Obtain AIC and BIC measures only

        . fitstat, ic

    Compare fit statistics for models

        . logit lfp k5 k618 age wc hc lwg inc
        . fitstat, save
        . logit lfp k5 k618 age age2 wc hc lwg inc
        . fitstat, diff

    Compare fit statistics with named models

        . logit lfp k5 k618 age age2 wc hc lwg inc
        . fitstat, saving(agesq)
        . logit lfp k5 k618 age wc hc lwg inc
        . fitstat, using(agesq)


Citing SPost commands

  When using these commands, we would appreciate it if you would cite:

    J. Scott Long & Jeremy Freese. 2014.  Regression Models for Categorical Dependent Variables Using
     Stata, 3rd Edition.  College Station, TX: Stata Press

  SPost13 website.  Workflow website.


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2016-8-15 19:34:13


. webuse fish


. zip count persons livebait, inflate(child camper)


Fitting constant-only model:


Iteration 0:   log likelihood =  -1347.807  
Iteration 1:   log likelihood = -1305.3245  
Iteration 2:   log likelihood = -1104.3005  
Iteration 3:   log likelihood = -1103.9426  
Iteration 4:   log likelihood = -1103.9425  


Fitting full model:


Iteration 0:   log likelihood = -1103.9425  
Iteration 1:   log likelihood =  -896.2346  
Iteration 2:   log likelihood = -851.61723  
Iteration 3:   log likelihood = -850.70435  
Iteration 4:   log likelihood = -850.70142  
Iteration 5:   log likelihood = -850.70142  


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
------------------------------------------------------------------------------


. fitstat


                         |         zip
-------------------------+-------------
Log-likelihood           |            
                   Model |    -850.701
          Intercept-only |   -1127.023
-------------------------+-------------
Chi-square               |            
       Deviance (df=244) |    1701.403
               LR (df=4) |     552.643
                 p-value |       0.000
-------------------------+-------------
R2                       |            
                McFadden |       0.245
     McFadden (adjusted) |       0.240
            Cox-Snell/ML |       0.890
  Cragg-Uhler/Nagelkerke |       0.890
-------------------------+-------------
IC                       |            
                     AIC |    1713.403
        AIC divided by N |       6.854
              BIC (df=6) |    1734.532


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2016-8-15 20:05:25
蓝色 发表于 2016-8-15 19:32
搜索和下载 spost13_ado
findit spost13_ado
好的,谢谢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群