资源描述:
《北大暑期课程《回归分析报告》(linear regression analysis)讲义pku8》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、实用文案Class8:polynomialregressionanddummyvariablesI.PolynomialRegressionPolynomialregressionisaminortopic.Becausethereislittlethatisnew.Whatisnewisthatyoumaywanttocreateanewvariablefromthesamedataset.Thisisnecessaryifyouthinkthatthetrueregressionfunctionisnotlinearbutquadra
2、tic,youmightwanttotrytousethequadraticfunction,thatis,thefirstandthesecondorderregressors.Forexample,weknowthatearningsincreasesasafunctionofage.Buttherelationshipisnotlinear.Therefore,weregressearningsonageandage2.Oneimportanttrickisthatifyouhavepolynomialregression,ther
3、egressionlineisnolongerlinearwhenyouplotthedependentvariableagainstindependentvariable.Useahypotheticalexample,Ifweobtainhasalineareffect,hasaquadraticeffect.Ifyouareaskedtoplotagainstthelineislinear.Ifyouareaskedtoplotagainst,thelineisquadratic.Saythesamplemeanofis0.5012
4、358InterpretationofcoefficientsinquadraticequationsSayimportant:thereisnosimplerelationshipbetweenand.Sometime,theeffectofonispositive,sometimestheeffectofonisnegative.Inotherwords,theeffectofondependsonthevalueof.Suggestion:plottheregressionforthedatarange.Onethingwecant
5、ell:Whenb2>0,theeffectofonincreaseswith;Whenb2<0,theeffectofondecreaseswith.[figure]II.InterpretationofCoefficientsinPolynomialRegressionRelationshipbetweenYandthe“polynomial”independentvariableisnolongerlinear.Recallaspecialpropertyofthelinearfunction:therelationshipbetw
6、eenYandanX(sayXk)isconstantforallvaluesofthisXandotherXvariables:(1).标准实用文案Inapolynomialregression,thissimplerelationshipnolongerholdstrue.Foraquadraticregression,forexample,(2)wehave(3),whichisdependentonthevalueofXk.Ingeneral,thesituationwhereasimplelinearrelationshipof
7、equation(1)isnottrueiscalled“interaction”,atopictowhichwewilldevotealecture.Fornow,letusdefineinteractionasthesituationwherethe“effect”ofanindependentvariabledependsonthevalueofanothervariable.Inpolynomialregressionsinvolvinganindependentvariableofanorderhigherthan1(i.e.,
8、quadraticorhigher),wecaninterpretthisasanimplicitinteractionofavariablewithitself.Example,earnin