Econometrics for PhDs

Similar documents
Econometrics of Panel Data

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

1 Motivation for Instrumental Variable (IV) Regression

Jeffrey M. Wooldridge Michigan State University

Econometric Analysis of Cross Section and Panel Data

Instrumental Variables and the Problem of Endogeneity

EC327: Advanced Econometrics, Spring 2007

Dynamic Panels. Chapter Introduction Autoregressive Model

Econometrics. 8) Instrumental variables

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

Final Exam. Economics 835: Econometrics. Fall 2010

Lecture 6: Dynamic panel models 1

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

Dealing With Endogeneity

1. You have data on years of work experience, EXPER, its square, EXPER2, years of education, EDUC, and the log of hourly wages, LWAGE

1 Outline. 1. Motivation. 2. SUR model. 3. Simultaneous equations. 4. Estimation

Econ 2120: Section 2

ECON 4551 Econometrics II Memorial University of Newfoundland. Panel Data Models. Adapted from Vera Tabakova s notes

Topic 7: Heteroskedasticity

Motivation for multiple regression

Econometrics of Panel Data

Statistics, inference and ordinary least squares. Frank Venmans

Panel Data Models. Chapter 5. Financial Econometrics. Michael Hauser WS17/18 1 / 63

Lecture 7: Dynamic panel models 2

Short T Panels - Review

Econometrics of Panel Data

8. Instrumental variables regression

ECON Introductory Econometrics. Lecture 16: Instrumental variables

INTRODUCTION TO BASIC LINEAR REGRESSION MODEL

LECTURE 2 LINEAR REGRESSION MODEL AND OLS

Problem Set #6: OLS. Economics 835: Econometrics. Fall 2012

Non-linear panel data modeling

Lecture 4: Linear panel models

4 Instrumental Variables Single endogenous variable One continuous instrument. 2

4 Instrumental Variables Single endogenous variable One continuous instrument. 2

Multiple Regression Analysis

Wooldridge, Introductory Econometrics, 4th ed. Chapter 15: Instrumental variables and two stage least squares

Instrumental variables estimation using heteroskedasticity-based instruments

Econometrics Summary Algebraic and Statistical Preliminaries

Applied Health Economics (for B.Sc.)

Hypothesis Testing for Var-Cov Components

GLS. Miguel Sarzosa. Econ626: Empirical Microeconomics, Department of Economics University of Maryland

Ordinary Least Squares Regression

Panel Data. March 2, () Applied Economoetrics: Topic 6 March 2, / 43

Lecture: Simultaneous Equation Model (Wooldridge s Book Chapter 16)

EC312: Advanced Econometrics Problem Set 3 Solutions in Stata

Testing Linear Restrictions: cont.

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

Review of Statistics

Reliability of inference (1 of 2 lectures)

Lecture 8: Instrumental Variables Estimation

EC4051 Project and Introductory Econometrics

Vector Autoregressive Model. Vector Autoregressions II. Estimation of Vector Autoregressions II. Estimation of Vector Autoregressions I.

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

Identification and Estimation Using Heteroscedasticity Without Instruments: The Binary Endogenous Regressor Case

A Course in Applied Econometrics Lecture 4: Linear Panel Data Models, II. Jeff Wooldridge IRP Lectures, UW Madison, August 2008

PANEL DATA RANDOM AND FIXED EFFECTS MODEL. Professor Menelaos Karanasos. December Panel Data (Institute) PANEL DATA December / 1

Answers to Problem Set #4

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

Multiple Regression. Midterm results: AVG = 26.5 (88%) A = 27+ B = C =

Handout 11: Measurement Error

Applied Econometrics (MSc.) Lecture 3 Instrumental Variables

Notes on Panel Data and Fixed Effects models

Comprehensive Examination Quantitative Methods Spring, 2018

Endogeneity. Tom Smith

Selection on Observables

FNCE 926 Empirical Methods in CF

Topic 10: Panel Data Analysis

INFERENCE APPROACHES FOR INSTRUMENTAL VARIABLE QUANTILE REGRESSION. 1. Introduction

Basic Regressions and Panel Data in Stata

