多元线性应用回归.ppt_第1页
多元线性应用回归.ppt_第2页
多元线性应用回归.ppt_第3页
多元线性应用回归.ppt_第4页
多元线性应用回归.ppt_第5页
已阅读5页,还剩107页未读 继续免费阅读

下载本文档

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

文档简介

1、浙江财经学院 倪伟才,1,第三章 多元线性回归,3.1 多元线性回归模型 3.2 回归参数的估计 3.3 参数估计量的性质 3.4 回归方程的显著性检验 3.5 中心化和标准化 3.6 相关阵与偏相关系数 3.7 本章小结与评注,浙江财经学院 倪伟才,2,第三章多元线性回归模型,例子: 工资收入y ,教育x1 、工资经验x2 ; 产品的销售量y,自身的价格x1、替代品的价格x2、互补品的价格x3; 某品牌手机的销售额y,广告费x1、价格x2、可支配的收入x3、研发的投入x4; 汽车的速度y,动力x1、重量x2; 血糖y,胰岛素x1、生长素x2。 以上例子的特点:被解释变量只有一个,解释变量有2

2、个或2个以上,这样的模型称为多元线性回归模型。 本章的主要内容:多元线性回归模型、基本假设、未知参数的估计及性质、回归方程的系数和回归方程的检验、预测等。 本章特点:利用矩阵进行计算。,浙江财经学院 倪伟才,3,3.1多元线性回归模型,一 多元线性回归模型的一般形式: y=0+1 x1+2 x2+p x p + y为被解释变量,是随机变量; x1, x2 , ,x p 为解释变量,确定性变量,可以控制和测量; 0 ,1 , , p 是(p+1)个未知参数; 0回归常数, 1 , , p 回归系数。 n组样本观测值(xi 1 , xi 2 , xi 3 , , x i p ; y i)i=1,2

3、,n. (每一组样本观测值为一个向量,前面一个下标 i 表示第 i 组样本观测值,后面一个下标表示解释变量),浙江财经学院 倪伟才,4,多元线性回归模型的矩阵形式,浙江财经学院 倪伟才,5,矩阵形式,其中Y,均为n维列向量;X为n*(p+1)的矩阵;为p维列向量,浙江财经学院 倪伟才,6,二.多元线性回归模型的基本假设,1. x1 , x2 , , xp是确定性变量. 2. xi (i=1 ,2 , p.)之间无线性关系(即无共线性). 3. 高斯马尔科夫条件:E(i)=0, i=1, 2, n. ; Cov (i , j)=0 , ij; Cov (i , j)=2, i=j . 4. i的

4、正态性假设: i N(0, 2 )。,浙江财经学院 倪伟才,7,三、回归系数的解释 例题,多元线性回归方程的解释,y表示空调机的销售量, x1表示空调机的价格, x2表示消费者可用于支配的收入。,y=0+1x1+2x2+ E(y)=0+1x1+2x2,在x2保持不变时,有,在x1保持不变时,有,浙江财经学院 倪伟才,8,三、多元线性回归方程的系数解释,浙江财经学院 倪伟才,9,四.完全共线性 例子,假设我们想估计竞选支出对竞选结果的影响. 假定每次选举都有两位侯选人.令vote A为侯选人A的得票率, expend A为侯选人A的竞选支出; expend B为侯选人B的竞选支出; tot ex

5、pend为竞选总支出.为了将每个侯选人竞选支出与竞选总支出的影响隔离开,考虑如下模型: vote A=0+1 expend A +2 expend B+3 totexpend+ 由于expend A +expend B=tot expend, 因此这3个自变量存在完全共线性.只要解释1 的意义就会揭示出问题. 参数1 被认为是在保持侯选人B的竞选支出和竞选总支出不变的情况下,度量了侯选人A的竞选支出对其得票率的影响.因为如果expend B和tot expend都保持不变,我们就不可能增加expend A ,所以这就毫无意义. 解决完全共性方法:将3个自变量中去掉1个.,浙江财经学院 倪伟才,

