STATA实用学习笔记(6)
? Notice that the ologit and oprobit results are quite close to each other
? usually it doesn’t make much difference whether you use ordered logit or ordered
probit.
3.6 Count data models
1、适用情况:
计数模型适用于因变量是非负的离散数,且数据有实际的意义。
? 比如:consider the number of financial analysts that follow a given company
? if the company is not followed by any analysts, Y = 0 ? if the company is followed by one analyst, Y = 1 ? if the company is followed by two analysts, Y = 2 ? if the company is followed by two analysts, Y = 3
此种数据无法使用OLS回归,因为因变量无法满足数据是在负无穷到正无穷之间,因为只能取非负数,同时要求因变量是连续变量,而计数模型的因变量是离散的。 2、适用的回归模型
? Two distributions that fulfill the criteria of having non-negative discrete integer values
are the “Poisson” and the “negative binomial”. ? the negative binomial (nbreg) ? the Poisson (poisson) 3、实际中计数模型的例子:
? The number of R&D patents awarded ? The number of airline accidents ? The number of murders
? The number of times that mainland Chinese people have visited Singapore ? The number of weaknesses found by peer reviewers at audit firms
4、模型的选择:
(1)POISSON模型:
? The Poisson distribution is most often used to determine the probability of x
occurrences per unit of time。E.g., the number of murders per year ? The basic assumptions of the Poisson distribution are as follows:
? The time interval can be divided into small subintervals such that the probability of an
occurrence in each subinterval is very small
? The probability of an occurrence in each subinterval remains constant over time
? The probability of two or more occurrences in each subinterval must be small enough
to be ignored
? An occurrence or nonoccurrence in one subinterval must not affect the occurrence or
nonoccurrence in any other subinterval (this is the independence assumption). 满足条件下的例子:
? The probability of a murder occurring during any given minute is small
? The probability of a murder occurring during any given minute remains constant
during the year
21
? The probability of more than one person being murdered during any given minute is
very small
? The number of murders in any given time period is independent of the number of
murders in any other time period. 参数的估计:
? The only parameter needed to characterize the Poisson distribution is the mean rate at which events occur 。“incidence rate” ,?
? For example, ? can be the average number of murders per month or the average
number of analysts per company
POISSON分布的概率函数:
? 如果已知每月的犯罪数为2,求每月有3起犯罪的概率。
模型特点:
? 模型只有一个参数
λ,发生率可用右式估计。
命令:
? control for heteroscedasticity using the robust option
poisson weaknesses reviewed_firm_also_reviewer litigation_dummy , robust
? panel dataset (it isn’t) you would also need to control for time-series dependence
using the cluster() option 缺点:
? Unobserved heterogeneity in the data (e.g., omitted variables) will often cause the
variance to exceed the mean (a phenomenon known as “overdispersion”). 回归后检验:
? 回归后马上用poisgof 命令,检验是否显著,如显著则无法使用,而须使用The
negative binomial ,该模型无须assume that the mean and variance of the distribution are the same (2)the negative binomial模型:
? nbreg weaknesses reviewed_firm_also_reviewer litigation_dummy , robust
(cluster())
? 回归结果的α显著,说明POISSON模型不适用。
22
3.7 Tobit and interval regression models
1、适用的数据类型:
? censoring (or truncation) of the dependent variable. 当观众数大于座位数时,观测不到。
2、选择模型:
? The censoring problem can be solved by estimating a “tobit” model ? The tobit model is somewhat similar:
Y* = a0+ a1 X + e
Y = 0 if -? < Y* ? 0 Y = Y* if 0 < Y* < +? The Y* and Y variables are both observed when they are greater than zero (Y* is
unobserved when Y = 0)
? Both the probit and tobit models assume that the errors (e) are normally distributed. 3、例子:
? Recall that in our fee dataset, the nonauditfees variable is left-censored at zero
because many companies choose not to purchase any non-audit services。This phenomenon is like some individuals choosing not to purchase any cigarettes when the price exceeds P0
? gen lnta=ln(totalassets)
? egen miss=rmiss(lnnaf lnta) (当lnnaf lnta为miss时,miss为1) ? tobit lnnaf lnta if miss==0, ll(0) (ll(数字)表示左边截取的数据,ul(数字)表示
右边截取的数字。)
? tobit lnnaf lnta if miss==0, ll(此命令与上命令功能相同) ? 回归完成后可以用命令显示有多少数据 censoried.
count if miss==0 & lnnaf==0 count if miss==0 & lnnaf>0
4、当左右两边均截取以后,也可使用tobit模型
? gen lnnaf1=lnnaf
? replace lnnaf1=5 if lnnaf>5 & lnnaf!=. ? tobit lnnaf1 lnta if miss==0, ll(0) ul(5)
? tobit lnnaf1 lnta if miss==0, ll ul (如果截取数字是样本中的最大和最小值不用列出,
系统会自动选取)。
? tobit lnnaf lnta if miss==0, ll ul(5) robust cluster (companyid)(控制异方差和时间序
列不独立)
23
3.8 Duration models(生存模型)
1、适用数据:
因变量测试某一事件持续的时间。例如:
? Duration of life (medical, engineering)
? how long do people live for? ? how long do machines last?
? Duration of unemployment (economics)
相关推荐:
- [实用模板]第八章:法国“新浪潮”与“左岸派”
- [实用模板]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,深
- 弟子规全文带拼音




