Empirical Application of Panel Data Regression

Size: px
Start display at page:

Download "Empirical Application of Panel Data Regression"

Transcription

1 Empirical Application of Panel Data Regression 1. We use Fatality data, and we are interested in whether rising beer tax rate can help lower traffic death. So the dependent variable is traffic death, while the key regressor is the beer tax rate. 2. The data is a csv file. The command to read csv file is insheet (or use menu).. insheet using "I:\420\420_data_fatality.csv" (9 vars, 336 obs). rename statename state. label variable y "number of annual traffic death per 10,000 people". encode state, gen(id). list state id year beertax y in 1/10, nol state id year beertax y AL AL AL AL AL AL AL AR AR AR xtset id panel variable: id (balanced) We observe each state repeatedly, so this is panel data. Each state is a panel (group, cluster). Here each panel has 7 observations; each observation is state-year. 3. The variable state is string, for which we can generate a categorical variable using encode state, gen(id). Then we use id to declare this is a panel data, and Stata 1

2 finds it is balanced, i.e., there is no missing value at some year for some state. This can also be seen by using command. tab year year Freq. Percent Cum Total We can construct panel data by stacking the cross section in one year above another (using commands append or merge). To see this,. sort year id. list state year y in 1/ state year y AL AR AL AR The first 48 observations are the 1982 cross section, followed by the 1983 cross section, and so on. It is important to have id variable (Stata calls it group variable) such as state in each cross section. 5. In panel data there are three types of variables: (1) variables that are time-invariant such as state; (2) variables that are panel-invariant such as year; and (3) variables that vary over time and across panels such as beer tax and y. Later we will show the fixed effect (FE) and first difference (FD) estimators cannot estimate the effect of (1) variables that are time-invariant. We can use xtsum to tell which type a variable is: 2

3 . xtsum y year id Variable Mean Std. Dev. Min Max Observations y overall N = 336 between n = 48 within T = 7 year overall N = 336 between n = 48 within T = 7 id overall N = 336 between n = 48 within T = 7 A variable is panel-invariant if its between standard deviation is zero; it is timeinvariant if within standard deviation is zero. 6. First, we consider using only one year data (cross section). The scatter plot and simple regression both indicate positive correlation between beer tax and traffic death, which is ridiculous.. twoway (sca y beertax if year==1982, ml(state)) (lfit y beertax if year==1982) NM WY NV MT OK TX ID AZ LA AR CO KY TN WV ND SD DE KS VT OR CA UT INMO NH WA WI CT IA NE VA IL MD PA MI NJ OH ME MN NY RI MA FL MS NCAL SC GA beertax number of annual traffic death per 10,000 people Fitted values 3

4 . reg y beertax if year==1982, nohe beertax _cons Running a pooled regression that uses all years only helps a little. reg y beertax Source SS df MS Number of obs = F( 1, 334) = Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = beertax _cons Notice that the sample size in pooled regression is 48 7 = 336, resulting in bigger t value. 8. This across-state comparison, whether using one year or all years, is prone to omitted variable bias. Factors like drinking culture are unobserved, but they can affect both beer tax and traffic death. If we believe drinking culture is (largely) time-invariant, then over-time comparison (time series regression) for given state is more meaningful:. two (sca y beertax if state=="al", ml(year)) (lfit y beertax if state=="al") 4

5 beertax number of annual traffic death per 10,000 people Fitted values. reg y beertax if state=="al", nohe beertax _cons Now we see a negative ˆβ 1, though it is insignificant. 9. Intuitively, the over-time or within comparison is more convincing because we can safely rule out the effect of time-constant unobserved factors such as drinking culture something that is fixed over time cannot be used to explain the over time variation in y. 10. If we assume the marginal effect of beertax on traffic death does not change across states, then we can improve our estimate by using all states. Toward that end, we need to generate the panel-specific first (or one-year) difference of traffic death and beer tax dy1 = y i,t y i,t 1 (1) dx1 = beertax i,t beertax i,t 1 (2) where y i,t 1 denotes the first lag of y i. Notice that we need two subscripts. The first 5

6 subscript i indexes panel, and the second subscript t indexes time. Here we compute the first difference for each given i. In stata, that means by id.. sort id year. by id: gen ylag1 = y[_n-1] (48 missing values generated). by id: gen dy1 = y-ylag1 (48 missing values generated). list id year y ylag1 dy1 in 1/ id year y ylag1 dy AL AL AL AL AR AR AR Notice that we get the first lag of y (called ylag1) by pushing the y series one-period downward, so one missing value is generated. It is worth emphasizing that we do this separately for each state using by id. The first non-missing observation in the first difference series (called dy1) is y 1,2 y 1,1 = = Next we get the panel-specific first difference of beertax, and apply OLS to the difference data:. by id: gen dx1 = beertax[_n]-beertax[_n-1] (48 missing values generated). reg dy1 dx1, nohe dy1 Coef. Std. Err. t P> t [95% Conf. Interval] dx

7 _cons This first or one-year difference estimate is negative and significant. Good news. 11. To understand why the FD estimator works, consider the structural models: y i,t = β 1 x i,t + β 2 w i + u i,t (3) y i,t 1 = β 1 x i,t 1 + β 2 w i + u i,t 1 (4) where w i does not have time subscript t because it denotes the time-invariant variable (like drinking culture). Subtracting (4) from (3) leads to y i,t = β 1 x i,t + u i,t (5) The FD estimator is just OLS applied to (5). Notice that w i has been removed by taking difference. So OLS applied to the differenced data, model (5), is not subject to omitted variable bias. By contrast, the OLS applied to pooled regression (3) suffer the omitted variable bias β 2cov(x i,t w i ) var(x i,t ). 12. It also becomes clear that the FD estimator cannot estimate the effect of any factor that is time-invariant (such as a dummy variable called south that equals one if a state is in south part of the country). 13. (Optional) FD estimator is consistent as long as cov( x i,t, u i,t ) = 0. A sufficient condition is strict exogeneity: cov(x i,tj, u i,tk ) = 0, t j, t k. 14. (Optional) In general, the error term in (5) is serially correlated for given i : cov( u i,t, u i,t k ) 0, k = 1,..., T 1. So cluster-robust standard error should be used in theory. 15. Even though ˆβ 1 is obtained from (5), its interpretation is still the change in y when x changes by one unit, i.e., in terms of (3). 16. To avoid the ambiguity of using one-year-difference or two-year-difference, we may consider the one-way fixed effect (FE) estimator 7

