Chamberlain-Mundlak 设备 CRE Probit 的平均边际效应

机器算法验证 面板数据 固定效应模型 边际效应
2022-04-02 00:15:40

我正在尝试计算 Chamberlain-Mundlak 相关随机效应概率模型的平均边际效应。最终目标是从固定效应面板 logit 中获得与 AME 等效的东西。后者的问题在于它在估计之前消除了 FE,因此无法将它们包含在 AME 中。

据我了解,一种可能的方法是拟合一个面板随机效应概率,其中 RHS 变量增加了 ,每个面板的平均值。这是张伯伦-蒙德拉克 CRE。包含均值项应捕获未观察到的异质性与使随机效应模型不一致的协变量之间的相关性。x¯ixit

如果我理解 Jeff Wooldridge 的笔记(第 40 页),AME 将是 RE 概率模型的导数

1Ni=1NΦ(xitβ^a+ψ^a+x¯iξ^a)

关于xβ^a=β^(1+σ^2)

那将意味着

AME=1Ni=1Nϕ(xitβ^a+ψ^a+x¯iξ^a)βa(1+σ^2)

这意味着我只需要像 JW在第 52 页上所做的那样使用指数函数系数来衡量 RE 面板概率的普通平均边际效应。

然而,我得到的估计与他建议的不需要重新缩放的其他等效方法有很大不同,比如 pooled probit、xtgee 和 GLM,甚至 FE OLS(所有这些都非常相似)。我正在努力弄清楚为什么会这样。


这是我的Stata代码:

set more off
estimates drop _all
copy https://mitpress.mit.edu/sites/default/files/titles/content/wooldridge/statafiles.zip statafiles.zip, replace
unzipfile statafiles.zip, replace
use "lfp.dta", clear

xtset id period // balanced panel

/* Calculate means of covariates for each id */
foreach var of varlist kids lhinc {
    egen `var'bar = mean(`var'), by(id)
}

/* (1) FE Panel Logit */
qui xtlogit lfp kids lhinc i.period, fe nolog
margins, dydx(kids lhinc) post
estimates store m1, title("Panel Logit FE") // these set the FE to its average of zero

/* (2) FE Linear Panel Model */
qui xtreg lfp kids lhinc i.period, fe cluster(id)
margins, dydx(kids lhinc) post
estimates store m2, title("Panel FE")

/* (3) Pooled Probit (Inefficient Relative to CRE) */
probit lfp kids lhinc kidsbar lhincbar educ i.black c.age##c.age i.period, cluster(id) nolog
margins, dydx(kids lhinc) post
estimates store m3, title("Pooled Probit")

/* (4) GEE may be more efficient */
qui xtgee lfp kids lhinc kidsbar lhincbar educ i.black c.age##c.age i.period, ///
fam(bin) link(probit) corr(exch) robust nolog
margins, dydx(kids lhinc) post
estimates store m4, title("Panel GEE")

/* (5) GLM */
qui glm lfp kids lhinc kidsbar lhincbar educ i.black c.age##c.age i.period, ///
fam(bin) link(probit) cluster(id) nolog
margins, dydx(kids lhinc) post
estimates store m5, title("GLM")

/* (6) Chamberlain-Mundlak Device Style Correlated Random Effects Probit */ 
/* ("Style" means also adding other time-invariant variables) */
qui xtprobit lfp kids lhinc kidsbar lhincbar educ i.black c.age##c.age i.period, re nolog

/* (a) Scaled coefficients to compare with pooled index function probit ones in (3) */
di (1/sqrt(1 + e(sigma_u)^2))*_b[kids]
di (1/sqrt(1 + e(sigma_u)^2))*_b[lhinc]
local factor = 1/sqrt(1 + e(sigma_u)^2) // scale factor

/* (b) CRE MEs Attempt #1 */
margins, expression(normalden(xb())*(_b[kids])*(1/sqrt(1 + e(sigma_u)^2))) force
margins, expression(normalden(xb())*(_b[lhinc])*(1/sqrt(1 + e(sigma_u)^2))) force

/* (c) CRE MEs Attempt #2 */
margins, dydx(kids lhinc) post
estimates store m6, title("CRE")

