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