多元回归分析进一步问题_第1页
多元回归分析进一步问题_第2页
多元回归分析进一步问题_第3页
多元回归分析进一步问题_第4页
多元回归分析进一步问题_第5页
已阅读5页,还剩50页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

关于多元回归分析进一步问题12MultipleRegressionAnalysis

多元回归分析

y=b0+b1x1+b2x2+...bkxk+u4.FurtherIssues进一步的问题第2页,共55页,2024年2月25日,星期天3ChapterOutline本章大纲EffectsofDataScalingonOLSStatistics数据的测度单位换算对OLS统计量的影响MoreonFunctionalForm对函数形式的进一步讨论MoreonGoodness-of-FitandSelectionofRegressors拟合优度和回归元选择的进一步探讨PredictionandResidualAnalysis预测和残差分析第3页,共55页,2024年2月25日,星期天4LectureNotes课堂笔记EffectsofRedefiningvariables重新定义变量的影响Estimatedcoefficients估计系数RsquaredR平方tstatisticst统计量Functionalform函数形式 Logarithmicform对数函数形式ModelswithQuadratics含二次式的模型Modelswithinteractionterms含交叉项的模型第4页,共55页,2024年2月25日,星期天5RedefiningVariables

重新定义变量Whywouldwewanttodoso?为什么我们想这样做?Often,datascalingisusedtoreducethenumberofzerosafteradecimalpointinanestimatedcoefficient,sothattheresultsappearprettier.数据测度单位变换经常被用于减少被估参数小数点后的零的个数,这样结果更好看一些。Sincethisismainlyanactionofdecoration,weexpectnothingessentialshouldchange.既然这样做主要为了好看,我们希望本质的东西不改变。第5页,共55页,2024年2月25日,星期天6RedefiningVariables:Anexample

重新定义变量:一个例子Consideramodelrelatinginfantbirthweighttocigarettesmokingandfamilyincome:以下模型反映了婴儿出生体重与孕妇吸烟量和家庭收入之间的关系:(1)Considerthefollowingrescaling:考虑如下单位变换:(2)Birthweightischangedfromouncestopounds出生体重单位由盎司变为磅(3)Numberofcigarettesischangedtopacksofcigrattes香烟的支数变为包数Theestimationresultsispresentedinthefollowingtable.估计结果列于下表

第6页,共55页,2024年2月25日,星期天7Table6.1Y(column)(1)bwght(2)bwghtlbs(3)bwghtX(rows)Cigs-0.4634(0.0916)-0.0289(0.0057)--Packs-----9.268(1.832)Faminc0.0927(0.0292)0.0058(0.0018)0.0927(0.0292)Intercept116.794(1.049)7.3109(0.0656)116.974(1.049)Observations138813881388R-squared0.02980.02980.0298SSR557,485.512177.5778557.485.51SER20.0631.253920.063第7页,共55页,2024年2月25日,星期天8Impactofchangingthescaleofthedependentvariable

改变被解释变量测度单位的影响Since1lbs=16oz,thedependentvariableistransformedbydividing16.因为1磅=16盎司,被解释变量被除以16。Wecomparecolumns(1)and(2).比较第1列与第2列。Theestimatedcoefficientsin(1)/16=thosein(2).(1)中被估参数/16=(2)中被估参数Thestandarderrorsofestimatedcoefficientsin(1)/16=thosein(2)(1)中被估参数的标准差/16=(2)中被估参数的标准差第8页,共55页,2024年2月25日,星期天9Impactofchangingthescaleofthedependentvariable

改变被解释变量测度单位的影响Thetstatisticsin(1)and(2)areidentical.(1)和(2)中t统计量相同TheRsquaredareidentical.R平方相同SSRin(1)/(16*16)=SSRin(2)(1)中SSR/(16*16)=(2)中SSRSER(standarderror)in(1)/16=SERin(2)(1)中SER(标准差)/16=(2)中SER第9页,共55页,2024年2月25日,星期天10Impactofchangingthescaleoftheindependentvariable

改变解释变量测度单位的影响Nownumberofcigarettesischangedtopacksofcigarettes.现在香烟数量单位变为包。Nowcomparecolumns(1)and(3).现在比较第(1)列和第(3)列。Coefficientsestimatesandstandarderrorsonfamincandinterceptarethesame.变量faminc系数和截距项的估计值和其标准差分析同上。Coefficientsestimatesandstandarderrorsonpacksare20timeslarger.packs的系数估计值和标准差变为20倍。第10页,共55页,2024年2月25日,星期天11Impactofchangingthescaleoftheindependentvariable

改变解释变量测度单位的影响Thetstatisticsareidentical.t统计量相同TheRsquaredareidentical.R平方相同TheSSRareidentical.SSR相同TheSERareidentical.SER相同第11页,共55页,2024年2月25日,星期天12RedefiningVariables

