查看原文
其他

Heckman模型out了,内生转换模型掌控大局

计量经济圈 计量经济圈 2019-06-30



欢迎投稿(荐稿)计量经济圈,计量相关都行

箱:econometrics666@sina.cn

copyright@计量经济圈(ID: econometrics666),有需要do文件的进入计量经济圈社群直接提取,今后很有可能do文件只放在社群。多逛逛计量经济圈这个中国计量第一大社区,最好进入咱们的社群进一步学习和交流。


Heckman选择模型与内生转化模型的区别:Heckman模型关注的是那个可观察的方程,然后研究两变量之间的关系。比如,研究有没有小孩与工资之间的关系,那么对于那些没有工作的人,工资这个被解释变量为missing value,因此我们此时就存在样本选择偏差,那Heckman模型更多的通过从观察到的样本得到一个mills ratio比例,从而纠正这个样本的分布,从而估计出两者之间的关系。


但内生转化模型是同时关注两个状态下的情况,即那有工作的与没有工作的都关注,然后去推演两者之间的关系。之所以强调内生,是因为我们的选择方程比如是否加入工会,会同时受到比如公共部门的工资和私有部门的工资的影响。要晓得,还有外生转换模型,called exogenous switching model.


 内生转换模型能够由两阶段最小二乘法或最大似然估计得到,但是这两种方法会让模型估计出的参数有效性降低。这些估计方法需要很繁琐的调整,来得到一致的标准误差。我们接下来会介绍到的movestay命令,通过完全信息极大似然方法能够同时估计二值选择部分和连续部分,从而获得一致的标准误差。这个方法的前提是,二值选择方程和连续部分的方程的误差项需要服从联合正太分布。在劳动经济学领域,房产需求预测以及市场失衡等建模方面,内生转换模型已经变成了中流砥柱的内生选择偏差修正模型。


我们使用movestay命令,来估计一个个体在公共部门和私有部门工作工资的差异性。


Ii* 是个潜变量,它来决定一个个体是选择公共部门还是私有部门上班。W1i和W2i分别表示一个个体在私有部门工作的工资和在公共部门工作的工资。Zi是那些会影响一个个体对部门选择的因素。Xi是那些影响一个个体工资的因素。β1和β2,γ是我们待估计的参数。这个工作部门选择方程Ii有如下的表达式,即潜变量Ii*大于0,这个个体就选择在私有部门工作,否则选择在公共部门工作。


但是,正如我们上面4.3式所看到的那样,部门选择方程本身实际上是内生于工资的,也就是说哪个部门给的工资高,在其他条件一样的情况下,这个个体都应当会选择那个部门去工作。而且,一些没有观测到的但会影响个体选择哪个部门工作的因素,往往也可能会影响到这个个体在工作时获得的工资。如果我们忽略了这些选择性效应,可能会导致一些错误的结论,比如公共部门的工资高一些。我们即将使用的这个ML估计式可以修正选择偏差。

 

粗暴简单地放上代码和操作,根据上文

**movestay模型估计-------------------------------

ssc install movestay  //先安装这个程序

use "http://www.adeptanalytics.org/download/ado/movestay/movestay_example.dta", clear //使用数据


global str age age2 edu13 edu4 edu5 reg2 reg3 reg4 //定义全局变量


movestay (lmo_wage = $str), select(private= $str m_s1 job_hold) ///
 //lmo_wage:月收入, edu13,1du4,edu5:教育, reg2,reg3,reg4: 区域虚拟变量


在这个例子里,private是一个0-1虚拟变量,如果个体选择了私有部门工作,那他等于1,不然就等于0。个体的工资是受到年龄,年龄的平方,教育程度,所在区域这些因素影响的。在部门选择方程中,除了上面提及到的因素外,我们还包括了个体的婚姻状况和家庭中的工作人数,因为这两个因素会影响个体的部门选择,但是不可能影响市场上的工资。

