




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
多元回归分析虚拟变量1第一页,共十八页,编辑于2023年,星期五DummyVariablesAdummyvariableisavariablethattakesonthevalue1or0Examples:male(=1ifaremale,0otherwise),south(=1ifinthesouth,0otherwise),etc.Dummyvariablesarealsocalledbinaryvariables,forobviousreasonspersonwageeducfemalemarried13.1021023.24221133.0020046.00440155.30701……………52511.565115263.5500Table:Apartiallistingofthedatainwage1.raw2第二页,共十八页,编辑于2023年,星期五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第三页,共十八页,编辑于2023年,星期五Exampleofd0>0xy}b0y=b0+b1xslope=b1d=0{d0y=(b0+d0)+b1xd=1(y=b0+d0d+b1x+u)4第四页,共十八页,编辑于2023年,星期五DummiesforMultipleCategoriesWecanusedummyvariablestocontrolforsomethingwithmultiplecategoriesWagedeterminations:wâge=-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.wâge=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(wâge)=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(wâgeF)-log(wâgeM)=-0.301,(wâgeF-wâgeM)/wâgeM=exp(-0.301)-1=0.3512=35.12%5第五页,共十八页,编辑于2023年,星期五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第六页,共十八页,编辑于2023年,星期五MultipleCategories(cont)AnycategoricalvariablecanbeturnedintoasetofdummyvariablesBecausethebasegroupisrepresentedbytheintercept,iftherearencategoriesthereshouldben–1dummyvariablesIftherearealotofcategories,itmaymakesensetogroupsometogetherExample:wagedeterminationslog(wâge)=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第七页,共十八页,编辑于2023年,星期五InteractionsAmongDummiesInteractingdummyvariablesislikesubdividingthegrouplog(wâge)=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第八页,共十八页,编辑于2023年,星期五MoreonDummyInteractionslog(wâge)=b0+b1
female+b2married+b3
female•married+b4
educ+b5
exper+b6
tenurefemale=0,married=0,log(wâge)=b0
+b4
educ+b5
exper+b6
tenurefemale=0,married=1,log(wâge)=b0
+b2
+b4
educ+b5
exper+b6
tenurefemale=1,married=0,log(wâge)=b0+b1
+b4
educ+b5
exper+b6
tenurefemale=1,married=1,log(wâge)=b0+b1+b2
+b3+b4
educ+b5
exper+b6
tenure9第九页,共十八页,编辑于2023年,星期五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(wâge)=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第十页,共十八页,编辑于2023年,星期五yxy=b0+b1xy=(b0+d0)+(b1+d1)xExampleofd0>0andd1<0d=1d=011第十一页,共十八页,编辑于2023年,星期五TestingforDifferencesAcrossGroupsTherefore,whethertheparametersoftwogroupsarethesameresultinwhetheralltheparametersofthedummyvariableandinteractiontermsarezero.Thatis,H0:d0=0,d1=0,...,dk=012第十二页,共十八页,编辑于2023年,星期五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(wâge)=0.284
+0.092
educ+0.0041exper+0.022
tenuren=526SSRr=101.3298log(wâge)=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第十三页,共十八页,编辑于2023年,星期五TestingforDifferencesAcrossGroupsTestingwhetheraregressionfunctionisdifferentforonegroupversusanothercanbethoughtofassimplytestingforthejointsignificanceofthedummyanditsinteractionswithallotherxvariablesSo,youcanestimatethemodelwithalltheinteractionsandwithoutandformanFstatistic,butthiscouldbeunwieldy14第十四页,共十八页,编辑于2023年,星期五TestingforDifferencesAcrossGroups,withoutdummyvariablesWagedeterminations:whethermenandwomenhavedifferentinterceptandslopes?WeestimatethemodelformenandwomenseparatelyMen:log(wâge)=0.322
+0.096
educ+0.0081exper+0.0182
tenuren1=274SSR1=49.5472Women:log(wâge)=0.356
+0.080
educ+0.0023exper+0.010
tenuren2=252SSR2=39.0353So,wegettheunrestrictedmodel’sSSRur=49.5472+39.0353=88.5825,Thepooledmodellog(wâge)=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,weget
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025建筑工程项目施工廉洁合同
- 遗传性凝血酶原缺陷症的健康宣教
- 扩张型心肌病的健康宣教
- 盐敏感性高血压的健康宣教
- 肛门生殖器疣的健康宣教
- 2025商场广告位租赁合同
- 纵隔囊肿的健康宣教
- 护理风险防控之有效沟通
- 2025电子产品采购合同书
- 儿童文明礼仪培训
- 2025年美丽中国第六届全国国家版图知识竞赛测试题库(中小学组)
- 2025年早产儿培训试题及答案
- 江西省鹰潭市2023-2024学年六年级下学期数学期中试卷(含答案)
- 2024年全国职业院校技能大赛中职(食品药品检验赛项)考试题库(含答案)
- 化粪池清掏协议书范本
- 2024-2025学年九年级化学人教版教科书解读
- 水利水电工程质量监督工作标准
- 2024年云南省昆明市五华区小升初数学试卷
- 化工原理完整(天大版)课件
- 2025年元明粉项目可行性研究报告
- 艺术色彩解读
评论
0/150
提交评论