重新定义变量

Changingthescaleoftheyvariablewillleadtoacorrespondingchangeinthescaleofthecoefficientsandstandarderrors,sonochangeinthesignificanceorinterpretation改变变量y的测度单位会导致系数和标准差相应的改变,所以解释变量系数显著性和对其解释没有改变。Changingthescaleofonexvariablewillleadtoachangeinthescaleofthatcoefficientandstandarderror,sonochangeinthesignificanceorinterpretationonthisvariableandothervariables.改变一个变量x的测度单位会导致该变量系数和标准差的相应改变,所以所有解释变量显著性和对其解释没有改变。第12页,共55页,2024年2月25日,星期天13RedefiningVariables

重新定义变量Ifthedependentvariableappearsinlogarithmform,changingtheunitofmeasurementofthedependentvariabledoesnotaffectanyoftheslopecoefficient.如果被解释变量以对数形式出现,改变被解释变量度量单位对任何斜率系数没有影响。Thisfollowsfromlog(cy)=log(c)+log(y),rescalingywillresultinchangestotheinterceptbutnottheslopecoefficients.来自log(cy)=log(c)+log(y),改变y测度单位将改变截距,不改变斜率系数。第13页,共55页,2024年2月25日,星期天14BetaCoefficientsBeta系数Considerasampleregressionfunctionofthefollowingform:考虑如下形式的样本回归方程:

ŷ=200+20,000x1

+0.2x2Canwesaythatx1

isthemostimportantvariable?我们能说x1是最重要的变量吗?Nowlookattheunitsofeachvariable:现在,查看以下各个变量的单位:yindollarsy单位:美元x1incentsx1单位:美分x2inthousandsx2单位:千美元第14页,共55页,2024年2月25日,星期天15BetaCoefficientsBeta系数Whatproblemdoestheaboveexamplereveal?上例揭示了什么问题?Themagnitudeoftheestimatedcoefficientsarenotcomparable.被估计系数的大小是不可比较的。Arelatedproblemiswhenthemagnitudesofvariablesdiffertoomuch,theround-offerrorcanbeseriousinregressioncalculations.一个相关的问题是,当变量大小差别过大时,在回归中因运算近似而导致的误差会比较大。第15页,共55页,2024年2月25日,星期天16BetaCoefficientsBeta系数

Occasionallyyou’llseereferencetoa“standardizedcoefficient”or“betacoefficient”whichhasaspecificmeaning有时,我们会看见“标准化系数”或“Beta系数”,这些名称有着特殊的意义Ideaistoreplaceyandeachxvariablewithastandardizedversion–i.e.subtractmeananddividebystandarddeviation使用Beta系数是因为有时我们把y和各个x替换为标准化版本——也就是,减去均值后除以标准离差。Coefficientreflectsstandarddeviationofyforaonestandarddeviationchangeinx

系数反映对于一单位x的标准离差的y的标准离差。第16页,共55页,2024年2月25日,星期天17BetaCoefficientsBeta系数第17页,共55页,2024年2月25日,星期天18BetaCoefficientsBeta系数第18页,共55页,2024年2月25日,星期天19FunctionalForm函数形式

OLScanbeusedforrelationshipsthatarenotstrictlylinearinxandybyusingnonlinearfunctionsofxandy–willstillbelinearintheparametersOLS也可以用在x和y不是严格线性的情况,通过使用非线性方程,使得关于参数仍为线性。Cantakethenaturallogofx,yorboth可以取x,y(一个或全部)的自然对数Canusequadraticformsofx可以用x的平方形式Canuseinteractionsofxvariables可以用x的交叉项第19页,共55页,2024年2月25日,星期天20InterpretationofLogModels

对数模型的解释

Ifthemodelisln(y)=b0+b1ln(x)+u如果模型是ln(y)=b0+b1ln(x)+u

b1istheelasticityofywithrespecttoxb1是y对于x的弹性Ifthemodelisln(y)=b0+b1x+u如果模型是ln(y)=b0+b1x+u

b1isapproximatelythepercentagechangeinygivena1unitchangeinx,oftencalledsemi-elasticity.b1近似是,给定一单位x的改变,y的百分比变化,常被称为半弹性。第20页,共55页,2024年2月25日,星期天21Whyuselogmodels?

为什么使用对数模型?

TheslopecoefficientsonLoggedvariablesareinvarianttothescaleofthevariables.取对数后变量的斜率系数,不随变量测度单位改变。Theygiveadirectestimateofelasticityifbothregressorandregressandhavetakenlogs.如果回归元和回归子都取对数形式,斜率系数给出对弹性的一个直接估计。Formodelswithy>0,theconditionaldistributionisoftenheteroskedasticorskewed,whileln(y)ismuchlessso对于y>0的模型,条件分布经常偏斜或存在异方差,而ln(y)就小多了,所以Thedistributionofln(y)ismorenarrow,limitingtheeffectofoutliersln(y)的分布窄多了,限制了异常(或极端)观测值(outliers)的影响。第21页,共55页,2024年2月25日,星期天22SomeRulesofThumb

