STATA实用学习笔记(8)
小结:根据因变量的类型选择不同的回归模型 Dependent variable (Y) Continuous (-? < Y < +?) Examples Estimation method(s) OLS Quantile regression Probit Logit Multinomial logit Multinomial probit STATA command regress qreg Log of audit fees Stock returns Cost of capital Listed / Not listed Big 6 / Non-Big 6 auditor Method of transport (train, bus, car, bicycle) Type of company (private, public unquoted, quoted) Type of peer review report (adverse, modified, unmodified) Examples Binary (Y = 0, 1) Discrete and unordered (Y = 0, 1, 2,..) probit logit mlogit mprobit Discrete and ordered (Y = 0, 1, 2,..) Dependent variable (Y) Discrete count data (Y = 0, 1, 2, …) Ordered probit Ordered logit oprobit ologit Estimation method(s) Poisson Negative binomial STATA command poisson nbreg Number of weaknesses disclosed in peer review report Non-audit fees Football attendance Duration of unemployment CEO tenure Company survival 26
Continuous but censored (kL ? Y < kH) Duration data (often censored) kL ? Y < kH Tobit tobit Cox proportional hazards stcox
第四章 面板数据 主要内容: ? 4.1 The basic idea ? 4.2 Linear regression ? 4.3 Logit and probit models ? 4.4 Other models
? 4.1 The basic idea
1、面板数据:横截面时间序列,自变量中同一个特征变量连续多年其他变量有变动。在不同年度数据间可能存在一个稳定影响的公司或个人特征因素。在以前的学习中,为消除时间序列不独立,在回归命令中加入robust cluster () 选项来消除异方差和变量相关错误。 2、面板数据的优点:一是样本量大,估计精确,二是可以在回归中加入动态影响因素(上一年或下一年数据),三是可以控制不可观测变量对不同年度的影响。 3、面板数据可能存在的计量问题:
一般的回归模型可用上式来表示,如果是面板数据,ε中应该包含两部分,一部分为随机误差,一部分为每年的固定影响。即:
,这样回归模型即变为:
u表示各年的固定影响,e为误差项,X为变量值。
如果u和X不相关,则X的系数是无偏的,但实际中常常的相关的,因此需要进行特别处理。
4、处理计量问题的一些方法:
(1)最简单的方法是在回归式中加入robust cluster ()选择项。
(2)使用固定效用模型:对特征变量取不同的哑变量,在回归中加入哑变量来控制个人特征的影响。例如:
? tab persnr, gen(dum_)(根据不同的persnr值产生哑变量dum_1、dum_2。。。) ? reg lsat age dum_1 dum_2 dum_4
? reg lsat age dum_1 dum_2 dum_3 dum_4, nocons
为消除多重共线性,回归时如保留常数项时,哑变量就需要减少一个,如想保留所有哑
27
变量,则需去掉常数项。
? 另一种命令可以将特征变量的值分开,separate lsat, by(persnr),此命令根据
不同的persnr产生不同的变量序列lsat1、lsat2、lsat3。。。,以便分别进行对比分析,比如以下命令:
twoway (lfit lsat1 age) (scatter lsat1 age) twoway (lfit lsat2 age) (scatter lsat2 age) twoway (lfit lsat3 age) (scatter lsat3 age) twoway (lfit lsat4 age) (scatter lsat4 age)
? 另一种命令可以同时画出不同分变量的直线图,两变量间的拟合图以及不同
分变量间的散点图。命令如下:
twoway (line lsat_hat1-lsat_hat4 age) (lfit lsat age) (scatter lsat1-lsat4 age)
图形结果如下:
(3)使用命令:
fixed effect model命令:xtreg lsat age , fe i(persnr) random effect model命令:xtreg lsat age , re i(persnr)
在上式中,如果θ=1,则变形为fixed effect model,如果θ=0,则变形为OLS模型,如果0<θ<1,则为random effect model。
通过上式的变换,基本消除了在每一年中保持不变的影响部分。有时Y也可以用上一期的
?Yi?1来代替。
28
? 4.2 Linear regression
通过上面的讲解,知道连续变量的线性回归可以用OLS模型、fixed effect model和random effect model。什么情况下使用哪一种模型更有效?
1、当ui和 Xit相关时,使用fixed effect model,当不相关时, it is better to use the random-effects model (because it is more efficient).只有当没有时间序列效应时才用OLS模型。
2、判断使用模型的方法:
(1)固定效应模型与随机模型:
使用Hausman方法判断,原理是如果相关固定效应模型无偏,而随机模型有偏,二者相差会较大;如果不相关,两个都无偏,随机模型会更有效,二者不会有太大差别。因此方法就是比较系数是否有显著不同。
? Null hypothesis (H0): ui and Xit are uncorrelated ? The Hausman statistic is distributed as chi2
? If the chi2 statistic is positive and statistically significant, we can reject the null hypothesis. This
would mean that the fixed-effects model is preferable because the coefficients are consistent. ? If the chi2 statistic is not positive and statistically significant, we cannot reject the null
hypothesis. This would mean that the random-effects model is preferable because the coefficients are consistent and efficient.
实现命令:
? xtreg lsat age, fe i( persnr) ? estimates store fixed_effects ? xtreg lsat age, re i( persnr) ? estimates store random_effects
? hausman fixed_effects random_effects
注意事项:小样本时结果并不一定可靠。On the other hand, this result is not very reliable because the asymptotic assumption fails to hold in this small sample.
(2)随机模型和OLS模型:
? If we cannot reject the null hypothesis that ui and Xit are uncorrelated, we need to determine
whether the ui are distributed randomly across individuals. 用the Breusch-Pagan test来检验,whether ?u2 is significantly positive.
实现命令:
xtreg, re(随机模型面板数据回归) ttest0 检验结果如下:未拒绝零假设。
29
3、使用固定效用模型时要注意,
和
接近于0时,结果不可靠。
4.3 Logit and probit models
1、当因变量为0和1时,数据为面板数据时,可以使用命令消除时间序列计量问题:
? xtlogit , fe i()
但结果的解释与连续变量不一样,当因变量没有变动时,回归时自动剔除这些样本。实际中也有不少这种例子,比如研究公司在某一年是否有欺诈时,大多数公司不会有,因此Y=0在样本年度中一直不变,使用固定效用模型将剔除这些样本。
? xtlogit , re i()
使用随机模型可保留样本中的所有样本。
相关推荐:
- [实用模板]第八章:法国“新浪潮”与“左岸派”
- [实用模板]2021年北京上半年临床医学检验技师生物
- [实用模板]SAP GUI 7.10客户端安装配置文档
- [实用模板]2001年临床执业医师资格考试综合笔试试
- [实用模板]36机场工作实用英语词汇总结
- [实用模板](一)社会保险稽核通知书
- [实用模板]安全教育主题班会材料
- [实用模板]濉溪县春季呼吸道传染病防控应急演练方
- [实用模板]长沙房地产市场周报(1.30-2.3)
- [实用模板]六年级数学上册典中点 - 图文
- [实用模板]C程序设计(红皮书)习题官方参考答案
- [实用模板]中国证监会第一届创业板发行审核委员会
- [实用模板]桥梁工程复习题
- [实用模板]2011学而思数学及答案
- [实用模板]初中病句修改专项练习
- [实用模板]监理学习知识1 - 图文
- [实用模板]小机灵杯四年级试题
- [实用模板]国贸专业毕业论文模板
- [实用模板]教育学概论考试练习题-判断题4
- [实用模板]2015届高考英语一轮复习精品资料(译林
- 00Nkmhe_市场营销学工商管理_电子商务_
- 事业单位考试法律常识
- 诚信教育实施方案
- 吉大小天鹅食品安全检测箱方案(高中低
- 房地产销售培训资料
- 高一地理必修1复习提纲
- 新概念英语第二册lesson_1_练习题
- 证券公司内部培训资料
- 小学英语时间介词专项练习
- 新世纪英语专业综合教程(第二版)第1册U
- 【新课标】浙教版最新2018年八年级数学
- 工程建设管理纲要
- 外研版 必修一Module 4 A Social Surve
- Adobe认证考试 AE复习资料
- 基于H.264AVC与AVS标准的帧内预测技术
- 《食品检验机构资质认定管理办法》(质
- ABB变频器培训课件
- (完整版)小学说明文阅读练习题及答案
- 深思洛克(SenseLock) 深思IV,深思4,深
- 弟子规全文带拼音