6、10,利用矩阵形式求回归参数的估计,关于向量求导,浙江财经学院 倪伟才,11,浙江财经学院 倪伟才,12,关于矩阵求导,浙江财经学院 倪伟才,13,浙江财经学院 倪伟才,14,浙江财经学院 倪伟才,15,浙江财经学院 倪伟才,16,残差性质,浙江财经学院 倪伟才,17,rank(X)=p+1 rank(XX) =p+1,浙江财经学院 倪伟才,18,例 题(用Stata!),数据: ch05pr04.dta 请用矩阵求线性回归模型的系数估计值 1:计算矩阵形式XX 2:计算矩阵形式(XX)-1 3:计算矩阵形式XY 4:计算矩阵形式系数的估计值 (XX)-1 XY 5:将用矩阵运算得到的系数估计

7、值和软件的直接回归得到的结果比较!,浙江财经学院 倪伟才,19,Stata命令,数据:ch05pr04.dta gen one=1 mkmat y,mat(y) mkmat (one x),mat(x) mat list x mat list y mat b=inv(x*x)*x*y mat list b reg y x,浙江财经学院 倪伟才,20,最大似然估计,yN(X,2In),等价于使(y-X)(y-X)达到最小,这又完全与OLSE一样,浙江财经学院 倪伟才,21,例 3.1 (数据:12元回归.sav),例3.1国际旅游外汇收入是国民经济发展的重要组成部分,影响一个国家或地区旅游收入的

8、因素包括自然、文化、社会、经济、交通等多方面的因素,本例研究第三产业对旅游外汇收入的影响。中国统计年鉴把第三产业划分为12个组成部分,分别为x1农林牧渔服务业,x2地质勘查水利管理业,x3交通运输仓储和邮电通信业,x4批发零售贸易和餐饮业,x5金融保险业,x6房地产业,x7社会服务业,x8卫生体育和社会福利业,x9教育文化艺术和广播,x10科学研究和综合艺术,x11党政机关,x12其他行业。采用1998年我国31个省、市、自治区的数据,以国际旅游外汇收入(百万美元)为因变量y,以如上12 个行业为自变量做多元线性回归,数据见表3.1,其中自变量单位为亿元人民币。,浙江财经学院 倪伟才,22,残

9、差(abstracted from Greene ECONOMETRIC ANALYSIS chapter 3),浙江财经学院 倪伟才,23,we can interpret M as a matrix that produces the vector of least squares residuals in the regression of y on X when it premultiplies any vector y. It is convenient to refer to this matrix as a “residual maker.” It follows that MX

10、 = 0. One way to interpret this result is that if X is regressed on X, a perfect fit will result and the residuals will be zero.,The n n matrix M defined is fundamental in regression analysis. You can easily show that M is both symmetric (M = M) and idempotent (M = M2).,residual maker: M,浙江财经学院 倪伟才,

11、24,fit value,浙江财经学院 倪伟才,25,The matrix P, which is also symmetric and idempotent, is a projection matrix. It is the matrix formed from X such that when a vector y is premultiplied by P, the result is the fitted values in the least squares regression of y on X. This is also the projection of the vecto

12、r y into the column space of X.,projection (or hat)matrix: P,浙江财经学院 倪伟才,26,projection (or hat)matrix: P性质,1:对称矩阵 2:幂等矩阵,浙江财经学院 倪伟才,27,残差的方差协方差矩阵,浙江财经学院 倪伟才,28,随机误差项的方差2的无偏估计为,浙江财经学院 倪伟才,29,课堂练习,数据见:TableF2.2.dta 题目来源于Greene Notes3 解释变量y=G,x=(one,pg,y) 请用Stata计算: 1:xx, xy, (xx) -1, b 2:M 3:xe=xMy,whe

