Multiple Regression 2

Similar documents
Temporal Regression Models in Econometrics. With the use of the lag operator, we can rewrite this as

Seasonal Models and Seasonal Adjustment

Serially Correlated Regression Disturbances

Multivariate ARMA Processes

The Algebra of the Kronecker Product. Consider the matrix equation Y = AXB where

Models with Limited Dependent Variables

New York University Department of Economics. Applied Statistics and Econometrics G Spring 2013

Introduction to Linear Regression Analysis

19 : APPENDIX. An Index Notation for Multivariate Analysis

Using regression to study economic relationships is called econometrics. econo = of or pertaining to the economy. metrics = measurement

Models with of Multiple Responses

Categorical Predictor Variables

Forecasting with ARMA Models

MODULE- 07 : FLUIDICS AND FLUID LOGIC

Panel data panel data set not

ESS 265 Spring Quarter 2005 Time Series Analysis: Linear Regression

EC3062 ECONOMETRICS. THE MULTIPLE REGRESSION MODEL Consider T realisations of the regression equation. (1) y = β 0 + β 1 x β k x k + ε,

Econometrics. 5) Dummy variables

Econometrics Lecture 5: Limited Dependent Variable Models: Logit and Probit

Dynamic Regression Models (Lect 15)

x y = 1, 2x y + z = 2, and 3w + x + y + 2z = 0

Econometric Modelling Prof. Rudra P. Pradhan Department of Management Indian Institute of Technology, Kharagpur

STAT 350: Geometry of Least Squares

The multiple regression model; Indicator variables as regressors

1 Differentiable manifolds and smooth maps

CHAPTER 4 & 5 Linear Regression with One Regressor. Kazu Matsuda IBEC PHBU 430 Econometrics

Multiple Regression Analysis: Inference ECONOMETRICS (ECON 360) BEN VAN KAMMEN, PHD

Econometric textbooks usually discuss the procedures to be adopted

THEODORE VORONOV DIFFERENTIABLE MANIFOLDS. Fall Last updated: November 26, (Under construction.)

Chapter 11. Correlation and Regression

Use of Dummy (Indicator) Variables in Applied Econometrics

Bayesian Inference: Probit and Linear Probability Models

This note introduces some key concepts in time series econometrics. First, we

Binary variables in linear regression

LECTURE 6. Introduction to Econometrics. Hypothesis testing & Goodness of fit

Making sense of Econometrics: Basics

Econometrics I KS. Module 2: Multivariate Linear Regression. Alexander Ahammer. This version: April 16, 2018

Econometric Forecasting Overview

MATH 1070 Introductory Statistics Lecture notes Relationships: Correlation and Simple Regression

On Objectivity and Models for Measuring. G. Rasch. Lecture notes edited by Jon Stene.

14 Multiple Linear Regression

Linear Regression. In this lecture we will study a particular type of regression model: the linear regression model

V3: Circadian rhythms, time-series analysis (contd )

Least Squares Estimation-Finite-Sample Properties

TOOLING UP MATHEMATICS FOR ENGINEERING*

Review of Classical Least Squares. James L. Powell Department of Economics University of California, Berkeley

TESTING FOR CO-INTEGRATION

Making sense of Econometrics: Basics

ECON 450 Development Economics

In the bivariate regression model, the original parameterization is. Y i = β 1 + β 2 X2 + β 2 X2. + β 2 (X 2i X 2 ) + ε i (2)

Lecture-1: Introduction to Econometrics

We like to capture and represent the relationship between a set of possible causes and their response, by using a statistical predictive model.

UNST 232 Mentor Section Assignment 5 Historical Climate Data

ACE 564 Spring Lecture 8. Violations of Basic Assumptions I: Multicollinearity and Non-Sample Information. by Professor Scott H.

ECONOMETRIC MODEL WITH QUALITATIVE VARIABLES

Last Update: March 1 2, 201 0

1111: Linear Algebra I

The Identification of ARIMA Models

Lecture notes on Turing machines


1. Fundamental concepts

CSE250A Fall 12: Discussion Week 9

Timevarying VARs. Wouter J. Den Haan London School of Economics. c Wouter J. Den Haan