一些经验法则

Whattypesofvariablesareoftenusedinlogform?什么类型的变量经常用对数形式?Dollaramountsthatmustbepositive,wages,salaries,firmsales,andfirmmarketvalue.肯定为正的钱数:工资,薪水,企业销售额和企业市值。Verylargevariables,suchaspopulation,totalnumberofemployees,schoolenrollment,etc.非常大的变量:如人口,雇员总数和学校注册人数等。第22页,共55页,2024年2月25日,星期天23SomeRulesofThumb

一些经验法则Whattypesofvariablesareoftenusedinlevelform?什么类型的变量经常用水平值形式?Variablesmeasuredinyears,e.g.,education,experience,tenure,age用年测量的变量:如教育年限,工作经历,任期年限和年龄Variables,thatcanappeareitherinlogorinlevel:可以以水平值或对数形式出现的变量:Variablesthatareaproportionorpercent:unemployrate,theparticipationrateinapension,etc.比例或百分比变量:失业率,养老保险金参与率等。第23页,共55页,2024年2月25日,星期天24LimitationsofLogs

对数形式的限制Itcannotbeusedifavariabletakesonzeroofnegativevalues.一个变量取零或负值,则不能使用对数。Incaseswhenyisnonnegativebutcantake0,log(1+y)issometimesused.如果y非负但可以取零,则有时使用log(1+y)。Usinglog(1+y)andtheninterpretingtheestimatesasiftheestimateswerelog(y)isacceptablewhenthedataonyarenotdominatedbyzeros.当数据并非多数为零时,使用log(1+y)估计,并且假定变量为log(y),解释所得的估计值,是可以接受的。第24页,共55页,2024年2月25日,星期天25CautionsinusingLogs

慎重使用对数形式Noticethatwhenyisinlogform,itismoredifficulttopredicttheoriginalvariables,sincetheoriginalmodelallowustopredictlog(y)insteadofy.注意到,当y取对数形式时,更难以预测原变量的值,因为原模型允许我们预测log(y)而不是y。第25页,共55页,2024年2月25日,星期天26CautionsinusingLogs

慎重使用对数形式第26页,共55页,2024年2月25日,星期天27QuadraticModels

含二次式的模型

Foramodeloftheformy=b0+b1x+b2x2+uwecan’tinterpretb1aloneasmeasuringthechangeinywithrespecttox,weneedtotakeintoaccountb2aswell,since对于形式为y=b0+b1x+b2x2+u的模型,我们不能单独将b1解释为关于x,y变化的度量,我们需要将b2也考虑进来,因为第27页,共55页,2024年2月25日,星期天28QuadraticModels

含二次式的模型Ifoneisinterestedincalculatingthepredictedchangesinygivenastartingvalueofxandachangeinx,onecandirectlyuse(1).如果感兴趣的是,给定x的初始值和变动,预测y的变化,那么可以直接使用(1)。Ingeneral,wemayusetheaveragevalueofx,orthemedian,orthelowerandupperquantilestopredicty,dependingonthequestionofourinterest.一般来说,我们可以使用x的平均值,中值,或上下四分位数来预测y,取决于我们感兴趣的问题。第28页,共55页,2024年2月25日,星期天29QuadraticModels

含二次式的模型第29页,共55页,2024年2月25日,星期天30QuadraticModels

含二次式的模型第30页,共55页,2024年2月25日,星期天313.737.3724.4experwage第31页,共55页,2024年2月25日,星期天32MoreonQuadraticModels

对含二次式模型的进一步讨论

Supposethatthecoefficientonxispositiveandthecoefficientonx2isnegative假如x的系数为正,x2的系数为负。Thenyisincreasinginxatfirst,butwilleventuallyturnaroundandbedecreasinginx那么,y首先随x上升而上升,但最终转向随x上升而下降。第32页,共55页,2024年2月25日,星期天33MoreonQuadraticModels

对含二次式模型的进一步讨论

Supposethatthecoefficientonxisnegativeandthecoefficientonx2ispositive假如x的系数为负,x2的系数为正。Thenyisdecreasinginxatfirst,butwilleventuallyturnaroundandbeincreasinginx那么,y首先随x上升而下降,但最终转向随x上升而上升。第33页,共55页,2024年2月25日,星期天34InteractionTerms

交叉项

Foramodeloftheformy=b0+b1x1+b2x2+b3x1x2+uwecan’tinterpretb1aloneasmeasuringthechangeinywithrespecttox1,weneedtotakeintoaccountb3aswell,since对于形式为y=b0+b1x1+b2x2+b3x1x2+u的模型,我们不能单独将b1解释为关于x1,y变化的度量,我们需要将b3也考虑进来,因为第34页,共55页,2024年2月25日,星期天35InteractionTerms