8 . xtreg y beertax, fe Fixed-effects (within) regression Number of obs = 336 Group variable: id Number of groups = 48 R-sq: within = Obs per group: min = 7 between = avg = 7.0 overall = max = 7 F(1,287) = corr(u_i, Xb) = Prob > F = beertax _cons sigma_u sigma_e rho (fraction of variance due to u_i) F test that all u_i=0: F(47, 287) = Prob > F = The FE estimator is based on the so called within regression T t=1 y i,t y i,t ȳ i = β 1 (x i,t x i ) + (u i,t ū i ) (6) T t=1 x i,t where ȳ i =, x T i = are the panel-specific means. The process of subtracting the panel-specific mean is called within transformation. The point is, the T within transformation, akin to taking difference, can remove the time-invariant unobserved heterogeneity: w i w i = 0. In other words, the FE estimator is not subject to the bias of omitting time-invariant factors. The downside is, FE estimator cannot estimate the effect of any time-invariant factors. 17. We can obtain demeaned value by regressing a variable on constant term. Likewise, we need panel-specific constant term or panel-specific dummy variable in order to generate the panel-specific demeand value. That is why FE estimate can be produced 8

9 in the dummy variable regression (DVR), one that includes all except one state dummy variable:. qui tab state, gen(sd). reg y beertax sd1-sd47 beertax sd sd _cons We drop one state dummy to avoid dummy variable trap. Notice that ˆβ 1 FE, a fact that FW theorem can prove. ˆβ DVR 1 = = 18. Intuitively, the DVR resolves the omitted-variable issue by using panel-specific dummy variables as proxy for w i. This is a good idea since both w i and the dummy variable are time constant. 19. Now we can test the null hypothesis that the state fixed effect (state dummies) is insignificant (H 0 : β 2 = 0 or equivalently H 0 : w i = 0).. testparm sd1-sd47 ( 1) sd1 = 0 (47) sd47 = 0 F( 47, 287) = Prob > F = So the null hypothesis is rejected. This F test is reported by xtreg command. 20. We can also test the significance of beertax 9

10 . test beertax ( 1) beertax = 0 F( 1, 287) = Prob > F = This F test is also reported by xtreg command. 21. Now we can understand why the pooled OLS is biased. Basically, it is because the pooled OLS omits state dummies, which are correlated with beertax:. qui reg beertax sd1-sd47. dis "F test for exogeneity of beertax is " e(f) F test for exogeneity of beertax is The first and third F tests, and , jointly explain why the pooled OLS is biased. 23. In a similar fashion, we can obtain the two-way fixed effect estimator by including in the DVR time dummy variables, which serve as proxy for panel-invariant unobserved effect (like the safety feature of cars).. qui tab year, gen(yd). reg y beertax sd1-sd47 yd1-yd6, nohe beertax sd yd yd _cons Or, we can use the xtreg command along with time dummy variables 10

11 . xtreg y beertax yd1-yd6, fe Fixed-effects (within) regression Number of obs = 336 Group variable: id Number of groups = 48 beertax yd _cons Finally, it is important to use cluster-robust standard error in order to account for the serial correlation among the error terms for given panel, i.e., between u i,t ū i and u i,t k ū i :. xtreg y beertax yd1-yd6, fe vce(cluster id) Fixed-effects (within) regression Number of obs = 336 Group variable: id Number of groups = 48 (Std. Err. adjusted for 48 clusters in id) Robust beertax yd yd _cons sca hatbeta1 = _b[beertax] The cluster-robust standard error can account for both across-panel heteroskedasticity and within-panel correlation. 11

12 26. We can test the year fixed effect:. testparm yd* ( 1) yd1 = 0 ( 2) yd2 = 0 ( 3) yd3 = 0 ( 4) yd4 = 0 ( 5) yd5 = 0 ( 6) yd6 = 0 F( 6, 47) = 4.22 Prob > F = In this case, the year fixed effect (yearly dummies) is significant at 1% level. So omitted variable bias would arise if we forget to include yearly dummies. 27. The two-way FE estimate ˆβ two way FE 1 = is economically significant since. qui sum y. dis "percentage change in y is " hatbeta1/r(mean) percentage change in y is traffic death drops by about 31% after tax rate changes by one unit. 28. Remember the command xtreg y x timedummy, fe vce(cluster id) reports the two-way fixed effect estimator with cluster-robust standard error. It is the most commonly-used command for applied economists. Equivalently, you can get the same ˆβ 1 by using reg y x paneldummy timedummy The FE estimator cannot be used if the key regressor is time-invariant; it is biased if the unobserved heterogeneity is time-varying. 29. (Optional) The command to do within transformation, and obtain within, between and random effect estimators are 12

13 xtreg y beertax, fe * within transformation bysort id: egen ybar = mean(y) bysort id: gen dmy = y - ybar bysort id: egen xbar = mean(beertax) bysort id: gen dmx = beertax - xbar * within regression reg dmy dmx * panel-specific intercept term (u_i in stata and a_i in textbook) gen u = ybar - _b[dmx]*xbar * standard deviation of u_i sum u if year==1982 * Between regression 14.2 in the textbook sort id year reg ybar xbar if year==1982 * Random effect model xtreg y beertax, re 13

