DERIVING LINEAR REGRESSION COEFFICIENTS

Slides:



Advertisements
Similar presentations
EC220 - Introduction to econometrics (chapter 1)
Advertisements

EC220 - Introduction to econometrics (chapter 1)
1 MAXIMUM LIKELIHOOD ESTIMATION OF REGRESSION COEFFICIENTS X Y XiXi 11  1  +  2 X i Y =  1  +  2 X We will now apply the maximum likelihood principle.
CHOW TEST AND DUMMY VARIABLE GROUP TEST
Christopher Dougherty EC220 - Introduction to econometrics (chapter 2) Slideshow: a Monte Carlo experiment Original citation: Dougherty, C. (2012) EC220.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 10) Slideshow: introduction to maximum likelihood estimation Original citation: Dougherty,
Lecture 3 Today: Statistical Review cont’d:
1 XX X1X1 XX X Random variable X with unknown population mean  X function of X probability density Sample of n observations X 1, X 2,..., X n : potential.
1 PROBABILITY DISTRIBUTION EXAMPLE: X IS THE SUM OF TWO DICE red This sequence provides an example of a discrete random variable. Suppose that you.
Random effects estimation RANDOM EFFECTS REGRESSIONS When the observed variables of interest are constant for each individual, a fixed effects regression.
MEASUREMENT ERROR 1 In this sequence we will investigate the consequences of measurement errors in the variables in a regression model. To keep the analysis.
EC220 - Introduction to econometrics (chapter 2)
EC220 - Introduction to econometrics (chapter 9)
EXPECTED VALUE OF A RANDOM VARIABLE 1 The expected value of a random variable, also known as its population mean, is the weighted average of its possible.
TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT This sequence describes the testing of a hypotheses relating to regression coefficients. It is.
1 A MONTE CARLO EXPERIMENT In the previous slideshow, we saw that the error term is responsible for the variations of b 2 around its fixed component 
Christopher Dougherty EC220 - Introduction to econometrics (chapter 3) Slideshow: prediction Original citation: Dougherty, C. (2012) EC220 - Introduction.
1 In the previous sequence, we were performing what are described as two-sided t tests. These are appropriate when we have no information about the alternative.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 4) Slideshow: semilogarithmic models Original citation: Dougherty, C. (2012) EC220.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 10) Slideshow: maximum likelihood estimation of regression coefficients Original citation:
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: Chow test Original citation: Dougherty, C. (2012) EC220 - Introduction.
1 In a second variation, we shall consider the model shown above. x is the rate of growth of productivity, assumed to be exogenous. w is now hypothesized.
1 This sequence shows why OLS is likely to yield inconsistent estimates in models composed of two or more simultaneous relationships. SIMULTANEOUS EQUATIONS.
1 PREDICTION In the previous sequence, we saw how to predict the price of a good or asset given the composition of its characteristics. In this sequence,
EC220 - Introduction to econometrics (review chapter)
1 UNBIASEDNESS AND EFFICIENCY Much of the analysis in this course will be concerned with three properties of estimators: unbiasedness, efficiency, and.
FIXED EFFECTS REGRESSIONS: WITHIN-GROUPS METHOD The two main approaches to the fitting of models using panel data are known, for reasons that will be explained.
Christopher Dougherty EC220 - Introduction to econometrics (review chapter) Slideshow: sampling and estimators Original citation: Dougherty, C. (2012)
DUMMY CLASSIFICATION WITH MORE THAN TWO CATEGORIES This sequence explains how to extend the dummy variable technique to handle a qualitative explanatory.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 12) Slideshow: autocorrelation, partial adjustment, and adaptive expectations Original.
THE DUMMY VARIABLE TRAP 1 Suppose that you have a regression model with Y depending on a set of ordinary variables X 2,..., X k and a qualitative variable.
1 INTERACTIVE EXPLANATORY VARIABLES The model shown above is linear in parameters and it may be fitted using straightforward OLS, provided that the regression.
Christopher Dougherty EC220 - Introduction to econometrics (review chapter) Slideshow: conflicts between unbiasedness and minimum variance Original citation:
Christopher Dougherty EC220 - Introduction to econometrics (chapter 8) Slideshow: measurement error Original citation: Dougherty, C. (2012) EC220 - Introduction.
THE FIXED AND RANDOM COMPONENTS OF A RANDOM VARIABLE 1 In this short sequence we shall decompose a random variable X into its fixed and random components.
CONSEQUENCES OF AUTOCORRELATION
ALTERNATIVE EXPRESSION FOR POPULATION VARIANCE 1 This sequence derives an alternative expression for the population variance of a random variable. It provides.
CONFLICTS BETWEEN UNBIASEDNESS AND MINIMUM VARIANCE
EC220 - Introduction to econometrics (chapter 8)
MULTIPLE RESTRICTIONS AND ZERO RESTRICTIONS
F TEST OF GOODNESS OF FIT FOR THE WHOLE EQUATION 1 This sequence describes two F tests of goodness of fit in a multiple regression model. The first relates.
MULTIPLE REGRESSION WITH TWO EXPLANATORY VARIABLES: EXAMPLE 1 This sequence provides a geometrical interpretation of a multiple regression model with two.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 12) Slideshow: footnote: the Cochrane-Orcutt iterative process Original citation: Dougherty,
Simple regression model: Y =  1 +  2 X + u 1 We have seen that the regression coefficients b 1 and b 2 are random variables. They provide point estimates.
A.1The model is linear in parameters and correctly specified. PROPERTIES OF THE MULTIPLE REGRESSION COEFFICIENTS 1 Moving from the simple to the multiple.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 9) Slideshow: instrumental variable estimation: variation Original citation: Dougherty,
Christopher Dougherty EC220 - Introduction to econometrics (chapter 6) Slideshow: multiple restrictions and zero restrictions Original citation: Dougherty,
1 We will now look at the properties of the OLS regression estimators with the assumptions of Model B. We will do this within the context of the simple.
1 COVARIANCE, COVARIANCE AND VARIANCE RULES, AND CORRELATION Covariance The covariance of two random variables X and Y, often written  XY, is defined.
1 Y SIMPLE REGRESSION MODEL Suppose that a variable Y is a linear function of another variable X, with unknown parameters  1 and  2 that we wish to estimate.
1 We will continue with a variation on the basic model. We will now hypothesize that p is a function of m, the rate of growth of the money supply, as well.
Christopher Dougherty EC220 - Introduction to econometrics (review chapter) Slideshow: alternative expression for population variance Original citation:
1 ASYMPTOTIC PROPERTIES OF ESTIMATORS: THE USE OF SIMULATION In practice we deal with finite samples, not infinite ones. So why should we be interested.
Definition of, the expected value of a function of X : 1 EXPECTED VALUE OF A FUNCTION OF A RANDOM VARIABLE To find the expected value of a function of.
1 NONLINEAR REGRESSION Suppose you believe that a variable Y depends on a variable X according to the relationship shown and you wish to obtain estimates.
INSTRUMENTAL VARIABLES 1 Suppose that you have a model in which Y is determined by X but you have reason to believe that Assumption B.7 is invalid and.
1 INSTRUMENTAL VARIABLE ESTIMATION OF SIMULTANEOUS EQUATIONS In the previous sequence it was asserted that the reduced form equations have two important.
1 HETEROSCEDASTICITY: WEIGHTED AND LOGARITHMIC REGRESSIONS This sequence presents two methods for dealing with the problem of heteroscedasticity. We will.
1 ESTIMATORS OF VARIANCE, COVARIANCE, AND CORRELATION We have seen that the variance of a random variable X is given by the expression above. Variance.
1 CHANGES IN THE UNITS OF MEASUREMENT Suppose that the units of measurement of Y or X are changed. How will this affect the regression results? Intuitively,
SEMILOGARITHMIC MODELS 1 This sequence introduces the semilogarithmic model and shows how it may be applied to an earnings function. The dependent variable.
1 REPARAMETERIZATION OF A MODEL AND t TEST OF A LINEAR RESTRICTION Linear restrictions can also be tested using a t test. This involves the reparameterization.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 1) Slideshow: simple regression model Original citation: Dougherty, C. (2012) EC220.
FOOTNOTE: THE COCHRANE–ORCUTT ITERATIVE PROCESS 1 We saw in the previous sequence that AR(1) autocorrelation could be eliminated by a simple manipulation.
VARIABLE MISSPECIFICATION I: OMISSION OF A RELEVANT VARIABLE In this sequence and the next we will investigate the consequences of misspecifying the regression.
Introduction to Econometrics, 5th edition
Introduction to Econometrics, 5th edition
Introduction to Econometrics, 5th edition
Introduction to Econometrics, 5th edition
Introduction to Econometrics, 5th edition
Presentation transcript:

