Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: two sets of dummy variables Original citation: Dougherty, C. (2012) EC220.

Slides:



Advertisements
Similar presentations
CHOW TEST AND DUMMY VARIABLE GROUP TEST
Advertisements

EC220 - Introduction to econometrics (chapter 5)
Christopher Dougherty EC220 - Introduction to econometrics (chapter 1) Slideshow: exercise 1.7 Original citation: Dougherty, C. (2012) EC220 - Introduction.
EC220 - Introduction to econometrics (chapter 10)
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.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 4) Slideshow: interactive explanatory variables Original citation: Dougherty, C. (2012)
HETEROSCEDASTICITY-CONSISTENT STANDARD ERRORS 1 Heteroscedasticity causes OLS standard errors to be biased is finite samples. However it can be demonstrated.
EC220 - Introduction to econometrics (chapter 7)
Christopher Dougherty EC220 - Introduction to econometrics (chapter 3) Slideshow: exercise 3.5 Original citation: Dougherty, C. (2012) EC220 - Introduction.
EC220 - Introduction to econometrics (chapter 2)
Christopher Dougherty EC220 - Introduction to econometrics (review chapter) Slideshow: expected value of a function of a random variable Original citation:
Christopher Dougherty EC220 - Introduction to econometrics (chapter 6) Slideshow: variable misspecification iii: consequences for diagnostics Original.
Christopher Dougherty EC220 - Introduction to econometrics (review chapter) Slideshow: confidence intervals Original citation: Dougherty, C. (2012) EC220.
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.
EC220 - Introduction to econometrics (review chapter)
TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT This sequence describes the testing of a hypotheses relating to regression coefficients. It is.
Christopher Dougherty EC220 - Introduction to econometrics (review chapter) Slideshow: continuous random variables Original citation: Dougherty, C. (2012)
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 -
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.
Christopher Dougherty EC220 - Introduction to econometrics (review chapter) Slideshow: the normal distribution Original citation: Dougherty, C. (2012)
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: dummy variable classification with two categories Original citation:
EC220 - Introduction to econometrics (review chapter)
Christopher Dougherty EC220 - Introduction to econometrics (review chapter) Slideshow: sampling and estimators Original citation: Dougherty, C. (2012)
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.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 12) Slideshow: autocorrelation, partial adjustment, and adaptive expectations Original.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 10) Slideshow: Tobit models Original citation: Dougherty, C. (2012) EC220 - Introduction.
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.
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.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 11) Slideshow: Friedman Original citation: Dougherty, C. (2012) EC220 - Introduction.
Confidence intervals were treated at length in the Review chapter and their application to regression analysis presents no problems. We will not repeat.
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.
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,
Christopher Dougherty EC220 - Introduction to econometrics (chapter 1) Slideshow: exercise 1.5 Original citation: Dougherty, C. (2012) EC220 - Introduction.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 9) Slideshow: instrumental variable estimation: variation Original citation: Dougherty,
. reg LGEARN S WEIGHT85 Source | SS df MS Number of obs = F( 2, 537) = Model |
Christopher Dougherty EC220 - Introduction to econometrics (chapter 6) Slideshow: multiple restrictions and zero restrictions Original citation: Dougherty,
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: exercise 5.2 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.
COST 11 DUMMY VARIABLE CLASSIFICATION WITH TWO CATEGORIES 1 This sequence explains how you can include qualitative explanatory variables in your regression.
Christopher Dougherty EC220 - Introduction to econometrics (review chapter) Slideshow: alternative expression for population variance Original citation:
Christopher Dougherty EC220 - Introduction to econometrics (revision lectures 2011) Slideshow: dummy variables Original citation: Dougherty, C. (2011)
RAMSEY’S RESET TEST OF FUNCTIONAL MISSPECIFICATION 1 Ramsey’s RESET test of functional misspecification is intended to provide a simple indicator of evidence.
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.
WHITE TEST FOR HETEROSCEDASTICITY 1 The White test for heteroscedasticity looks for evidence of an association between the variance of the disturbance.
Christopher Dougherty EC220 - Introduction to econometrics (review chapter) Slideshow: independence of two random variables Original citation: Dougherty,
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 II: INCLUSION OF AN IRRELEVANT VARIABLE In this sequence we will investigate the consequences of including an irrelevant variable.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 1) Slideshow: simple regression model Original citation: Dougherty, C. (2012) EC220.
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
Presentation transcript:

Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: two sets of dummy variables Original citation: Dougherty, C. (2012) EC220 - Introduction to econometrics (chapter 5). [Teaching Resource] © 2012 The Author This version available at: Available in LSE Learning Resources Online: May 2012 This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. This license allows the user to remix, tweak, and build upon the work even for commercial purposes, as long as the user credits the author and licenses their new creations under the identical terms

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 of a model with two types. COST =  1  +   OCC +   RES +  2 N + u

