第十七--章相关分析与回归分析.pptx

上传人:zf 文档编号:30873013 上传时间:2024-09-13 格式:PPTX 页数:84 大小:1.96MB
下载 相关 举报
第十七--章相关分析与回归分析.pptx_第1页
第1页 / 共84页
第十七--章相关分析与回归分析.pptx_第2页
第2页 / 共84页
第十七--章相关分析与回归分析.pptx_第3页
第3页 / 共84页
第十七--章相关分析与回归分析.pptx_第4页
第4页 / 共84页
第十七--章相关分析与回归分析.pptx_第5页
第5页 / 共84页
点击查看更多>>
下载资源
资源描述

第十七--章相关分析与回归分析.pptx

《第十七--章相关分析与回归分析.pptx》由会员分享,可在线阅读,更多相关《第十七--章相关分析与回归分析.pptx(84页珍藏版)》请在冰豆网上搜索。

第十七--章相关分析与回归分析.pptx

ChapterSeventeenCorrelationAndRegression第十七章相关分析与回归分析学习目标l讨论积矩相关系数、偏相关和部分相关的概念,并说明这些相关关系如何为回归分析建立基础。

l解释二元回归的特点和方法,描述其一般模型、参数估计、标准化回归系数、显著性检验、预测准确性、残差分析和模型交叉检验。

l解释多元回归分析的特点和方法,尤其是逐步回归、含虚拟变量的回归以及回归中的方差和协方差分析。

l描述多元回归分析中用的特殊方法,尤其是逐步回归、含虚拟变量的回归以及回归中的方差和协方差分析。

l探讨非定量相关及其测量指标学习内容1.积矩相关系数2.偏相关3.非定量相关4.回归分析5.二元回归6.统计与二元回归分析的关系7.进行二元回归分析8.多元回归9.与二元回归分析相关的统计量9.进行多元回归分析10.逐步回归11.多重共线性12.预测的相对重要性13.交叉验证14.回归与虚拟变量15.方差分析与回归分析16.总结ProductMomentCorrelation积矩相关系数积矩相关系数r是最常用的概括两个定量(定距或定比尺度)变量X与Y的关系强度的统计量它是一个决定X与Y是否存在线性关系的指标。

由于这个指标最早由KarlPearson提出的,因此也被称为Pearson相关系数。

它同时也叫简单相关系数、双变量相关系数或者相关系数。

ProductMomentCorrelation积矩相关系数对于n个观测值的样本,变量为X和Y,积矩相关系数r计算为r=(Xi-X)(Yi-Y)Si=1n(Xi-X)2Si=1n(Yi-Y)2Si=1nDivisionofthenumeratoranddenominatorby(n-1)givesr=(Xi-X)(Yi-Y)n-1Si=1n(Xi-X)2n-1Si=1n(Yi-Y)2n-1Si=1n=COVxySxSyProductMomentCorrelation积矩相关系数r在-1.0和+1.0之间变化。

不论两个变量各自的测量单位是什么,相关系数都是不变的。

ExplainingAttitudeTowardtheCityofResidence研究对居住城市的态度Table17.1调查对象编号调查对象编号对城市的态度对城市的态度居住年限居住年限天气的重要性天气的重要性161032912113812443415101211646175878224911188109910111017812225ProductMomentCorrelation积矩相关系数相关系数的计算如下:

=(10+12+12+4+12+6+8+2+18+9+17+2)/12=9.333XY=(6+9+8+3+10+4+5+2+11+9+10+2)/12=6.583(Xi-X)(Yi-Y)Si=1n=(10-9.33)(6-6.58)+(12-9.33)(9-6.58)+(12-9.33)(8-6.58)+(4-9.33)(3-6.58)+(12-9.33)(10-6.58)+(6-9.33)(4-6.58)+(8-9.33)(5-6.58)+(2-9.33)(2-6.58)+(18-9.33)(11-6.58)+(9-9.33)(9-6.58)+(17-9.33)(10-6.58)+(2-9.33)(2-6.58)=-0.3886+6.4614+3.7914+19.0814+9.1314+8.5914+2.1014+33.5714+38.3214-0.7986+26.2314+33.5714=179.6668ProductMomentCorrelation积矩相关系数DecompositionoftheTotalVariation总变差分解r2=ExplainedvariationTotalvariation=SSxSSy=Totalvariation-ErrorvariationTotalvariation=SSy-SSerrorSSyDecompositionoftheTotalVariation总方差分解DecompositionoftheTotalVariation总变差分解r=0时的非线性关系PartialCorrelation偏相关偏相关系数是用于测量在控制或调整了一个或多个变量的基础上,两个变量之间的关系计算偏相关系数是需要考虑其“阶数”,这“阶数”说明有多少个变量被控制或调整简单相关系数r是零阶的,因为在测量两个变量之间关系时不需要控制额外变量的作用。