13、re e is residuals 4:MX,浙江财经学院 倪伟才,30,Stata命令,egen one=fill(1,1) mkmat G,mat(y) mkmat one Pg Y,mat(x) mat b=inv(xx)*x*y mat e=m*y mat xte=x*m*y mat list xte mat m=I(36)-x*inv(x*x)*x mat mx=m*x mat list mx,浙江财经学院 倪伟才,31,补充内容(矩阵计算),Applied Linear Regression Models (Fourth Edition) chapter5 simple linea

14、r regression Problems 5.23, 5.25 例题 Problems 5.23 学生练习: Problems 5.25 具体请见word格式: 回归模型的矩阵计算(stata).doc,浙江财经学院 倪伟才,32,Homework,浙江财经学院 倪伟才,33,3.3参数估计的性质(BLUE),浙江财经学院 倪伟才,34,浙江财经学院 倪伟才,35,特例 (一元线性回归模型),当p=1时,浙江财经学院 倪伟才,36,性质 3: D()=2(X X) -1的意义:,浙江财经学院 倪伟才,37,Calculating Parameter and Standard Error Es

15、timates for Multiple Regression Models,Example: The following model with k=3 is estimated over 15 observations: and the following data have been calculated from the original Xs. Calculate the coefficient estimates and their standard errors. To calculate the coefficients, just multiply the matrix by

16、the vector to obtain To calculate the standard errors, we need an estimate of 2.,浙江财经学院 倪伟才,38,(contd),The variance-covariance matrix of is given by The variances are on the leading diagonal: We write:,浙江财经学院 倪伟才,39,性质4: 高斯马尔可夫定理,Gauss-Markov theorem: 在高斯马尔可夫条件下, 即E()=0 , E( )=2I ,在的所有线性无偏估计中,由最小二乘法

17、得到的估计值 的方差最小.(即BLUE) 注可能存在非线性函数(指的是y1,y2, y n的函数 ),是无偏估计,但它的方差比由最小二乘法得到的估计值 的方差要小 可能存在有偏估计, 它的方差比由最小二乘法得到的估计值 的方差要小 本定理的一个前提是在的线性,无偏估计中. 本定理的证明采用矩阵形式.详细过程请参考Econometric Models and Economic ForecastsPindyck Appendix 4.3 The Multiple Regression Model in Matrix Form 该书110,111页,此种证明方法较繁琐! 建议采用Greene Eco

18、nometric Analysis的方法!,浙江财经学院 倪伟才,40,Greene的方法!(要求掌握!),浙江财经学院 倪伟才,41,Cond,浙江财经学院 倪伟才,42,注解:,Gauss-Markov theorem的证明可以参考 James H.Stock,Mark W.Watson Introduction to EconometricsAPPENDIX 16.5,浙江财经学院 倪伟才,43,参数估计量的性质,性质5 cov(,,e)=0,此性质说明 与e不相关,在正态假定下等价于与e独立, 从而与 独立。,性质6 在正态假设,(1),(2),浙江财经学院 倪伟才,44,3.4 回归

19、方程的显著性检验,浙江财经学院 倪伟才,45,M0 很方便的记号!,浙江财经学院 倪伟才,46,M0 性质,浙江财经学院 倪伟才,47,SST,SSR,SSE,浙江财经学院 倪伟才,48,SST=SSR+SSE,浙江财经学院 倪伟才,49,请用矩阵计算重点是3种平方和,浙江财经学院 倪伟才,50,Stata,例:数据:chap05pr04.dta gen one=1 mkmat one x,mat(x) mkmat y,mat(y) mat b=inv(x*x)*x*y mat p=x*inv(x*x)*x mat m=I(5)-p mat yhat=p*y mat e=m*y mat i=J

