Lecture 4 This week’s reading: Ch. 1 Today:

Slides:



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

Lesson 10: Linear Regression and Correlation
CHOW TEST AND DUMMY VARIABLE GROUP TEST
EC220 - Introduction to econometrics (chapter 5)
EC220 - Introduction to econometrics (chapter 4)
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: slope dummy variables Original citation: Dougherty, C. (2012) EC220 -
Christopher Dougherty EC220 - Introduction to econometrics (chapter 1) Slideshow: exercise 1.16 Original citation: Dougherty, C. (2012) EC220 - Introduction.
Lecture 3 Today: Statistical Review cont’d:
Christopher Dougherty EC220 - Introduction to econometrics (chapter 4) Slideshow: interactive explanatory variables Original citation: Dougherty, C. (2012)
ELASTICITIES AND DOUBLE-LOGARITHMIC MODELS
HETEROSCEDASTICITY-CONSISTENT STANDARD ERRORS 1 Heteroscedasticity causes OLS standard errors to be biased is finite samples. However it can be demonstrated.
Lecture 9 Today: Ch. 3: Multiple Regression Analysis Example with two independent variables Frisch-Waugh-Lovell theorem.
INTERPRETATION OF A REGRESSION EQUATION
EC220 - Introduction to econometrics (chapter 2)
1 Review of Correlation A correlation coefficient measures the strength of a linear relation between two measurement variables. The measure is based on.
So far, we have considered regression models with dummy variables of independent variables. In this lecture, we will study regression models whose dependent.
© Christopher Dougherty 1999–2006 VARIABLE MISSPECIFICATION I: OMISSION OF A RELEVANT VARIABLE We will now investigate the consequences of misspecifying.
Interpreting Bi-variate OLS Regression
Christopher Dougherty EC220 - Introduction to econometrics (chapter 2) Slideshow: testing a hypothesis relating to a regression coefficient (2010/2011.
EC220 - Introduction to econometrics (chapter 1)
1 INTERPRETATION OF A REGRESSION EQUATION The scatter diagram shows hourly earnings in 2002 plotted against years of schooling, defined as highest grade.
TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT This sequence describes the testing of a hypotheses relating to regression coefficients. It is.
Chapter 4 – Nonlinear Models and Transformations of Variables.
SLOPE DUMMY VARIABLES 1 The scatter diagram shows the data for the 74 schools in Shanghai and the cost functions derived from a regression of COST on N.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 3) Slideshow: precision of the multiple regression coefficients Original citation:
Christopher Dougherty EC220 - Introduction to econometrics (chapter 4) Slideshow: semilogarithmic models Original citation: Dougherty, C. (2012) EC220.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 4) Slideshow: nonlinear regression Original citation: Dougherty, C. (2012) EC220 -
DERIVING LINEAR REGRESSION COEFFICIENTS
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: Chow test Original citation: Dougherty, C. (2012) EC220 - Introduction.
EDUC 200C Section 4 – Review Melissa Kemmerle October 19, 2012.
TOBIT ANALYSIS Sometimes the dependent variable in a regression model is subject to a lower limit or an upper limit, or both. Suppose that in the absence.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: dummy variable classification with two categories Original citation:
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: two sets of dummy variables Original citation: Dougherty, C. (2012) EC220.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: the effects of changing the reference category Original citation: Dougherty,
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: dummy classification with more than two categories Original citation:
DUMMY CLASSIFICATION WITH MORE THAN TWO CATEGORIES This sequence explains how to extend the dummy variable technique to handle a qualitative explanatory.
1 INTERACTIVE EXPLANATORY VARIABLES The model shown above is linear in parameters and it may be fitted using straightforward OLS, provided that the regression.
1 TWO SETS OF DUMMY VARIABLES The explanatory variables in a regression model may include multiple sets of dummy variables. This sequence provides an example.
1 PROXY VARIABLES Suppose that a variable Y is hypothesized to depend on a set of explanatory variables X 2,..., X k as shown above, and suppose that for.
Introduction to Linear Regression and Correlation Analysis
EDUC 200C Section 3 October 12, Goals Review correlation prediction formula Calculate z y ’ = r xy z x for a new data set Use formula to predict.
What is the MPC?. Learning Objectives 1.Use linear regression to establish the relationship between two variables 2.Show that the line is the line of.
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.
Introduction to Linear Regression
Christopher Dougherty EC220 - Introduction to econometrics (chapter 1) Slideshow: exercise 1.5 Original citation: Dougherty, C. (2012) EC220 - Introduction.
© Christopher Dougherty 1999–2006 The denominator has been rewritten a little more carefully, making it explicit that the summation of the squared deviations.
CENTRE FOR INNOVATION, RESEARCH AND COMPETENCE IN THE LEARNING ECONOMY Session 3: Basic techniques for innovation data analysis. Part II: Introducing regression.
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.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: exercise 5.2 Original citation: Dougherty, C. (2012) EC220 - Introduction.
Chapter 5: Dummy Variables. DUMMY VARIABLE CLASSIFICATION WITH TWO CATEGORIES 1 We’ll now examine how you can include qualitative explanatory variables.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 4) Slideshow: exercise 4.5 Original citation: Dougherty, C. (2012) EC220 - Introduction.
(1)Combine the correlated variables. 1 In this sequence, we look at four possible indirect methods for alleviating a problem of multicollinearity. POSSIBLE.
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.
COST 11 DUMMY VARIABLE CLASSIFICATION WITH TWO CATEGORIES 1 This sequence explains how you can include qualitative explanatory variables in your regression.
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.
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.
GRAPHING A RELATIONSHIP IN A MULTIPLE REGRESSION MODEL The output above shows the result of regressing EARNINGS, hourly earnings in dollars, on S, years.
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.
F TESTS RELATING TO GROUPS OF EXPLANATORY VARIABLES 1 We now come to more general F tests of goodness of fit. This is a test of the joint explanatory power.
1 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS When alternative specifications of a regression model have the same dependent variable, R 2 can be used.
VARIABLE MISSPECIFICATION I: OMISSION OF A RELEVANT VARIABLE In this sequence and the next we will investigate the consequences of misspecifying the regression.
Nvmrao Three useful results: GOODNESS OF FIT This sequence explains measures of goodness of fit in regression analysis. It is convenient to start by demonstrating.
The simple linear regression model and parameter estimation
Lecture 3 Today: Statistical Review cont’d:
Introduction to Econometrics, 5th edition
Introduction to Econometrics, 5th edition
Introduction to Econometrics, 5th edition
Presentation transcript:

