资源描述:
《北大暑期课程《回归分析报告》(linearregressionanalysis)讲义pku8》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、实用标准Class8:polynomialregressionanddummyvariablesI.PolynomialRegressionPolynomialregressionisaminortopic.Becausethereislittlethatisnew.Whatisnewisthatyoumaywanttocreateanewvariablefromthesamedataset.Thisisnecessaryifyouthinkthatthetrueregressionfunctionisnotlinearbutquadratic
2、,youmightwanttotrytousethequadraticfunction,thatis,thefirstandthesecondorderregressors.Forexample,weknowthatearningsincreasesasafunctionofage.Buttherelationshipisnotlinear.Therefore,weregressearningsonageandage2.Oneimportanttrickisthatifyouhavepolynomialregression,theregress
3、ionlineisnolongerlinearwhenyouplotthedependentvariableagainstindependentvariable.Useahypotheticalexample,Ifweobtainhasalineareffect,hasaquadraticeffect.Ifyouareaskedtoplotagainstthelineislinear.Ifyouareaskedtoplotagainst,thelineisquadratic.Saythesamplemeanofis0.5012358Interp
4、retationofcoefficientsinquadraticequationsSayimportant:thereisnosimplerelationshipbetweenand.Sometime,theeffectofonispositive,sometimestheeffectofonisnegative.Inotherwords,theeffectofondependsonthevalueof.Suggestion:plottheregressionforthedatarange.Onethingwecantell:Whenb2>0
5、,theeffectofonincreaseswith;Whenb2<0,theeffectofondecreaseswith.[figure]II.InterpretationofCoefficientsinPolynomialRegressionRelationshipbetweenYandthe“polynomial”independentvariableisnolongerlinear.Recallaspecialpropertyofthelinearfunction:therelationshipbetweenYandanX(sayX
6、k)isconstantforallvaluesofthisXandotherXvariables:(1).精彩文档实用标准Inapolynomialregression,thissimplerelationshipnolongerholdstrue.Foraquadraticregression,forexample,(2)wehave(3),whichisdependentonthevalueofXk.Ingeneral,thesituationwhereasimplelinearrelationshipofequation(1)isnot
7、trueiscalled“interaction”,atopictowhichwewilldevotealecture.Fornow,letusdefineinteractionasthesituationwherethe“effect”ofanindependentvariabledependsonthevalueofanothervariable.Inpolynomialregressionsinvolvinganindependentvariableofanorderhigherthan1(i.e.,quadraticorhigher),
8、wecaninterpretthisasanimplicitinteractionofavariablewithitself.Example,earn