Lecture 9: Panel Data Model (Chapter 14, Wooldridge Textbook)

Lecture 9: Panel Data Model (Chapter 14, Wooldridge Textbook) Lecture 9: Panel Data Model (Chapter 14, Wooldridge Textbook) 1 2 Panel Data Panel data is obtained by observing the same person, firm, county, etc over several periods. Unlike the pooled cross sections,

More information

Final Exam. 1. Definitions: Briefly Define each of the following terms as they relate to the material covered in class.

Final Exam. 1. Definitions: Briefly Define each of the following terms as they relate to the material covered in class. Name Answer Key Economics 170 Spring 2003 Honor pledge: I have neither given nor received aid on this exam including the preparation of my one page formula list and the preparation of the Stata assignment

More information

Quantitative Methods Final Exam (2017/1)

Quantitative Methods Final Exam (2017/1) Quantitative Methods Final Exam (2017/1) 1. Please write down your name and student ID number. 2. Calculator is allowed during the exam, but DO NOT use a smartphone. 3. List your answers (together with

More information

Econometrics Homework 4 Solutions

Econometrics Homework 4 Solutions Econometrics Homework 4 Solutions Computer Question (Optional, no need to hand in) (a) c i may capture some state-specific factor that contributes to higher or low rate of accident or fatality. For example,

More information

Empirical Application of Simple Regression (Chapter 2)

Empirical Application of Simple Regression (Chapter 2) Empirical Application of Simple Regression (Chapter 2) 1. The data file is House Data, which can be downloaded from my webpage. 2. Use stata menu File Import Excel Spreadsheet to read the data. Don t forget

More information

Applied Economics. Panel Data. Department of Economics Universidad Carlos III de Madrid

Applied Economics. Panel Data. Department of Economics Universidad Carlos III de Madrid Applied Economics Panel Data Department of Economics Universidad Carlos III de Madrid See also Wooldridge (chapter 13), and Stock and Watson (chapter 10) 1 / 38 Panel Data vs Repeated Cross-sections In

More information

Fortin Econ Econometric Review 1. 1 Panel Data Methods Fixed Effects Dummy Variables Regression... 7

Fortin Econ Econometric Review 1. 1 Panel Data Methods Fixed Effects Dummy Variables Regression... 7 Fortin Econ 495 - Econometric Review 1 Contents 1 Panel Data Methods 2 1.1 Fixed Effects......................... 2 1.1.1 Dummy Variables Regression............ 7 1.1.2 First Differencing Methods.............

More information

Problem Set 10: Panel Data

Problem Set 10: Panel Data Problem Set 10: Panel Data 1. Read in the data set, e11panel1.dta from the course website. This contains data on a sample or 1252 men and women who were asked about their hourly wage in two years, 2005

More information

CRE METHODS FOR UNBALANCED PANELS Correlated Random Effects Panel Data Models IZA Summer School in Labor Economics May 13-19, 2013 Jeffrey M.

CRE METHODS FOR UNBALANCED PANELS Correlated Random Effects Panel Data Models IZA Summer School in Labor Economics May 13-19, 2013 Jeffrey M. CRE METHODS FOR UNBALANCED PANELS Correlated Random Effects Panel Data Models IZA Summer School in Labor Economics May 13-19, 2013 Jeffrey M. Wooldridge Michigan State University 1. Introduction 2. Linear

More information

Simultaneous Equations with Error Components. Mike Bronner Marko Ledic Anja Breitwieser

Simultaneous Equations with Error Components. Mike Bronner Marko Ledic Anja Breitwieser Simultaneous Equations with Error Components Mike Bronner Marko Ledic Anja Breitwieser PRESENTATION OUTLINE Part I: - Simultaneous equation models: overview - Empirical example Part II: - Hausman and Taylor

More information

Exam ECON3150/4150: Introductory Econometrics. 18 May 2016; 09:00h-12.00h.

Exam ECON3150/4150: Introductory Econometrics. 18 May 2016; 09:00h-12.00h. Exam ECON3150/4150: Introductory Econometrics. 18 May 2016; 09:00h-12.00h. This is an open book examination where all printed and written resources, in addition to a calculator, are allowed. If you are

More information

Jeffrey M. Wooldridge Michigan State University

Jeffrey M. Wooldridge Michigan State University Fractional Response Models with Endogenous Explanatory Variables and Heterogeneity Jeffrey M. Wooldridge Michigan State University 1. Introduction 2. Fractional Probit with Heteroskedasticity 3. Fractional

More information

Please discuss each of the 3 problems on a separate sheet of paper, not just on a separate page!

Please discuss each of the 3 problems on a separate sheet of paper, not just on a separate page! Econometrics - Exam May 11, 2011 1 Exam Please discuss each of the 3 problems on a separate sheet of paper, not just on a separate page! Problem 1: (15 points) A researcher has data for the year 2000 from

More information

Nursing Facilities' Life Safety Standard Survey Results Quarterly Reference Tables

Nursing Facilities' Life Safety Standard Survey Results Quarterly Reference Tables Nursing Facilities' Life Safety Standard Survey Results Quarterly Reference Tables Table of Contents Table 1: Summary of Life Safety Survey Results by State Table 2: Ten Most Frequently Cited Life Safety

More information

1 The basics of panel data

1 The basics of panel data Introductory Applied Econometrics EEP/IAS 118 Spring 2015 Related materials: Steven Buck Notes to accompany fixed effects material 4-16-14 ˆ Wooldridge 5e, Ch. 1.3: The Structure of Economic Data ˆ Wooldridge

More information

Your Galactic Address

Your Galactic Address How Big is the Universe? Usually you think of your address as only three or four lines long: your name, street, city, and state. But to address a letter to a friend in a distant galaxy, you have to specify

More information

(a) Briefly discuss the advantage of using panel data in this situation rather than pure crosssections

(a) Briefly discuss the advantage of using panel data in this situation rather than pure crosssections Answer Key Fixed Effect and First Difference Models 1. See discussion in class.. David Neumark and William Wascher published a study in 199 of the effect of minimum wages on teenage employment using a

More information

Lecture 26 Section 8.4. Mon, Oct 13, 2008

Lecture 26 Section 8.4. Mon, Oct 13, 2008 Lecture 26 Section 8.4 Hampden-Sydney College Mon, Oct 13, 2008 Outline 1 2 3 4 Exercise 8.12, page 528. Suppose that 60% of all students at a large university access course information using the Internet.

More information

Fixed and Random Effects Models: Vartanian, SW 683

Fixed and Random Effects Models: Vartanian, SW 683 : Vartanian, SW 683 Fixed and random effects models See: http://teaching.sociology.ul.ie/dcw/confront/node45.html When you have repeated observations per individual this is a problem and an advantage:

More information

Introduction to Econometrics

Introduction to Econometrics Introduction to Econometrics STAT-S-301 Panel Data (2016/2017) Lecturer: Yves Dominicy Teaching Assistant: Elise Petit 1 Regression with Panel Data A panel dataset contains observations on multiple entities

More information

****Lab 4, Feb 4: EDA and OLS and WLS

****Lab 4, Feb 4: EDA and OLS and WLS ****Lab 4, Feb 4: EDA and OLS and WLS ------- log: C:\Documents and Settings\Default\Desktop\LDA\Data\cows_Lab4.log log type: text opened on: 4 Feb 2004, 09:26:19. use use "Z:\LDA\DataLDA\cowsP.dta", clear.

More information

Introduction to Econometrics. Regression with Panel Data

Introduction to Econometrics. Regression with Panel Data Introduction to Econometrics The statistical analysis of economic (and related) data STATS301 Regression with Panel Data Titulaire: Christopher Bruffaerts Assistant: Lorenzo Ricci 1 Regression with Panel

More information

Lab 07 Introduction to Econometrics

Lab 07 Introduction to Econometrics Lab 07 Introduction to Econometrics Learning outcomes for this lab: Introduce the different typologies of data and the econometric models that can be used Understand the rationale behind econometrics Understand

More information

Essential of Simple regression

Essential of Simple regression Essential of Simple regression We use simple regression when we are interested in the relationship between two variables (e.g., x is class size, and y is student s GPA). For simplicity we assume the relationship

More information

Binary Dependent Variables

Binary Dependent Variables Binary Dependent Variables In some cases the outcome of interest rather than one of the right hand side variables - is discrete rather than continuous Binary Dependent Variables In some cases the outcome

More information

Problem Set 5 ANSWERS

Problem Set 5 ANSWERS Economics 20 Problem Set 5 ANSWERS Prof. Patricia M. Anderson 1, 2 and 3 Suppose that Vermont has passed a law requiring employers to provide 6 months of paid maternity leave. You are concerned that women

More information

Parametric Test. Multiple Linear Regression Spatial Application I: State Homicide Rates Equations taken from Zar, 1984.

Parametric Test. Multiple Linear Regression Spatial Application I: State Homicide Rates Equations taken from Zar, 1984. Multiple Linear Regression Spatial Application I: State Homicide Rates Equations taken from Zar, 984. y ˆ = a + b x + b 2 x 2K + b n x n where n is the number of variables Example: In an earlier bivariate

More information

Lab 10 - Binary Variables

Lab 10 - Binary Variables Lab 10 - Binary Variables Spring 2017 Contents 1 Introduction 1 2 SLR on a Dummy 2 3 MLR with binary independent variables 3 3.1 MLR with a Dummy: different intercepts, same slope................. 4 3.2

More information

2. We care about proportion for categorical variable, but average for numerical one.

2. We care about proportion for categorical variable, but average for numerical one. Probit Model 1. We apply Probit model to Bank data. The dependent variable is deny, a dummy variable equaling one if a mortgage application is denied, and equaling zero if accepted. The key regressor is

More information

Exercices for Applied Econometrics A

Exercices for Applied Econometrics A QEM F. Gardes-C. Starzec-M.A. Diaye Exercices for Applied Econometrics A I. Exercice: The panel of households expenditures in Poland, for years 1997 to 2000, gives the following statistics for the whole

More information

Applied Statistics and Econometrics

Applied Statistics and Econometrics Applied Statistics and Econometrics Lecture 5 Saul Lach September 2017 Saul Lach () Applied Statistics and Econometrics September 2017 1 / 44 Outline of Lecture 5 Now that we know the sampling distribution

More information

ECON3150/4150 Spring 2016

ECON3150/4150 Spring 2016 ECON3150/4150 Spring 2016 Lecture 6 Multiple regression model Siv-Elisabeth Skjelbred University of Oslo February 5th Last updated: February 3, 2016 1 / 49 Outline Multiple linear regression model and

More information

Econometrics. Week 6. Fall Institute of Economic Studies Faculty of Social Sciences Charles University in Prague

Econometrics. Week 6. Fall Institute of Economic Studies Faculty of Social Sciences Charles University in Prague Econometrics Week 6 Institute of Economic Studies Faculty of Social Sciences Charles University in Prague Fall 2012 1 / 21 Recommended Reading For the today Advanced Panel Data Methods. Chapter 14 (pp.

More information

Applied Econometrics. Lecture 3: Introduction to Linear Panel Data Models

Applied Econometrics. Lecture 3: Introduction to Linear Panel Data Models Applied Econometrics Lecture 3: Introduction to Linear Panel Data Models Måns Söderbom 4 September 2009 Department of Economics, Universy of Gothenburg. Email: mans.soderbom@economics.gu.se. Web: www.economics.gu.se/soderbom,

More information

Lecture 3 Linear random intercept models

Lecture 3 Linear random intercept models Lecture 3 Linear random intercept models Example: Weight of Guinea Pigs Body weights of 48 pigs in 9 successive weeks of follow-up (Table 3.1 DLZ) The response is measures at n different times, or under

More information

Longitudinal Data Analysis Using Stata Paul D. Allison, Ph.D. Upcoming Seminar: May 18-19, 2017, Chicago, Illinois

Longitudinal Data Analysis Using Stata Paul D. Allison, Ph.D. Upcoming Seminar: May 18-19, 2017, Chicago, Illinois Longitudinal Data Analysis Using Stata Paul D. Allison, Ph.D. Upcoming Seminar: May 18-19, 217, Chicago, Illinois Outline 1. Opportunities and challenges of panel data. a. Data requirements b. Control

More information

Capital humain, développement et migrations: approche macroéconomique (Empirical Analysis - Static Part)

Capital humain, développement et migrations: approche macroéconomique (Empirical Analysis - Static Part) Séminaire d Analyse Economique III (LECON2486) Capital humain, développement et migrations: approche macroéconomique (Empirical Analysis - Static Part) Frédéric Docquier & Sara Salomone IRES UClouvain

More information

Analyzing Severe Weather Data

Analyzing Severe Weather Data Chapter Weather Patterns and Severe Storms Investigation A Analyzing Severe Weather Data Introduction Tornadoes are violent windstorms associated with severe thunderstorms. Meteorologists carefully monitor

More information

Recent Advances in the Field of Trade Theory and Policy Analysis Using Micro-Level Data

Recent Advances in the Field of Trade Theory and Policy Analysis Using Micro-Level Data Recent Advances in the Field of Trade Theory and Policy Analysis Using Micro-Level Data July 2012 Bangkok, Thailand Cosimo Beverelli (World Trade Organization) 1 Content a) Classical regression model b)

