全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
11192 6
2010-01-29


小弟最近在使用poisson regression的时候遇到点问题,当使用xtpoisson(Conditional fixed-effects Poisson regression)  和poisson时(分类变量设置为dummy)发现,对结果自变量的估计在两个模型一样。但是两个模型的Log likelihood却差很多。小弟想知道为什么会这样,这两个模型的区别是什么,望高人赐教!--注(小弟医学背景,数学不好,望高人细致讲解,谢谢)。

程序和结果如下:




xtset strata

xtpoisson y x, fe  irr

Iteration 0:   log likelihood = -20492.497  
Iteration 1:   log likelihood = -20481.975  
Iteration 2:   log likelihood = -20481.975  

Conditional fixed-effects Poisson regression    Number of obs      =      5096
Group variable: strata                            Number of groups   =       168

                                                Obs per group: min =        26
                                                               avg =      30.3
                                                               max =        31

                                                Wald chi2(1)       =     21.06
Log likelihood  = -20481.975                    Prob > chi2        =    0.0000

------------------------------------------------------------------------------
      y         |        IRR   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
x               |   1.000386   .0000842     4.59   0.000     1.000221    1.000552
------------------------------------------------------------------------------

.
. xi:poisson y  x  i.strata,irr
i.strata            _Istrata_1-168        (naturally coded; _strata_1 omitted)

Iteration 0:   log likelihood = -21350.463  
Iteration 1:   log likelihood =  -21350.19  
Iteration 2:   log likelihood =  -21350.19  

Poisson regression                                Number of obs   =       5096
                                                  LR chi2(168)    =   17845.66
                                                  Prob > chi2     =     0.0000
Log likelihood =  -21350.19                       Pseudo R2       =     0.2947

------------------------------------------------------------------------------
      y         |        IRR   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  x             |   1.000386   .0000842     4.59   0.000     1.000221    1.000552
二维码

扫码加我 拉你入群

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

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

全部回复
2010-4-20 21:29:09
[R] poisson -- Poisson regression