G. S. Maddala Kajal Lahiri. WILEY A John Wiley and Sons, Ltd., Publication

Handout 12. Endogeneity & Simultaneous Equation Models

Instrumental Variables and GMM: Estimation and Testing. Steven Stillman, New Zealand Department of Labour

Instrumental Variables, Simultaneous and Systems of Equations

Applied Quantitative Methods II

A Course in Applied Econometrics Lecture 14: Control Functions and Related Methods. Jeff Wooldridge IRP Lectures, UW Madison, August 2008

Specification testing in panel data models estimated by fixed effects with instrumental variables

ECO375 Tutorial 8 Instrumental Variables

Applied Microeconometrics (L5): Panel Data-Basics

ECON 594: Lecture #6

Multiple Regression Analysis

An overview of applied econometrics

Title. Description. var intro Introduction to vector autoregressive models

Next, we discuss econometric methods that can be used to estimate panel data models.

Rockefeller College University at Albany

Missing dependent variables in panel data models

Regression: Ordinary Least Squares

Linear Models in Econometrics

Econometrics. 4) Statistical inference

Econometrics Honor s Exam Review Session. Spring 2012 Eunice Han

AGEC 621 Lecture 16 David Bessler

Empirical Application of Simple Regression (Chapter 2)

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

Vector Auto-Regressive Models

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

xtseqreg: Sequential (two-stage) estimation of linear panel data models

Identification and Estimation Using Heteroscedasticity Without Instruments: The Binary Endogenous Regressor Case

VAR Models and Applications

A Non-Parametric Approach of Heteroskedasticity Robust Estimation of Vector-Autoregressive (VAR) Models

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

Transcription:

Econometrics for PhDs Amine Ouazad April 2012, Final Assessment - Answer Key 1

Questions with a require some Stata in the answer. Other questions do not. 1 Ordinary Least Squares: Equality of Estimates Across 2 Samples (20 points) Theos is launching the estimation of the following specification on sample A: regress return factor1-factor18, robust He runs the same regression on sample B, and would like to know whether the coefficients of the factors estimated on sample A are equal to the coefficients of the factors estimated on sample B. We write the specification y = x 0 j + ", where j =1, 2 indexes samples. The vector x has dimension K, andy is a scalar. Sample 1 has i =1, 2,...,N 1 observations, and sample 2 has i =1, 2,...,N 2 observations. The observations of x and y are noted y i,j and x i,j, where i indexes observations. 1. In Theos s estimation, what is the value of K? What does robust stand for? K is the number of covariates, including the constant. There are 18 non-constant covariates, hence K = 19. robust stands for heteroscedasticity robust standard errors. Instead of estimating each regression separately, we will use a trick: we will estimate one specification, which will allow us to test for the equality of the coefficients across the two samples. 2. Write the specification in matrix form Y = X +", stacking the two samples together, so that Y is a column vector of size N 1 + N 2. We write =( 1 2 ) 0. 1 is the coefficient vector for sample A, and 2 is the coefficient vector for sample 2. What is the size of matrix X? Write 0 x i,j 1 the observation i of sample j. Each x i,j is a vector of size K. Write X j = x 1,j!!! B @. C A. Then X = X 1 0 X 1 0 1. And Y = + ". The size of 0 X 2 0 X 2 2 x Nj,j matrix X is (N 1 + N 2 ) (2K). 3. Theos wants to test whether the coefficient of factor4 is equal across the two samples. What is the null hypothesis? What is the appropriate test statistic? We note 1 =(1, 1,1, 1,2,..., 1,K) 0 the column vector of coefficients for sample 1. The null hypothesis is that 1,4 = 2,4. Multiple test statistics are possible. Here I consider the 2

