资源描述:
《第6章 多元回归分析:虚拟变量.ppt》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、第六章 多元回归分析:虚拟变量y=b0+b1x1+b2x2+...bkxk+u5.DummyVariables1DummyVariablesAdummyvariableisavariablethattakesonthevalue1or0Examples:male(=1ifaremale,0otherwise),south(=1ifinthesouth,0otherwise),etc.Dummyvariablesarealsocalledbinaryvariables,forobviousreasonspersonwageeducfemalemarried13.1021023.
2、24221133.0020046.00440155.30701……………52511.565115263.5500Table:Apartiallistingofthedatainwage1.raw2ADummyIndependentVariableConsiderasimplemodelwithonecontinuousvariable(x)andonedummy(d)y=b0+d0d+b1x+uThiscanbeinterpretedasaninterceptshiftIfd=0,theny=b0+b1x+uIfd=1,theny=(b0+d0)+b1x+uThecaseof
3、d=0isthebasegroup,thend0=E(y
4、x,d=1)-E(y
5、x,d=0)3Exampleofd0>0xy}b0y=b0+b1xslope=b1d=0{d0y=(b0+d0)+b1xd=1(y=b0+d0d+b1x+u)4DummiesforMultipleCategoriesWecanusedummyvariablestocontrolforsomethingwithmultiplecategoriesWagedeterminations:wâge=-1.57-1.81female+0.572educ+0.025exper+0.141tenure(0.72
6、)(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.Istheresigni
7、ficantwagedifferencebtwmenandwomen?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
8、-wâgeM)/wâgeM=exp(-0.301)-1=0.3512=35.12%5Example:EffectsofComputerOwnershiponCollegeGPAWhetherastudentownacomputereffecttheperformanceofthestudent?colGPA=b0+d0PC+b1hsGPA+b2ACT+ucolGPA=1.26+0.157PC+0.447hsGPA+0.0087ACT+u(0.33)(0.057)(0.094)(0.0105)n=141,R2=0.219Thismeansthatastudentwhoownsa
9、computerhasapredictedGPAabout0.16pointshigherthanacomparablestudentwithoutacomputer.ThecoefficientofPCisdifferentfromzero,that’s,thedifferencebetweentwodifferenttypestudentsissignificant.6MultipleCategories(cont)Anycategoricalvariablecanbeturnedintoaseto