分享

面板二值选择模型学习手册

 liyu_sun 2021-05-14

本文包括面板logit模型,包括命令操作以及相关检验等内容,欢迎阅读。

一.混合面板logit与probit模型

对于面板数据,如果被解释变量为离散变量或者虚拟变量时,使用离散选择模型,也就是面板二值选择模型。以二值选择(被解释变量取值为0或1)为例,当被解释变量取1的概率为标准正态分布时,使用probit模型;当被解释变量取1的概率为logistic分布时,使用logit模型。

混合面板二值选择模型命令为logit或者probit,命令格式为:

Syntax

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

图片

选项主要包括depvar表示被解释变量。indepvars表示解释变量, noconstant 表示不含截距项,vce(vcetype) 表示参数估计量方差协方差矩阵一致估计,包括oim, robust, cluster clustvar, bootstrap, or jackknife等。

案例讲解部分为:

webuse lbw

Logistic regression(logit回归)

logit low age lwt i.race smoke ptl ht ui

结果为:

图片

logit, level(99)

(level(99),置信水平,即99%。)

图片

案例02

webuse nhanes2d

svyset

Logistic regression using survey data

svy: logit highbp height weight age female

图片

二.面板logit与probit模型

面板二值选择模型固定效应

xtprobit y x1 x2 x3,fe

xtlogit y x1 x2 x3,fe

面板二值选择模型随机效应

Random-effects (RE) model 

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

Random-effects (RE) model

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

案例讲解:

Setup

webuse union

Random-effects logit model

xtlogit union age grade i.not_smsa south##c.year

图片

Fixed-effects logit model

xtlogit union age grade i.not_smsa south##c.year, fe

图片

Hausman检验

hausman fe re

图片

案例讲解总结

use union,clear

第一步:固定效应模型选择

Fixed-effects logit model 

xtlogit union age grade i.not_smsa south##c.year, fe 

estimates store fe 

logit union age grade i.not_smsa south##c.year , nolog //混合面板Logit模型 

estimates store logit 

hausman fe logit //在混合面板Logit模型于固定效应之间选择 

第二步:随机效应模型选择

Random-effects logit model 

xtlogit union age grade i.not_smsa south##c.year  //主要通过观察此回归结果中的LR检验与0.05比较 

estimates store re 

第三步:固定效应还是随机效应 

hausman fe re

第四步:确定好随机效应或者固定效应模型后,再次返回去选择相对应的模型

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多