Topic 11: Matrix Approach to Linear Regression

Slides:



Advertisements
Similar presentations
1 Regression as Moment Structure. 2 Regression Equation Y =  X + v Observable Variables Y z = X Moment matrix  YY  YX  =  YX  XX Moment structure.
Advertisements

Managerial Economics in a Global Economy
Topic 12: Multiple Linear Regression
Computational Statistics. Basic ideas  Predict values that are hard to measure irl, by using co-variables (other properties from the same measurement.
The Simple Regression Model
Chapter 12 Simple Linear Regression
Statistical Techniques I EXST7005 Simple Linear Regression.
CmpE 104 SOFTWARE STATISTICAL TOOLS & METHODS MEASURING & ESTIMATING SOFTWARE SIZE AND RESOURCE & SCHEDULE ESTIMATING.
Simple Regression. Major Questions Given an economic model involving a relationship between two economic variables, how do we go about specifying the.
Ch11 Curve Fitting Dr. Deshi Ye
Topic 3: Simple Linear Regression. Outline Simple linear regression model –Model parameters –Distribution of error terms Estimation of regression parameters.
The Simple Linear Regression Model: Specification and Estimation
1 Chapter 3 Multiple Linear Regression Ray-Bing Chen Institute of Statistics National University of Kaohsiung.
Statistics 350 Lecture 14. Today Last Day: Matrix results and Chapter 5 Today: More matrix results and Chapter 5 Please read Chapter 5.
Multivariate Data Analysis Chapter 4 – Multiple Regression.
NOTES ON MULTIPLE REGRESSION USING MATRICES  Multiple Regression Tony E. Smith ESE 502: Spatial Data Analysis  Matrix Formulation of Regression  Applications.
Probability & Statistics for Engineers & Scientists, by Walpole, Myers, Myers & Ye ~ Chapter 11 Notes Class notes for ISE 201 San Jose State University.
Basic Mathematics for Portfolio Management. Statistics Variables x, y, z Constants a, b Observations {x n, y n |n=1,…N} Mean.
Probability theory 2008 Outline of lecture 5 The multivariate normal distribution  Characterizing properties of the univariate normal distribution  Different.
Statistics 350 Lecture 17. Today Last Day: Introduction to Multiple Linear Regression Model Today: More Chapter 6.
Linear regression models in matrix terms. The regression function in matrix terms.
Matrix Approach to Simple Linear Regression KNNL – Chapter 5.
Objectives of Multiple Regression
Regression Analysis Regression analysis is a statistical technique that is very useful for exploring the relationships between two or more variables (one.
Linear Regression Analysis Additional Reference: Applied Linear Regression Models – Neter, Kutner, Nachtsheim, Wasserman The lecture notes of Dr. Thomas.
Multiple Linear Regression - Matrix Formulation Let x = (x 1, x 2, …, x n )′ be a n  1 column vector and let g(x) be a scalar function of x. Then, by.
7.1 Multiple Regression More than one explanatory/independent variable This makes a slight change to the interpretation of the coefficients This changes.
Topic 14: Inference in Multiple Regression. Outline Review multiple linear regression Inference of regression coefficients –Application to book example.
CIS 2033 based on Dekking et al. A Modern Introduction to Probability and Statistics Instructor Longin Jan Latecki C22: The Method of Least Squares.
MTH 161: Introduction To Statistics
Regression Analysis Week 8 DIAGNOSTIC AND REMEDIAL MEASURES Residuals The main purpose examining residuals Diagnostic for Residuals Test involving residuals.
1 Multiple Regression A single numerical response variable, Y. Multiple numerical explanatory variables, X 1, X 2,…, X k.
Introduction to Matrices and Matrix Approach to Simple Linear Regression.
Ch14: Linear Least Squares 14.1: INTRO: Fitting a pth-order polynomial will require finding (p+1) coefficients from the data. Thus, a straight line (p=1)
Trees Example More than one variable. The residual plot suggests that the linear model is satisfactory. The R squared value seems quite low though,
Chapter 11: Linear Regression and Correlation Regression analysis is a statistical tool that utilizes the relation between two or more quantitative variables.
MathematicalMarketing Slide 5.1 OLS Chapter 5: Ordinary Least Square Regression We will be discussing  The Linear Regression Model  Estimation of the.
Simple and multiple regression analysis in matrix form Least square Beta estimation Beta Simple linear regression Multiple regression with two predictors.
DATA ANALYSIS AND MODEL BUILDING LECTURE 8 Prof. Roland Craigwell Department of Economics University of the West Indies Cave Hill Campus and Rebecca Gookool.
Statistics 350 Lecture 2. Today Last Day: Section Today: Section 1.6 Homework #1: Chapter 1 Problems (page 33-38): 2, 5, 6, 7, 22, 26, 33, 34,
Econometrics III Evgeniya Anatolievna Kolomak, Professor.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS St. Edward’s University.
STA302/1001 week 11 Regression Models - Introduction In regression models, two types of variables that are studied:  A dependent variable, Y, also called.
The simple linear regression model and parameter estimation
Chapter 4: Basic Estimation Techniques
Chapter 11: Linear Regression and Correlation
Chapter 7. Classification and Prediction
Regression Analysis AGEC 784.
Probability Theory and Parameter Estimation I
Probability and Statistics for Computer Scientists Second Edition, By: Michael Baron Section 11.1: Least squares estimation CIS Computational.
Correlation.
The Simple Linear Regression Model: Specification and Estimation
CH 5: Multivariate Methods
Regression.
Evgeniya Anatolievna Kolomak, Professor
Multiple Regression and Model Building
CIS 2033 based on Dekking et al
Matrices Definition: A matrix is a rectangular array of numbers or symbolic elements In many applications, the rows of a matrix will represent individuals.
The regression model in matrix form
Regression Models - Introduction
Multiple Regression Models
J.-F. Pâris University of Houston
Linear regression Fitting a straight line to observations.
The Simple Linear Regression Model: Specification and Estimation
Chapter 4, Regression Diagnostics Detection of Model Violation
OVERVIEW OF LINEAR MODELS
Nonlinear Fitting.
Multivariate Methods Berlin Chen
Multivariate Methods Berlin Chen, 2005 References:
Regression Models - Introduction
Presentation transcript:

Topic 11: Matrix Approach to Linear Regression

Outline Linear Regression in Matrix Form

The Model in Scalar Form Yi = β0 + β1Xi + ei The ei are independent Normally distributed random variables with mean 0 and variance σ2 Consider writing the observations: Y1= β0 + β1X1 + e1 Y2= β0 + β1X2 + e2 : Yn= β0 + β1Xn + en

The Model in Matrix Form

The Model in Matrix Form II

The Design Matrix

Vector of Parameters

Vector of error terms

Vector of responses

Simple Linear Regression in Matrix Form

Variance-Covariance Matrix Main diagonal values are the variances and off-diagonal values are the covariances.

Covariance Matrix of e Independent errors means that the covariance of any two residuals is zero. Common variance implies the main diagonal values are equal.

Covariance Matrix of Y

Distributional Assumptions in Matrix Form e ~ N(0, σ2I) I is an n x n identity matrix Ones in the diagonal elements specify that the variance of each ei is 1 times σ2 Zeros in the off-diagonal elements specify that the covariance between different ei is zero This implies that the correlations are zero

Least Squares We want to minimize (Y-Xβ)(Y-Xβ) We take the derivative with respect to the (vector) β This is like a quadratic function Recall the function we minimized using the scalar form

Least Squares The derivative is 2 times the derivative of (Y-Xβ) with respect to β In other words, –2X(Y-Xβ) We set this equal to 0 (a vector of zeros) So, –2X(Y-Xβ) = 0 Or, XY = XXβ (the normal equations)

Normal Equations XY = (XX)β Solving for β gives the least squares solution b = (b0, b1) b = (XX)–1(XY) See KNNL p 199 for details This same matrix approach works for multiple regression!!!!!!

Fitted Values

Hat Matrix We’ll use this matrix when assessing diagnostics in multiple regression

Estimated Covariance Matrix of b This matrix, b, is a linear combination of the elements of Y These estimates are Normal if Y is Normal These estimates will be approximately Normal in general

A Useful MultivariateTheorem U ~ N(μ, Σ), a multivariate Normal vector V = c + DU, a linear transformation of U c is a vector and D is a matrix Then V ~ N(c+Dμ, DΣD)

Application to b b = (XX)–1(XY) = ((XX)–1X)Y Since Y ~ N(Xβ, σ2I) this means the vector b is Normally distributed with mean (XX)–1XXβ = β and covariance σ2 ((XX)–1X) I((XX)–1X) = σ2 (XX)–1

Background Reading We will use this framework to do multiple regression where we have more than one explanatory variable Another explanatory variable is comparable to adding another column in the design matrix See Chapter 6