20、(5,1,1) mat list i mat m0=I(5)-i*inv(i*i)*i mat list m0,浙江财经学院 倪伟才,51,Cond,mat ssr=e*e mat sse=yhat*m0*yhat mat sst=y*m0*y mat list sse mat list ssr mat list sst reg y x 具体的输出结果请参考:3种平方和的矩阵计算.doc 练习:Applied Linear Regression Modelschapter5 problems5.24 数据: chap05pr21.dta,浙江财经学院 倪伟才,52,样本决定系数 R2= SSE

21、/ SST=1 SSR/ SST R2 measures the proportion of variation in Y which is explained by the multiple regression equation. R2 is often used informally as a goodness of fit statistic and to compare the validity of regression results under alternative specifications of the independent variables in the mode

22、l . However, there are several problems with the use of R2 . First, all our statistic results follow from the initial assumption that the model is correct ; we have no procedure that compares alternative specifications. Second, R2 is sensitive to the number of independent variables included in the r

23、egression model. The addition of more independent variables to the regression equation can never lower R2 and is likely to raise it. (The addition of a new explanatory variable does not alter SST but is likely to increase SSE. ) Thus ,one could simply add more variables to an equation if one wished

24、only to maximize R2.,浙江财经学院 倪伟才,53,Adjusted R2 要掌握!,The difficulty with R2 as a measure of goodness of fit is that R2 pertains only to explained and unexplained variation in Y and therefore does not account for the number of degree of freedom. A natural solution is to use variances, not variations,

25、thus eliminating the dependence of goodness of fit in the number of independent variables in the model.,浙江财经学院 倪伟才,54,Adjusted R2性质,浙江财经学院 倪伟才,55,三.统计量:回归方程总体显著性的检验,浙江财经学院 倪伟才,56,Cond,浙江财经学院 倪伟才,57,联合排除性约束的F检验 很重要,务必掌握,浙江财经学院 倪伟才,58,联合排除性约束的F检验的公式记住,浙江财经学院 倪伟才,59,联合排除性约束的F检验和一般F检验的关系,一般F检验实际上就是联合排除性

26、约束的F检验的特例!,浙江财经学院 倪伟才,60,一道有趣的题目:Wooldridge question4.5,浙江财经学院 倪伟才,61,练习,Consider Patient satisfaction chap06pr15.dta 1:Test whether X3 can be dropped from the regression model given that X1 and X2 are retained. Use F test statistic and level of significance 0.05.State the alternatives, decision rul

27、e, and conclusion. What is the P-value of the test? 2:Test whether 1=-1 and 2=0.State the alternatives, full model and reduced model, decision rule, and conclusion. What is the P-value of the test? abstracted from Applied Linear Regression Models Problems 7.5 and 7.9,浙江财经学院 倪伟才,62,Stata chap06pr15.d

28、ta,1: reg y x1 x2 x3 test x3 di 3.600.5 1.8973666 2: quireg y x1 x2 x3 test x1=-1 F( 1, 42) = 0.43 Prob F = 0.5133 test x2=0,accumulate F( 2, 42) = 0.88 Prob F = 0.4208,浙江财经学院 倪伟才,63,四. t统计量:个别回归系数的显著性检验,浙江财经学院 倪伟才,64,五.讲解课本例3.1 (12元.dta),注:全体12个自变量做为整体对y有显著性的线性关系;但每一个自变量对y没有显著性的线性关系。 :对于多元回归而言,回归方程

29、总体性的显著性F检验和回归系数的个别显著性的t检验不同;原因在于多重共线性。 如何才能使每一个变量都对y具有显著性影响: 方法:剔除多余变量,一个一个剔除,先剔除p值最大的,进行检验,依次进行,直到所有的变量对y的影响都是显著的(即每个p值均小于).,浙江财经学院 倪伟才,65,Stata for 课本例3.1,数据: 12元.dta reg y x* reg y x2-x12 reg y x3-x12 reg y x3-x11 reg y x3 x5-x11 reg y x3 x5 x6 x8-x11 reg y x3 x5 x8-x11 reg y x3 x8-x11 reg y x3 x

