版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、安慰劑檢驗(yàn)介紹(Placebotest)安慰劑是一種附加實(shí)證檢驗(yàn)的思路,并不存在一個(gè)具體的特定的操作方法。一般存在兩種尋找安慰劑變量的方法。比如,在已有的實(shí)證檢驗(yàn)中,發(fā)現(xiàn)自變量Xi會(huì)影響自變量Zi與因變量Yi之間存在相關(guān)關(guān)系。在其后的實(shí)證檢驗(yàn)中,采用其他主體(國(guó)家,省份,公司)的Xj變量作為安慰劑變量,檢驗(yàn)Xj是否影響Zi與Yi之間的相關(guān)關(guān)系。如果不存在類(lèi)似于Xi的影響,即可排除Xi的安慰劑效應(yīng),使得結(jié)果更為穩(wěn)健。另一種尋找安慰劑變量的方法。已知,Xi是虛擬變量,Xi=1,iftT;Xi=0iftT+n;Xi=0iftT+n,其中n根據(jù)實(shí)際情況取值,可正可負(fù)。檢驗(yàn)Xi是否影響Zi與Yi之間的相
2、關(guān)關(guān)系。如果不存在類(lèi)似于Xi的影響,即可排除Xi的安慰劑效應(yīng),使得結(jié)果更為穩(wěn)健。舉例:以美國(guó)市場(chǎng)某種政策沖擊識(shí)別策略的因果關(guān)系考察,在最后部分選取英國(guó)同期的因變量,檢驗(yàn)是否有類(lèi)似的特征,就是安慰劑檢驗(yàn)。以中國(guó)2007年所得稅改革作為減稅的政策沖擊以驗(yàn)證減稅對(duì)企業(yè)創(chuàng)新的影響。亦可以通過(guò)把虛擬的政策實(shí)施時(shí)間往前往后推幾年,作為虛擬的政策時(shí)點(diǎn),如果檢驗(yàn)發(fā)現(xiàn)沒(méi)有類(lèi)似的因果,文章的主要結(jié)論就更加可信了。以下是詳細(xì)的例題,安慰劑檢驗(yàn)在最后。SurvivingGraduateEconometricswithR:Difference-in-DifferencesEstimation2of8Thefollowi
3、ngreplicationexercisecloselyfollowsthehomeworkassignment#2inECNS562.Thedataforthisexercisecanbefoundhere.ThedataisabouttheexpansionoftheEarnedIncomeTaxCredit.Thisisalegislationaimedatprovidingataxbreakforlowincomeindividuals.Forsomebackgroundonthesubject,seeEissa,Nada,andJeffreyB.Liebman.1996.LaborS
4、upplyResponsestotheEarnedIncomeTaxCredit.QuarterlyJournalofEconomics.111(2):605-637.Thehomeworkquestions(abbreviated):Describeandsummarizedata.Calculatethesamplemeansofallvariablesfor(a)singlewomenwithnochildren,(b)singlewomenwith1child,and(c)singlewomenwith2+children.Createanewvariablewithearningsc
5、onditionalonworking(missingfornon-employed)andcalculatethemeansofthisbygroupaswell.Constructavariableforthe“treatment”calledANYKIDSandavariableforaftertheexpansion(calledPOST93shouldbe1for1994andlater).Createagraphwhichplotsmeanannualemploymentratesbyyear(1991-1996)forsinglewomenwithchildren(treatme
6、nt)andwithoutchildren(control).Calculatetheunconditionaldifference-in-differenceestimatesoftheeffectofthe1993EITCexpansiononemploymentofsinglewomen.Nowrunaregressiontoestimatetheconditionaldifference-in-differenceestimateoftheeffectoftheEITC.Useallwomenwithchildrenasthetreatmentgroup.Reestimatethism
7、odelincludingdemographiccharacteristics.Addthestateunemploymentrateandallowitseffecttovarybythepresenceofchildren.Allowthetreatmenteffecttovarybythosewith1or2+children.Estimatea“placebo”treatmentmodel.Takedatafromonlythepre-reformperiod.Usethesametreatmentandcontrolgroups.Introduceaplacebopolicythat
8、beginsin1992(so1992and1993bothhavethisfakepolicy).Areview:LoadingyourdataRecallthecodeforimportingyourdata:STATA:/*Lastmodified1/11/2011*/*Thefollowingblockofcommandsgoatthestartofnearlyalldofiles*/*Bracketcommentswith/*/orjustuseanasteriskatlinebeginningclear/*Clearsmemory*/setmem50m/*Adjustthisfor
9、yourparticulardataset*/cdC:DATAEcon562homework/*Changethisforyourfilestructure*/logusing,replace/*Logfilerecordsallcommands&results*/display$S_DATE$S_TIMEsetmoreoffinsheetusing,clearR:#KevinGoulding#ECNS562-Assignment2#Loadtheforeignpackagerequire(foreign)#Importdatafromwebsite#update:firstdownloadt
10、hefilefromthislink:10#Thenimportfromyourharddrive:11eitc=(C:/link/to/my/download/folder/)12NotethatanycommentscanbeembeddedintoRcode,simplybyputtinga#totheleftofyourcom13fromyourharddrive:1415eitc=(C:DATACoursesEcon562homework)DescribeandsummarizeyourdataRecallfrompart1ofthisseries,thefollowingcodet
11、odescribeandsummarizeyourdata:STATA:dessumR:InR,eachcolumnofyourdataisassignedaclasswhichwilldeterminehowyourdataistreatedinvariousfunctions.ToseewhatclassRhasinterpretedforallyourvariables,runthefollowingcode:sapply(eitc,class)summary(eitc)source()sumstats(eitc)TooutputthesummarystatisticstabletoLa
12、TeX,usethefollowingcode:require(xtable)#xtablepackagehelpscreateLaTeXcodefromR.xtable(sumstats(eitc)Note:Youwillneedtore-runthecodeforsumstats()whichyoucanfindinanearlierpost.CalculateConditionalSampleMeansSTATA:summarizeifchildren=0summarizeifchildren=1summarizeifchildren=1summarizeifchildren=1&yea
13、r=1994meanworkifpost93=0&anykids=1R:#Thefollowingcodeutilizesthesumstatsfunction(youwillneedtore-runthiscode)TOC o 1-5 h zsumstats(eitceitc$children=0,)sumstats(eitceitc$children=1,)sumstats(eitceitc$children=1,)sumstats(eitceitc$children=1&eitc$year=1994,)#Alternately,youcanusethebuilt-insummaryfun
14、ctionsummary(eitceitc$children=0,)summary(eitceitc$children=1,)summary(eitceitc$children=1,)summary(eitceitc$children=1&eitc$year=1994,)#Anotherexample:Summarizevariableworkforwomenwithonechildfrom1993onwards.summary(subset(eitc,year=1993&children=1,select=work)Thecodeaboveincludesallsummarystatisti
15、cs一butsayyouareonlyinterestedinthemean.Youcouldthenbemorespecificinyourcoding,likethis:mean(eitceitc$children=0,work)mean(eitceitc$children=1,work)mean(eitceitc$children=1,work)Tryoutanyoftheotherheadingswithinthesummaryoutput,theyshouldalsowork:min()forminimumvalue,max()formaximumvalue,stdev()forst
16、andarddeviation,andothers.CreateaNewVariableTocreateanewvariablecalled“”equaltoearningsconditionalonworking(if“work”=1),“NA”otherwise(“work”=0)一usethefollowingcode:STATA:gencearn=earnifwork=1R:121234567z=names(eitc)X=lapply(X,function(x)replace(x,x=0,NA)eitc=cbind(eitc,X)eitc$=NULLnames(eitc)=zConst
17、ructaTreatmentVariableConstructavariableforthetreatmentcalled“anykids”=1fortreatedindividual(hasatleastonechild);andavariableforaftertheexpansioncalled“post93”=1for1994andlater.STATA:genanykids=(children=1)genpost93=(year=1994)R:1eitc$post93=(eitc$year=1994)2eitc$anykids=(eitc$children0)CreateaplotC
18、reateagraphwhichplotsmeanannualemploymentratesbyyear(1991-1996)forsinglewomenwithchildren(treatment)andwithoutchildren(control).STATA:preservecollapsework,by(yearanykids)genwork0=workifanykids=0labelvarwork0Singlewomen,nochildrengenwork1=workifanykids=1labelvarwork1Singlewomen,childrentwoway(linewor
19、k0year,sort)(linework1year,sort),ytitle(LaborForceParticipationRates)graphsaveGraphhomework,replaceR:#Takeaveragevalueofworkbyyear,conditionalonanykidsminfo=aggregate(eitc$work,list(eitc$year,eitc$anykids=1),mean)#renamecolumnheadings(variables)names(minfo)=c(YR,Treatment,LFPR)#Attachanewcolumnwithl
20、abelsminfo$Group1:6=Singlewomen,nochildrenminfo$Group7:12=Singlewomen,childrenminforequire(ggplot2)#packageforcreatingniceplotsqplot(YR,LFPR,data=minfo,geom=c(point,line),colour=Group,xlab=Year,ylab=LaborForceParticipationRate)+-_/-tffI備l=2)genpostXone=post93*onekidgenpostXtwo=post93*twokidR:#Thesta
21、teunemploymentrateinteractedwithnumberofchildreneitc$=eitc$urate*eitc$anykids#Creatinganewtreatmentterm:#First,wellcreateanewdummyvariabletodistinguishbetweenonechildand2+.eitc$manykids=(eitc$children=2)#Next,wellcreateanewvariablebyinteractingthenewdummy#variablewiththeoriginalinteractionterm.eitc$tr2=eitc$*eitc$manykidsEstimateaPlaceboMod
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 農(nóng)村房屋建房合同范例
- 保姆和家政合同范本
- 兒童樂(lè)園實(shí)施合同范本
- 前期工程門(mén)窗合同范本
- 公地共用合同范本
- 傳媒主播合同范本
- 農(nóng)業(yè)抵押合同范本
- 義診合作協(xié)議合同范本
- 2025年標(biāo)準(zhǔn)鍵盤(pán)行業(yè)深度研究分析報(bào)告
- 寫(xiě)結(jié)婚合同范例
- 《行政倫理學(xué)教程(第四版)》課件 第7、8章?行政人格、行政組織倫理
- 2024年江蘇蘇海控股集團(tuán)有限公司招聘筆試沖刺題(帶答案解析)
- 2023年4月自考00504藝術(shù)概論試題及答案含解析
- 美麗的大自然(教案)2023-2024學(xué)年美術(shù)一年級(jí)下冊(cè)
- 2024年低壓電工考試題庫(kù)(試題含答案)
- 成都特色民俗課件
- 地質(zhì)勘探行業(yè)分析
- 花城版音樂(lè)四下-第四課-認(rèn)知音樂(lè)節(jié)奏(教案)
- 寵物醫(yī)院?jiǎn)T工手冊(cè)
- 2024年高考英語(yǔ)讀后續(xù)寫(xiě)高分寶典專(zhuān)題08讀后續(xù)寫(xiě)肢體動(dòng)作描寫(xiě)積累1(詞-句-文)講義
- 商業(yè)與公積金貸款政策
評(píng)論
0/150
提交評(píng)論