全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
2418 4
2015-10-17
xtlogit 执行完以后要做概率估计也是
predict p 这个p就是其对应的概率吗
二维码

扫码加我 拉你入群

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

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

全部回复
2015-10-17 16:37:55
看pdf的manual或者help里面的解释和例子
特别是选项


Title
    [XT] xtlogit postestimation -- Postestimation tools for xtlogit
Description
    The following postestimation commands are available after xtlogit:
    Command              Description
    -----------------------------------------------------------------------------------------------------------
        contrast         contrasts and ANOVA-style joint tests of estimates
    (1) estat ic         Akaike's and Schwarz's Bayesian information criteria (AIC and BIC)
        estat summarize  summary statistics for the estimation sample
        estat vce        variance-covariance matrix of the estimators (VCE)
        estimates        cataloging estimation results
    (2) forecast         dynamic forecasts and simulations
        hausman          Hausman's specification test
        lincom           point estimates, standard errors, testing, and inference for linear combinations of
                           coefficients
        lrtest           likelihood-ratio test
    (3) margins          marginal means, predictive margins, marginal effects, and average marginal effects
        marginsplot      graph the results from margins (profile plots, interaction plots, etc.)
        nlcom            point estimates, standard errors, testing, and inference for nonlinear combinations of
                           coefficients
        predict          predictions, residuals, influence statistics, and other diagnostic measures
        predictnl        point estimates, standard errors, testing, and inference for generalized predictions
        pwcompare        pairwise comparisons of estimates
        test             Wald tests of simple and composite linear hypotheses
        testnl           Wald tests of nonlinear hypotheses
    -----------------------------------------------------------------------------------------------------------
    (1) estat ic is not appropriate after xtlogit, pa.
    (2) forecast is not appropriate with mi estimation results or after xtlogit, fe.
    (3) The default prediction statistic for xtlogit, fe, pu1, cannot be correctly handled by margins; however,
        margins can be used after xtlogit, fe with the predict(pu0) option or the predict(xb) option.

Syntax for predict
    Random-effects model
        predict [type] newvar [if] [in] [, RE_statistic nooffset]
    Fixed-effects model
        predict [type] newvar [if] [in] [, FE_statistic nooffset]
    Population-averaged model
        predict [type] newvar [if] [in] [, PA_statistic nooffset]

    RE_statistic       Description
    -----------------------------------------------------------------------------------------------------------
    Main
      xb               linear prediction; the default
      pu0              probability of a positive outcome assuming the random effect is zero

      stdp             standard error of the linear prediction
    -----------------------------------------------------------------------------------------------------------
    FE_statistic       Description
    -----------------------------------------------------------------------------------------------------------
    Main
      pc1              probability of a positive outcome conditional on one positive outcome within group; the default
      pu0              probability of a positive outcome assuming the fixed effect is zero
      xb               linear prediction

      stdp             standard error of the linear prediction
    -----------------------------------------------------------------------------------------------------------
    PA_statistic       Description
    -----------------------------------------------------------------------------------------------------------
    Main
      mu               probability of depvar; considers the offset()
      rate             probability of depvar
      xb               linear prediction

      stdp             standard error of the linear prediction
      score            first derivative of the log likelihood with respect to xb
    -----------------------------------------------------------------------------------------------------------
    These statistics are available both in and out of sample; type predict ... if e(sample) ... if wanted only
      for the estimation sample.
    The predicted probability for the fixed-effects model is conditional on there being only one outcome per
      group.  See [R] clogit for details.

Menu for predict
    Statistics > Postestimation > Predictions, residuals, etc.
Options for predict
        +------+
    ----+ Main +-----------------------------------------------------------------------------------------------
    xb calculates the linear prediction.  This is the default for the random-effects model.


    pc1 calculates the predicted probability of a positive outcome conditional on one positive outcome within
        group.  This is the default for the fixed-effects model.

    mu and rate both calculate the predicted probability of depvar.  mu takes into account the offset(), and
        rate ignores those adjustments.  mu and rate are equivalent if you did not specify offset().  mu is the
        default for the population-averaged model.

    pu0 calculates the probability of a positive outcome, assuming that the fixed or random effect for that
        observation's panel is zero.  This may not be similar to the proportion of observed outcomes in the
        group.

    stdp calculates the standard error of the linear prediction.

    score calculates the equation-level score.

      nooffset is relevant only if you specified offset(varname) for xtlogit.  This option modifies the
        calculations made by predict so that they ignore the offset variable; the linear prediction is treated
        as xb rather than xb + offset.
Examples
    Setup
        . webuse union

    Fit random-effects model
        . xtlogit union age grade i.south

    Compute probability of positive outcome, assuming random effect is zero
        . predict prob, pu0

    Fit population-averaged model
        . xtlogit union age grade i.south, pa

    Compute predicted probability of union
        . predict unionpr, mu

    Compute average marginal effect of age on probability of union
        . margins, dydx(age)



二维码

扫码加我 拉你入群

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

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

2015-10-17 23:38:49
谢谢大神相助!请问完整版的manual要在哪里下载,或者能否发一份给我729957618@qq.com?不甚感激!
二维码

扫码加我 拉你入群

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

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

2015-10-18 00:22:34
是用fe还是re使用hausman检验吗
具体命令和原来一样吗
二维码

扫码加我 拉你入群

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

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

2015-10-18 00:33:30
我用xtlogit y x1 x2
不论用predict p
还是predict p,pc1
还是predict p,pu0
都有好多缺失值,
我想得到y的概率,应该用什么命令?
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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