/
York SPIDA John Fox Notes DummyVariable Regression Cop York SPIDA John Fox Notes DummyVariable Regression Cop

York SPIDA John Fox Notes DummyVariable Regression Cop - PDF document

min-jolicoeur
min-jolicoeur . @min-jolicoeur
Follow
400 views
Uploaded On 2015-06-05

York SPIDA John Fox Notes DummyVariable Regression Cop - PPT Presentation

Topics A Dichotomous explanatory variable Polytomous Explanatory Variables Modeling Interactions The Principle of Marginality 2010 by John Fox York SPIDA DummyVariable Regression 2 A Dichotomous Explanatory Variable The simplest case one dichotomous ID: 80594

Topics Dichotomous explanatory

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "York SPIDA John Fox Notes DummyVariable ..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Dummy-VariableRegression1.TopicsADichotomousexplanatoryvariablePolytomousExplanatoryVariablesModelingInteractionsThePrincipleofMarginality2010byJohnFoxYorkSPIDA Dummy-VariableRegression2.ADichotomousExplanatoryVariableThesimplestcase:onedichotomousandonequantitativeexplanatoryvariable.Relationshipsareadditive—thepartialeffectofeachexplanatoryvariableisthesameregardlessofthespecicvalueatwhichtheotherexplanatoryvariableisheldconstant.Theotherassumptionsoftheregressionmodelhold.2010byJohnFoxYorkSPIDA Dummy-VariableRegressionThemotivationforincludingaqualitativeexplanatoryvariableisthesameasforincludinganadditionalquantitativeexplanatoryvariable:toaccountmorefullyfortheresponsevariable,bymakingtheerrorssmaller;andtoavoidabiasedassessmentoftheimpactofanexplanatoryvariable,asaconsequenceofomittinganotherexplanatoryvariablesthatisrelatedtoit.2010byJohnFoxYorkSPIDA Dummy-VariableRegressionFigure1representsidealizedexamples,showingtherelationshipbetweeneducationandincomeamongwomenandmen.Inbothcases,thewithin-genderregressionsofincomeoneducationareparallel.Parallelregressionsimplyadditiveeffectsofeducationandgenderonincome.In(a),genderandeducationareunrelatedtoeachother:Ifweignoregenderandregressincomeoneducationalone,weobtainthesameslopeasisproducedbytheseparatewithin-genderregressions;ignoringgenderinatesthesizeoftheerrors,however.In(b)genderandeducationarerelated,andthereforeifweregressincomeoneducationalone,wearriveatabiasedassessmentoftheeffectofeducationonincome.Theoverallregressionofincomeoneducationhasanegativeslopeeventhoughthewithin-genderregressionshavepositiveslopes.2010byJohnFoxYorkSPIDA Dummy-VariableRegression (a)EducationIncome MenWomen (b)EducationIncome MenWomenFigure1.Inbothcasesthewithin-genderregressionsofincomeoneduca-tionareparallel:in(a)genderandeducationareunrelated;in(b)womenhavehigheraverageeducationthanmen.2010byJohnFoxYorkSPIDA Dummy-VariableRegressionWecouldperformseparateregressionsforwomenandmen.Thisapproachisreasonable,butithasitslimitations:Fittingseparateregressionsmakesitdifculttoestimateandtestforgenderdifferencesinincome.Furthermore,ifwecanassumeparallelregressions,thenwecanmorecientlyestimatethecommoneducationslopebypoolingsampledatafrombothgroups.2010byJohnFoxYorkSPIDA Dummy-VariableRegression2.0.1IntroducingaDummyRegressorOnewayofformulatingthecommon-slopemodelis,calledadummy-variableregressororanindicatorvariable,iscoded1formenand0forwomen:formenforwomenThus,forwomenthemodelbecomes(0)+andformen(1)+TheseregressionequationsaregraphedinFigure2.2010byJohnFoxYorkSPIDA Dummy-VariableRegression Figure2.Theparametersintheadditivedummy-regressionmodel.2010byJohnFoxYorkSPIDA Dummy-VariableRegression2.1Regressorsvs.ExplanatoryVariablesThisisourinitialencounterwithanideathatisfundamentaltomanylinearmodels:thedistinctionbetweenexplanatoryvariablesregressors.Here,isaqualitativeexplanatoryvariable(orfactor),withcategories(alsocalledlevelsfemaleThedummyvariableisaregressor,representingtheexplanatoryvariablegender.Incontrast,thequantitativeexplanatoryvariable(orcovariateandtheregressorareoneandthesame.Wewillseelaterthatanexplanatoryvariablecangiverisetoseveralregressors,andthatsomeregressorsarefunctionsofmorethanoneexplanatoryvariable.2010byJohnFoxYorkSPIDA Dummy-VariableRegression2.2HowDummyRegressionWorksInterpretationofparametersintheadditivedummy-regressionmodel:givesthedifferenceininterceptsforthetworegressionlines.Becausetheseregressionlinesareparallel,alsorepresentstheconstantseparationbetweenthelines—theexpectedincomeadvantageaccruingtomenwheneducationisheldconstant.Ifmenweredisadvantagedrelativetowomen,thenwouldbenegativegivestheinterceptforwomen,forwhomisthecommonwithin-gendereducationslope.2010byJohnFoxYorkSPIDA Dummy-VariableRegressionEssentiallysimilarresultsareobtainedifwecodezeroformenandoneforwomen(Figure3):Thesignofisreversed,butitsmagnituderemainsthesame.Thecoefnowgivestheincomeinterceptformen.Itisthereforeimmaterialwhichgroupiscodedoneandwhichiscodedzero.2010byJohnFoxYorkSPIDA Dummy-VariableRegression Figure3.Parameterscorrespondingtothealternativecodingformenandforwomen.2010byJohnFoxYorkSPIDA Dummy-VariableRegression3.PolytomousExplanatoryVariablesConsidertheregressionoftheratedprestigeofoccupationsontheirincomeandeducationlevels.Letusclassifytheoccupationsintothreecategories:(1)professionalandmanagerial;(2)‘white-collar’;and(3)‘blue-collar’.-categoryclassicationcanberepresentedintheregressionequationbyintroducingtwodummyregressors:Category BlueCollar WhiteCollar Professional&Managerial Theregressionmodelisthenisincomeandiseducation.2010byJohnFoxYorkSPIDA Dummy-VariableRegressionThismodeldescribesthreeparallelregressionplanes,whichcandifferintheirintercepts(seeFigure4):BlueCollar:WhiteCollar:Professional:givestheinterceptforblue-collaroccupations.representstheconstantverticaldistancebetweentheregressionplanesforwhite-collarandblue-collaroccupations.representstheconstantverticaldifferencebetweentheparallelregressionplanesforprofessionalandblue-collaroccupations(thevaluesofeducationandincome).Blue-collaroccupationsarecoded0forbothdummyregressors,so‘bluecollar’servesasacategorytowhichtheotheroccupa-tionalcategoriesarecompared.2010byJohnFoxYorkSPIDA Dummy-VariableRegression Figure4.Theadditivedummy-regressionmodelshowingthreeparallelregressionplanes.2010byJohnFoxYorkSPIDA Dummy-VariableRegressionThechoiceofabaselinecategoryisusuallyarbitrary,forwewouldtthesamethreeregressionplanesregardlessofwhichofthethreecategoriesisselectedforthisrole.Becausethechoiceofbaselineisarbitrary,wewanttotestthenullhypothesisofnopartialeffectofoccupationaltype,buttheindividualhypothesesareoflessThehypothesiscanbetestedbytheincremental-sum-of-squaresapproach,removingfromthemodel.2010byJohnFoxYorkSPIDA Dummy-VariableRegressionForapolytomousexplanatoryvariablewithcategories,wecodedummyregressors.Onesimpleschemeistoselecttherstcategoryasthebaseline,andtocodewhenobservationfallsincategory,and0otherwise,forCategory 23 1 2 ··· ········· Totestthehypothesisthattheeffectsofaqualitativeexplanatoryvariablearenil,deleteitsdummyregressorsfromthemodelandcomputeanincremental2010byJohnFoxYorkSPIDA Dummy-VariableRegression4.ModelingInteractionsTwoexplanatoryvariablesinteractindeterminingaresponsevariablewhenthepartialeffectofonedependsonthevalueoftheother.Additivemodelsspecifytheabsenceofinteractions.Iftheregressionsindifferentcategoriesofaqualitativeexplanatoryvariablearenotparallel,thenthequalitativeexplanatoryvariableinteractswithoneormoreofthequantitativeexplanatoryvariables.Thedummy-regressionmodelcanbemodiedtoreectinteractions.ConsiderthehypotheticaldatainFigure5(andcontrasttheseexampleswiththoseshowninFigure1,wheretheeffectsofgenderandeducationwereadditive):In(a),genderandeducationareindependent,sincewomenandmenhaveidenticaleducationdistributions.In(b),genderandeducationarerelated,sincewomen,onaverage,havehigherlevelsofeducationthanmen.2010byJohnFoxYorkSPIDA Dummy-VariableRegression (a)EducationIncome MenWomen (b)EducationIncome MenWomenFigure5.Inbothcases,genderandeducationinteractindeterminingincome.In(a)genderandeducationareindependent;in(b)womenonaveragehavemoreeducationthanmen.2010byJohnFoxYorkSPIDA Dummy-VariableRegressionInboth(a)and(b),thewithin-genderregressionsofincomeoneducationarenotparallel—theslopeformenislargerthantheslopeforwomen.Becausetheeffectofeducationvariesbygender,educationandgenderinteractinaffectingincome.Itisalsothecasethattheeffectofgendervariesbyeducation.Be-causetheregressionsarenotparallel,therelativeincomeadvantageofmenchangeswitheducation.Interactionisasymmetricconcept—theeffectofeducationvariesbygender,andtheeffectofgendervariesbyeducation.2010byJohnFoxYorkSPIDA Dummy-VariableRegressionTheseexamplesillustrateanotherimportantpoint:Interactioncorrelationofexplanatoryvariablesareempiricallyandlogicallydistinctphenomena.Twoexplanatoryvariablescaninteractwhetherornottheyarerelatedtoone-anotherstatistically.Interactionreferstothemannerinwhichexplanatoryvariablescombinetoaffectaresponsevariable,nottotherelationshipbetweentheexplanatoryvariablesthemselves.2010byJohnFoxYorkSPIDA Dummy-VariableRegression4.1ConstructingInteractionRegressorsWecouldmodelthedataintheexamplebyttingseparateregressionsofincomeoneducationforwomenandmen.Acombinedmodelfacilitatesatestofthegender-by-educationinteraction,however.Aproperlyformulateduniedmodelthatpermitsdifferentinterceptsandslopesinthetwogroupsproducesthesamettothedataasseparateregressions.Thefollowingmodelaccommodatesdifferentinterceptsandslopesforwomenandmen:Alongwiththedummyregressorforgenderandthequantitativeregressorforeducation,Ihaveintroducedtheinteractionregressor2010byJohnFoxYorkSPIDA Dummy-VariableRegressionTheinteractionregressoristheoftheothertworegressors:isafunctionof,butitisnotalinearfunction,avoidingperfectcollinearity.Forwomen,(0)+0)+andformen,(1)+1)+TheseregressionequationsaregraphedinFigure6:aretheinterceptandslopefortheregressionofincomeoneducationamongwomen.givesthedifferenceininterceptsbetweenthemaleandfemalegroupsgivesthedifferenceinslopesbetweenthetwogroups.2010byJohnFoxYorkSPIDA Dummy-VariableRegression Figure6.Theparametersinthedummy-regressionmodelwithinteraction.2010byJohnFoxYorkSPIDA Dummy-VariableRegressionTotestforinteraction,wecantestthehypothesisIntheadditive,no-interactionmodel,representedtheuniquepartialeffectofgender,whilethesloperepresentedtheuniquepartialeffectofeducation.Intheinteractionmodel,isnolongerinterpretableastheunqualiincomedifferencebetweenmenandwomenofequaleducation—isnowtheincomedifferenceatLikewise,intheinteractionmodel,isnottheunqualiedpartialeffectofeducation,butrathertheeffectofeducationamongwomen.Theeffectofeducationamongmen()doesnotappeardirectlyinthemodel.Extensiontopolytomousfactorsisstraight-forward.2010byJohnFoxYorkSPIDA Dummy-VariableRegression5.ThePrincipleofMarginalityTheseparatepartialeffects,ormaineffects,ofeducationandgenderaremarginaltotheeducation-by-genderinteraction.Ingeneral,weneithertestnorinterpretmaineffectsofexplanatoryvariablesthatinteract.Ifwecanruleoutinteractioneitherontheoreticalorempiricalgrounds,thenwecanproceedtotest,estimate,andinterpretmaineffects.ItdoesnotgenerallymakesensetospecifyandtmodelsthatincludeinteractionregressorsbutthatdeletemaineffectsthataremarginaltoSuchmodels—whichviolatetheprincipleofmarginality—areinterpretable,buttheyarenotbroadlyapplicable.2010byJohnFoxYorkSPIDA Dummy-VariableRegressionConsiderthemodelAsshowninFigure7(a),thismodeldescribesregressionlinesforwomenandmenthathavethesameinterceptbut(potentially)differentslopes,aspecicationthatispeculiarandofnosubstantiveinterest.Similarly,themodelgraphedinFigure7(b),constrainstheslopeforwomento0,whichisneedlesslyrestrictive.2010byJohnFoxYorkSPIDA Dummy-VariableRegression XY011=1D=0(b) Figure7.Twomodelsthatviolatetheprincipleofmarginality,byincludingtheinteractionregressorbut(a)omittingor(b)omitting2010byJohnFoxYorkSPIDA York SPIDA John Fox