2 TWO SETS OF DUMMY VARIABLES We will continue with the school cost function model and extend it to take account of the fact that some of the schools are residential. COST =  1  +   OCC +   RES +  2 N + u

3 TWO SETS OF DUMMY VARIABLES To model the higher overhead costs of residential schools, we introduce a dummy variable RES which is equal to 1 for them and 0 for nonresidential schools.  is the extra annual overhead cost of a residential school, relative to that of a nonresidential one. COST =  1  +   OCC +   RES +  2 N + u

4 TWO SETS OF DUMMY VARIABLES We will also make a distinction between occupational and regular schools, using the dummy variable OCC defined in the first sequence. (It would be better to use the four-category school classification, and in practice we would, but it would complicate the graphics.) COST =  1  +   OCC +   RES +  2 N + u

5 TWO SETS OF DUMMY VARIABLES If a school has a regular curriculum and is nonresidential, both dummy variables are 0 and the cost function simplifies to its basic components. COST =  1  +   OCC +   RES +  2 N + u Regular, nonresidentialCOST =  1  +  2 N + u (OCC = RES = 0)

6 TWO SETS OF DUMMY VARIABLES For a residential regular school, RES is equal to 1 and the intercept increases by an amount . COST =  1  +   OCC +   RES +  2 N + u Regular, nonresidentialCOST =  1  +  2 N + u (OCC = RES = 0) Regular, residentialCOST = (  1  +   ) +  2 N + u (OCC = 0; RES = 1)

7 TWO SETS OF DUMMY VARIABLES In the case of a nonresidential occupational school, RES is 0 and OCC is 1, so the overhead cost increases by . If the school is both occupational and residential, it increases by (  +  ). COST =  1  +   OCC +   RES +  2 N + u Regular, nonresidentialCOST =  1  +  2 N + u (OCC = RES = 0) Regular, residentialCOST = (  1  +   ) +  2 N + u (OCC = 0; RES = 1) Occupational, nonresidentialCOST = (  1  +   ) +  2 N + u (OCC = 1; RES = 0) Occupational, residentialCOST = (  1  +  +   ) +  2 N + u (OCC = RES = 1)

COST N  1 +  +  1+1+ 1+1+ 11 Occupational, residential Regular, nonresidential    +  8  Occupational, nonresidential Regular, residential TWO SETS OF DUMMY VARIABLES The diagram illustrates the model graphically. Note that the effects of the different components of the model are assumed to be separate and additive in this specification.

COST N  1 +  +  1+1+ 1+1+ 11 Occupational, residential Regular, nonresidential    +   Occupational, nonresidential Regular, residential TWO SETS OF DUMMY VARIABLES 9 In particular, we are assuming that the extra overhead cost of a residential school is the same for regular and occupational schools.

TWO SETS OF DUMMY VARIABLES Here are the data for the first 10 schools. Note how the values of the dummy variables vary according to the characteristics of the school. 10 School Type Residential?COST N OCCRES 1OccupationalNo345, Occupational Yes537, Regular No170, Occupational Yes RegularNo100, Regular No28, Regular Yes160, Occupational No45, Occupational No120, OccupationalNo61,

TWO SETS OF DUMMY VARIABLES Here is a scatter diagram showing the four types of school. 11

. reg COST N OCC RES Source | SS df MS Number of obs = F( 3, 70) = Model | e e+11 Prob > F = Residual | e e+09 R-squared = Adj R-squared = Total | e e+10 Root MSE = COST | Coef. Std. Err. t P>|t| [95% Conf. Interval] N | OCC | RES | _cons | TWO SETS OF DUMMY VARIABLES Here is the Stata output for the regression. We will start by interpreting the regression coefficients. The coefficient of N indicates that the marginal cost per student is 322 yuan per year. 12