/* (d) CRE MEs Attempt #3 */
nlcom (kids:_b[kids]*`factor') (lhinc:_b[lhinc]*`factor')

esttab *, se mtitle modelwidth(15)

这产生:

 esttab *, se mtitle modelwidth(15)

------------------------------------------------------------------------------------------------------------------------------
                         (1)                (2)                (3)                (4)                (5)                (6)   
              Panel Logit FE           Panel FE      Pooled Probit          Panel GEE                GLM                CRE   
------------------------------------------------------------------------------------------------------------------------------
kids                 -0.0507*           -0.0389***         -0.0389***         -0.0373***         -0.0389***         -0.0302***
                    (0.0254)          (0.00917)          (0.00892)          (0.00932)          (0.00892)          (0.00533)   

lhinc                -0.0145***        -0.00894           -0.00954*          -0.00917           -0.00954*          -0.00762*  
                   (0.00150)          (0.00459)          (0.00475)          (0.00491)          (0.00475)          (0.00357)   
------------------------------------------------------------------------------------------------------------------------------
N                       5275              28315              28315              28315              28315              28315   
------------------------------------------------------------------------------------------------------------------------------
Standard errors in parentheses
* p<0.05, ** p<0.01, *** p<0.001

(1) 非常不同,因为 FE logit 忽略了 FE。(2)-(5) 都非常相似。未缩放的 CRE AME 如 (6) 所示。

我尝试了 3 种缩放这些的方法(所有这些看起来都比未缩放的版本更多):

. qui xtprobit lfp kids lhinc kidsbar lhincbar educ i.black c.age##c.age i.period, re nolog

. 
. /* (a) Scaled coefficients to compare with pooled index function probit ones in (3) */
. di (1/sqrt(1 + e(sigma_u)^2))*_b[kids]
-.08865639

. di (1/sqrt(1 + e(sigma_u)^2))*_b[lhinc]
-.02240692

. local factor = 1/sqrt(1 + e(sigma_u)^2) // scale factor

. 
. /* (b) CRE MEs Attempt #1 */
. margins, expression(normalden(xb())*(_b[kids])*(1/sqrt(1 + e(sigma_u)^2))) force
(note: expression is a function of possibly stochastic quantities other than e(b))

Predictive margins                              Number of obs     =     28,315
Model VCE    : OIM

Expression   : normalden(xb())*(_b[kids])*(1/sqrt(1 + e(sigma_u)^2))

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       _cons |  -.0061709   .0011396    -5.41   0.000    -.0084045   -.0039372
------------------------------------------------------------------------------

. margins, expression(normalden(xb())*(_b[lhinc])*(1/sqrt(1 + e(sigma_u)^2))) force
(note: expression is a function of possibly stochastic quantities other than e(b))

Predictive margins                              Number of obs     =     28,315
Model VCE    : OIM

Expression   : normalden(xb())*(_b[lhinc])*(1/sqrt(1 + e(sigma_u)^2))

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       _cons |  -.0015596   .0007353    -2.12   0.034    -.0030008   -.0001185
------------------------------------------------------------------------------

. 
. /* (c) CRE MEs Attempt #2 */
. margins, dydx(kids lhinc) post

Average marginal effects                        Number of obs     =     28,315
Model VCE    : OIM

Expression   : Pr(lfp=1), predict(pr)
dy/dx w.r.t. : kids lhinc

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        kids |  -.0301539   .0053261    -5.66   0.000    -.0405928   -.0197149
       lhinc |  -.0076211   .0035696    -2.13   0.033    -.0146174   -.0006247
------------------------------------------------------------------------------

. estimates store m6, title("CRE")

. 
. /* (d) CRE MEs Attempt #3 */
. nlcom (kids:_b[kids]*`factor') (lhinc:_b[lhinc]*`factor')

        kids:  _b[kids]*.2233101065698412
       lhinc:  _b[lhinc]*.2233101065698412

------------------------------------------------------------------------------
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        kids |  -.0067337   .0011894    -5.66   0.000    -.0090648   -.0044025
       lhinc |  -.0017019   .0007971    -2.13   0.033    -.0032642   -.0001395
------------------------------------------------------------------------------
0个回答
没有发现任何回复~