DERIVING LINEAR REGRESSION COEFFICIENTS True model Y X This sequence shows how the regression coefficients for a simple regression model are derived, using the least squares criterion (OLS, for ordinary least squares) 1

DERIVING LINEAR REGRESSION COEFFICIENTS True model Y X We will start with a numerical example with just three observations: (1,3), (2,5), and (3,6). 2

DERIVING LINEAR REGRESSION COEFFICIENTS True model Y Fitted model b2 b1 X Writing the fitted regression as Y = b1 + b2X, we will determine the values of b1 and b2 that minimize RSS, the sum of the squares of the residuals. ^ 3

DERIVING LINEAR REGRESSION COEFFICIENTS True model Y Fitted model b2 b1 X Given our choice of b1 and b2, the residuals are as shown. 4

DERIVING LINEAR REGRESSION COEFFICIENTS The sum of the squares of the residuals is thus as shown above. 5

DERIVING LINEAR REGRESSION COEFFICIENTS The quadratics have been expanded. 6

DERIVING LINEAR REGRESSION COEFFICIENTS Like terms have been added together. 7

DERIVING LINEAR REGRESSION COEFFICIENTS For a minimum, the partial derivatives of RSS with respect to b1 and b2 should be zero. (We should also check a second-order condition.) 8

DERIVING LINEAR REGRESSION COEFFICIENTS The first-order conditions give us two equations in two unknowns. 9