Chapter 1 Statistical Inference

Lecture 1: OLS derivations and inference

Regression M&M 2.3 and 10. Uses Curve fitting Summarization ('model') Description Prediction Explanation Adjustment for 'confounding' variables

An Introduction to Matrix Algebra

FIRST MIDTERM EXAM ECON 7801 SPRING 2001

Lecture 20 Random Samples 0/ 13

Comparison of Modern Stochastic Optimization Algorithms

Machine Learning Linear Classification. Prof. Matteo Matteucci

Dummy Variables. Susan Thomas IGIDR, Bombay. 24 November, 2008

Lecture 6: Linear models and Gauss-Markov theorem

22 Approximations - the method of least squares (1)

Numerical Methods. Equations and Partial Fractions. Jaesung Lee

This is a repository copy of Estimating Quarterly GDP for the Interwar UK Economy: An Application to the Employment Function.

Lecture 2. The Simple Linear Regression Model: Matrix Approach

Factorial designs (Chapter 5 in the book)

Tightening Durbin-Watson Bounds

Analysing data: regression and correlation S6 and S7

Chapter 11 Evolution by Permutation

Short T Panels - Review

22s:152 Applied Linear Regression

Chapter 9. Dummy (Binary) Variables. 9.1 Introduction The multiple regression model (9.1.1) Assumption MR1 is

Designing Information Devices and Systems I Spring 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way

YEAR 10 GENERAL MATHEMATICS 2017 STRAND: BIVARIATE DATA PART II CHAPTER 12 RESIDUAL ANALYSIS, LINEARITY AND TIME SERIES

1.1 Implicit solution for vertical viscosity and diffusion terms using finite differences

Newtonian Mechanics. Chapter Classical space-time

8. TRANSFORMING TOOL #1 (the Addition Property of Equality)

Testing for Regime Switching in Singaporean Business Cycles

Eigenvalues and Eigenvectors

Heteroskedasticity. Part VII. Heteroskedasticity

On the econometrics of the Koyck model

1. Introduction. Hang Qian 1 Iowa State University

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

MATH 2030: MATRICES ,, a m1 a m2 a mn If the columns of A are the vectors a 1, a 2,...,a n ; A is represented as A 1. .

ANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3

EXAMINATION QUESTIONS 63. P f. P d. = e n

Linear Mixed Models: Methodology and Algorithms

Chapter 1 Introduction. What are longitudinal and panel data? Benefits and drawbacks of longitudinal data Longitudinal data models Historical notes

Transcription:

