北大暑期课程《回归分析》(Linear Regression Analysis)义2.doc_第1页
北大暑期课程《回归分析》(Linear Regression Analysis)义2.doc_第2页
北大暑期课程《回归分析》(Linear Regression Analysis)义2.doc_第3页
北大暑期课程《回归分析》(Linear Regression Analysis)义2.doc_第4页
北大暑期课程《回归分析》(Linear Regression Analysis)义2.doc_第5页
已阅读5页,还剩2页未读 继续免费阅读

下载本文档

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

文档简介

Class 2, Page 7Class 2: Basics of matrix (2) Linear regression. I. Basics of matrix (2) 1. Inverse of a MatrixThe inverse of a square matrix exists if the matrix is nonsingular. The inverse A-1 is defined as:A-1A = AA-1 = I Alternatively, the condition can be expressed in three other forms: (1) A has rank n, (2) the n rows are linearly independent, and (3) the n columns are linearly independent. Inverse is a difficult operation. Usually we can use computer softwares to find the inverse. Here we only want to know a simple example. For a 2x2 matrix:A-1 = where D is the determinant of A. D(A) = ad-bc. 2. Determinant of a MatrixThe determinant of a matrix is a scale. A nonsingular matrix has a non-zero determinant. 3. Operation Rules of MatricesA = B means for all i, jA + B = B + A(A + B) + C = A + (B + C) (AB)C = A(BC)C(A + B) = CA + CBc(A + B) = cA + cB, where c is a scalarIA = AI = AA + O = AAO = OA = O (A) = A(A + B) = A + B(AB) = B A (ABC) = C B A (AB)-1=B-1 A-1, provided A and B are each nonsingular(proof: AB B-1 A-1=I)(ABC)-1=C-1B-1A-1(A-1)-1=A(A)-1=(A-1)4. Variance-covariance matrixFor a vector of variables b with elements (b0, b1, bk), its variance-covariance matrix II. Linear Regression with a Single Regressor (Simple Regression) For simple linear regression, we learned, We assume that this model is true only in the population. What we can observe, however, is a sample. For a sample of fixed size i = 1,.n, we can write the model in the following way:(1) where Let us further assume that and Equation (1) becomes (2)expand from the matrix form into the element form.Pre-multiply (2) by X(3)We set (orthogonality condition), meaning (first element);(second element). Given the orthogonality condition, we can easily solve b as (5),Why do we assume the orthogonality condition? Because orthogonality gives the least squares solution best linear predictor. BlackboardPartial with respect to set to zero. In practice, we dont know whether X satisfies the orthogonality condition. We usually make the assumption:Note that the first assumption means orthogonality between 1 and . The second assumption means that x is not correlated with . Similarly, Det Let us solve for b Thus, b is indeed your old friend: b =III. Inference of Regression Coefficients (simple regression)A. Define expectation of a vector: take expectation of each of the elements.B. Define variance of a vector: is a symmetric matrix, called variance and covariance matrix of b.C. Property: if A is a matrix with only constant elements,D. The LS EstimatorFor the model E. Properties of the LS Estimatorthat is, b is unbiased. (after assuming , non-serial correlation and homoscedasticity) blackboard We then need normality assumption for statistical inferences. Recall the formula:V(b1) = III. Fitted Values and ResidualsInterpretation of projection 3-d graphis called H matrix, or hat matrix. H is an idempotent matrix:For residuals: (I-H) is also a idempotent matrix.IV. Estimation of the Residual VarianceA. Sample Analog (6) is unknown but can be estimated by e, where e is residual. Some of you may have noticed that I have intentionally distinguished from e. is called disturbance, and e is called residual. Residual is defined by the difference between observed and predicted values. The sample analog of (6) isIn matrix:The sample analog is thenee/nB. Degrees of FreedomLet us review briefly the concept of degrees of freedom. As a general rule, the correct degrees of freedom equals the number of total observations minus the number of parameters used in estimation. Since we obtain residuals after we use estimated coefficients, the residuals are subject to linear constrained (recall orthogonality constraints). For example:If n=2, p=2, we have the saturated model, e1=0, e2=0. If n=3, p=2, there is only 1 degree of freedom. e1= - e1In multiple regression, there are p parameters to be estimated. Therefore, the remaining degrees o

温馨提示

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

评论

0/150

提交评论