More information

EXST 7015 Fall 2014 Lab 08: Polynomial Regression

EXST 7015 Fall 2014 Lab 08: Polynomial Regression EXST 7015 Fall 2014 Lab 08: Polynomial Regression OBJECTIVES Polynomial regression is a statistical modeling technique to fit the curvilinear data that either shows a maximum or a minimum in the curve,

More information

Lab 6 - Simple Regression

Lab 6 - Simple Regression Lab 6 - Simple Regression Spring 2017 Contents 1 Thinking About Regression 2 2 Regression Output 3 3 Fitted Values 5 4 Residuals 6 5 Functional Forms 8 Updated from Stata tutorials provided by Prof. Cichello

More information

Motivation for multiple regression

Motivation for multiple regression Motivation for multiple regression 1. Simple regression puts all factors other than X in u, and treats them as unobserved. Effectively the simple regression does not account for other factors. 2. The slope

More information

Measurement Error. Often a data set will contain imperfect measures of the data we would ideally like.

Measurement Error. Often a data set will contain imperfect measures of the data we would ideally like. Measurement Error Often a data set will contain imperfect measures of the data we would ideally like. Aggregate Data: (GDP, Consumption, Investment are only best guesses of theoretical counterparts and

More information

Monday 7 th Febraury 2005

Monday 7 th Febraury 2005 Monday 7 th Febraury 2 Analysis of Pigs data Data: Body weights of 48 pigs at 9 successive follow-up visits. This is an equally spaced data. It is always a good habit to reshape the data, so we can easily

More information

INTRODUCTION TO BASIC LINEAR REGRESSION MODEL

INTRODUCTION TO BASIC LINEAR REGRESSION MODEL INTRODUCTION TO BASIC LINEAR REGRESSION MODEL 13 September 2011 Yogyakarta, Indonesia Cosimo Beverelli (World Trade Organization) 1 LINEAR REGRESSION MODEL In general, regression models estimate the effect

More information

Handout 11: Measurement Error

Handout 11: Measurement Error Handout 11: Measurement Error In which you learn to recognise the consequences for OLS estimation whenever some of the variables you use are not measured as accurately as you might expect. A (potential)

More information

Answer all questions from part I. Answer two question from part II.a, and one question from part II.b.

Answer all questions from part I. Answer two question from part II.a, and one question from part II.b. B203: Quantitative Methods Answer all questions from part I. Answer two question from part II.a, and one question from part II.b. Part I: Compulsory Questions. Answer all questions. Each question carries

More information

Use your text to define the following term. Use the terms to label the figure below. Define the following term.

Use your text to define the following term. Use the terms to label the figure below. Define the following term. Mapping Our World Section. and Longitude Skim Section of your text. Write three questions that come to mind from reading the headings and the illustration captions.. Responses may include questions about

More information

Ninth ARTNeT Capacity Building Workshop for Trade Research "Trade Flows and Trade Policy Analysis"

Ninth ARTNeT Capacity Building Workshop for Trade Research Trade Flows and Trade Policy Analysis Ninth ARTNeT Capacity Building Workshop for Trade Research "Trade Flows and Trade Policy Analysis" June 2013 Bangkok, Thailand Cosimo Beverelli and Rainer Lanz (World Trade Organization) 1 Selected econometric

More information

University of California at Berkeley Fall Introductory Applied Econometrics Final examination. Scores add up to 125 points

University of California at Berkeley Fall Introductory Applied Econometrics Final examination. Scores add up to 125 points EEP 118 / IAS 118 Elisabeth Sadoulet and Kelly Jones University of California at Berkeley Fall 2008 Introductory Applied Econometrics Final examination Scores add up to 125 points Your name: SID: 1 1.

More information

8. Nonstandard standard error issues 8.1. The bias of robust standard errors

8. Nonstandard standard error issues 8.1. The bias of robust standard errors 8.1. The bias of robust standard errors Bias Robust standard errors are now easily obtained using e.g. Stata option robust Robust standard errors are preferable to normal standard errors when residuals

More information

Lecture 7: OLS with qualitative information

Lecture 7: OLS with qualitative information Lecture 7: OLS with qualitative information Dummy variables Dummy variable: an indicator that says whether a particular observation is in a category or not Like a light switch: on or off Most useful values:

More information

Module 19: Simple Linear Regression

Module 19: Simple Linear Regression Module 19: Simple Linear Regression This module focuses on simple linear regression and thus begins the process of exploring one of the more used and powerful statistical tools. Reviewed 11 May 05 /MODULE

More information

Sample Statistics 5021 First Midterm Examination with solutions

Sample Statistics 5021 First Midterm Examination with solutions THE UNIVERSITY OF MINNESOTA Statistics 5021 February 12, 2003 Sample First Midterm Examination (with solutions) 1. Baseball pitcher Nolan Ryan played in 20 games or more in the 24 seasons from 1968 through

More information

Handout 12. Endogeneity & Simultaneous Equation Models

Handout 12. Endogeneity & Simultaneous Equation Models Handout 12. Endogeneity & Simultaneous Equation Models In which you learn about another potential source of endogeneity caused by the simultaneous determination of economic variables, and learn how to

More information

Introduction to Econometrics

Introduction to Econometrics Introduction to Econometrics STAT-S-301 Introduction to Time Series Regression and Forecasting (2016/2017) Lecturer: Yves Dominicy Teaching Assistant: Elise Petit 1 Introduction to Time Series Regression

More information

Outline. Linear OLS Models vs: Linear Marginal Models Linear Conditional Models. Random Intercepts Random Intercepts & Slopes

Outline. Linear OLS Models vs: Linear Marginal Models Linear Conditional Models. Random Intercepts Random Intercepts & Slopes Lecture 2.1 Basic Linear LDA 1 Outline Linear OLS Models vs: Linear Marginal Models Linear Conditional Models Random Intercepts Random Intercepts & Slopes Cond l & Marginal Connections Empirical Bayes

More information

ECON Introductory Econometrics. Lecture 5: OLS with One Regressor: Hypothesis Tests

ECON Introductory Econometrics. Lecture 5: OLS with One Regressor: Hypothesis Tests ECON4150 - Introductory Econometrics Lecture 5: OLS with One Regressor: Hypothesis Tests Monique de Haan (moniqued@econ.uio.no) Stock and Watson Chapter 5 Lecture outline 2 Testing Hypotheses about one

More information

ECO220Y Simple Regression: Testing the Slope

ECO220Y Simple Regression: Testing the Slope ECO220Y Simple Regression: Testing the Slope Readings: Chapter 18 (Sections 18.3-18.5) Winter 2012 Lecture 19 (Winter 2012) Simple Regression Lecture 19 1 / 32 Simple Regression Model y i = β 0 + β 1 x

More information

ECON3150/4150 Spring 2016

ECON3150/4150 Spring 2016 ECON3150/4150 Spring 2016 Lecture 4 - The linear regression model Siv-Elisabeth Skjelbred University of Oslo Last updated: January 26, 2016 1 / 49 Overview These lecture slides covers: The linear regression

More information

ECON 497 Final Exam Page 1 of 12

ECON 497 Final Exam Page 1 of 12 ECON 497 Final Exam Page of 2 ECON 497: Economic Research and Forecasting Name: Spring 2008 Bellas Final Exam Return this exam to me by 4:00 on Wednesday, April 23. It may be e-mailed to me. It may be

More information

Econ 1123: Section 5. Review. Internal Validity. Panel Data. Clustered SE. STATA help for Problem Set 5. Econ 1123: Section 5.

Econ 1123: Section 5. Review. Internal Validity. Panel Data. Clustered SE. STATA help for Problem Set 5. Econ 1123: Section 5. Outline 1 Elena Llaudet 2 3 4 October 6, 2010 5 based on Common Mistakes on P. Set 4 lnftmpop = -.72-2.84 higdppc -.25 lackpf +.65 higdppc * lackpf 2 lnftmpop = β 0 + β 1 higdppc + β 2 lackpf + β 3 lackpf

More information

General Linear Model (Chapter 4)

General Linear Model (Chapter 4) General Linear Model (Chapter 4) Outcome variable is considered continuous Simple linear regression Scatterplots OLS is BLUE under basic assumptions MSE estimates residual variance testing regression coefficients

More information

Applied Statistics and Econometrics

Applied Statistics and Econometrics Applied Statistics and Econometrics Lecture 6 Saul Lach September 2017 Saul Lach () Applied Statistics and Econometrics September 2017 1 / 53 Outline of Lecture 6 1 Omitted variable bias (SW 6.1) 2 Multiple

More information

ECON2228 Notes 7. Christopher F Baum. Boston College Economics. cfb (BC Econ) ECON2228 Notes / 41

ECON2228 Notes 7. Christopher F Baum. Boston College Economics. cfb (BC Econ) ECON2228 Notes / 41 ECON2228 Notes 7 Christopher F Baum Boston College Economics 2014 2015 cfb (BC Econ) ECON2228 Notes 6 2014 2015 1 / 41 Chapter 8: Heteroskedasticity In laying out the standard regression model, we made

More information

Basic Regressions and Panel Data in Stata

Basic Regressions and Panel Data in Stata Developing Trade Consultants Policy Research Capacity Building Basic Regressions and Panel Data in Stata Ben Shepherd Principal, Developing Trade Consultants 1 Basic regressions } Stata s regress command