Lecture 4 This week’s reading: Ch. 1 Today: Ch. 1: The Simple Regression Model Interpretation of regression results Goodness of fit

DERIVING LINEAR REGRESSION COEFFICIENTS Y 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. © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION The scatter diagram shows hourly earnings in 2002 plotted against years of schooling, defined as highest grade completed, for a sample of 540 respondents from the National Longitudinal Survey of Youth. © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION Highest grade completed means just that for elementary and high school. Grades 13, 14, and 15 mean completion of one, two and three years of college. © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION Grade 16 means completion of four-year college. Higher grades indicate years of postgraduate education. © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+------------------------------ F( 1, 538) = 112.15 Model | 19321.5589 1 19321.5589 Prob > F = 0.0000 Residual | 92688.6722 538 172.283777 R-squared = 0.1725 -------------+------------------------------ Adj R-squared = 0.1710 Total | 112010.231 539 207.811189 Root MSE = 13.126 ------------------------------------------------------------------------------ EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- S | 2.455321 .2318512 10.59 0.000 1.999876 2.910765 _cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444 This is the output from a regression of earnings on years of schooling, using Stata. © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+------------------------------ F( 1, 538) = 112.15 Model | 19321.5589 1 19321.5589 Prob > F = 0.0000 Residual | 92688.6722 538 172.283777 R-squared = 0.1725 -------------+------------------------------ Adj R-squared = 0.1710 Total | 112010.231 539 207.811189 Root MSE = 13.126 ------------------------------------------------------------------------------ EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- S | 2.455321 .2318512 10.59 0.000 1.999876 2.910765 _cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444 For the time being, we will be concerned only with the estimates of the parameters. The variables in the regression are listed in the first column and the second column gives the estimates of their coefficients. © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+------------------------------ F( 1, 538) = 112.15 Model | 19321.5589 1 19321.5589 Prob > F = 0.0000 Residual | 92688.6722 538 172.283777 R-squared = 0.1725 -------------+------------------------------ Adj R-squared = 0.1710 Total | 112010.231 539 207.811189 Root MSE = 13.126 ------------------------------------------------------------------------------ EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- S | 2.455321 .2318512 10.59 0.000 1.999876 2.910765 _cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444 In this case there is only one variable, S, and its coefficient is 2.46. _cons, in Stata, refers to the constant. The estimate of the intercept is -13.93. © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION ^ Here is the scatter diagram again, with the regression line shown. © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION ^ What do the coefficients actually mean? © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION ^ To answer this question, you must refer to the units in which the variables are measured. © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION ^ S is measured in years (strictly speaking, grades completed), EARNINGS in dollars per hour. So the slope coefficient implies that hourly earnings increase by $2.46 for each extra year of schooling. © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION ^ We will look at a geometrical representation of this interpretation. To do this, we will enlarge the marked section of the scatter diagram. © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION $15.53 $13.07 $2.46 One year The regression line indicates that completing 12th grade instead of 11th grade would increase earnings by $2.46, from $13.07 to $15.53, as a general tendency. © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION ^ You should ask yourself whether this is a plausible figure. If it is implausible, this could be a sign that your model is misspecified in some way. © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION ^ For low levels of education it might be plausible. But for high levels it would seem to be an underestimate. © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION ^ What about the constant term? (Try to answer this question yourself before continuing with this sequence.) © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION ^ Literally, the constant indicates that an individual with no years of education would have to pay $13.93 per hour to be allowed to work. © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION ^ This does not make any sense at all. In former times craftsmen might require an initial payment when taking on an apprentice, and might pay the apprentice little or nothing for quite a while, but an interpretation of negative payment is impossible to sustain. © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION ^ A safe solution to the problem is to limit the interpretation to the range of the sample data, and to refuse to extrapolate on the ground that we have no evidence outside the data range. © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION ^ With this explanation, the only function of the constant term is to enable you to draw the regression line at the correct height on the scatter diagram. It has no meaning of its own. © Christopher Dougherty 1999–2006