PartialCorrelation偏相关PartCorrelationCoefficient部分相关系数部分相关系数代表从X中去除其他自变量线性影响后,Y和X之间的相关性。

ry(x.z)部分相关系数计算如下:

通常认为偏相关系数比部分相关系数重要。

ry(x.z)=rxy-ryzrxz1-rxz2NonmetricCorrelation非定量相关rstrttrsrRegressionAnalysis回归分析Regressionanalysisexaminesassociativerelationshipsbetweenametricdependentvariableandoneormoreindependentvariablesinthefollowingways:

回归分析是分析定量因变量与一个或多个自变量之间相关关系的有效且易用的方法,可以用于以下几方面;Determinewhethertheindependentvariablesexplainasignificantvariationinthedependentvariable:

whetherarelationshipexists.确定自变量是否能够解释因变量的重要变差,即二者之间是否存在关系。

Determinehowmuchofthevariationinthedependentvariablecanbeexplainedbytheindependentvariables:

strengthoftherelationship.确定因变量中有多大比例的变差可以有自变量来解释,即关系的强度有多大。

RegressionAnalysis回归分析Determinethestructureorformoftherelationship:

themathematicalequationrelatingtheindependentanddependentvariables.确定二者关系的形式,即与自变量和因变量有关的数学方程式。

Predictthevaluesofthedependentvariable.预测因变量的值。

Controlforotherindependentvariableswhenevaluatingthecontributionsofaspecificvariableorsetofvariables.在评估特定变量贡献时,控制其他变量的作用。

Regressionanalysisisconcernedwiththenatureanddegreeofassociationbetweenvariablesanddoesnotimplyorassumeanycausality.尽管自变量可能解释一部分因变量的变差,但这并不表示必然存在因果关系StatisticsAssociatedwithBivariateRegressionAnalysis与二元回归分析相关的统计量Bivariateregressionmodel.ThebasicregressionequationisYi=+Xi+ei,whereY=dependentorcriterionvariable,X=independentorpredictorvariable,=interceptoftheline,=slopeoftheline,andeiistheerrortermassociatedwiththeithobservation.二元回归模型,基本的回归等式为Yi=+Xi+ei,其中Yi是因变量或标准变量,Xi为自变量或预测变量,为直线截距,为直线斜率,ei为第i个观测值的误差。

Coefficientofdetermination.Thestrengthofassociationismeasuredbythecoefficientofdetermination,r2.Itvariesbetween0and1andsignifiestheproportionofthetotalvariationinYthatisaccountedforbythevariationinX.可决系数变量之间联系的强度由可决系数r2类测量,其值在类测量,其值在0和和1之间之间变化,表表示变化,表表示Y的总变差中能被的总变差中能被X变差解释的比例。

变差解释的比例。

Estimatedorpredictedvalue.TheestimatedorpredictedvalueofYiisi=a+bx,whereiisthepredictedvalueofYi,andaandbareestimatorsofand,respectively.估计值或预测值:

Yi的估计值或预测值为=a+bx,为Yi预测值,a和b分别为和的估计值。

b0b1b0b1b0b1StatisticsAssociatedwithBivariateRegressionAnalysis与二元回归分析相关的统计量Regressioncoefficient.Theestimatedparameterbisusuallyreferredtoasthenon-standardizedregressioncoefficient.回归系数。

估计的参数b通常是指非标准化回归系数。

Scattergram.Ascatterdiagram,orscattergram,isaplotofthevaluesoftwovariablesforallthecasesorobservations.散点图。

散点图是根据两个变量的所有观测值绘制的图。

Standarderrorofestimate.Thisstatistic,SEE,isthestandarddeviationoftheactualYvaluesfromthepredictedvalues.估计标准误。