More information

Lecture 8: Instrumental Variables Estimation

Lecture 8: Instrumental Variables Estimation Lecture Notes on Advanced Econometrics Lecture 8: Instrumental Variables Estimation Endogenous Variables Consider a population model: y α y + β + β x + β x +... + β x + u i i i i k ik i Takashi Yamano

More information

Lab 11 - Heteroskedasticity

Lab 11 - Heteroskedasticity Lab 11 - Heteroskedasticity Spring 2017 Contents 1 Introduction 2 2 Heteroskedasticity 2 3 Addressing heteroskedasticity in Stata 3 4 Testing for heteroskedasticity 4 5 A simple example 5 1 1 Introduction

More information

Warwick Economics Summer School Topics in Microeconometrics Instrumental Variables Estimation

Warwick Economics Summer School Topics in Microeconometrics Instrumental Variables Estimation Warwick Economics Summer School Topics in Microeconometrics Instrumental Variables Estimation Michele Aquaro University of Warwick This version: July 21, 2016 1 / 31 Reading material Textbook: Introductory

More information

Question 1 [17 points]: (ch 11)

Question 1 [17 points]: (ch 11) Question 1 [17 points]: (ch 11) A study analyzed the probability that Major League Baseball (MLB) players "survive" for another season, or, in other words, play one more season. They studied a model of