Wald test. Note ˆr the estimate imposing the constraint of the null hypothesis, and ˆ the unrestricted estimate. Under the null, ˆr is more efficient than ˆ. Then, the Wald statistic W =(ˆr ˆ)0 (Var( ˆ) Var( ˆr))( ˆr ˆ) converges under the null in distribution to a Chi Square distribution with 1 degree of freedom. Extension testing for the equality of all coefficients: The null hypothesis is that 1 = 2. In other words, that each element of the coefficient vector 1 is equal to the corresponding element in 2.ThatisatotalofKrestrictions. 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 The restriction can be written as R =0,whereR = B @.... 0 0 1 0 0 1. C A 4. Sample A is in file samplea.dta and sample B is in file sampleb.dta. Using only the commands gen, use, append, regress, test, clear, write the Stata program that tests whether the coefficient estimates are equal across the two samples. clear use samplea.dta gen sample = 1 append using sampleb.dta replace sample = 2 if sample ==. forvalues k=1/18 { gen factor k _sample1=factor k *(sample==1) } forvalues k=1/18 { gen factor k _sample2=factor k *(sample==2) } gen sample1 = sample == 1 regress return sample1 factor1_sample1-factor18_sample1 factor1_sample2-factor18_sample2, robust test factor1_sample1 = factor1_sample2 This last line tests whether the coefficient for factor1 in sample 1 is equal to the coefficient for 3

factor2 in sample 2. 5. This is done. Theos now wants to include a fixed effect in the regression, and rather than running regress return factor1-factor18, robust he runs areg return factor1-factor18, robust a(industry) industry is the SIC code of the industry of the observation. Assuming that I is a P vector of industry effects, how should we rewrite the specification in matrix form in question 2? Don t forget that the stacked regression should be equivalent to running two separate regressions. The matrix specification should be rewritten as follows. I 1 is the vector of industry fixed effects estimated on sample 1 and I 2 is the vector of industry fixed effects estimated on sample 2. Write D 1 the design matrix for sample1 and D 2 the design matrix for sample2. Then the matrix form of the specification is: Y = X + D 1 I 1 + D 2 I 2 + ". The design matrix D 1 has size N 1 P and the design matrix D 2 has size N 2 P. 6. Please rewrite the program of question 4 to allow for industry fixed effects. The command egen = group() can be used in addition to previous commands. The program becomes: clear use samplea.dta gen sample = 1 append using sampleb.dta replace sample = 2 if sample ==. forvalues k=1/18 { gen factor k _sample1=factor k *(sample==1) } forvalues k=1/18 { gen factor k _sample2=factor k *(sample==2) 4

} gen sample1 = sample == 1 egen industry_by_sample = group(industry sample) areg return sample1 factor1_sample1-factor18_sample1 factor1_sample2-factor18_sample2, a(industry_by_sample) robust test factor1_sample1 = factor1_sample2 2 Instrumental Variables: Rain and Election Day (20 points) It rained heavily last Sunday. And it was election day, the first round of the French presidential elections. A well-trained political scientist believes that the weather conditions provide him with a good instrument for estimating the causal impact of voter turnout on the share of votes going to the extreme-right party. He has a dataset with the last 28 elections, across the 93 French departements (i.e. county). He would like to run the following regression: extreme right t,i = turnout t,i + x t,i + " t,i where t indexes the election (t =1, 2,...,28) andi indexes departements (i =1, 2,...,93). The dimension of x t,i is K. The weather conditions are in a vector weather t,j, which has dimension L. Weather conditions are measured at the regional level, and a region is larger than a departement. We note j(i) the region of departement i. The political scientist could not find more refined data. There are 22 regions so that j =1, 2,...,22. 1. Write the OLS specification in matrix form. Explain the political scientist s intuition: Why does he need an instrumental variable? Why is this instrumental variable potentially a good identification strategy? Write the first stage of the IV regression. We order observations by election and then by region, and stack observations extreme right t,i into a single vector ER of size TI where T is the number of elections and I the number of departements. Similarly we stack observations on turnout into a single vector TO of the same size. Observations for the covariates are stacked in a matrix of size TI K. The residual vector is noted ". 5