LECTURE 4 Multiple Regression 2 Dummy Variables and Categorical Data The era of modern econometrics began shortly after the war at a time when there was a paucity of reliable economic data The data consisted mostly of annual observations; and the number of years spanned by the usable data were few Nowadays, we benefit from data which is collected on a quarterly and, sometimes, on a monthly basis In spite of the belief that the structure of the economy and the behaviour of its agents had changed under the impact of the war, it seemed imperative to the pioneer investigators to include wartime data and prewar data in their series Therefore it was often necessary to incorporate in the econometric equations devices which were designed to accommodate changes in structure The simplest of such devices entails a dummy variable which enables one to calculate an intercept term which takes different values in different epochs Let us imagine, for the sake of simplicity, that we are concerned only with the difference between wartime and the succeeding peacetime Then our structural equation might take the form of (185) y t = d t1 γ 1 + d t2 γ 2 + x t1 β 1 + +x tk β k + ε t Here we are replacing the usual intercept term β 0 by the term d t1 γ 1 + d t2 γ 2 wherein d 1 and d 2 are the so-called dummy variables whose values are specified by { 1, if t Wartime; (186) d t1 = 0, if t Peacetime, { 0, if t Wartime; d t2 = 1, if t Peacetime To understand how this scheme is represented in terms of the matrix notation, let us recall that the intercept term β 0 is accompanied in equation (103) by a vector i =[1,,1] of T units In place of this unit vector, we now have two 40

4: MULTIPLE REGRESSION 2 vectors which constitute the following matrix: (187) 0 1 0 1 The submatrix above the horizontal dots corresponds to wartime whilst the submatrix below the dots corresponds to peacetime There is an alternative but equivalent way of constructing this mechanism which gives rise to the equation (188) y t = µ + d t2 δ + x t1 β 1 + +x tk β k + ε t, where µ = γ 1 and µ + δ = γ 2 This scheme is associated with the following vectors of dummy variables: (189) 1 1 1 1 We can conceive of yet another scheme in which there is a constant intercept term κ together with two parameters γ 1 and γ 2 which are intended to reflect the peculiar circumstances of the two epochs In that case, the structural equation would be of the form (190) y t = κ + d t1 γ 1 + d t2 γ 2 + x t1 β 1 + +x tk β k + ε t, whilst the associated vectors of dummy variables would be (191) 1 1 1 1 41

DSG POLLOCK: INTRODUCTORY ECONOMERTICS The summary notation for this matrix is [i, d 1,d 2 ] A problem besetting this formulation is immediately apparent, for there is now an exact linear relationship between the three columns of dummy variables such that i = d 1 + d 2 This feature conflicts with a necessary condition for the practicability of linear regression which is that the columns of the data matrix X must be linearly independent to ensure that the inverse matrix (X X) 1 exists It is instructive to investigate the consequence of forming the matrix X X from the three columns in (191) and attempting to invert it via the Matrix- Invert function of Lotus 1-2-3 Let the number of observations be T = T 1 + T 2 where T 1 is the length of the wartime period and T 2 is the length of the peacetime period Then the matrix product in question is (192) X X = T T 1 T 2 T 1 T T 2 0 T 2 It is clear that the first column of this matrix is the sum of the second and third columns, as was the case with the original matrix X of (191) If there were no other explanatory variables apart from the dummy variables of the matrix of (191), then the problem of inversion could be easily averted We should only need to add an extra row to the the matrix X in the form of [0, 1, 1] and to append an extra zero to the vector y =[y 1,,y T ] of the observations of the dependent variable and the regression would, in principle, become viable This addition to the data corresponds to the wholly reasonable restriction that γ 1 + γ 2 = 0; and we should discover that this condition is fulfilled by the resulting estimates With the additional row in X, the matrix X X now takes the form of (193) X X = T T 1 T 2 T 1 T 1 +1 1 T 2 1 T 2 +1 wherein the columns are linearly independent The device of supplementing the data will also work when the matrix X includes columns of genuine explanatory variables in addition to the dummy variables: we simply append zeros to the columns of explanatory variables and units to the columns of dummy varaibles However, there is one drawback which should be guarded against Imagine that the value of T becomes very large Then the difference between the matrix of (193), which is formally invertible, and the matrix of (192), which is not invertible, tends to vanish with the effect that the matrix of (193) becomes almost singular or non-invertible In the technical language of numerical analysis, we say that the latter matrix becomes 42

4: MULTIPLE REGRESSION 2 ill-conditioned The consequence is that the numerical inversion of the matrix will be beset by rounding error One obvious recourse against this problem of near-singularity is to append to the data matrix a row vector whose elements have values which are nonnegligible in comparison with the value of T Thus the vector [0,T,T] would serve the same purpose as the vector [0, 1, 1]; and it would result in a wellconditioned matrix of the form (194) X X = T T 1 T 2 T 1 T 1 +T T T 2 T T 2 +T Whilst the foregoing considerations are of some interest for the light that they cast upon problems of matrix inversion, they may have little practical significance in the present application The reason is that, if we wish to estimate the parameters κ, γ 1 and γ 2 of equation (190) subject to the restriction that γ 1 + γ 2 = 0, then we might as well estimate the parameters µ and δ of equation (188) in the first instance and then proceed to find the alternative parameters by solving the equations (195) µ = γ 1 + κ, µ + δ = γ 2 + κ, 0=γ 1 +γ 2 The solution is (196) γ 1 = δ 2, γ 2 = δ 2, κ = µ+ δ 2 The advantage of this procedure is that it allows one to test for the constancy of the intercept term rather easily by testing the restriction that δ =0 We can elaborate the device of dummy variables to accommodate more complicated effects such as the effects of the seasonal variations of economic activity Imagine that we have quarterly data and that we decide that we must estimate an intercept term which varies over the seasons We may do this with an equation of the form (197) y t = d t1 γ 1 + +d t4 γ 4 +x t1 β 1 + +x tk β 4 + ε t 43

DSG POLLOCK: INTRODUCTORY ECONOMERTICS In this case, the associated vector of dummy variables takes the form of (198) 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 This is simply a partitioned matrix wherein the submatrix I 4 =[e 1,e 2,e 3,e 4 ] is replicated as many times as the number of years spanned by the data As in the case of the dichotomous dummy variables, we can arrange matters in a variety of alternative ways Thus, in place of equation (197), we may take the equation (199) y t = µ + d t2 δ 2 + d t3 δ 3 + d t4 δ 4 + x t1 β 1 + +x tk β 4 + ε t, which is associated with the following matrix of dummy variables: (200) 0 0 1 0 0 1 0 0 1 0 0 1 Here it is the matrix [i, e 2,e 3,e 4 ] which is replicated in each year From the estimated values of µ, δ 2, δ 3 and δ 4, we can derive estimates of the alternative parameters γ 1,,γ 4 Two-Way Classifications of Qualitative Factors So far, we have considered qualitative factors which vary only in time These factors might be accompanied by other factors which vary in a spatial or geographical dimension In discussing further elaborations of this nature, let us confine our attention to a model which contains only categorical data of a sort which is encoded by dummy variables which take binary values 44

Consider an equation of the form 4: MULTIPLE REGRESSION 2 (201) y tj = µ + γ t + δ j + ε tj wherein t = 1,,T and j = 1,,M This represents the model which underlies a so-called two-way analysis of variance For a concrete interpretation, we may imagine that y tj is an observation taken at time t in the jth region Then the parameter γ t represents an effect which is common to all observations taken at time t, whilst the parameter δ j represents a characteristic of the jth region which prevails through time As an illustration, we may consider the case where T = M = 3 Then the equation (201) gives rise to the following structure: y 11 y 12 y 13 y 21 y 22 y 23 = µ 1 1 1 1 1 1+ γ 1 γ 1 γ 1 γ 2 γ 2 γ 2 y 31 y 32 y 33 1 1 1 γ 3 γ 3 γ 3 (202) + δ 1 δ 2 δ 3 δ 1 δ 2 δ 3 + ε 11 ε 12 ε 13 ε 21 ε 22 ε 23 δ 1 δ 2 δ 3 ε 31 ε 32 ε 33 Here there seems to be a large number of parameters 7 in all in comparison with the number of observations on the variable y However, it is likely that there will be several observations for each cell of the two-way classification Thus we might observe n individuals in each region j at each point in time t In order to assimilate the two-way model to the ordinary regression model, we may rewrite it in the form of (203) y 11 y 21 y 31 y 12 y 22 y 32 y 13 y 23 y 33 = 1 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 0 1 µ γ 1 γ 2 γ 3 + δ 1 δ 2 Here the matrix X consisting of zeros and ones is called the design matrix This format can easily accomodate n observations on the variable y taken in the tjth cell The observations are simply arrayed one below another in the vector y The corresponding rows of the matrix X are n replicas of the same vector 45 δ 3 ε 11 ε 21 ε 31 ε 12 ε 22 ε 32 ε 13 ε 23 ε 33

DSG POLLOCK: INTRODUCTORY ECONOMERTICS A close inspection of the design matrix in (203) will show that there are two degrees of linear dependence amongst its columns Thus column 1, which is associated with the intercept term µ, is the sum of the columns 2 4, which are associated with the temporal effects γ 1, γ 2 and γ 3 The first column is also the sum of the columns 5 7, which are associated with the spatial effects δ 1, δ 2 and δ 3 To ensure that the parameters are amenable to estimation, we must impose two restrictions: (204) γ 1 + γ 2 + γ 3 =0, δ 1 +δ 2 +δ 3 =0 These restrictions may be assimilated to the regression equations of (203) by adding the following rows to the bottom of the design matrix (205) [ 0 1 1 0 0 0 0 0 0 1 1 1 and by appending two zeros to the bottom of the y vector on the LHS and to the vector ε on the RHS ] 46