交叉项第35页,共55页,2024年2月25日,星期天36InteractionTerms

交叉项Example6.3,page195.mple6.3,page195.第36页,共55页,2024年2月25日,星期天37MoreonGoodness-of-FitandSelectionofRegressors

拟合优度和解释变量选择的进一步探讨AdjustedR-Squared第37页,共55页,2024年2月25日,星期天38MoreonGoodness-of-FitandSelectionofRegressors

拟合优度和解释变量选择的进一步探讨WedefinethepopulationR-squaredistheproportionofthevariationinyinthepopulationexplainedbytheindependentvariables,as我们定义总体R2为:y的变异在总体中能被解释变量解释的比例,为TheadjustedR-squareisstillnotanunbiasedestimatorofthepopulationR-squared,becausetheratiooftwounbiasedestimatorsisnotanunbiasedestimator.调整过的R2仍不是总体R2的一个无偏估计量,因为两个无偏估计量的比例不是一个无偏估计量。第38页,共55页,2024年2月25日,星期天39MoreonGoodness-of-FitandSelectionofRegressors

拟合优度和解释变量选择的进一步探讨Theprimaryattractivenessofisthatisimposesapenaltyforaddingmoreindependentvariablestoamodel.调整过的R2最根本的吸引力,在于它对向模型增加自变量的惩罚。Ifweaddanewindependentvariabletoaregressionequation,increasesifandonlyifthetstatisticonthenewvariableisgreaterthanoneinabsolutevalue.如果我们向回归模型加入一个新的解释变量,当且仅当新变量的t统计量的绝对值大于1时,调整过的R2增加。第39页,共55页,2024年2月25日,星期天40UsingAdjustedR-SqraredtoChooseBetweenNonnestedModels

利用调整的R2在两个非嵌套模型中进行选择Twomodelsarenonnestedifneithermodelisaspecialcaseoftheother.如果两个模型中任何一个都不是另一个的特例,则两个模型是非嵌套的。TheFstatisticsonlyallowustotestnestedmodels,sincetherestrictedmodelisaspecialcaseoftheunrestrictedmodel.F统计量只允许我们检验嵌套的模型,因为有限制的模型是无限制模型的特例。Weneedsomeguidanceinchoosingamongnonnestedmodels.我们需要一些在无嵌套模型间进行选择的指导。第40页,共55页,2024年2月25日,星期天41UsingAdjustedR-SquaredtoChooseBetweenNonnestedModels

利用调整的R2在两个非嵌套模型中进行选择

Comparingtochooseamongdifferentnonnestedsetsofindependentvariablescanbevaluablewhenthesevariablesrepresentdifferentfunctionalform. 当变量有不同函数形式时,通过比较调整过的R2,在不同的解释变量的非嵌套组合中进行选择,是颇有价值的。Forexample,onemodelisy=b0+b1x1+b2log(x2)buttheotherisy=b0+b1x1+b2x2+b3x22.IftheAdjustedR-Squaredis0.3butitis0.6fromthesecondone,wetendtochoosethesecondmodel.例如,一个模型是y=b0+b1x1+b2log(x2), 另一个是y=b0+b1x1+b2x2+b3x22。 如果第一个模型调整过的R平方为0.3,而第二个为0.6,我们倾向于选择第二个模型第41页,共55页,2024年2月25日,星期天42UsingAdjustedR-SquaredtoChooseBetweenNonnestedModels

利用调整的R2在两个非嵌套模型中进行选择TheLimitationofAdjustedR-squared:wecannotuseittochoosebetweendifferentfunctionalformsforthedependentvariable.调整过的R2的限制:我们不能利用它在关于因变量函数形式不同的模型间进行选择第42页,共55页,2024年2月25日,星期天43PredictionAnalysis:theestimator

预测分析:估计量第43页,共55页,2024年2月25日,星期天44PredictionAnalysis:thestandarderror预测分析:标准差第44页,共55页,2024年2月25日,星期天45PredictionAnalysis:theConfidenceInterval

预测分析:置信区间第45页,共55页,2024年2月25日,星期天46PredictionAnalysis:ConfidenceIntervalforaparticulary

预测分析:一个特殊y的置信区间第46页,共55页,2024年2月25日,星期天47PredictionAnalysis:PredictionIntervalfory0

预测分析:y0的预测区间第47页,共55页,2024年2月25日,星期天48PredictionAnalysis:PredictionIntervalfory0

预测分析:y0的预测区间第48页,共55页,2024年2月25日,星期天49Sometimes,itisusefultoexamineindividualobservationstoseewhethertheactualvalue

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论