ER = TO + X + " The political scientist believes that there are omitted (potentially unobserved) variables that are correlated with turnout and that have an impact on the share of the vote going to the extreme-right. Hence the assumption E(" X, TO) =0is not satisfied. Weather conditions are unlikely to affect voters preferences, but they are likely to affect the probability of going to the voting booth. The first stage is written as: TO = Wc+ Xb + U where W is the matrix of weather conditions of size TI Lfor each election and each département. W has size TI. U is the residual of the first stage. 2. What are the conditions under which the vector weather t,i is a valid instrumental variable for turnout t,i and the model is identified? Write the formal conditions (there are at least 4) and discuss their interpretation. Write the causal diagram with arrows. In the first stage, we assume that Cov(W,X)6=0, Cov(",W)=0 (valid instrument), and that Cov(X, ") =0(exogeneity of the Xs), and that L>K.Otherconditionsapply. 3. Write down the Stata command that estimates the IV regression instrumenting turnout by weather. The variables in x t,i are called x1-xk in Stata. The weather variables are called temperature, rain, pressure. ivreg extremeright (turnover = temperature rain pressure) x1-xk. Options can be specified for the appropriate consideration of clustering and robust standard errors. 4. The political scientist is concerned that because weather is measured at the regional level, and turnover at the departement level, there may be some inference issues in the IV estimation. What does he mean? How should we solve this problem? The residuals of the regression are likely to be correlated within each region. In other words, 6

Cov(" ti," ti 0) 6= 0if j(i) =j(i 0 ). We write Cov(" ti," ti 0)=, with >0. In this case OLS standard errors are typically an underestimate of the true standard errors on the coefficients of the first stage. Noting 2 the variance of the residuals of the second stage regression. Assume for simplicity that the number of départements per region is constant at N r. Note J the square matrix of ones of size N r.thenthestandarderrorsfortheivcoefficientare: Var ĉ ˆb! = W 0 Y X 0 Y! 1 W 0 X 0! (( 2 )Id Nr + J) Id J (W X)(Y 0 W Y 0 X) 1 5. We would like to include one dummy per election i, and one dummy per region t. Is the model identified with these two set of dummies? Explain. If that is possible, update the Stata command of question 3 to include region and election dummies. With one dummy per election and one dummy per region, the model is written as: ER = TO + X + E + R + " TO = Wc+ Xb + E 0 + R 0 + U where and are the design matrices for the election and the regions, and E, R and the election and region fixed effects in the second stage, E 0 and R 0 are the election and region fixed effects in the first stage. Because the election and region dummies are not instrumented, they are assumed exogenous and included in the first stage regression as well as in the second stage regression. The election dummies are a set of dummies constant for a given value of t. Theregion dummies are a set of dummies constant for a given value of j. Turnover TO varies across elections and across regions. Therefore, the coefficient of TO is identified. The coefficients of the variables in X and W are identified as long as there is variation both across elections and across regions. We update the Stata command of question 3. and elections, we perform an IV regression with dummy variables: Because there is a small number of regions xi: ivreg extremeright (turnover = temperature rain pressure) x1-xk i.region i.election 7

One region dummy and one election dummy are dropped from the regression since the constant and all dummies are not jointly identified. 3 Logit: What is the Specification? (20 points) The Magnum Ice Cream company organizes a consumer focus group with N =78 participants. Each participant sees one of two commercials (commercial A or commercial B). Each participant can either pick the new Moccachino ice cream or the traditional best-seller, the chocolate Magnum ice cream. Finally, participants fill a questionnaire on their socio-economic characteristics. 1. Write the utility of the Moccachino ice cream and the utility of the chocolate ice cream as a function of the commercial seen and customer s characteristics. Participants in the study are indexed by i =1, 2, 3,...,N. Products are indexed by j =0, 1. j =1is the new Moccachino ice cream. The dummy c i =0, 1 indicates whether they have seen the Moccachino commerical. The observable characteristics of the participant are noted X i.then,u i,j = X i j + j c i + " i,j is the utility of choosing product j for participant i. 2. Write the probability of choosing the new Moccachino ice cream as a function of customer characteristics and the commercial seen. P (j = 1) = P (X i 1 + 1 c i +" i,1 >X i 2 + 2 c i +" i,2 )=P(X i ( 1 2 )+( 1 2 )c i >" i,2 " i,1 ). Participant characteristics and the commercial seen determine the probability of choosing product j =1. Noting F ( ) the cumulative distribution function of the difference " i,2 " i,1,then P (j = 1) = F (X i ( 1 2 )+( 1 2 )c i ). 3. What assumptions should we make on the residuals of question 1 so that this probability is a logit probability? Same question if we want a probit probability? We assume a logit probability. If the residuals are extreme-value distributed, i.e. have a Gumbel distribution with cdf F (x) = exp( exp( x)), thenthecdffisthecdfofthelogitdistribution. Iftheresidualshavenormal distribution with mean 0 and variance 1/2, theresidualhasastandardnormaldistribution. 4. How can we test that the assignment of commercials to consumers has been randomized? Explain very carefully. The null hypothesis of the randomization of commercials to participants is H 0 : c i? X i, 8