SEE表示Y的实际值与预测值之间的标准差Standarderror.Thestandarddeviationofb,SEb,iscalledthestandarderror.标准误。

B的标准差Seb被称作标准误。

YStatisticsAssociatedwithBivariateRegressionAnalysis与二元回归分析相关的统计量Standardizedregressioncoefficient.Alsotermedthebetacoefficientorbetaweight,thisistheslopeobtainedbytheregressionofYonXwhenthedataarestandardized.标准化回归系数。

也被称作beta系数或beta权数,是X与Y均为标准化数据时的斜率。

Sumofsquarederrors.Thedistancesofallthepointsfromtheregressionlinearesquaredandaddedtogethertoarriveatthesumofsquarederrors,whichisameasureoftotalerror,误差平方和。

将所有偏离回归拟合线的点的距离的平方和加总就得到误差平方和,值总误差的测量指标,记作tstatistic.Atstatisticwithn-2degreesoffreedomcanbeusedtotestthenullhypothesisthatnolinearrelationshipexistsbetweenXandY,orH0:

=0,wheret=b/SEbT统计量。

自由度为n-2的t统计量可用于检验X与Y不存在线性关系的零假设。

ejS2ConductingBivariateRegressionAnalysisPlottheScatterDiagram二元回归分析散点图二元回归分析散点图Ascatterdiagram,orscattergram,isaplotofthevaluesoftwovariablesforallthecasesorobservations.散点图就是根据两个变量的所有观测值绘制的图表Themostcommonlyusedtechniqueforfittingastraightlinetoascattergramistheleast-squaresprocedure.Infittingtheline,theleast-squaresprocedureminimizesthesumofsquarederrors,用一条直线对散点图进行拟合的最常用方法为最小二乘法.为找到最佳拟合线,最小二乘法可以令误差平方和最小。

ejS2ConductingBivariateRegressionAnalysis进行二元回归分析法Fig.17.2图PlottheScatterDiagram绘制散点图FormulatetheGeneralModel建立二元回归模型EstimatetheParameters估计参数EstimateStandardizedRegressionCoefficients估计标准化回归系数TestforSignificance显著性检验DeterminetheStrengthandSignificanceofAssociation确定相关关系的强度和显著性CheckPredictionAccuracy检查预测准确度ExaminetheResiduals残差检验Cross-ValidatetheModel模型交叉检验ConductingBivariateRegressionAnalysisFormulatetheBivariateRegressionModel分析二元回归模型Inthebivariateregressionmodel,thegeneralformofastraightlineis:

Y=Xb0+b1whereY=dependentorcriterionvariable因变量或标准变量X=independentorpredictorvariable自变量或预测变量=interceptoftheline直线的截距b0b1=slopeoftheline直线的斜率Theregressionprocedureaddsanerrortermtoaccountfortheprobabilisticorstochasticnatureoftherelationship:

在回归分析中需要加上误差项,以便考察变量之间关系的随机性Yi=b0+b1Xi+eiwhereeiistheerrortermassociatedwiththeithobservation.式中ei为第I个观察值相关的误差项PlotofAttitudewithDurationFig.17.34.52.256.7511.25913.593615.7518DurationofResidenceAttitudeWhichStraightLineIsBest?

Fig.17.49632.254.56.75911.2513.515.7518Line1Line2Line3Line4BivariateRegression二元回归Fig.17.5X2X1X3X5X4YYJJeJeJeJeJYYJJXY0+1XConductingBivariateRegressionAnalysisEstimatetheParameters二元回归参数分析areunknownandareestimatedfromthesampleobservationsusingtheequation在大多数情况下,和是未知的,需要根据等式从样本观测值中估计whereiistheestimatedorpredictedvalueofYi,andaandbareestimatorsofInmostcases,b0andb1Yi=a+bxiYand,respectively.b=COVxySx2=(Xi-X)(Yi-Y)Si=1n(Xi-X)Si=1n2=XiYi-nXYSi=1nXi2-nX2Si=1nb0b1b0ConductingBivariateRegressionAnalysisEstimatetheParameters二元回归参数分析Theintercept,a,maythenbecalculatedusing:

截距a则可以计算如下a=ForthedatainTable17.1,theestimationofparametersmaybeillustratedasfollows:

=(10)(6)+(12)(9)+(12)(8)+(4)(3)+(12)(10)+(6)(4)+(8)(5)+