INTERPRETATION OF A REGRESSION EQUATION ^ Another solution is to explore the possibility that the true relationship is nonlinear and that we are approximating it with a linear regression. We will soon extend the regression technique to fit nonlinear models. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: This sequence explains measures of goodness of fit in regression analysis. It is convenient to start by demonstrating three useful results. The first is that the mean value of the residuals must be zero. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: The residual in any observation is given by the difference between the actual and fitted values of Y for that observation. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: First substitute for the fitted value. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: Now sum over all the observations. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: Dividing through by n, we obtain the sample mean of the residuals in terms of the sample means of X and Y and the regression coefficients. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: If we substitute for b1, the expression collapses to zero. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: Next we will demonstrate that the mean of the fitted values of Y is equal to the mean of the actual values of Y. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: Again, we start with the definition of a residual. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: Sum over all the observations. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: Divide through by n. The terms in the equation are the means of the residuals, actual values of Y, and fitted values of Y, respectively. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: We have just shown that the mean of the residuals is zero. Hence the mean of the fitted values is equal to the mean of the actual values. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: Next we will demonstrate that the sum of the products of the values of X and the residuals is zero. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: We start by replacing the residual with its expression in terms of Y and X. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: We expand the expression. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: The expression is equal to zero. One way of demonstrating this would be to substitute for b1 and b2 and show that all the terms cancel out. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: A neater way is to recall the first order condition for b2 when deriving the regression coefficients. You can see that it is exactly what we need. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: Finally we will demonstrate that the sum of the products of the fitted values of Y and the residuals is zero. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: We start by substituting for the fitted value of Y. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: We expand and rearrange. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Four useful results: The expression is equal to zero, given the first and third useful results. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT We now come to the discussion of goodness of fit. One measure of the variation in Y is the sum of its squared deviations around its sample mean, often described as the Total Sum of Squares, TSS. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT We will decompose TSS using the fact that the actual value of Y in any observations is equal to the sum of its fitted value and the residual. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT We substitute for Yi. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT From the useful results, the mean of the fitted values of Y is equal to the mean of the actual values. Also, the mean of the residuals is zero. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Hence we can simplify the expression as shown. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT We expand the squared terms on the right side of the equation. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT We expand the third term on the right side of the equation. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT The last two terms are both zero, given the first and fourth useful results. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Thus we have shown that TSS, the total sum of squares of Y can be decomposed into ESS, the ‘explained’ sum of squares, and RSS, the residual (‘unexplained’) sum of squares. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT The words explained and unexplained were put in quotation marks because the explanation may in fact be false. Y might really depend on some other variable Z, and X might be acting as a proxy for Z. It would be safer to use the expression apparently explained instead of explained. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT The main criterion of goodness of fit, formally described as the coefficient of determination, but usually referred to as R2, is defined to be the ratio of ESS to TSS, that is, the proportion of the variance of Y explained by the regression equation. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Obviously we would like to locate the regression line so as to make the goodness of fit as high as possible, according to this criterion. Does this objective clash with our use of the least squares principle to determine b1 and b2? © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Fortunately, there is no clash. To see this, rewrite the expression for R2 in term of RSS as shown. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT The OLS regression coefficients are chosen in such a way as to minimize the sum of the squares of the residuals. Thus it automatically follows that they maximize R2. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Another natural criterion of goodness of fit is the correlation between the actual and fitted values of Y. We will demonstrate that this is maximized by using the least squares principle to determine the regression coefficients © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT We will start with the numerator and substitute for the actual value of Y, and its mean, in the first factor. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT We rearrange a little. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT We expand the expression The last two terms are both zero (fourth and first useful results). © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Thus the numerator simplifies to the sum of the squared deviations of the fitted values. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT We have the same expression in the denominator, under a square root. Cancelling, we are left with the square root in the numerator. © Christopher Dougherty 1999–2006

© Christopher Dougherty 1999–2006 GOODNESS OF FIT Thus the correlation coefficient is the square root of R2. It follows that it is maximized by the use of the least squares principle to determine the regression coefficients. © Christopher Dougherty 1999–2006