部门选择方程的回归结果在select部分,lmo_wage1是私有部门的工资回归方程,lmo_wage0是公共部门的工资回归方程。表格下方的rho_0和rho_1的相关系数都为正,但只有rho_0是显著的,因此我们可以说,选择在公共部门工作的个体的工资比在样本中的一个随机个体本来能够获得的要低,但选择在私有部门工作的个体的工资既没有比随机个体要好也没有见着要差。最后一列显示的是似然比检验,p值小于0,因此我们认为这三个方程之间是关联在一起的。

 

给大家参考这三篇文章,都是用到了内生转换模型。

The union-nonunion model of Lee (1978) investigates the joint determination of the extent of unionism and the effects of unions on wage rates. The propensity to join a union depends on the net wage gains that might result from trade union membership. The paper explicitly models the interdependence between the wage gain equation and the union membership equation. 

 

• Adamchik and Bedi (2000) use data from Poland to examine whether there are any wage differentials of workers in the public and private sectors. The paper interprets sectoral wage differentials in terms of expected benefits and the desirability of working in a particular sector.

 

• Thorst (1977) models the housing-demand problem by examining the expenditures on housing services in owner-occupied and rental housing. The study models the individual decision to own or rent a house and the amount spent on housing services. 


以下是Heckman的估计结果


Heckman方法其实也可以得出类似的估计结果,不过我们认为这两种方法各自有自己擅长的,那种内生性的regime自然更加适合使用movestay。
**heckman模型估计私有部门不可观测-------------------------------
replace lmo_wage=. if private==1


heckman lmo_wage age age2 edu13 edu4 edu5 reg2 reg3 reg4, ///
select(age age2 edu13 edu4 edu5 reg2 reg3 reg4 m_s1 job_hold) nolog


**heckman两步法模型估计-------------------------------
heckman lmo_wage age age2 edu13 edu4 edu5 reg2 reg3 reg4, ///
select(age age2 edu13 edu4 edu5 reg2 reg3 reg4 m_s1 job_hold) twostep nolog


**heckman模型估计公共部门没有数值-------------------------------
 use "http://www.adeptanalytics.org/download/ado/movestay/movestay_example.dta", clear //使用数据


gen wage1=lmo_wage


replace wage1=. if private==0


heckman wage1 age age2 edu13 edu4 edu5 reg2 reg3 reg4, ///
 select(age age2 edu13 edu4 edu5 reg2 reg3 reg4 m_s1 job_hold) nolog



下面给圈友介绍一下通过PSM和Heckman都可以修正选择偏误:PSM修正由于可观测因素导致的选择偏误,Heckman修正由于不可观测因素导致的选择性偏误。


“Selection bias due to observables” arises from sample differences that researchers can observe but fail to control. “Selection bias due to unobservables” arises from the unobservable and thus uncontrolled sample differences that affect managers’ decisions and their consequences. In this article I review two econometric tools developed to mitigate these biases—the propensity score matching (PSM) method to mitigate selection bias due to observables and the Heckman inverse-Mills-ratio (IMR) method to address selection bias due to unobservables—and discuss their applications in accounting and finance research. The article has four takeaways. First, researchers should select the correct method to alleviate potential selection bias: the PSM method mitigates selection bias due to observables, but does not alleviate selection bias due to unobservables.


Second, in applying PSM researchers are advised to restrict their inferences to firms whose characteristics can be found in both the sample and control groups. Third, the IMR method, though popular, is limited to situations in which the choices are binary, the outcomes of choices are modeled in a linear regression, and the unobservables in the choice and outcome models follow multivariate normal distribution. Researchers can overcome these constraints by using full information maximum likelihood estimation. Last, when the IMR method is used, special attention should be paid to the formulas in calculating IMRs.


附上一篇相关文章

链接: https://pan.baidu.com/s/12hc3l-U9HaGYBYznU1ja2Q

密码: 4waj


写在后面:各位圈友,咱们的计量经济圈社群里面资料和计量咨询都很多,希望大家能够积极加入咱们这个大家庭戳这里)。我们已经邀请社群里的圈友建立了微信群与圈圈对话,进去之后一定要看“群公告”,不然接收不了群息。



帮点击一下下面的小广告,谢谢支持!


Modified on

    您可能也对以下帖子感兴趣

    文章有问题?点此查看未经处理的缓存