30、8 x9 x11,浙江财经学院 倪伟才,66,六.对F显著,t不显著的直观解释,y : the total travel time; X1 : the number of miles traveled; X2 : the number of gallons of gasoline consumed. Assume that we obtain the equation and find that the F test shows the relationship to be significant .Then suppose we conduct a test on 1 to determin

31、e whether 1 0 ,and we cannot reject H0: 1 =0 .Does this mean that travel time y is not related to miles traveled x1 ?,浙江财经学院 倪伟才,67,Cond,Not necessarily .What it probably means is that with x2 already in the model, x1 does not make a significant contribution to determining the value of y . This inte

32、rpretation makes sense in our example: if we know the amount of gasoline consumed, we do not gain much additional information useful in predicting y by knowing the miles traveled. Similarly, a t test might lead us to conclude 2 =0 on the grounds that ,with x1 in the model ,knowledge of the amount of

33、 gasoline consumed does not add much.,浙江财经学院 倪伟才,68,3.5 标准化系数,请参考Applied Linear Regression Modelschapter7, 7.5部分,Standardized Multiple Regession Model,Purpose: A standardized form of the general multiple regression model is employed to control round off errors in normal equations calculations and to

34、 permit comparisons of the estimated regression coefficients in common units.,浙江财经学院 倪伟才,69,Round off Errors in calculations,The results from normal equations calculations can be sensitive to rounding of data in intermediate stages of calculations .When the number of X variables is small-say, three

35、or less-round off effects can be controlled by carrying a sufficient number of digits in intermediate calculations .Indeed, most computer regression programs use double-precision arithmetic in all computations to control round off effects. Still, with a large number of X variables ,serious round off

36、 effects can arise despite the use of many digits in intermediate calculations .,浙江财经学院 倪伟才,70,Cond,Round off errors tend to enter calculations primarily when the inverse of XX is taken. The danger of serious round off errors in (XX)-1 is particularly great when(1)XX has a determinant that is close

37、to zero and/or (2)the elements of XX differ substantially in order to magnitude. The first condition arises when some or all of the X variables are highly intercorrelated. The second condition arises when the X variables have substantially different magnitudes so that the entries in the XX matrix co

38、ver a wide range, say, from 15 to 49000000,浙江财经学院 倪伟才,71,Lack of Comparability in Regression Coefficients,例:考虑二元回归方程,从表面上看,2000比2大,误解为x1对y的平均影响要比x2对y的平均影响要大,复习回归系数的实际意义,联系:可口可乐:比2升多送250毫升! 其它的:如买一送三。,浙江财经学院 倪伟才,72,2000表示x1增加1吨,y平均增加2000个单位;,实际上, x1 ,x2对y的平均影响是相同的。, x1 , x2的单位不同, x1的单位为吨, x2的单位为公斤,2表

39、示x2增加1公斤, y平均增加2个单位 即:表示x2增加1吨, y平均增加2000个单位,浙江财经学院 倪伟才,73,Why to transform variables,The transformation to obtain the standardized regression model ,called the correlation transformation, makes all enries in the XX matrix for the transformed variables fall between -1 and 1 inclusive, so that the ca

40、lculation of the inverse matrix becomes much less subject to round off errors due to dissimilar orders of magnitudes than with the original variables.,浙江财经学院 倪伟才,74,Correlation Transformation,The correlation transformation is a simple modification of the usual standardization of a variable. The corr

41、elation transformation is a simple function of the standardized variables,浙江财经学院 倪伟才,75,变量标准化,浙江财经学院 倪伟才,76,Formula for correlation transformation,浙江财经学院 倪伟才,77,Standardized Regression Model,The regression model with the transformed y* and xk* as defined by the correlation transformation formula is

42、called a standardized regression model and is as follows: The reason why there is no intercept parameter in the standardized regression model is that the least squares calculations always would lead to an estimated intercept term of zero if an intercept parameter were present in the model.,浙江财经学院 倪伟

