楼主: wt未来
8230 6

[回归分析求助] stata 零膨胀负二项回归拟合优度问题 [推广有奖]

  • 0关注
  • 0粉丝

高中生

90%

还不是VIP/贵宾

-

威望
0
论坛币
2 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
181 点
帖子
12
精华
0
在线时间
54 小时
注册时间
2013-5-22
最后登录
2018-6-11

楼主
wt未来 发表于 2016-8-14 20:34:14 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
stata 零膨胀负二项回归模型中,检验拟合优度,键入poisgof后显示. poisgof
last estimates for poisson not found
r(301);
这种情况要怎么操作。求指教,谢谢!急急~~

二维码

扫码加我 拉你入群

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

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

关键词:Stata 负二项回归 拟合优度 tata Estimates 模型

沙发
hua2007 发表于 2016-8-15 01:13:57
这个命令不适合零膨胀负二项泊松,只适用于标准的泊松回归。

藤椅
wt未来 发表于 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


地板
wt未来 发表于 2016-8-15 20:05:25
蓝色 发表于 2016-8-15 19:32
搜索和下载 spost13_ado
findit spost13_ado
好的,谢谢

7
wt未来 发表于 2016-8-15 20:05:51
蓝色 发表于 2016-8-15 19:34
. webuse fish
这个的话怎么看数据,新手求指教

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-1 04:54