that is, there is no correlation between observables X i and the commercial dummy c i.noting K the number of covariates, a set of K seemingly unrelated regressions x i,k = a k + b k c i + " i,k, provides an equivalent formulation for the null hypothesis: H 0 : b k =0, 8k. 5. What is the Stata command used to test the randomization of the assignment of the commercial to customers in question 4? The randomization of the assignment of the commercial to consumers for characteristic k is performed using a t test, so that regress x1 commercial, followedbytest commercial=0 performs the test for characteristic x1. The p-value and the t stat are reported in an appropriate table, alongside the mean of x1 for the group that saw the first commercial, and for the group that saw the second commercial. For a joint test that all characteristics are uncorrelated with the commercial, stack the observations of x i,k into a vector X of size KN. This stacked vector is stored in variable x in Stata. Then run regression regress x commercial, cluster(participant), andrunthe joint t test test commercial=0. 6. Write the Stata program that estimates the marginal effect of the commercial on the probability of choosing the new Moccachino ice cream. logit choice x1-xk commercial mfx 7. Is the effect of the commercial equal across consumers in the logit model? The commercial has an equal impact on the probability of choosing the Moccachino ice cream across consumers. In order to estimate effects that depend on customers characteristics, construct interactions terms between the observable characteristics and the commercial dummy. 4 The Generalized Method of Moments: The Normal Distribution (20 points) No Stata command is required in this problem. We observe a series of iid draws x 1,x 2,x 3,...,x N from a Normal distribution. 1. Provide the GMM estimator of the mean and the variance of the normal distribution using 2 moments: the empirical mean and the empirical variance. 9

Give the moment conditions. Give the empirical moment conditions. Give the objective function. The moment conditions are the following: E(x i µ)=0and E(x 2 i ) E(x i) 2 2 =0.Theempirical moment conditions are: m 1 (x i,µ) = µ m 2 (x i, 1 N 2 ) = 2 1 N NX x i i=1 NX x 2 i + i=1 1 N! 2 NX x i i=1 We stack these conditions into a column vector m(x i,µ, 2 ) of size 2. The objective function is Q(x i,µ, 2 )=m(x i,µ, 2 ) 0 W m(x i,µ, 2 ) where W is a positive definite squared matrix of size 2. 2. Provide the GMM estimator of the mean and the variance of the normal distribution using 4 moments: the empirical mean, variance, skewness, and kurtosis. Give the moment conditions. Give the empirical moment conditions. Give the objective function. Note m 3 (x i,µ, 2 ) and m 4 (x i,µ, 2 ) the moment conditions corresponding to skewness and kurtosis. These are: m 3 (x i,µ, m 4 (x i,µ, 2 ) = 1 N 2 ) = 1 N NX (x i µ) 3 i=1 NX (x i µ) 4 3( 2 ) 2 i=1 The skewness of a normal distribution is zero and the excess kurtosis of a normal distribution is equal to 0. Stacking these 4 moment conditions into a single vector M of size 4, the objective function is: 10