TWO SETS OF DUMMY VARIABLES The constant provides an estimate of the annual overhead cost of the reference category, nonresidential regular schools. It is still negative, which does not make any sense. 13. reg COST N OCC RES Source | SS df MS Number of obs = F( 3, 70) = Model | e e+11 Prob > F = Residual | e e+09 R-squared = Adj R-squared = Total | e e+10 Root MSE = COST | Coef. Std. Err. t P>|t| [95% Conf. Interval] N | OCC | RES | _cons |

TWO SETS OF DUMMY VARIABLES The coefficient of OCC indicates that the annual overhead costs of occupational schools are 110,000 yuan more than those of regular schools. 14. reg COST N OCC RES Source | SS df MS Number of obs = F( 3, 70) = Model | e e+11 Prob > F = Residual | e e+09 R-squared = Adj R-squared = Total | e e+10 Root MSE = COST | Coef. Std. Err. t P>|t| [95% Conf. Interval] N | OCC | RES | _cons |

TWO SETS OF DUMMY VARIABLES The coefficient of RES indicates that the annual overhead costs of residential schools are 58,000 yuan greater than those of nonresidential schools. 15. reg COST N OCC RES Source | SS df MS Number of obs = F( 3, 70) = Model | e e+11 Prob > F = Residual | e e+09 R-squared = Adj R-squared = Total | e e+10 Root MSE = COST | Coef. Std. Err. t P>|t| [95% Conf. Interval] N | OCC | RES | _cons |

TWO SETS OF DUMMY VARIABLES The regression result is shown at the top in equation form. Putting both dummy variables equal to 0, we obtain the implicit cost function for nonresidential regular schools. 16 ^ ^ COST = –29, ,000OCC + 58,000RES + 322N Regular, nonresidentialCOST= –29, N (OCC = RES = 0)

TWO SETS OF DUMMY VARIABLES Putting RES equal to 1, but keeping OCC at 0, we obtain the cost function for residential regular schools. 17 ^ ^ ^ COST = –29, ,000OCC + 58,000RES + 322N Regular, nonresidentialCOST= –29, N (OCC = RES = 0) Regular, residentialCOST= –29, , N (OCC = 0; RES = 1) = 29, N

TWO SETS OF DUMMY VARIABLES And similarly the cost functions for nonresidential and residential occupational schools are derived by putting OCC equal to 1 and RES equal to 0 and 1, respectively. 18 COST = –29, ,000OCC + 58,000RES + 322N Regular, nonresidentialCOST= –29, N (OCC = RES = 0) Regular, residentialCOST= –29, , N (OCC = 0; RES = 1) = 29, N Occupational, nonresidentialCOST= –29, , N (OCC = 1; RES = 0) = 81, N Occupational, residentialCOST= –29, , , N (OCC = RES = 1) = 139, N ^ ^ ^ ^ ^

TWO SETS OF DUMMY VARIABLES Here is the scatter diagram with the four cost functions implicit in the regression result. 19

TWO SETS OF DUMMY VARIABLES t tests and F tests can be performed in the usual way. The coefficient of the occupational school dummy variable is significantly different from 0 at the 0.1% significance level. 20. reg COST N OCC RES Source | SS df MS Number of obs = F( 3, 70) = Model | e e+11 Prob > F = Residual | e e+09 R-squared = Adj R-squared = Total | e e+10 Root MSE = COST | Coef. Std. Err. t P>|t| [95% Conf. Interval] N | OCC | RES | _cons |

TWO SETS OF DUMMY VARIABLES However, the t ratio for the coefficient of RES is only Fortunately we may perform a one-sided test (why?), so it is significantly different from 0 at the 5% level (but not the 1% level). 21. reg COST N OCC RES Source | SS df MS Number of obs = F( 3, 70) = Model | e e+11 Prob > F = Residual | e e+09 R-squared = Adj R-squared = Total | e e+10 Root MSE = COST | Coef. Std. Err. t P>|t| [95% Conf. Interval] N | OCC | RES | _cons |

Copyright Christopher Dougherty 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 5.2 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 Individuals studying econometrics on their own and 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 or the University of London International Programmes distance learning course 20 Elements of Econometrics