DERIVING LINEAR REGRESSION COEFFICIENTS Solving them, we find that RSS is minimized when b1 and b2 are equal to 1.67 and 1.50, respectively. 10

DERIVING LINEAR REGRESSION COEFFICIENTS True model Y Fitted model b2 b1 X Here is the scatter diagram again. 11

DERIVING LINEAR REGRESSION COEFFICIENTS True model Y Fitted model b2 b1 X The fitted line and the fitted values of Y are as shown. 12

DERIVING LINEAR REGRESSION COEFFICIENTS Before we move on to the general case, it is as well to make a small but important mathematical point. 13

DERIVING LINEAR REGRESSION COEFFICIENTS When we establish the expression for RSS, we do so as a function of b1 and b2. At this stage, b1 and b2 are not specific values. Our task is to determine the particular values that minimize RSS. 14

DERIVING LINEAR REGRESSION COEFFICIENTS We should give these values special names, to differentiate them from the rest. 15

DERIVING LINEAR REGRESSION COEFFICIENTS Obvious names would be b1OLS and b2OLS, OLS standing for Ordinary Least Squares and meaning that these are the values that minimize RSS. We have re-written the first-order conditions and their solution accordingly. 16

DERIVING LINEAR REGRESSION COEFFICIENTS True model Y X1 Xn X Now we will proceed to the general case with n observations. 17

DERIVING LINEAR REGRESSION COEFFICIENTS True model Y Fitted model b2 b1 X1 Xn X Given our choice of b1 and b2, we will obtain a fitted line as shown. 18

DERIVING LINEAR REGRESSION COEFFICIENTS True model Y Fitted model b2 b1 X1 Xn X The residual for the first observation is defined. 19

DERIVING LINEAR REGRESSION COEFFICIENTS True model Y Fitted model b2 b1 X1 Xn X Similarly we define the residuals for the remaining observations. That for the last one is marked. 20

DERIVING LINEAR REGRESSION COEFFICIENTS RSS, the sum of the squares of the residuals, is defined for the general case. The data for the numerical example are shown for comparison.. 21

DERIVING LINEAR REGRESSION COEFFICIENTS The quadratics are expanded. 22

DERIVING LINEAR REGRESSION COEFFICIENTS Like terms are added together. 23

DERIVING LINEAR REGRESSION COEFFICIENTS } Note that in this equation the observations on X and Y are just data that determine the coefficients in the expression for RSS. 24

DERIVING LINEAR REGRESSION COEFFICIENTS } The choice variables in the expression are b1 and b2. This may seem a bit strange because in elementary calculus courses b1 and b2 are usually constants and X and Y are variables. 25

DERIVING LINEAR REGRESSION COEFFICIENTS } However, if you have any doubts, compare what we are doing in the general case with what we did in the numerical example. 26

DERIVING LINEAR REGRESSION COEFFICIENTS } The first derivative with respect to b1. 27

DERIVING LINEAR REGRESSION COEFFICIENTS } With some simple manipulation we obtain a tidy expression for b1 . 28

DERIVING LINEAR REGRESSION COEFFICIENTS } The first derivative with respect to b2. 29

DERIVING LINEAR REGRESSION COEFFICIENTS Divide through by 2. 30

DERIVING LINEAR REGRESSION COEFFICIENTS We now substitute for b1 using the expression obtained for it and we thus obtain an equation that contains b2 only. 31