(2)

(2)+(18)(11)+(9)(9)+(17)(10)+

(2)

(2)=917Xi2=102+122+122+42+122+62+82+22+182+92+172+22=1350-bYXS12iS=112=i1XiYiConductingBivariateRegressionAnalysisEstimatetheParameters二元回归参数分析Itmayberecalledfromearliercalculationsofthesimplecorrelationthat:

前面我们讲过简单相关系数的计算为:

=9.333=6.583Givenn=12,bcanbecalculatedas:

=0.5897a=XYb=917-(12)(9.333)(6.583)1350-(12)(9.333)2Y-bX=6.583-(0.5897)(9.333)=1.0793ConductingBivariateRegressionAnalysisEstimatetheStandardizedRegressionCoefficient估计标准化回归系数Standardizationistheprocessbywhichtherawdataaretransformedintonewvariablesthathaveameanof0andavarianceof1(Chapter14).标准化就是将原始数据转换为均值为0,方差为1的新变量的过程(见14章)Whenthedataarestandardized,theinterceptassumesavalueof0.数据进行标准化后,截距取值为0Thetermbetacoefficientorbetaweightisusedtodenotethestandardizedregressioncoefficient.Bata系数被用来表示标准化回归系数。

Byx=Bxy=rxyThereisasimplerelationshipbetweenthestandardizedandnon-standardizedregressioncoefficients:

标准化和非标准化回归系数的关系可以简单表示如下:

Byx=byx(Sx/Sy)ConductingBivariateRegressionAnalysisTestforSignificance二元回归显著性检验二元回归显著性检验ThestatisticalsignificanceofthelinearrelationshipbetweenXandYmaybetestedbyexaminingthehypotheses:

对于X和Y之间的线性关系的统计显著性可以通过以下假设进行检验Atstatisticwithn-2degreesoffreedomcanbeused,where通常采用双尾检验,对此要采用自由度为n-2的t统计量SEbdenotesthestandarddeviationofbandiscalledthestandarderror.Seb表示b的标准差,被称为标准误。

H0:

bb1=0H1:

bb10t=bSEbConductingBivariateRegressionAnalysisTestforSignificance二元回归显著性检验二元回归显著性检验Usingacomputerprogram,theregressionofattitudeondurationofresidence,usingthedatashowninTable17.1,yieldedtheresultsshowninTable17.2.Theintercept,a,equals1.0793,andtheslope,b,equals0.5897.Therefore,theestimatedequationis:

用计算机程序,根据表17-1的数据,可以建立对城市态度与居住年限的回归方程,其中截距a=1.0793,斜率b=0.5897,估计的方程式为:

Attitude()=1.0793+0.5897(Durationofresidence)Thestandarderror,orstandarddeviationofbisestimatedas0.07008,andthevalueofthetstatisticast=0.5897/0.0700=8.414,withn-2=10degreesoffreedom.B的标准误或标准差为0.07008,t=0.5897/0.0700自由度为n-2=10FromTable4intheStatisticalAppendix,weseethatthecriticalvalueoftwith10degreesoffreedomand=0.05is2.228foratwo-tailedtest.Sincethecalculatedvalueoftislargerthanthecriticalvalue,thenullhypothesisisrejected.从附录统计表4中,我们可以找到自由度为10,a=0.05时双尾检验t的临界值为2.228,由于t的计算值大于临界值,零假设被拒绝。

aYConductingBivariateRegressionAnalysisDeterminetheStrengthandSignificanceofAssociation确定相关关系的强度和显著性Thetotalvariation,SSy,maybedecomposedintothevariationaccountedforbytheregressionline,SSreg,andtheerrororresidualvariation,SSerrororSSres,asfollows:

总变差SSy可以分解为回归变差,SSreg和残差SSerror或Ssres,即SSy=SSreg+SSreswhereSSy=(Yi-Y)2nSi=1SSreg=(Yi-Y)2SSres=(Yi-Yi)2nSi=1nSi=1DecompositionoftheTotalVariationinBivariateRegression二元回归中的总变差分解Fig.17.6X2X1X3X5X4YXTotalVariationSSyResidualVariation残余变差SSresExplainedVariation解释变差SSregYConductingBivaria

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 农林牧渔 > 水产渔业

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1