Syntax

        poisson depvar [indepvars] [if] [in] [weight] [, options]

    options                       description
    -------------------------------------------------------------------------
    Model
      noconstant                  suppress constant term
      exposure(varname_e)         include ln(varname_e) in model with
                                    coefficient constrained to 1
      offset(varname_o)           include varname_o in model with coefficient
                                    constrained to 1
      constraints(constraints)    apply specified linear constraints
      collinear                   keep collinear variables

    SE/Robust
      vce(vcetype)                vcetype may be oim, robust, cluster
                                    clustvar, opg, bootstrap, or jackknife

    Reporting
      level(#)                    set confidence level; default is level(95)
      irr                         report incidence-rate ratios
      nocnsreport                 do not display constraints
      display_options             control spacing and display of omitted
                                    variables and base and empty cells

    Maximization
      maximize_options            control the maximization process; seldom
                                    used

    + coeflegend                  display coefficients' legend instead of
                                    coefficient table
    -------------------------------------------------------------------------
    + coeflegend does not appear in the dialog box.
    indepvars may contain factor variables; see fvvarlist.
    depvar, indepvars, varname_e, and varname_o may contain time-series
      operators; see tsvarlist.
    bootstrap, by, fracpoly, jackknife, mfp, mi estimate, nestreg, rolling,
      statsby, stepwise, svy are allowed; see prefix.
    vce(bootstrap) and vce(jackknife) are not allowed with the mi estimate
      prefix.
    Weights are not allowed with the bootstrap prefix.
    vce() and weights are not allowed with the svy prefix.
    fweights, iweights, and pweights are allowed; see weight.
    See [R] poisson postestimation for features available after estimation.


Menu

    Statistics > Count outcomes > Poisson regression


Description

    poisson fits a Poisson regression of depvar on indepvars, where depvar is
    a nonnegative count variable.

    If you have panel data, see [XT] xtpoisson.


Options

        +-------+
    ----+ Model +------------------------------------------------------------

    noconstant, exposure(varname_e), offset(varname_o),
        constraints(constraints), collinear; see [R] estimation options.

        +-----------+
    ----+ SE/Robust +--------------------------------------------------------

    vce(vcetype) specifies the type of standard error reported, which
        includes types that are derived from asymptotic theory, that are
        robust to some kinds of misspecification, that allow for intragroup
        correlation, and that use bootstrap or jackknife methods; see [R]
        vce_option.

        +-----------+
    ----+ Reporting +--------------------------------------------------------

    level(#); see [R] estimation options.

    irr reports estimated coefficients transformed to incidence-rate ratios,
        that is, exp(b) rather than b.  Standard errors and confidence
        intervals are similarly transformed.  This option affects how results
        are displayed, not how they are estimated or stored.  irr may be
        specified at estimation or when replaying previously estimated
        results.

    nocnsreport; see [R] estimation options.

    display_options:  noomitted, vsquish, noemptycells, baselevels,
        allbaselevels; see [R] estimation options.

        +--------------+
    ----+ Maximization +-----------------------------------------------------

    maximize_options:  difficult, technique(algorithm_spec), iterate(#),
        [no]log, trace, gradient, showstep, hessian, showtolerance,
        tolerance(#), ltolerance(#), nrtolerance(#), nonrtolerance,
        from(init_specs); see [R] maximize.  These options are seldom used.

        Setting the optimization type to technique(bhhh) resets the default
        vcetype to vce(opg).

    The following option is available with poisson but is not shown in the
    dialog box:

    coeflegend; see [R] estimation options.
二维码

扫码加我 拉你入群

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

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

2010-4-20 21:30:54
[XT] xtpoisson -- Fixed-effects, random-effects, and population-averaged
                        Poisson models


Syntax

    Random-effects (RE) model

        xtpoisson depvar [indepvars] [if] [in] [weight] [, re RE_options]


    Conditional fixed-effects (FE) model

        xtpoisson depvar [indepvars] [if] [in] [weight] , fe [FE_options]


    Population-averaged (PA) model

        xtpoisson depvar [indepvars] [if] [in] [weight] , pa [PA_options]


    RE_options                   description
    -------------------------------------------------------------------------
    Model
      noconstant                 suppress constant term
      re                         use random-effects estimator; the default
      exposure(varname)          include ln(varname) in model with
                                   coefficient constrained to 1
      offset(varname)            include varname in model with coefficient
                                   constrained to 1
      normal                     use a normal distribution for random effects
                                   instead of gamma
      constraints(constraints)   apply specified linear constraints
      collinear                  keep collinear variables

    SE
      vce(vcetype)               vcetype may be oim, bootstrap, or jackknife

    Reporting
      level(#)                   set confidence level; default is level(95)
      irr                        report incidence-rate ratios
      noskip                     fit constant-only model and perform
                                   likelihood-ratio test
      nocnsreport                do not display constraints
      display_options            control spacing and display of omitted
                                   variables and base and empty cells

    Integration
      intmethod(intmethod)       integration method; intmethod may be
                                   mvaghermite, aghermite, or ghermite;
                                   default is intmethod(mvaghermite)
      intpoints(#)               use # quadrature points; default is
                                   intpoints(12)

    Maximization
      maximize_options           control the maximization process; seldom
                                   used

    + coeflegend                 display coefficients' legend instead of
                                   coefficient table
    -------------------------------------------------------------------------
    + coeflegend does not appear in the dialog box.

    FE_options                   description
    -------------------------------------------------------------------------
    Model
      fe                         use fixed-effects estimator
      noconstant                 suppress constant term
      exposure(varname)          include ln(varname) in model with
                                   coefficient constrained to 1
      offset(varname)            include varname in model with coefficient
                                   constrained to 1
      constraints(constraints)   apply specified linear constraints
      collinear                  keep collinear variables

    SE
      vce(vcetype)               vcetype may be oim, bootstrap, or jackknife

    Reporting
      level(#)                   set confidence level; default is level(95)
      irr                        report incidence-rate ratios
      noskip                     fit constant-only model and perform
                                   likelihood-ratio test
      nocnsreport                do not display constraints
      display_options            control spacing and display of omitted
                                   variables and base and empty cells

    Maximization
      maximize_options           control the maximization process; seldom
                                   used

    + coeflegend                 display coefficients' legend instead of
                                   coefficient table
    -------------------------------------------------------------------------
    + coeflegend does not appear in the dialog box.

    PA_options                   description
    -------------------------------------------------------------------------
    Model
      noconstant                 suppress constant term
      pa                         use population-averaged estimator
      exposure(varname)          include ln(varname) in model with
                                   coefficient constrained to 1
      offset(varname)            include varname in model with coefficient
                                   constrained to 1

    Correlation
      corr(correlation)          within-group correlation structure
      force                      estimate even if observations unequally
                                   spaced in time

    SE/Robust
      vce(vcetype)               vcetype may be conventional, robust,
                                   bootstrap, or jackknife
      nmp                        use divisor N-P instead of the default N
      scale(parm)                override the default scale parameter; parm
                                   may be x2, dev, phi, or #

    Reporting
      level(#)                   set confidence level; default is level(95)
      irr                        report incidence-rate ratios
      display_options            control spacing and display of omitted
                                   variables and base and empty cells

    Optimization
      optimize_options           control the optimization process; seldom
                                   used

    + coeflegend                 display coefficients' legend instead of
                                   coefficient table
    -------------------------------------------------------------------------
    + coeflegend does not appear in the dialog box.

    correlation              description
    -------------------------------------------------------------------------
    exchangeable             exchangeable
    independent              independent
    unstructured             unstructured
    fixed matname            user-specified
    ar #                     autoregressive of order #
    stationary #             stationary of order #
    nonstationary #          nonstationary of order #
    -------------------------------------------------------------------------

    A panel variable must be specified. For xtpoisson, pa, correlation
      structures other than exchangeable and independent require that a time
      variable also be specified.  Use xtset.
    indepvars may contain factor variables; see fvvarlist.
    depvar and indepvars may contain time-series operators; see tsvarlist.
    by and statsby are allowed; see prefix.
    iweights, fweights, and pweights are allowed for the population-averaged
      model, and iweights are allowed in the random-effects and fixed-effects
      models; see weight.  Weights must be constant within panel.
    See [XT] xtpoisson postestimation for features available after
      estimation.


Menu

    Statistics > Longitudinal/panel data > Count outcomes > Poisson
        regression (FE, RE, PA)


Description

    xtpoisson fits random-effects, conditional fixed-effects, and
    population-averaged Poisson models.  Whenever we refer to a fixed-effects
    model, we mean the conditional fixed-effects model.

    By default, the population-averaged model is an equal-correlation model;
    xtpoisson assumes corr(exchangeable).  See [XT] xtgee for details on how
    to fit other population-averaged models.


Options for RE model

        +-------+
    ----+ Model +------------------------------------------------------------

    noconstant; see [R] estimation options.

    re, the default, requests the random-effects estimator.

    exposure(varname), offset(varname); see [R] estimation options.

    normal specifies that the random effects follow a normal distribution
        instead of a gamma distribution.

    constraints(constraints), collinear; see [R] estimation options.

        +----+
    ----+ SE +---------------------------------------------------------------

    vce(vcetype) specifies the type of standard error reported, which
        includes types that are derived from asymptotic theory and that use
        bootstrap or jackknife methods; see [XT] vce_options.

        +-----------+
    ----+ Reporting +--------------------------------------------------------
二维码

扫码加我 拉你入群

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

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

2015-4-1 17:05:27
请问你是用STATA做的poisson分析吗
二维码

扫码加我 拉你入群

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

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

2019-4-23 14:01:45
想问一下fe irr是什么意思呀
二维码

扫码加我 拉你入群

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

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

2021-9-4 21:19:25
Dreammd 发表于 2019-4-23 14:01
想问一下fe irr是什么意思呀
同问irr是什么意思呢?
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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