DERIVING LINEAR REGRESSION COEFFICIENTS The definition of the sample mean has been used. 32

DERIVING LINEAR REGRESSION COEFFICIENTS The last two terms have been disentangled. 33

DERIVING LINEAR REGRESSION COEFFICIENTS Terms not involving b2 have been transferred to the right side. 34

DERIVING LINEAR REGRESSION COEFFICIENTS To create space, the equation is shifted to the top of the slide. 35

DERIVING LINEAR REGRESSION COEFFICIENTS Hence we obtain an expression for b2. 36

DERIVING LINEAR REGRESSION COEFFICIENTS In practice, we shall use an alternative expression. We will demonstrate that it is equivalent. 37

DERIVING LINEAR REGRESSION COEFFICIENTS Expanding the numerator, we obtain the terms shown. 38

DERIVING LINEAR REGRESSION COEFFICIENTS In the second term the mean value of Y is a common factor. In the third, the mean value of X is a common factor. The last term is the same for all i. 39

DERIVING LINEAR REGRESSION COEFFICIENTS We use the definitions of the sample means to simplify the expression. 40

DERIVING LINEAR REGRESSION COEFFICIENTS Hence we have shown that the numerators of the two expressions are the same. 41

DERIVING LINEAR REGRESSION COEFFICIENTS The denominator is mathematically a special case of the numerator, replacing Y by X. Hence the expressions are quivalent. 42

DERIVING LINEAR REGRESSION COEFFICIENTS True model Y Fitted model b2 b1 X1 Xn X The scatter diagram is shown again. We will summarize what we have done. We hypothesized that the true model is as shown, we obtained some data, and we fitted a line. 43

DERIVING LINEAR REGRESSION COEFFICIENTS True model Y Fitted model b2 b1 X1 Xn X We chose the parameters of the fitted line so as to minimize the sum of the squares of the residuals. As a result, we derived the expressions for b1 and b2. 44

DERIVING LINEAR REGRESSION COEFFICIENTS True model Y Fitted model b2 b1 X1 Xn X Again, we should make the mathematical point discussed in the context of the numerical example. These are the particular values of b1 and b2 that minimize RSS, and we should differentiate them from the rest by giving them special names, for example b1OLS and b2OLS. 45

DERIVING LINEAR REGRESSION COEFFICIENTS True model Y Fitted model b2 b1 X1 Xn X However, for the next few chapters, we shall mostly be concerned with the OLS estimators, and so the superscript 'OLS' is not really necessary. It will be dropped, to simplify the notation. 46

DERIVING LINEAR REGRESSION COEFFICIENTS True model Fitted model Typically, an intercept should be included in the regression specification. Occasionally, however, one may have reason to fit the regression without an intercept. In the case of a simple regression model, the true and fitted models become as shown. 47

DERIVING LINEAR REGRESSION COEFFICIENTS True model Fitted model We will derive the expression for b2 from first principles using the least squares criterion. The residual in observation i is ei = Yi – b2Xi. 48

DERIVING LINEAR REGRESSION COEFFICIENTS True model Fitted model With this, we obtain the expression for the sum of the squares of the residuals. 49

DERIVING LINEAR REGRESSION COEFFICIENTS True model Fitted model We differentiate with respect to b2. The OLS estimator is the value that makes this slope equal to zero (the first-order condition for a minimum). Note that we have differentiated properly between the general b2 and the specific b2OLS. 50

DERIVING LINEAR REGRESSION COEFFICIENTS True model Fitted model Hence, we obtain the OLS estimator of b2 for this model. 51

DERIVING LINEAR REGRESSION COEFFICIENTS True model Fitted model The second derivative is positive, confirming that we have found a minimum. 52

Copyright Christopher Dougherty 2012. These slideshows may be downloaded by anyone, anywhere for personal use. Subject to respect for copyright and, where appropriate, attribution, they may be used as a resource for teaching an econometrics course. There is no need to refer to the author. The content of this slideshow comes from Section 1.3 of C. Dougherty, Introduction to Econometrics, fourth edition 2011, Oxford University Press. Additional (free) resources for both students and instructors may be downloaded from the OUP Online Resource Centre http://www.oup.com/uk/orc/bin/9780199567089/. Individuals studying econometrics on their own who feel that they might benefit from participation in a formal course should consider the London School of Economics summer school course EC212 Introduction to Econometrics http://www2.lse.ac.uk/study/summerSchools/summerSchool/Home.aspx or the University of London International Programmes distance learning course EC2020 Elements of Econometrics www.londoninternational.ac.uk/lse. 2012.10.28