More information

Regression Diagnostics

Regression Diagnostics Diag 1 / 78 Regression Diagnostics Paul E. Johnson 1 2 1 Department of Political Science 2 Center for Research Methods and Data Analysis, University of Kansas 2015 Diag 2 / 78 Outline 1 Introduction 2

More information

Applied Statistics and Econometrics

Applied Statistics and Econometrics Applied Statistics and Econometrics Lecture 13 Nonlinearities Saul Lach October 2018 Saul Lach () Applied Statistics and Econometrics October 2018 1 / 91 Outline of Lecture 13 1 Nonlinear regression functions

More information

Applied Statistics and Econometrics

Applied Statistics and Econometrics Applied Statistics and Econometrics Lecture 7 Saul Lach September 2017 Saul Lach () Applied Statistics and Econometrics September 2017 1 / 68 Outline of Lecture 7 1 Empirical example: Italian labor force

More information

What Lies Beneath: A Sub- National Look at Okun s Law for the United States.

What Lies Beneath: A Sub- National Look at Okun s Law for the United States. What Lies Beneath: A Sub- National Look at Okun s Law for the United States. Nathalie Gonzalez Prieto International Monetary Fund Global Labor Markets Workshop Paris, September 1-2, 2016 What the paper

More information

point estimates, standard errors, testing, and inference for nonlinear combinations

