资源描述:
《chapter7 - Multiple Regression Analysis with Qualitative Information (1×2).pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、2015/11/4Chapter7MultipleRegressionAnalysiswithQualitativeInformationBinary(orDummy)Variables1MainContents本章主要内容BasicsofDummyIndependentVariable虚拟变量作为解释变量进入模型的一般方式MultipleCategories多个类别的情形InteractionInvolvingDummies虚拟变量的交互项应Goodness-of-FitandSelectionofRegre
2、ssors拟合优度和回归元的选择ABinaryDependentVariable被解释变量是二值变量212015/11/4虚拟变量进入模型的一般方式:加法两个类别/多个类别情形3DummyVariable:Definition虚拟变量定义Adummyvariableisavariablethattakesonthevalue1or0,alsocalledasabinaryvariable.虚拟变量也称为二值变量,取值为0或者1422015/11/4DummyVariable:InterceptShift虚拟变量:体
3、现截距的不同---加法方式引进模型Considerasimplemodelwithonecontinuousvariable(x)andonedummy(d):将虚拟变量d加入模型:ydxu001Thiscanbeinterpretedasaninterceptshift:可以看作截距的变化:Ifd=0,theny=0+1x+uIfd=1,theny=(0+0)+1x+uThecaseofd=0isthebasegroup通常d=0的情形作为基准组Thedifferenceintheinter
4、ceptsis不同情形下的截距为:0Eyd1,xEyd0,x注意到Eyd1,x=001++xEyd;0,x=01+xdueonlytothequalitativecharacteristic.5DummyVariable:InterceptShift虚拟变量:截距的变化yy=(0+0)+1xd=1slope=1{d=00y=+x01}0x632015/11/4DummyVariable:DummyTrapProblem注意虚拟变量陷阱Question:Canwes
5、pecifythefollowingmodel:yfemalemalexu00111,ifindividualisfemalefemale0,otherwise1,ifindividualismalemale0,otherwise可以如此设定虚拟变量并建立模型吗?No!Thetwodummiesareperfectlinear:female+male=1.不可以!female+male=1,解释变量完全共线!Onlyuseoneofthetwodummiesinthemodeloru
6、sethetwodummiesinthemodelwithoutanintercept如果一定要包含这两个虚拟变量,则模型去掉常数项。7DummiesforMultipleCategories模型中包含多重类别因素情形(1)Example:logwage00female1married1educuTheimportantlimitationofthismodelisthatthemarriagepremiumisassumedtobethesameformenandwomen.局限:该模型隐
7、含婚姻对工资的影响,无论男女都是相同的。Now,Fourgroups:marriedmen,marriedwomen,singlemen,andsinglewomen.考虑四个组别,定义四个虚拟变量:logwage00marrmale1marrfem2singfem1educuHere,dummyvariablesformultiplecategoriesareused.Thebasegroupissinglemensuchthatthedummytrapisavoided.四个类别,但模型
8、中加入三个虚拟变量,基准组为单身男性。842015/11/4模型系数含义(一)logwage00marrmale1marrfem2singfem1educuElogwage单身男性,edu,01educElogwage已婚男性,ed