43、才,78,Relation,It is easy to show that the parameters *0,*1,. ,*p in the standardized regression model and the original parameters 0,1,. ,p in the ordinary multiple regression model are related as follows:,We see that the standardized regression coefficients *k and the original regression coefficient

44、s k are related by simple scaling factors involving ratios of standard deviations,浙江财经学院 倪伟才,79,标准化系数的推导,浙江财经学院 倪伟才,80,In order to compare the importance of the independent variables in determining the dependent variable, the standardized coefficients are more appropriate for the purpose.,浙江财经学院 倪伟才

45、,81,标准化回归系数与普通最小二乘回归系数之间的关系:,标准化回归方程:,注意:标准化回归方程回归常数项为0 !,浙江财经学院 倪伟才,82,求标准化系数的步骤,1:先将y, x1, x2, ,x p 标准化,2:然后将y的z 得分对x1,x2,x p的z 得分进行回归,3:最后根据回归方程得到标准化系数,浙江财经学院 倪伟才,83,例:污染对住房价格的影响(Wooldridge p175 example 6.1)(数据见hprice2.sav),被解释变量:price; 解释变量:nox(氧化亚氮), crime, rooms, dist, stratio(学生和教师的比例),例题讲解(s

46、pss),考虑price关于nox , crime , room, dist,stratio 的多元线性回归,浙江财经学院 倪伟才,84,结合例子回归方程标准化的3种方法:,首先descriptive statistics- descriptives options-mean,std.deviation;然后利用compute 产生各个变量的z得分;最后进行回归.(该方法主要为了熟悉标准化的具体过程!),利用regression直接得到!,利用descriptives-save standardized values as variables直接产生z得分,再进行回归.(该方法可以马上得到z得

47、分!),浙江财经学院 倪伟才,85,(3)根据结果,在环境污染、犯罪率、住房的大小的3个自变量中对价格影响最大的是哪种因素?最小呢?,如果想知道每个自变量对平均住房价格的美元价值的影响,那就应该使用未经标准化的变量。,思 考:,提 醒,(1)写出标准化回归方程:,(2)标准化回归方程中的标准化系数的符号与实际一致吗?,浙江财经学院 倪伟才,86,Stata,data:chap07ta05.dta egen ys = std(y) egen x1s = std(x1) egen x2s= std(x2) regress ys x1s x2s, noconstant regress y x1 x2

48、, beta,浙江财经学院 倪伟才,87,练习,Consider Patient satisfaction chap06pr15.dta 1:Transform the variables by means of the correlation transformation formula and fit the standardized regression model. 2:Transform the estimated standardized regression coefficients back to the ones for fitted regression model in

49、the original variables. abstracted from Applied Linear Regression Models Problems 7.18,浙江财经学院 倪伟才,88,Stata for 练习chap06pr15.dta,egen ys=std(y) egen x1s=std(x1) egen x2s=std(x2) egen x3s=std(x3) reg ys x1s x2s x3s,nocons sum y x1 x2 x3 di -.5906664 *17.23646 /8.918092 di -.1106149 *17.23646 / 4.31355

50、6 di -.2339312 *17.23646 / .2993391 reg y x1 x2 x3,beta,浙江财经学院 倪伟才,89,XX matrix for transform variables,其中r i j为xi , x j之间的简单相关系数,浙江财经学院 倪伟才,90,Cont.,We consider the XX matrix for the transformed variables .The X variable here is:,Remember that the standardized regression model does not contain an i

51、ntercept term; hence, there is no column of 1s in the X matrix.,浙江财经学院 倪伟才,91,Formula: XX=rxx,It can be shown that the XX matrix for the transformed variables is simply the correlation matrix of the X variables. XX=rxx Since the XX matrix for the transformed variables consists of coefficients of cor

52、relation between the X variables, all of its elements are between 1 and 1 and thus are of the same order of magnitude. As we pointed out earlier, this can be of great help in controlling round off errors when inverting the XX matrix,浙江财经学院 倪伟才,92,comment,We illustrate that the XX matrix for the tran

