欢迎来到得力文库 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
得力文库 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

    STATA实用学习提高笔记材料.doc

    • 资源ID:809551       资源大小:1.02MB        全文页数:44页
    • 资源格式: DOC        下载积分:10金币
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录   QQ登录  
    二维码
    微信扫一扫登录
    下载资源需要10金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    STATA实用学习提高笔记材料.doc

    '' 北京科技大学STATA 应用学习摘录2第一章 STATA 的基本操作 一、设置内存容set mem 500m, perm一、显示输入内容 Display 1 Display “clive”二、显示数据集结构 describe Describe /d三、编辑 edit Edit四、重命名变量 Rename var1 var2五、显示数据集内容 list/browse List in 1 List in 2/10六、数据导入:数据文件是文本类型(.csv)1、 insheet: . insheet using “C:Documents and SettingsAdministrator桌面 ST9007datasetFees1.csv”, clear2、 内存为空时才可以导入数据集,否则会出现(you must start with an empty dataset) (1)清空内存中的所有变量:.drop _all (2)导入语句后加入“clear”命令。 七、保存文件1、 save “C:Documents and SettingsAdministrator桌面ST9007datasetFees1.dta” 2、 save “C:Documents and SettingsAdministrator桌面ST9007datasetFees1.dta”, replace 八、打开及退出已存文件 use 1、.Use 文件路径及文件名, clear 2、. Drop _all/.exit 九、记录命令和输出结果(log) 1、 开始建立记录文件:log using “J:phdoutput.log“, replace 2、 暂停记录文件:log off 3、 重新打开记录文件:log on 4、 关闭记录文件:log close 十一、创建和保存程序文件:(doedit, do) 1、 打开程序编辑窗口:doedit 2、 写入命令 3、 保存文件,.do. 4、 运行命令:.do 程序文件路径及文件名 十二、多个数据集合并为一个数据集(变量和结构相同)纵向合并 append insheet using “J:phdFees1.csv“, clear save “J:phdFees1.dta“, replace insheet using “J:phdFees2.csv“, clear3append using “J:phdFees1.dta“ save “J:phdFees1.dta“, replace十三、横向合并,在原数据集基础上加上另外的变量 merge 1、insheet using “J:phdFees1.csv“, clear sort companyid yearend save “J:phdFees1.dta“, replace describe insheet using “J:phdFees6.csv“, clear sort companyid yearend merge companyid yearend using “J:phdFees1.dta“ save “J:phdFees1.dta“, replace describe2、_merge=1 obs. From master data _merge=2 obs. From using data_merge=3 obs. From both master and using data十四、帮助文件:help1、. Help describe 十五、描述性统计量1、summarize incorporationyear 单个 summarize incorporationyear-big6 连续多个 summarize _all or simply summarize 所有2、更详细的统计量summarize incorporationyear, detail3、centile centile auditfees, centile(0(10)100) centile auditfees, centile(0(5)100) 4、tabulate 不同类型变量的频数和比例 tabulate companytype tabulate companytype big6, column 按列计算百分比 tabulate companytype big6, row 按行计算百分比 tab companytype big6 if companytype=0 2001; PincusPincus andand Rajgopal,Rajgopal, 2002).2002). b)b)CompaniesCompanies decidedecide whetherwhether toto grantgrant stockstock optionsoptions (Core(Core andand Guay,Guay, 1999).1999). c)c)CompaniesCompanies decidedecide whetherwhether toto hirehire BigBig 5 5 oror non-Bignon-Big 5 5 auditorsauditors (e.g.,(e.g., ChaneyChaney etet al.,al., 2004).2004). d)d)GovernmentsGovernments decidedecide whetherwhether toto fullyfully oror partiallypartially privatizeprivatize (Guedhami(Guedhami andand Pittman,Pittman, 2006).2006). e)e)CompaniesCompanies decidedecide whetherwhether toto followfollow internationalinternational financialfinancial reportingreporting strategystrategy (Leuz(Leuz andand Verrecchia,Verrecchia, 2000).2000). f)f)CompaniesCompanies decidedecide whetherwhether toto recognizerecognize financialfinancial instrumentsinstruments atat fairfair valuevalue oror disclosedisclose (Ahmed(Ahmed etet al.,al., 2006).2006). g)g)CompaniesCompanies decidedecide whetherwhether oror notnot toto gogo privateprivate (Engel(Engel etet al.,al., 2002).2002).2 2、ConcernsConcerns aboutabout selectivityselectivity arisearise whenwhen thethe RHSRHS dummydummy variablevariable (D)(D) isis endogenous:endogenous:EndogeneityEndogeneity resultsresults inin biasbias ifif E(uE(u | | D)D) 0.0. TheThe intuitionintuition underlyingunderlying HeckmanHeckman isis toto estimateestimate andand thenthen controlcontrol forfor E(uE(u | | D).D). FirstFirst modelmodel thethe choicechoice ofof D:D:39Z Z isis a a vectorvector ofof exogenousexogenous variablesvariables thatthat affectaffect D D butbut havehave nono directdirect effecteffect onon Y.Y.DZY3 3、HeckmanHeckman 的方法:的方法:TheThe intuitionintuition underlyingunderlying HeckmanHeckman isis toto estimateestimate E(uE(u | | D)D) andand includeinclude itit asas a a controlcontrol variablevariable onon thethe RHSRHS ofof thethe Y Y model:model: E(uE(u | | D)D) = = IMRIMR wherewhere40TheThe IMRIMR variablevariable isis addedadded asas a a “control“control forfor selectivity”selectivity” inin thethe Y Y model:model:TheThe D D andand Y Y modelsmodels cancan bebe estimatedestimated inin two-stepstwo-steps oror estimatedestimated jointlyjointly usingusing maximummaximum likelihoodlikelihood (ML)(ML) MLML yieldsyields separateseparate estimatesestimates ofof andand . . TheThe two-steptwo-step yieldsyields anan estimateestimate ofof . . UnderUnder thethe nullnull ofof nono selectivityselectivity bias,bias, = = 0 0 andand = = 0.0. 4 4、另一种思路:、另一种思路:原始模型:原始模型:还可以转化为还可以转化为 以下方程组:以下方程组:加入控制变量后变为加入控制变量后变为41可以分别可以分别 D=1D=1 或或 D=0D=0 的情况下分别回归。的情况下分别回归。5 5、选择模型使用、选择模型使用 heckmanheckman 的例子:的例子:useuse “J:phdheckman.dta“,“J:phdheckman.dta“, clearclear heckmanheckman wagewage educationeducation age,age, select(emp=select(emp= marriedmarried childrenchildren educationeducation age)age) twosteptwostep42 WomensWomensWomens wageswageswages areareare higherhigherhigher if if if theytheythey areareare olderolderolder andandand moremoremore highlyhighlyhighly educatededucatededucated TheTheThe probitprobitprobit modelmodelmodel ofofof employmentemploymentemployment is is is exactlyexactlyexactly thethethe samesamesame asasas whatwhatwhat wewewe hadhadhad beforebeforebefore WomenWomenWomen areareare moremoremore likelylikelylikely tototo bebebe in inin employmentemploymentemployment if if if theytheythey areareare married,married,married, havehavehave children,children,children, areareare moremoremore highlyhighlyhighly educatededucatededucated ororor older.older.older. TheTheThe 657657657 censoredcensoredcensored observationsobservationsobservations areareare thethethe womenwomenwomen whowhowho areareare notnotnot in inin employment.employment.employment. TheTheThe WaldWaldWald chi2chi2chi2 teststeststests thethethe overalloveralloverall significancesignificancesignificance ofofof thethethe model.model.model.43 TheTheThe lambalambalamba variablevariablevariable is is is simplysimplysimply thethethe IMRIMRIMR thatthatthat waswaswas estimatedestimatedestimated fromfromfrom thethethe empempemp modelmodelmodel ( ( ( ). ). ). TheTheThe IMRIMRIMR coefficientcoefficientcoefficient (4.00)(4.00)(4.00) is is is SinceSinceSince thethethe IMRIMRIMR coefficientcoefficientcoefficient is is is statisticallystatisticallystatistically significant,significant,significant, it it it maymaymay bebebe concludedconcludedconcluded thatthatthat theretherethere is is is statisticallystatisticallystatistically significantsignificantsignificant evidenceevidenceevidence ofofof a a a selectionselectionselection effect.effect.effect. RecallRecallRecall thatthatthat wewewe areareare tryingtryingtrying tototo estimateestimateestimate thethethe errorerrorerror in inin thethethe wagewagewage equationequationequation whichwhichwhich is is is truncatedtruncatedtruncated becausebecausebecause wewewe onlyonlyonly observeobserveobserve wageswageswages ofofof thethethe womenwomenwomen whowhowho areareare in inin employmentemploymentemployment TheTheThe IMRIMRIMR coefficientcoefficientcoefficient cancancan alsoalsoalso bebebe writtenwrittenwritten asasas thethethe productproductproduct ofofof rhorhorho andandand sigmasigmasigma ( ( ( ) ) ) rhorhorho ( ( ( ) ) ) is is is thethethe correlationcorrelationcorrelation betweenbetweenbetween u u u andandand v v v sigmasigmasigma ( ( ( ) ) ) is is is thethethe standardstandardstandard deviationdeviationdeviation ofofof u u u Thus,Thus,Thus, 4.004.004.00 = = = 0.670.670.67 * * * 5.955.955.956 6、选择模型使用最大似然估计方法、选择模型使用最大似然估计方法 MLML MLML 可以用来可以用来 testtest thethe statisticalstatistical significancesignificance ofof rho.rho.IfIf rhorho = = 0,0, thethe IMRIMR coefficientcoefficient mustmust alsoalso bebe zerozero inin whichwhich casecase therethere isis nono 44needneed toto controlcontrol forfor selectivity.selectivity. heckmanheckman wagewage educationeducation age,age, select(emp=select(emp= marriedmarried childrenchildren educationeducation age)age) 如在命令最后不加如在命令最后不加 twostep,twostep,则则 STATASTATA 直接给出直接给出 MLML 的结果。的结果。结果中的结果中的表示有显著的选择证据。表示有显著的选择证据。 7 7、TreatmentTreatment effectseffects modelmodel 方法估计方法估计SupposeSuppose thatthat wewe wantwant toto estimateestimate oneone auditaudit feefee modelmodel withwith BigBig 6 6 onon thethe rightright handhand sideside ofof thethe equationequation (i.e.,(i.e., wewe assumeassume thatthat thethe X X coefficientscoefficients havehave thethe samesame slopeslope inin thethe twotwo equations)equations) WeWe cancan estimateestimate thisthis modelmodel usingusing thethe treatregtreatreg commandcommand treatregtreatreg lnaflnaf lnta,lnta, treattreat (big6=(big6= lntalnta lnsales)lnsales) twosteptwostep 在命令后不加在命令后不加 twosteptwostep,将得到,将得到 MLML 估计结果,但有可能发散得不到结果。估计结果,但有可能发散得不到结果。7 7、模型使用中的主要问题:、模型使用中的主要问题:FrancisFrancis andand LennoxLennox (2010)(2010) argueargue thatthat manymany accountingaccounting studiesstudies havehave estimatedestimated thethe HeckmanHeckman andand treatmenttreatment effectseffects modelsmodels incorrectlyincorrectly ItIt isis wellwell recognizedrecognized (in(in economics)economics) thatthat exogenousexogenous Z Z variablesvariables fromfrom thethe firstfirst stagestage choicechoice modelmodel needneed toto bebe validlyvalidly excludedexcluded fromfrom thethe secondsecond stagestage outcomeoutcome regressionregression (Little,(Little, 1985;1985; LittleLittle andand Rubin,Rubin, 1987;1987; ManningManning etet al.,al., 1987).1987). AccountingAccounting studiesstudies havehave generallygenerally failedfailed to:to: (a)(a) imposeimpose exclusionexclusion restrictionsrestrictions, , oror (b)(b) provideprovide compellingcompelling groundsgrounds forfor thethe validityvalidity ofof thethe exclusionexclusion restrictions.restrictions. 使用工具变量的注意事项:使用工具变量的注意事项:ResearchersResearchers needneed toto bebe awareaware thatthat HeckmanHeckman andand treatmenttreatment effectseffects modelsmodels cancan provideprovide resultsresults thatthat areare extremelyextremely fragile.fragile. SensitivitySensitivity primarilyprimarily affectsaffects thethe RHSRHS variablevariable thatthat isis assumedassumed toto bebe endogenousendogenous (D)(D) andand thethe IMRs.IMRs. StudiesStudies needneed toto discuss:discuss:(研究中应讨论以下问题)(研究中应讨论以下问题)whywhy thethe ZsZs areare exogenousexogenous whywhy thethe ZsZs havehave nono directdirect effecteffect onon Y Y whetherwhether thethe ZsZs areare powerfulpowerful predictorspredictors ofof D D TheThe signssigns andand significancesignificance ofof thethe IMRsIMRs alonealone dodo notnot provideprovide compellingcompelling evidenceevidence asas toto thethe directiondirection oror existenceexistence ofof selectivityselectivity bias.bias. SelectionSelection studiesstudies shouldshould routinelyroutinely reportreport teststests forfor multicollinearitymulticollinearity problemsproblems. . ResearchersResearchers cancan considerconsider usingusing thethe matchedmatched propensitypropensity scorescore methodologymethodology toto determinedetermine whetherwhether therethere isis evidenceevidence ofof selectionselection onon observables.observables.

    注意事项

    本文(STATA实用学习提高笔记材料.doc)为本站会员(一***)主动上传,得力文库 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知得力文库 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于得利文库 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知得利文库网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号-8 |  经营许可证:黑B2-20190332号 |   黑公网安备:91230400333293403D

    © 2020-2023 www.deliwenku.com 得利文库. All Rights Reserved 黑龙江转换宝科技有限公司 

    黑龙江省互联网违法和不良信息举报
    举报电话:0468-3380021 邮箱:hgswwxb@163.com  

    收起
    展开