point estimates, standard errors, testing, and inference for nonlinear combinations Title xtreg postestimation Postestimation tools for xtreg Description The following postestimation commands are of special interest after xtreg: command description xttest0 Breusch and Pagan LM test for

More information

THE MULTIVARIATE LINEAR REGRESSION MODEL

THE MULTIVARIATE LINEAR REGRESSION MODEL THE MULTIVARIATE LINEAR REGRESSION MODEL Why multiple regression analysis? Model with more than 1 independent variable: y 0 1x1 2x2 u It allows : -Controlling for other factors, and get a ceteris paribus

More information

4 Instrumental Variables Single endogenous variable One continuous instrument. 2

4 Instrumental Variables Single endogenous variable One continuous instrument. 2 Econ 495 - Econometric Review 1 Contents 4 Instrumental Variables 2 4.1 Single endogenous variable One continuous instrument. 2 4.2 Single endogenous variable more than one continuous instrument..........................

More information

4 Instrumental Variables Single endogenous variable One continuous instrument. 2

4 Instrumental Variables Single endogenous variable One continuous instrument. 2 Econ 495 - Econometric Review 1 Contents 4 Instrumental Variables 2 4.1 Single endogenous variable One continuous instrument. 2 4.2 Single endogenous variable more than one continuous instrument..........................

More information

Lecture 14. More on using dummy variables (deal with seasonality)

Lecture 14. More on using dummy variables (deal with seasonality) Lecture 14. More on using dummy variables (deal with seasonality) More things to worry about: measurement error in variables (can lead to bias in OLS (endogeneity) ) Have seen that dummy variables are

More information

Regression with Panel Data

Regression with Panel Data Regression with Panel Data (SW Chapter 10) Outline 1. Panel Data: What and Why 2. Panel Data with Two Time Periods 3. Fixed Effects Regression 4. Regression with Time Fixed Effects 5. Standard Errors for

More information

Introductory Econometrics. Lecture 13: Hypothesis testing in the multiple regression model, Part 1

Introductory Econometrics. Lecture 13: Hypothesis testing in the multiple regression model, Part 1 Introductory Econometrics Lecture 13: Hypothesis testing in the multiple regression model, Part 1 Jun Ma School of Economics Renmin University of China October 19, 2016 The model I We consider the classical

More information

Week 3: Simple Linear Regression

Week 3: Simple Linear Regression Week 3: Simple Linear Regression Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ALL RIGHTS RESERVED 1 Outline

More information

Practice 2SLS with Artificial Data Part 1

Practice 2SLS with Artificial Data Part 1 Practice 2SLS with Artificial Data Part 1 Yona Rubinstein July 2016 Yona Rubinstein (LSE) Practice 2SLS with Artificial Data Part 1 07/16 1 / 16 Practice with Artificial Data In this note we use artificial

More information

Auto correlation 2. Note: In general we can have AR(p) errors which implies p lagged terms in the error structure, i.e.,

Auto correlation 2. Note: In general we can have AR(p) errors which implies p lagged terms in the error structure, i.e., 1 Motivation Auto correlation 2 Autocorrelation occurs when what happens today has an impact on what happens tomorrow, and perhaps further into the future This is a phenomena mainly found in time-series