53、sformed variables is the correlation matrix of the X variables by considering two entries in the matrix:,1:In the upper left corner of XX we have:,2:In the first row, second column of XX, we have,浙江财经学院 倪伟才,93,Estimated Standardized Regression Coefficients,浙江财经学院 倪伟才,94,comment,When there are two X

54、variables in the regression model, we can readily see the algebraic from of the standardized regression coefficients.,浙江财经学院 倪伟才,95,3.6相关矩阵、偏决定系数、偏相关系数,1:自变量的样本相关阵,其中r i j为xi , x j之间的简单相关系数,样本相关阵是对称的,一.样本相关阵,浙江财经学院 倪伟才,96,2:在样本相关阵的基础上进一步求出y与每个自变量xi的相关系数r y i ,得到增广的样本相关阵,浙江财经学院 倪伟才,97,例:计算课本例3.1旅游外汇收

55、入的相关矩阵和增广相关矩阵(注意两者的区别) (数据见12元回归.sav),问题:y和哪个自变量的相关性最强? 哪些自变量的相关系数大于0.9?,解答:ry7=0.741 ; r56=0.989, r34=0.934, r84=0.926, r89=0.937, r811=0.906, r56=0.989,浙江财经学院 倪伟才,98,二.偏决定系数,偏决定系数衡量在回归方程中已包含了若干个自变量时,再引入某一个新的自变量时,y的残差会发生改变,残差平方和的相对减少量,可以衡量某自变量的引进对y的边际贡献(marginal contribution).,回忆:复决定系数R2是衡量回归方程拟合度的

56、一个指标,所有的自变量作为整体解释y的变异的比例 .,复相关系数R实际上是y和y的预测值的样本相关系数。(上机验证12元回归.sav ),浙江财经学院 倪伟才,99,模型中已含有x2,再加入X1使y残差平方和的相对减少量是r2y1 ;2=SSR(X2) SSR(X1 , X2 )/ SSR(X2);称r2y1 ;2为已含有x2,y和x1的偏决定系数,二元线性回归模型的偏决定系数:,SSR(X1)表示只含 x1时y的残差平方和;,SSR(X2)表示只含 x2时y的残差平方和;,SSR(X1 , X2 )表示同时含 x1, X2时y的残差平和。,模型中已含有x1,再加入X2使y残差平方和的相对减少

57、量是r2y2 ;1=SSR(X1) SSR(X1 , X2 )/ SSR(X1);称r2y2 ;1为已含有x1,y和x2的偏决定系数,偏决定系数的意义,y和x1的偏决定系数r2y2 ;1 :未被x1解释的y的变异部分由于x2被引进到模型中来而得到解释的比例。,浙江财经学院 倪伟才,100,偏决定系数实际上就是联合F检验,上机验证12元回归.sav Regression y on x1,block x2, And statistics-R squared change,浙江财经学院 倪伟才,101,三、 偏相关系数,r 1 2 ; y = y保持不变下的x1和x2的偏相关系数.,考虑二元线性回归模型的偏相关系数,定义,r y 1 ; 2 = x2保持不变下的y和x1的偏相关系数;,r y 2 ; 1 = x1保持不变下的y和x2的偏相关系数 ;,浙江财经学院 倪伟才,102,偏相关系数的例题(数据见pcorr.dta), 做残差e1 对残差e2 的回归 。 e2 前的估计系数是x1 的单位变化对y的净影响。 (理解多元回归系数的意义),计算y和x1的偏相关系数,分3步:,做y仅对x2的回归,得到残差e1,做x1仅对x2的回归,得到残差e2 . 注意残差e1 , e2 的含义: e1 表示除去x2 对y的影响后的y值; e2表示除去x2 对x1的影响后的 x1值.即e1 , e2

温馨提示

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

评论

0/150

提交评论