全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
7217 5
2013-03-23
请问做完ivtobit (use Newey's two-step estimator)回归后如何计算marginal effect?
谢谢!
二维码

扫码加我 拉你入群

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

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

全部回复
2013-3-23 01:23:23
Title

    [R] ivtobit postestimation -- Postestimation tools for ivtobit


Description

    The following postestimation commands are available after ivtobit:

    Command           Description
    -------------------------------------------------------------------------------------------------------------
        contrast      contrasts and ANOVA-style joint tests of estimates
    (1) estat         AIC, BIC, VCE, and estimation sample summary
        estat (svy)   postestimation statistics for survey data
        estimates     cataloging estimation results
        hausman       Hausman's specification test
        lincom        point estimates, standard errors, testing, and inference for linear combinations of
                        coefficients
    (2) lrtest        likelihood-ratio test; not available with two-step estimator
        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
    (1) suest         seemingly unrelated estimation
        test          Wald tests of simple and composite linear hypotheses
        testnl        Wald tests of nonlinear hypotheses
    -------------------------------------------------------------------------------------------------------------
    (1) estat ic and suest are not appropriate after ivtobit, twostep.
    (2) lrtest is not appropriate with svy estimation results.


Syntax for predict

    After ML or twostep

        predict [type] newvar [if] [in] [, statistic]

    After ML

        predict [type] {stub*|newvarlist} [if] [in] , scores

    statistic       Description
    -------------------------------------------------------------------------------------------------------------
    Main
      xb            linear prediction; the default
      stdp          standard error of the linear prediction
      stdf          standard error of the forecast; not available with two-step estimator
      pr(a,b)       Pr(a < y < b); not available with two-step estimator
      e(a,b)        E(y | a < y < b); not available with two-step estimator
      ystar(a,b)    E(y*), y* = max{a,min(y,b)}; not available with two-step estimator
    -------------------------------------------------------------------------------------------------------------
    These statistics are available both in and out of sample; type predict ... if e(sample) ... if wanted only
      for the estimation sample.
    stdf is not allowed with svy estimation results.

    where a and b may be numbers or variables; a missing (a > .) means minus infinity, and b missing (b > .)
      means plus infinity; see missing.


Menu

    Statistics > Postestimation > Predictions, residuals, etc.


Options for predict

        +------+
    ----+ Main +-------------------------------------------------------------------------------------------------

    xb, the default, calculates the linear prediction.

    stdp calculates the standard error of the linear prediction.  It can be thought of as the standard error of
        the predicted expected value or mean for the observation's covariate pattern.  The standard error of the
        prediction is also referred to as the standard error of the fitted value.

    stdf calculates the standard error of the forecast, which is the standard error of the point prediction for 1
        observation.  It is commonly referred to as the standard error of the future or forecast value.  By
        construction, the standard errors produced by stdf are always larger than those produced by stdp; see
        Methods and formulas in [R] regress.  stdf is not available with the two-step estimator.

    pr(a,b) calculates Pr(a < xb + u < b), the probability that y|x would be observed in the interval (a,b).

        a and b may be specified as numbers or variable names; lb and ub are variable names;
        pr(20,30) calculates Pr(20 < xb + u < 30);
        pr(lb,ub) calculates Pr(lb < xb + u < ub); and
        pr(20,ub) calculates Pr(20 < xb + u < ub).

        a missing (a > .) means minus infinity; pr(.,30) calculates Pr(-infinity < xb + u < 30);
        pr(lb,30) calculates Pr(-infinity < xb + u < 30) in observations for which lb > .
        and calculates Pr(lb < xb + u < 30) elsewhere.

        b missing (b > .) means plus infinity; pr(20,.) calculates Pr(+infinity > xb + u > 20);
        pr(20,ub) calculates Pr(+infinity > xb + u > 20) in observations for which ub > .
        and calculates Pr(20 < xb + u < ub) elsewhere.

    e(a,b) calculates E(xb + u | a < xb + u < b), the expected value of y|x conditional on y|x being in the
        interval (a,b), meaning that y|x is truncated.  a and b are specified as they are for pr().  e(a,b) is
        not available with the two-step estimator.

    ystar(a,b) calculates E(y*), where y* = a if xb + u < a, y* = b if xb + u > b, and y* = xb + u otherwise,
        meaning that y* is censored.  a and b are specified as they are for pr().  ystar(a,b) is not available
        with the two-step estimator.

    scores, not available with twostep, calculates equation-level score variables.

        For models with one endogenous regressor, five new variables are created.

            The first new variable will contain the first derivative of the log likelihood with respect to the
            probit equation.

            The second new variable will contain the first derivative of the log likelihood with respect to the
            reduced-form equation for the endogenous regressor.

            The third new variable will contain the first derivative of the log likelihood with respect to alpha.

            The fourth new variable will contain the first derivative of the log likelihood with respect to
            ln(s).

            The fifth new variable will contain the first derivative of the log likelihood with respect to ln(v).

        For models with j endogenous regressors, j + {(j + 1)(j + 2)}/2 + 1 new variables are created.

            The first new variable will contain the first derivative of the log likelihood with respect to the
            tobit equation.

            The second through (j + 1)th new variables will contain the first derivatives of the log likelihood
            with respect to the reduced-form equations for the endogenous variables in the order they were
            specified when ivtobit was called.

            The remaining score variables will contain the partial derivatives of the log likelihood with respect
            to s[1,1], s[2,1], s[3,1], ..., s[j+1,1], s[2,2], ..., s[j+1,2], ..., s[j+1,j+1], where s[m,n]
            denotes the (m,n) element of the Cholesky decomposition of the error covariance matrix.


Examples

    Setup
        . webuse laborsup
        . ivtobit fem_inc fem_educ kids (other_inc = male_educ), ll

    Compute average marginal effects on expected income, conditional on it being greater than 10 (thousand
    dollars)
        . margins, predict(e(10,.)) dydx(other_inc fem_educ kids)

    Estimate separately for women with 8, 12, and 16 years of education
        . margins, predict(e(10,.)) dydx(kids) at(fem_educ=(8(4)16))

    Plot most recent estimates and confidence intervals
        . marginsplot

二维码

扫码加我 拉你入群

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

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

2013-3-23 01:30:52
蓝色 发表于 2013-3-23 01:23
Title

    [R] ivtobit postestimation -- Postestimation tools for ivtobit
pr(a,b)       Pr(a < y < b); not available with two-step estimator
e(a,b)        E(y | a < y < b); not available with two-step estimator
我想要的就是这两个值,但都不用于two-step estimator做出来的回归
求解!多谢!
二维码

扫码加我 拉你入群

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

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

2013-3-26 03:01:33
stata公司的人水平应该不错的,应该比我们强吧
人家既然说twostep 不能算,肯定是有原因的。
或者就是理论上就不行
二维码

扫码加我 拉你入群

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

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

2013-3-26 21:42:16
蓝色 发表于 2013-3-26 03:01
stata公司的人水平应该不错的,应该比我们强吧
人家既然说twostep 不能算,肯定是有原因的。
或者就是理论 ...
嗯,多谢版主~我就想问问有没有其他方法来着~多谢解答!
二维码

扫码加我 拉你入群

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

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

2015-2-12 00:15:38
jose.liupei 发表于 2013-3-23 01:30
pr(a,b)       Pr(a < y < b); not available with two-step estimator
e(a,b)        E(y | a < y < b) ...
您好,想向您请教一下,这两个在算边际值时有什么差别吗,我也看过help手册,但由于法学出身正在狂补统计学,能否能指导一下,十分感谢。
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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