More information

Statistical Modelling in Stata 5: Linear Models

Statistical Modelling in Stata 5: Linear Models Statistical Modelling in Stata 5: Linear Models Mark Lunt Arthritis Research UK Epidemiology Unit University of Manchester 07/11/2017 Structure This Week What is a linear model? How good is my model? Does

More information

Practice exam questions

Practice exam questions Practice exam questions Nathaniel Higgins nhiggins@jhu.edu, nhiggins@ers.usda.gov 1. The following question is based on the model y = β 0 + β 1 x 1 + β 2 x 2 + β 3 x 3 + u. Discuss the following two hypotheses.

More information

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

Econometrics I KS. Module 2: Multivariate Linear Regression. Alexander Ahammer. This version: April 16, 2018 Econometrics I KS Module 2: Multivariate Linear Regression Alexander Ahammer Department of Economics Johannes Kepler University of Linz This version: April 16, 2018 Alexander Ahammer (JKU) Module 2: Multivariate

More information

Autocorrelation. Think of autocorrelation as signifying a systematic relationship between the residuals measured at different points in time

Autocorrelation. Think of autocorrelation as signifying a systematic relationship between the residuals measured at different points in time Autocorrelation Given the model Y t = b 0 + b 1 X t + u t Think of autocorrelation as signifying a systematic relationship between the residuals measured at different points in time This could be caused

More information

Class business PS is due Wed. Lecture 20 (QPM 2016) Multivariate Regression November 14, / 44

Class business PS is due Wed. Lecture 20 (QPM 2016) Multivariate Regression November 14, / 44 Multivariate Regression Prof. Jacob M. Montgomery Quantitative Political Methodology (L32 363) November 14, 2016 Lecture 20 (QPM 2016) Multivariate Regression November 14, 2016 1 / 44 Class business PS

More information

At this point, if you ve done everything correctly, you should have data that looks something like:

At this point, if you ve done everything correctly, you should have data that looks something like: This homework is due on July 19 th. Economics 375: Introduction to Econometrics Homework #4 1. One tool to aid in understanding econometrics is the Monte Carlo experiment. A Monte Carlo experiment allows

More information

Basic econometrics. Tutorial 3. Dipl.Kfm. Johannes Metzler

Basic econometrics. Tutorial 3. Dipl.Kfm. Johannes Metzler Basic econometrics Tutorial 3 Dipl.Kfm. Introduction Some of you were asking about material to revise/prepare econometrics fundamentals. First of all, be aware that I will not be too technical, only as

More information

Longitudinal Data Analysis. RatSWD Nachwuchsworkshop Vorlesung von Josef Brüderl 25. August, 2009

Longitudinal Data Analysis. RatSWD Nachwuchsworkshop Vorlesung von Josef Brüderl 25. August, 2009 Longitudinal Data Analysis RatSWD Nachwuchsworkshop Vorlesung von Josef Brüderl 25. August, 2009 Longitudinal Data Analysis Traditional definition Statistical methods for analyzing data with a time dimension

More information

Chapter 2: simple regression model

Chapter 2: simple regression model Chapter 2: simple regression model Goal: understand how to estimate and more importantly interpret the simple regression Reading: chapter 2 of the textbook Advice: this chapter is foundation of econometrics.

More information

Lecture#12. Instrumental variables regression Causal parameters III

Lecture#12. Instrumental variables regression Causal parameters III Lecture#12 Instrumental variables regression Causal parameters III 1 Demand experiment, market data analysis & simultaneous causality 2 Simultaneous causality Your task is to estimate the demand function

More information

ECON Introductory Econometrics. Lecture 16: Instrumental variables

ECON Introductory Econometrics. Lecture 16: Instrumental variables ECON4150 - Introductory Econometrics Lecture 16: Instrumental variables Monique de Haan (moniqued@econ.uio.no) Stock and Watson Chapter 12 Lecture outline 2 OLS assumptions and when they are violated Instrumental

More information

Test of Convergence in Agricultural Factor Productivity: A Semiparametric Approach

Test of Convergence in Agricultural Factor Productivity: A Semiparametric Approach Test of Convergence in Agricultural Factor Productivity: A Semiparametric Approach Krishna P. Paudel, Louisiana State University and LSU Agricultural Center Mahesh Pandit, Louisiana State University and

More information

Applied Quantitative Methods II

Applied Quantitative Methods II Applied Quantitative Methods II Lecture 10: Panel Data Klára Kaĺıšková Klára Kaĺıšková AQM II - Lecture 10 VŠE, SS 2016/17 1 / 38 Outline 1 Introduction 2 Pooled OLS 3 First differences 4 Fixed effects

More information

EC327: Advanced Econometrics, Spring 2007

EC327: Advanced Econometrics, Spring 2007 EC327: Advanced Econometrics, Spring 2007 Wooldridge, Introductory Econometrics (3rd ed, 2006) Chapter 14: Advanced panel data methods Fixed effects estimators We discussed the first difference (FD) model

More information

ECON Introductory Econometrics. Lecture 6: OLS with Multiple Regressors

ECON Introductory Econometrics. Lecture 6: OLS with Multiple Regressors ECON4150 - Introductory Econometrics Lecture 6: OLS with Multiple Regressors Monique de Haan (moniqued@econ.uio.no) Stock and Watson Chapter 6 Lecture outline 2 Violation of first Least Squares assumption

More information

MSc Economic Policy Studies Methods Seminar. Stata Code and Questions sheet: Computer lab session 24 th October

MSc Economic Policy Studies Methods Seminar. Stata Code and Questions sheet: Computer lab session 24 th October MSc Economic Policy Studies Methods Seminar Stata Code and Questions sheet: Computer lab session 24 th October Example 1. Modelling rents (cross-section) Section I A1. We can input the data into Stata

More information