Q(x i,µ, 2 )=M 0 W M where W is a squared positive definite matrix. We will assume that W makes Q an efficient estimator of µ and 2. One choice for W is the inverse of the variance-covariance matrix of the vector of empirical moments (see lecture notes). 3. In question 2, the model is overidentified. Why? The model has 2 parameters, and 4 independent moment conditions. The moment conditions are independent: indeed, the first two moment conditions on mean and variance impose no constraint on the skewness and kurtosis of the model. 4. Design a test for the normality of the observations x 1,x 2,...,x N using the J-stat. If the distribution is normal, the four moment conditions are asymptotically jointly satisfied (note however that the converse is not true: there are non normal distributions that satisfy all of the four moment conditions). The null hypothesis to be tested is: H 0 : m(µ, 2 )=0(the empirical moment conditions are noted m while the moment conditions are noted m). Under the null hypothesis, the objective function NQ converges in distribution to a chi squared with 2 degrees of freedom (4 moments - 2 parameters). Noting G(.) the cumulative distribution function of the chi-squared distribution, the critical value at 5% is c 0.05 = G 1 (0.95). 5 Understanding a Paper (20 points) Consider the following attached paper, Blog, Blogger, and the Firm: Can Negative Employee Posts Lead to Positive Outcomes?, from the journal Information Systems Research, June 2011. Answer the following questions: 1. In specification 1, page 6, the author would like to include a blog fixed effect. Why would a blog fixed effect be desirable? Explain in plain English without maths. Now back to formal econometrics, how would you estimate the same specification with a blog fixed effect? Write the updated specification, propose a consistent estimator of the coefficients 0 to 5,and write the corresponding Stata command. The specification does not capture unobserved non time varying variables that may be correlated with lagged popularity, blog importance, the ratio of negativity, and the number of subscribers and that have an impact on next period popularity. This is for instance likely if blogs have trends that are related to the quality of the blog, its language, the products mentioned. The new specification is: 11

P i,t = 0 + 1 P i,t 1 + 2 W i,t + 3 W i,t R i,t + 4 R i,t + 5 S i,t + u i + " i,t u i is the blog-specific fixed effect. A consistent estimator of this specification is not provided either by the first-differenced estimator or by the within estimator. Indeed, the presence of the lagged dependent variable creates an endogeneity bias in both the first-differenced and in the within specification. Hence, we estimate the specification using GMM under the assumption that residuals " i,t are orthogonal within and across individuals. Using the Arellano-Bond approach, xtabond popularity weight weightxnegativity negativity subscribers, lags(1) 2. In table 6, the author presents the results of the estimation of a random effects model (column 2), and a first-difference model (column 3). Should the results of the random effects estimation differ from the results of the first-difference estimation? Under what conditions are the two estimators consistent? In what part of the text does the author test for the equality of the estimators? The two estimators are consistent estimators of the parameters as long as the residual including the random effect is orthogonal to the covariates. In this case, both the first-differenced estimation and the random effects estimation (via Generalized Least Squares) converge in probability to the value of the underlying parameters. Page 9, column 2: The estimates obtained from this fixed-effects regression are tested against the estimates from the random effects estimation by a Hausman test (Hausman 1978). We fail to reject the null that both the estimates are consistent at p = 0.49. Hence, the results with ran- dom effects are consistent as well as efficient. AHausmantestisachisquaredstatisticthattestsfortheequalityofthevectorofestimatesin the random effects model (efficient estimates under the null) and the vector of estimates in the fixed effects model. 3. In page 9, first column of text, the author says that The assumption that instruments are not correlated with the error terms cannot be directly tested. Is that true? Explain. This is indeed true as long as all potentially observable covariates have been included in the regression. By definition of Ordinary Least Squares, the residual is mean independent of the covariates. 4. Then the author states that [...] but can be tested indirectly if the model is overidentified. What is the null hypothesis? Ignore what the authors describe. Rather, remember the Instrumental Variable estimation as a GMM estimator. What do we call the J statistic in GMM? 12

What is the asymptotic distribution of the J stat under the null hypothesis? Write it carefully in maths, explain the notations. What is the p-value of the J stat and how do we read it? [Outline of the answer only] The null hypothesis is that all moment conditions implied by the instruments are jointly satisfied. If the number of covariates is noted K and the number of instruments is noted L, thetestcanbeperformedifk is strictly smaller than L. In which case, the objective function of the IV GMM estimator, under the null hypothesis, converges in distribution to a chi squared with L K degrees of freedom. NQ = Nm 0 1 m! d 2 (L K) The p-value is 1 F (Q), notingf the cdf of the chi squared with L K degrees of freedom. 13