




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
多元回歸分析虛擬變量1第一頁,共十八頁,2022年,8月28日DummyVariablesAdummyvariableisavariablethattakesonthevalue1or0Examples:male(=1ifaremale,0otherwise),south(=1ifinthesouth,0otherwise),etc.Dummyvariablesarealsocalledbinaryvariables,forobviousreasonspersonwageeducfemalemarried13.1021023.24221133.0020046.00440155.30701……………52511.565115263.5500Table:Apartiallistingofthedatainwage1.raw2第二頁,共十八頁,2022年,8月28日ADummyIndependentVariableConsiderasimplemodelwithonecontinuousvariable(x)andonedummy(d)y=b0+d0d+b1x+uThiscanbeinterpretedasaninterceptshiftIfd=0,theny=b0+b1x+uIfd=1,theny=(b0+d0)+b1x+uThecaseofd=0isthebasegroup,thend0=E(y|x,d=1)-E(y|x,d=0)3第三頁,共十八頁,2022年,8月28日Exampleofd0>0xy}b0y=b0+b1xslope=b1d=0{d0y=(b0+d0)+b1xd=1(y=b0+d0d+b1x+u)4第四頁,共十八頁,2022年,8月28日DummiesforMultipleCategoriesWecanusedummyvariablestocontrolforsomethingwithmultiplecategoriesWagedeterminations:wage=-1.57-1.81female+0.572educ+0.025exper+0.141tenure(0.72)(0.26)(0.049)(0.012)(0.021)
n=526R2=0.364Thecoefficientoffemale(-1.81)meansthewageoffemaleis$1.81lessperhourthanmaleworkersaftercontrollingothervariables.wage=7.10-2.51female
(0.21)(0.30)Thismeansthattheaveragemalewageperhouris$7.10,andfemale’swageis$2.51less,whichis$4.59perhour.Istheresignificantwagedifferencebtwmenandwomen?Yes,itindeedis.Becausethet-valueoffemaleis-2.51/0.30=-8.37Logformlog(wage)=0.501–0.301female+0.087educ+0.005exper+0.017tenure(0.102)(0.037)(0.0069)(0.016)(0.0030)
n=526R2=0.3923Femaleis30.1%lessthanmen.Theexactdifferenceislog(wageF)-log(wageM)=-0.301,(wageF-wageM)/wageM=exp(-0.301)-1=0.3512=35.12%5第五頁,共十八頁,2022年,8月28日Example:EffectsofComputerOwnershiponCollegeGPAWhetherastudentownacomputereffecttheperformanceofthestudent?colGPA=b0+d0
PC+b1hsGPA+b2ACT+ucolGPA=1.26
+0.157PC+0.447hsGPA+0.0087ACT+u
(0.33)(0.057)(0.094)(0.0105)
n=141,R2=0.219ThismeansthatastudentwhoownsacomputerhasapredictedGPAabout0.16pointshigherthanacomparablestudentwithoutacomputer.ThecoefficientofPCisdifferentfromzero,that’s,thedifferencebetweentwodifferenttypestudentsissignificant.6第六頁,共十八頁,2022年,8月28日MultipleCategories(cont)AnycategoricalvariablecanbeturnedintoasetofdummyvariablesBecausethebasegroupisrepresentedbytheintercept,iftherearencategoriesthereshouldben–1dummyvariablesIftherearealotofcategories,itmaymakesensetogroupsometogetherExample:wagedeterminationslog(wage)=0.388+0.292marrmale-0.120marrfem-0.097singfem+(0.102)(0.055)(0.058)(0.057)0.084educ+0.003exper+0.016tenure(0.007)(0.0017)(0.003)n=526R2=0.42387第七頁,共十八頁,2022年,8月28日InteractionsAmongDummiesInteractingdummyvariablesislikesubdividingthegrouplog(wage)=0.388-0.097female+0.292married-0.316female?married+(0.102)(0.057)(0.055)(0.074)0.084educ+0.003exper+0.016tenure(0.0069)(0.0017)(0.003)n=526R2=0.4238Thebasegroupissinglemenwhenfemale=0andmarried=0So,whenfemale=0andmarried=1,theinterceptforthemarriedmenis0.388+.0292=0.680female=1,married=0,singlewomen0.388-0.097=0.291female=1,married=1,marriedwomen0.388-0.097+0.292-0.316=0.2678第八頁,共十八頁,2022年,8月28日MoreonDummyInteractionslog(wage)=b0+b1
female+b2married+b3
female?married+b4
educ+b5
exper+b6
tenurefemale=0,married=0,log(wage)=b0
+b4
educ+b5
exper+b6
tenurefemale=0,married=1,log(wage)=b0
+b2
+b4
educ+b5
exper+b6
tenurefemale=1,married=0,log(wage)=b0+b1
+b4
educ+b5
exper+b6
tenurefemale=1,married=1,log(wage)=b0+b1+b2
+b3+b4
educ+b5
exper+b6
tenure9第九頁,共十八頁,2022年,8月28日OtherInteractionswithDummiesCanalsoconsiderinteractingadummyvariable,d,withacontinuousvariable,xy
=b0+d1d+b1x+d2d*x+uIfd=0,theny
=b0+b1x+uIfd=1,theny
=(b0+d1)+(b1+d2)x+uThisisinterpretedasachangeintheslopeExample:loghourlywageequation,(p235)log(wage)=0.465-0.210female+0.090educ-0.0072female?educ+0.0046exper+0.017tenure(0.123)(0.174)(0.0087)(0.014)(0.0016)(0.0030)n=526R2=0.3926Returntoeducationformenis0.090,or9%,forwomen,itis0.090-0.0072=0.0828,or8.28%Isthisdifferencesignificant?t=-0.0072/0.014=-0.53,sowecan’trejectthenullhypothesisthatthereisnodifferencebtwthereturntoeducationformenandwomen.10第十頁,共十八頁,2022年,8月28日yxy=b0+b1xy=(b0+d0)+(b1+d1)xExampleofd0>0andd1<0d=1d=011第十一頁,共十八頁,2022年,8月28日TestingforDifferencesAcrossGroupsTherefore,whethertheparametersoftwogroupsarethesameresultinwhetheralltheparametersofthedummyvariableandinteractiontermsarezero.Thatis,H0:d0=0,d1=0,...,dk=012第十二頁,共十八頁,2022年,8月28日TestingforDifferencesAcrossGroupsWagedeterminations:whethermenandwomenhavedifferentinterceptandslopes?Theoriginalmodelislog(wage)=b0
+b1educ+b2
exper++b3tenure+ufemaleisthedummyvariableTheunrestrictedmodelislog(wage)=b0
+d0
female+b1educ+d1female?educ+b2
exper+d2female?exper+b3tenure
+d4
female?tenure+uEstimatedtherestrictedandunrestrictedmodel,wegetlog(wage)=0.284
+0.092
educ+0.0041exper+0.022
tenuren=526SSRr=101.3298log(wage)=0.322+0.034
female+0.096educ-0.016
female?educ+
0.0081
exper-0.0059female?exper+0.018
tenure
–0.0079
female?tenuren=526SSRur=88.5825TheF=[(101.3298-88.5825)/4]/(88.5825/518)=18.82Wewillrejectthenullhypothesisandthereissignificantdifferencebtwmenandwomen.Statacommand:testfemale
female?educfemale?exper
female?tenure13第十三頁,共十八頁,2022年,8月28日TestingforDifferencesAcrossGroupsTestingwhetheraregressionfunctionisdifferentforonegroupversusanothercanbethoughtofassimplytestingforthejointsignificanceofthedummyanditsinteractionswithallotherxvariablesSo,youcanestimatethemodelwithalltheinteractionsandwithoutandformanFstatistic,butthiscouldbeunwieldy14第十四頁,共十八頁,2022年,8月28日TestingforDifferencesAcrossGroups,withoutdummyvariablesWagedeterminations:whethermenandwomenhavedifferentinterceptandslopes?WeestimatethemodelformenandwomenseparatelyMen:log(wage)=0.322
+0.096
educ+0.0081exper+0.0182
tenuren1=274SSR1=49.5472Women:log(wage)=0.356
+0.080
educ+0.0023exper+0.010
tenuren2=252SSR2=39.0353So,wegettheunrestrictedmodel’sSSRur=49.5472+39.0353=88.5825,Thepooledmodellog(wage)=0.284
+0.092
educ+0.0041exper+0.022
tenuren=526SSRr=101.3298ThenewFvalueisF=[(101.3298-(49.5472+39.035))/4]/((49.5472+39.035)/518)=18.82So,wege
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 亞馬遜雨傘訂購合同范本
- 農(nóng)村住房修建合同范例
- 廠區(qū)工人雇傭合同范本
- 企業(yè)采購紅酒合同范本
- 吧臺主理人合同范本
- 品牌供貨合作合同范例
- 前臺課程顧問合同范本
- 壓手續(xù)不押車合同范本
- 北京二手房服務(wù)合同范本
- 危險(xiǎn)建筑拆除合同范本
- 2024年世界職業(yè)院校技能大賽高職組“市政管線(道)數(shù)字化施工組”賽項(xiàng)考試題庫
- 攝影入門課程-攝影基礎(chǔ)與技巧全面解析
- 追覓科技在線測評邏輯題
- 高考成績證明模板
- 蝴蝶蘭PPT課件
- 賓館做房記錄表
- 工業(yè)管道檢查報(bào)告
- 教師德能勤績考核細(xì)則
- 對外漢語—春節(jié)學(xué)習(xí)教案
- 心經(jīng)注音版(打印版)
- 土地承包合同8篇
評論
0/150
提交評論