Generalized method of moments estimation in Stata 11

Size: px
Start display at page:

Download "Generalized method of moments estimation in Stata 11"

Transcription

1 Generalized method of moments estimation in Stata 11 David M. Drukker StataCorp Stata Conference Washington, DC / 27

2 Outline 1 A quick introduction to GMM 2 gmm examples Ordinary least squares Two-stage least squares Cross-sectional Poisson with endogenous covariates Fixed-effects Poisson regression 2 / 27

3 A quick introduction to GMM Method of Moments (MM) We estimate the mean of a distribution by the sample mean, the variance by the sample variance, etc We want to estimate µ = E[y] We use µ = (1/N) N i=1 y i This estimator has nice properties because it solves the sample moment condition (1/N) N (y i µ) = 0 i=1 which is the sample analog of the population moment condition E[y µ] = 0 Estimators that solve sample moment equations to produce estimates are called method-of-moments (MM) estimators This method dates back to Pearson (1895) 3 / 27

4 A quick introduction to GMM Generalized method-of-moments (GMM) The MM only works when the number of moment conditions equals the number of parameters to estimate If there are more moment conditions than parameters, the system of equations is algebraically over identified and cannot be solved Generalized method-of-moments (GMM) estimators choose the estimates that minimize a quadratic form of the sample moment conditions GMM gets as close to solving the over-identified system of sample moment equations as possible GMM reduces to MM when the number of parameters equals the number of moment conditions Hansen (1982) produced many of the key results; Wooldridge (2002); Cameron and Trivedi (2005) provide good introductions 4 / 27

5 A quick introduction to GMM Definition of GMM estimator 5 / 27 Our research question implies q population moment conditions E[m(w i, θ)] = 0 m is q 1 vector of functions whose expected values are zero in the population w i is the data on person i θ is k 1 vector of parameters, k q The sample moments that correspond to the population moments are m(θ) = (1/N) N i=1 m(w i, θ) When k < q, GMM chooses the parameters that are as close as possible to solving the over-identified system of moment equations θ GMM arg min θ m(θ) Wm(θ)

6 A quick introduction to GMM Some properties of the GMM estimator θ GMM arg min θ m(θ) Wm(θ) When k = q, the MM estimator solves m(θ) exactly so m(θ) Wm(θ) = 0 W only affects the efficiency of the GMM estimator Setting W = I yields consistent, but inefficient estimates Setting W = Cov[m(θ)] 1 yields an efficient GMM estimator We can take multiple steps to get an efficient GMM estimator 1 Let W = I and get θ GMM1 arg min θ m(θ) m(θ) 2 Use θ GMM1 to get Ŵ, which is an estimate of Cov[m(θ)] 1 3 Get θ GMM2 arg min θ m(θ) Ŵm(θ) 4 Repeat steps 2 and 3 using θ GMM2 in place of θ GMM1 6 / 27

7 gmm examples The gmm command The new command gmm estimates parameters by GMM gmm is similar to nl, you specify the sample moment conditions as substitutable expressions Substitutable expressions enclose the model parameters in braces {} 7 / 27

8 gmm examples The interactive syntax of gmm Ordinary least squares For many models, the population moment conditions have the form E[ze(β)] = 0 where z is a q 1 vector of instrumental variables and e(β) is a scalar function of the data and the parameters β The corresponding syntax of gmm is gmm (eb expression) [ if ][ in ][ weight ], instruments(instrument varlist) [ options ] where some options are onestep use one-step estimator (default is two-step estimator) winitial(wmtype) initial weight-matrix W wmatrix(witype) weight-matrix W computation after first step vce(vcetype) vcetype may be robust, cluster, bootstrap, hac 8 / 27

9 gmm examples Ordinary least squares Ordinary least squares (OLS) is an MM estimator We know that OLS estimates the parameters of the conditional expectation of y i = x i β + ǫ i under the assumption that E[ǫ x] = 0 Standard probability theory implies that E[ǫ x] = 0 E[xǫ] = 0 So the population moment conditions for OLS are E[x(y xβ)] = 0 The corresponding sample moment conditions are Solving for β yields (1/N) N i=1 x i(y i x i β) = 0 β OLS = ( N i=1 x i x i ) 1 N i=1 x i y i 9 / 27

10 gmm examples Modeling crime data I Ordinary least squares We have (fictional) data on crime in 3,000 communities. use cscrime2, clear. describe Contains data from cscrime2.dta obs: 3,000 vars: 5 29 Jul :02 size: 132,000 (98.7% of memory free) (_dta has notes) storage display value variable name type format label variable label policepc double %10.0g police officers per thousand arrestp double %10.0g arrests/crimes convictp double %10.0g convictions/arrests legalwage double %10.0g legal wage index 0-20 scale crime double %10.0g property-crime index 0-50 scale Sorted by: 10 / 27

11 gmm examples Modeling crime data II Ordinary least squares We specify that crime i = policepc i β 1 +legalwage i β 2 + β 3 + ǫ i We want to model E[crime policepc,legalwage] = policepcβ 1 +legalwageβ 2 +β 3 If E[ǫ policepc,legalwage] = 0, the population moment conditions are [( ) ] policepc E (crime policepcβ legalwage 1 legalwageβ 2 β 3 ) = ( ) / 27

12 OLS by GMM I gmm examples Ordinary least squares. gmm (crime - policepc*{b1} - legalwage*{b2} - {b3}), /// > instruments(policepc legalwage) nolog Final GMM criterion Q(b) = 2.62e-31 GMM estimation Number of parameters = 3 Number of moments = 3 Initial weight matrix: Unadjusted Number of obs = 3000 GMM weight matrix: Robust Robust Coef. Std. Err. z P> z [95% Conf. Interval] /b /b /b Instruments for equation 1: policepc legalwage _cons 12 / 27

13 OLS by GMM II gmm examples Ordinary least squares. regress crime policepc legalwage, robust Linear regression Number of obs = 3000 F( 2, 2997) = Prob > F = R-squared = Root MSE = Robust crime Coef. Std. Err. t P> t [95% Conf. Interval] policepc legalwage _cons / 27

14 IV and 2SLS gmm examples Two-stage least squares For some variables, the assumption E[ǫ x] = 0 is too strong and we need to allow for E[ǫ x] 0 If we have q variables z for which E[ǫ z] = 0 and the correlation between z and x is sufficiently strong, we can estimate β from the population moment conditions E[z(y xβ)] = 0 z are known as instrumental variables If the number of variables in z and x is the same (q = k), solving the the sample moment conditions yields the MM estimator known as the instrumental variables (IV) estimator If there are more variables in z than in x (q > k) and we let ( N 1 W = i=1 z i i) z in our GMM estimator, we obtain the two-stage least-squares (2SLS) estimator 14 / 27

15 2SLS on crime data I gmm examples Two-stage least squares The assumption that E[ǫ policepc] = 0 is false if communities increase policepc in response an increase in crime (an increase in ǫ i ) The variables arrestp and convictp are valid instruments, if they measure some components of communities toughness-on crime that are unrelated to ǫ but are related to policepc We will continue to maintain that E[ǫ legalwage] = 0 15 / 27

16 2SLS by GMM I gmm examples Two-stage least squares. gmm (crime - policepc*{b1} - legalwage*{b2} - {b3}), /// > instruments(arrestp convictp legalwage ) nolog onestep Final GMM criterion Q(b) = GMM estimation Number of parameters = 3 Number of moments = 4 Initial weight matrix: Unadjusted Number of obs = 3000 Robust Coef. Std. Err. z P> z [95% Conf. Interval] /b /b /b Instruments for equation 1: arrestp convictp legalwage _cons 16 / 27

17 2SLS by GMM II gmm examples Two-stage least squares. ivregress 2sls crime legalwage (policepc = arrestp convictp), robust Instrumental variables (2SLS) regression Number of obs = 3000 Wald chi2(2) = Prob > chi2 = R-squared =. Root MSE = Robust crime Coef. Std. Err. z P> z [95% Conf. Interval] policepc legalwage _cons Instrumented: policepc Instruments: legalwage arrestp convictp 17 / 27

18 gmm examples Poisson with endogenous covariates Cross-sectional Poisson with endogenous covariates We want to model to E[y i x i, ν i ] = exp(x i β)ν i This setup allows the distribution of ν i to depend on x i Mullahy (1997) showed that we can use instrumental variables z i and the population moment conditions to estimate β E [z i (y i exp(x i β) 1)] = 0 18 / 27

19 gmm examples Cross-sectional Poisson with endogenous covariates. use accident2, clear. describe Contains data from accident2.dta obs: 948 vars: 6 29 Jul :59 size: 26,544 (99.7% of memory free) storage display value variable name type format label variable label kids cvalue tickets traffic male accidents float %9.0g float %9.0g float %9.0g float %9.0g float %9.0g float %9.0g Sorted by: traffic and male are exogenous variables tickets is an endogenous variable kids and cvalue are instrumental variables 19 / 27

20 gmm examples Cross-sectional Poisson with endogenous covariates. gmm (accidents*exp(-tickets*{b1} - traffic*{b2} - male*{b3} - {b4}) - 1), /// > instruments(kids cvalue traffic male) onestep nolog Final GMM criterion Q(b) = GMM estimation Number of parameters = 4 Number of moments = 5 Initial weight matrix: Unadjusted Number of obs = 948 Robust Coef. Std. Err. z P> z [95% Conf. Interval] /b /b /b /b Instruments for equation 1: kids cvalue traffic male _cons 20 / 27

21 gmm examples Fixed-effects Poisson regression More complicated moment conditions The structure of the moment conditions for some models is too complicated to fit into the interactive syntax used thus far For example, Wooldridge (1999, 2002); Blundell, Griffith, and Windmeijer (2002) discuss estimating the fixed-effects Poisson model for panel data by GMM. In the Poisson panel-data model we are modeling E[y it x it, η i ] = exp(x it β + η i ) Hausman, Hall, and Griliches (1984) derived a conditional log-likelihood function when the outcome is assumed to come from a Poisson distribution with mean exp(x it β + η i ) and η i is an observed component that is correlated with the x it 21 / 27

22 gmm examples Fixed-effects Poisson regression Wooldridge (1999) showed that you could estimate the parameters of this model by solving the sample moment equations ( ) i t x y it y it µ i it = 0 µ i These moment conditions do not fit into the interactive syntax because the term µ i depends on the parameters Need to use moment-evaluator program syntax 22 / 27

23 gmm examples Fixed-effects Poisson regression Moment-evaluator program syntax An abbreviated form of the program syntax for gmm is gmm moment program [ if ][ in ][ weight ], equations(moment cond names) parameters(parameter names) [ instruments() options ] The moment program is an ado-file of the form program gmm_eval version 11 syntax varlist if, at(name) quietly { <replace elements of varlist with error part of moment conditions> } end 23 / 27

24 Panel Accident data gmm examples Fixed-effects Poisson regression. use xtaccidents. describe Contains data from xtaccidents.dta obs: 5,000 vars: 7 31 May :50 size: 160,000 (98.5% of memory free) storage display value variable name type format label variable label id male t kids cvalue tickets accidents float %9.0g float %9.0g float %9.0g float %9.0g float %9.0g float %9.0g float %9.0g Sorted by: id t. by id: egen max_a = max(accidents ). drop if max_a ==0 (3750 observations deleted) 24 / 27

25 gmm examples Fixed-effects Poisson regression program xtfe version 11 syntax varlist if, at(name) quietly { tempvar mu mubar ybar generate double mu = exp(kids* at [1,1] /// + cvalue* at [1,2] /// + tickets* at [1,3]) if egen double mubar = mean( mu ) if, by(id) egen double ybar = mean(accidents) if, by(id) replace varlist = accidents /// - mu * ybar / mubar if } end 25 / 27

26 FE Poisson by gmm gmm examples Fixed-effects Poisson regression. gmm xtfe, equations(accidents) parameters(kids cvalue tickets) /// > instruments(kids cvalue tickets, noconstant) /// > vce(cluster id) onestep nolog Final GMM criterion Q(b) = 1.50e-16 GMM estimation Number of parameters = 3 Number of moments = 3 Initial weight matrix: Unadjusted Number of obs = 1250 (Std. Err. adjusted for 250 clusters in id) Robust Coef. Std. Err. z P> z [95% Conf. Interval] /kids /cvalue /tickets Instruments for equation 1: kids cvalue tickets 26 / 27

27 gmm examples Fixed-effects Poisson regression FE Poisson by xtpoisson, fe. xtpoisson accidents kids cvalue tickets, fe nolog Conditional fixed-effects Poisson regression Number of obs = 1250 Group variable: id Number of groups = 250 Obs per group: min = 5 avg = 5.0 max = 5 Wald chi2(3) = Log likelihood = Prob > chi2 = accidents Coef. Std. Err. z P> z [95% Conf. Interval] kids cvalue tickets / 27

28 References Bibliography Blundell, Richard, Rachel Griffith, and Frank Windmeijer Individual effects and dynamics in count data models, Journal of Econometrics, 108, Cameron, A. Colin and Pravin K. Trivedi Microeconometrics: Methods and applications, Cambridge: Cambridge University Press. Hansen, L. P Large-sample properties of Generalized Method-of-Moment Estimators, Econometrica, Hausman, Jerry A., Bronwyn H. Hall, and Zvi Griliches Econometric Models for Count Data with an Application to the Patents-R&D Relationship, Econometrica, 52(4), Mullahy, J Instrumental variable estimation of Poisson Regression models: Application to models of cigarette smoking behavior, Review of Economics and Statistics, 79, Pearson, Karl Contributions to the mathematical theory of evolution II. Skew variation in homogeneous material, 27 / 27

29 gmm examples Fixed-effects Poisson regression Philosophical Transactions of the Royal Society of London, Series A, 186, Wooldridge, Jeffrey Econometric Analysis of Cross Section and Panel Data, Cambridge, Massachusetts: MIT Press. Wooldridge, Jeffrey M Distribution-free estimation of some nonlinear panel-data models, Journal of Econometrics, 90, / 27

Some Stata commands for endogeneity in nonlinear panel-data models

Some Stata commands for endogeneity in nonlinear panel-data models Some Stata commands for endogeneity in nonlinear panel-data models David M. Drukker Director of Econometrics Stata 2014 German Stata Users Group meeting June 13, 2014 1 / 51 Overview Two approaches to

More information

GMM Estimation in Stata

GMM Estimation in Stata GMM Estimation in Stata Econometrics I Department of Economics Universidad Carlos III de Madrid Master in Industrial Economics and Markets 1 Outline Motivation 1 Motivation 2 3 4 2 Motivation 3 Stata and

More information

David M. Drukker Italian Stata Users Group meeting 15 November Executive Director of Econometrics Stata

David M. Drukker Italian Stata Users Group meeting 15 November Executive Director of Econometrics Stata Estimating the ATE of an endogenously assigned treatment from a sample with endogenous selection by regression adjustment using an extended regression models David M. Drukker Executive Director of Econometrics

More information

Understanding the multinomial-poisson transformation

Understanding the multinomial-poisson transformation The Stata Journal (2004) 4, Number 3, pp. 265 273 Understanding the multinomial-poisson transformation Paulo Guimarães Medical University of South Carolina Abstract. There is a known connection between

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

Day 2A Instrumental Variables, Two-stage Least Squares and Generalized Method of Moments

Day 2A Instrumental Variables, Two-stage Least Squares and Generalized Method of Moments Day 2A nstrumental Variables, Two-stage Least Squares and Generalized Method of Moments c A. Colin Cameron Univ. of Calif.- Davis Frontiers in Econometrics Bavarian Graduate Program in Economics. Based

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

Эконометрика, , 4 модуль Семинар Для Группы Э_Б2015_Э_3 Семинарист О.А.Демидова

Эконометрика, , 4 модуль Семинар Для Группы Э_Б2015_Э_3 Семинарист О.А.Демидова Эконометрика, 2017-2018, 4 модуль Семинар 3 160418 Для Группы Э_Б2015_Э_3 Семинарист ОАДемидова * Stata program * copyright C 2010 by A Colin Cameron and Pravin K Trivedi * used for "Microeconometrics

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

Dynamic Panels. Chapter Introduction Autoregressive Model

Dynamic Panels. Chapter Introduction Autoregressive Model Chapter 11 Dynamic Panels This chapter covers the econometrics methods to estimate dynamic panel data models, and presents examples in Stata to illustrate the use of these procedures. The topics in this

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

Dealing With and Understanding Endogeneity

Dealing With and Understanding Endogeneity Dealing With and Understanding Endogeneity Enrique Pinzón StataCorp LP October 20, 2016 Barcelona (StataCorp LP) October 20, 2016 Barcelona 1 / 59 Importance of Endogeneity Endogeneity occurs when a variable,

More information

xtdpdqml: Quasi-maximum likelihood estimation of linear dynamic short-t panel data models

xtdpdqml: Quasi-maximum likelihood estimation of linear dynamic short-t panel data models xtdpdqml: Quasi-maximum likelihood estimation of linear dynamic short-t panel data models Sebastian Kripfganz University of Exeter Business School, Department of Economics, Exeter, UK UK Stata Users Group

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

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

Dynamic Panel Data Models

Dynamic Panel Data Models Models Amjad Naveed, Nora Prean, Alexander Rabas 15th June 2011 Motivation Many economic issues are dynamic by nature. These dynamic relationships are characterized by the presence of a lagged dependent

More information

Econometrics. 8) Instrumental variables

Econometrics. 8) Instrumental variables 30C00200 Econometrics 8) Instrumental variables Timo Kuosmanen Professor, Ph.D. http://nomepre.net/index.php/timokuosmanen Today s topics Thery of IV regression Overidentification Two-stage least squates

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

Partial effects in fixed effects models

Partial effects in fixed effects models 1 Partial effects in fixed effects models J.M.C. Santos Silva School of Economics, University of Surrey Gordon C.R. Kemp Department of Economics, University of Essex 22 nd London Stata Users Group Meeting

More information

Generalised method of moments estimation of structural mean models

Generalised method of moments estimation of structural mean models Generalised method of moments estimation of structural mean models Tom Palmer 1,2 Roger Harbord 2 Paul Clarke 3 Frank Windmeijer 3,4,5 1. MRC Centre for Causal Analyses in Translational Epidemiology 2.

More information

Analyzing spatial autoregressive models using Stata

Analyzing spatial autoregressive models using Stata Analyzing spatial autoregressive models using Stata David M. Drukker StataCorp Summer North American Stata Users Group meeting July 24-25, 2008 Part of joint work with Ingmar Prucha and Harry Kelejian

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

Treatment interactions with nonexperimental data in Stata

Treatment interactions with nonexperimental data in Stata The Stata Journal (2011) 11, umber4,pp.1 11 Treatment interactions with nonexperimental data in Stata Graham K. Brown Centre for Development Studies University of Bath Bath, UK g.k.brown@bath.ac.uk Thanos

More information

Day 3B Nonparametrics and Bootstrap

Day 3B Nonparametrics and Bootstrap Day 3B Nonparametrics and Bootstrap c A. Colin Cameron Univ. of Calif.- Davis Frontiers in Econometrics Bavarian Graduate Program in Economics. Based on A. Colin Cameron and Pravin K. Trivedi (2009,2010),

More information

A Journey to Latent Class Analysis (LCA)

A Journey to Latent Class Analysis (LCA) A Journey to Latent Class Analysis (LCA) Jeff Pitblado StataCorp LLC 2017 Nordic and Baltic Stata Users Group Meeting Stockholm, Sweden Outline Motivation by: prefix if clause suest command Factor variables

More information

Model and Working Correlation Structure Selection in GEE Analyses of Longitudinal Data

Model and Working Correlation Structure Selection in GEE Analyses of Longitudinal Data The 3rd Australian and New Zealand Stata Users Group Meeting, Sydney, 5 November 2009 1 Model and Working Correlation Structure Selection in GEE Analyses of Longitudinal Data Dr Jisheng Cui Public Health

More information

Day 1B Count Data Regression: Part 2

Day 1B Count Data Regression: Part 2 Day 1B Count Data Regression: Part 2 A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Economics Norwegian School of Economics Advanced Microeconometrics Aug 28 - Sept 1, 2017. Colin Cameron

More information

Microeconometrics (PhD) Problem set 2: Dynamic Panel Data Solutions

Microeconometrics (PhD) Problem set 2: Dynamic Panel Data Solutions Microeconometrics (PhD) Problem set 2: Dynamic Panel Data Solutions QUESTION 1 Data for this exercise can be prepared by running the do-file called preparedo posted on my webpage This do-file collects

More information

Instrumental Variables, Simultaneous and Systems of Equations

Instrumental Variables, Simultaneous and Systems of Equations Chapter 6 Instrumental Variables, Simultaneous and Systems of Equations 61 Instrumental variables In the linear regression model y i = x iβ + ε i (61) we have been assuming that bf x i and ε i are uncorrelated

More information

Description Quick start Menu Syntax Options Remarks and examples Stored results Methods and formulas Acknowledgment References Also see

Description Quick start Menu Syntax Options Remarks and examples Stored results Methods and formulas Acknowledgment References Also see Title stata.com hausman Hausman specification test Description Quick start Menu Syntax Options Remarks and examples Stored results Methods and formulas Acknowledgment References Also see Description hausman

More information

ESTIMATING AVERAGE TREATMENT EFFECTS: REGRESSION DISCONTINUITY DESIGNS Jeff Wooldridge Michigan State University BGSE/IZA Course in Microeconometrics

ESTIMATING AVERAGE TREATMENT EFFECTS: REGRESSION DISCONTINUITY DESIGNS Jeff Wooldridge Michigan State University BGSE/IZA Course in Microeconometrics ESTIMATING AVERAGE TREATMENT EFFECTS: REGRESSION DISCONTINUITY DESIGNS Jeff Wooldridge Michigan State University BGSE/IZA Course in Microeconometrics July 2009 1. Introduction 2. The Sharp RD Design 3.

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

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

Generalized linear models

Generalized linear models Generalized linear models Christopher F Baum ECON 8823: Applied Econometrics Boston College, Spring 2016 Christopher F Baum (BC / DIW) Generalized linear models Boston College, Spring 2016 1 / 1 Introduction

More information

Econometric Analysis of Cross Section and Panel Data

Econometric Analysis of Cross Section and Panel Data Econometric Analysis of Cross Section and Panel Data Jeffrey M. Wooldridge / The MIT Press Cambridge, Massachusetts London, England Contents Preface Acknowledgments xvii xxiii I INTRODUCTION AND BACKGROUND

More information

Spatial Regression Models: Identification strategy using STATA TATIANE MENEZES PIMES/UFPE

Spatial Regression Models: Identification strategy using STATA TATIANE MENEZES PIMES/UFPE Spatial Regression Models: Identification strategy using STATA TATIANE MENEZES PIMES/UFPE Intruduction Spatial regression models are usually intended to estimate parameters related to the interaction of

More information

Generalised method of moments estimation of structural mean models

Generalised method of moments estimation of structural mean models Generalised method of moments estimation of structural mean models Tom Palmer 1,2 Roger Harbord 2 Paul Clarke 3 Frank Windmeijer 3,4,5 1. MRC Centre for Causal Analyses in Translational Epidemiology 2.

More information

Case of single exogenous (iv) variable (with single or multiple mediators) iv à med à dv. = β 0. iv i. med i + α 1

Case of single exogenous (iv) variable (with single or multiple mediators) iv à med à dv. = β 0. iv i. med i + α 1 Mediation Analysis: OLS vs. SUR vs. ISUR vs. 3SLS vs. SEM Note by Hubert Gatignon July 7, 2013, updated November 15, 2013, April 11, 2014, May 21, 2016 and August 10, 2016 In Chap. 11 of Statistical Analysis

More information

11. Bootstrap Methods

11. Bootstrap Methods 11. Bootstrap Methods c A. Colin Cameron & Pravin K. Trivedi 2006 These transparencies were prepared in 20043. They can be used as an adjunct to Chapter 11 of our subsequent book Microeconometrics: Methods

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

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

Control Function and Related Methods: Nonlinear Models

Control Function and Related Methods: Nonlinear Models Control Function and Related Methods: Nonlinear Models Jeff Wooldridge Michigan State University Programme Evaluation for Policy Analysis Institute for Fiscal Studies June 2012 1. General Approach 2. Nonlinear

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

-redprob- A Stata program for the Heckman estimator of the random effects dynamic probit model

-redprob- A Stata program for the Heckman estimator of the random effects dynamic probit model -redprob- A Stata program for the Heckman estimator of the random effects dynamic probit model Mark B. Stewart University of Warwick January 2006 1 The model The latent equation for the random effects

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

Day 1A Ordinary Least Squares and GLS

Day 1A Ordinary Least Squares and GLS Day 1A Ordinary Least Squares and GLS c A. Colin Cameron Univ. of Calif.- Davis Frontiers in Econometrics Bavarian Graduate Program in Economics. Based on A. Colin Cameron and Pravin K. Trivedi (2009,2010),

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 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

Lecture 8 Panel Data

Lecture 8 Panel Data Lecture 8 Panel Data Economics 8379 George Washington University Instructor: Prof. Ben Williams Introduction This lecture will discuss some common panel data methods and problems. Random effects vs. fixed

More information

Estimation of hurdle models for overdispersed count data

Estimation of hurdle models for overdispersed count data The Stata Journal (2011) 11, Number 1, pp. 82 94 Estimation of hurdle models for overdispersed count data Helmut Farbmacher Department of Economics University of Munich, Germany helmut.farbmacher@lrz.uni-muenchen.de

More information

Empirical Asset Pricing

Empirical Asset Pricing Department of Mathematics and Statistics, University of Vaasa, Finland Texas A&M University, May June, 2013 As of May 24, 2013 Part III Stata Regression 1 Stata regression Regression Factor variables Postestimation:

More information

ECON 594: Lecture #6

ECON 594: Lecture #6 ECON 594: Lecture #6 Thomas Lemieux Vancouver School of Economics, UBC May 2018 1 Limited dependent variables: introduction Up to now, we have been implicitly assuming that the dependent variable, y, was

More information

Now what do I do with this function?

Now what do I do with this function? Now what do I do with this function? Enrique Pinzón StataCorp LP December 08, 2017 Sao Paulo (StataCorp LP) December 08, 2017 Sao Paulo 1 / 42 Initial thoughts Nonparametric regression and about effects/questions

More information

Lab 3: Two levels Poisson models (taken from Multilevel and Longitudinal Modeling Using Stata, p )

Lab 3: Two levels Poisson models (taken from Multilevel and Longitudinal Modeling Using Stata, p ) Lab 3: Two levels Poisson models (taken from Multilevel and Longitudinal Modeling Using Stata, p. 376-390) BIO656 2009 Goal: To see if a major health-care reform which took place in 1997 in Germany was

More information

options description set confidence level; default is level(95) maximum number of iterations post estimation results

options description set confidence level; default is level(95) maximum number of iterations post estimation results Title nlcom Nonlinear combinations of estimators Syntax Nonlinear combination of estimators one expression nlcom [ name: ] exp [, options ] Nonlinear combinations of estimators more than one expression

More information

Estimating the Fractional Response Model with an Endogenous Count Variable

Estimating the Fractional Response Model with an Endogenous Count Variable Estimating the Fractional Response Model with an Endogenous Count Variable Estimating FRM with CEEV Hoa Bao Nguyen Minh Cong Nguyen Michigan State Universtiy American University July 2009 Nguyen and Nguyen

More information

Problem set - Selection and Diff-in-Diff

Problem set - Selection and Diff-in-Diff Problem set - Selection and Diff-in-Diff 1. You want to model the wage equation for women You consider estimating the model: ln wage = α + β 1 educ + β 2 exper + β 3 exper 2 + ɛ (1) Read the data into

More information

An explanation of Two Stage Least Squares

An explanation of Two Stage Least Squares Introduction Introduction to Econometrics An explanation of Two Stage Least Squares When we get an endogenous variable we know that OLS estimator will be inconsistent. In addition OLS regressors will also

More information

IV and IV-GMM. Christopher F Baum. EC 823: Applied Econometrics. Boston College, Spring 2014

IV and IV-GMM. Christopher F Baum. EC 823: Applied Econometrics. Boston College, Spring 2014 IV and IV-GMM Christopher F Baum EC 823: Applied Econometrics Boston College, Spring 2014 Christopher F Baum (BC / DIW) IV and IV-GMM Boston College, Spring 2014 1 / 1 Instrumental variables estimators

More information

Marginal Effects for Continuous Variables Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised January 20, 2018

Marginal Effects for Continuous Variables Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised January 20, 2018 Marginal Effects for Continuous Variables Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised January 20, 2018 References: Long 1997, Long and Freese 2003 & 2006 & 2014,

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

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

fhetprob: A fast QMLE Stata routine for fractional probit models with multiplicative heteroskedasticity

fhetprob: A fast QMLE Stata routine for fractional probit models with multiplicative heteroskedasticity fhetprob: A fast QMLE Stata routine for fractional probit models with multiplicative heteroskedasticity Richard Bluhm May 26, 2013 Introduction Stata can easily estimate a binary response probit models

More information

Latent class analysis and finite mixture models with Stata

Latent class analysis and finite mixture models with Stata Latent class analysis and finite mixture models with Stata Isabel Canette Principal Mathematician and Statistician StataCorp LLC 2017 Stata Users Group Meeting Madrid, October 19th, 2017 Introduction Latent

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

FIML estimation of an endogenous switching model for count data

FIML estimation of an endogenous switching model for count data The Stata Journal (2004) 4, Number 1, pp. 40 49 FIML estimation of an endogenous switching model for count data Alfonso Miranda Economics Department University of Warwick Abstract. This paper presents

More information

GMM and Maximum Likelihood estimators with Mata and moptimize

GMM and Maximum Likelihood estimators with Mata and moptimize GMM and Maximum Likelihood estimators with Mata and moptimize Alfonso Miranda Centro de Investigación y Docencia Económicas (CIDE) (alfonso.miranda@cide.edu) Mexican Stata Users Group meeting May 18th

More information

Problem Set 1 ANSWERS

Problem Set 1 ANSWERS Economics 20 Prof. Patricia M. Anderson Problem Set 1 ANSWERS Part I. Multiple Choice Problems 1. If X and Z are two random variables, then E[X-Z] is d. E[X] E[Z] This is just a simple application of one

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

APEC 8212: Econometric Analysis II

APEC 8212: Econometric Analysis II APEC 8212: Econometric Analysis II Instructor: Paul Glewwe Spring, 2014 Office: 337a Ruttan Hall (formerly Classroom Office Building) Phone: 612-625-0225 E-Mail: pglewwe@umn.edu Class Website: http://faculty.apec.umn.edu/pglewwe/apec8212.html

More information

Economics 582 Random Effects Estimation

Economics 582 Random Effects Estimation Economics 582 Random Effects Estimation Eric Zivot May 29, 2013 Random Effects Model Hence, the model can be re-written as = x 0 β + + [x ] = 0 (no endogeneity) [ x ] = = + x 0 β + + [x ] = 0 [ x ] = 0

More information

Econometrics I KS. Module 1: Bivariate Linear Regression. Alexander Ahammer. This version: March 12, 2018

Econometrics I KS. Module 1: Bivariate Linear Regression. Alexander Ahammer. This version: March 12, 2018 Econometrics I KS Module 1: Bivariate Linear Regression Alexander Ahammer Department of Economics Johannes Kepler University of Linz This version: March 12, 2018 Alexander Ahammer (JKU) Module 1: Bivariate

More information

Non-linear panel data modeling

Non-linear panel data modeling Non-linear panel data modeling Laura Magazzini University of Verona laura.magazzini@univr.it http://dse.univr.it/magazzini May 2010 Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 1

More information

Estimation of pre and post treatment Average Treatment Effects (ATEs) with binary time-varying treatment using Stata

Estimation of pre and post treatment Average Treatment Effects (ATEs) with binary time-varying treatment using Stata Estimation of pre and post treatment Average Treatment Effects (ATEs) with binary time-varying treatment using Stata Giovanni Cerulli CNR IRCrES Marco Ventura ISTAT Methodological and Data Quality Division,

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

Estimating treatment effects from observational data using teffects, stteffects, and eteffects

Estimating treatment effects from observational data using teffects, stteffects, and eteffects Estimating treatment effects from observational data using teffects, stteffects, and eteffects David M. Drukker Executive Director of Econometrics Stata Nordic and Baltic Stata User Group Meeting Oslo,

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

The simulation extrapolation method for fitting generalized linear models with additive measurement error

The simulation extrapolation method for fitting generalized linear models with additive measurement error The Stata Journal (2003) 3, Number 4, pp. 373 385 The simulation extrapolation method for fitting generalized linear models with additive measurement error James W. Hardin Arnold School of Public Health

More information

Exam ECON5106/9106 Fall 2018

Exam ECON5106/9106 Fall 2018 Exam ECO506/906 Fall 208. Suppose you observe (y i,x i ) for i,2,, and you assume f (y i x i ;α,β) γ i exp( γ i y i ) where γ i exp(α + βx i ). ote that in this case, the conditional mean of E(y i X x

More information

Nonrecursive Models Highlights Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised April 6, 2015

Nonrecursive Models Highlights Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised April 6, 2015 Nonrecursive Models Highlights Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised April 6, 2015 This lecture borrows heavily from Duncan s Introduction to Structural

More information

The Multiple Linear Regression Model

The Multiple Linear Regression Model Short Guides to Microeconometrics Fall 2016 Kurt Schmidheiny Unversität Basel The Multiple Linear Regression Model 1 Introduction The multiple linear regression model and its estimation using ordinary

More information

Estimating and Interpreting Effects for Nonlinear and Nonparametric Models

Estimating and Interpreting Effects for Nonlinear and Nonparametric Models Estimating and Interpreting Effects for Nonlinear and Nonparametric Models Enrique Pinzón September 18, 2018 September 18, 2018 1 / 112 Objective Build a unified framework to ask questions about model

More information

Econ 836 Final Exam. 2 w N 2 u N 2. 2 v N

Econ 836 Final Exam. 2 w N 2 u N 2. 2 v N 1) [4 points] Let Econ 836 Final Exam Y Xβ+ ε, X w+ u, w N w~ N(, σi ), u N u~ N(, σi ), ε N ε~ Nu ( γσ, I ), where X is a just one column. Let denote the OLS estimator, and define residuals e as e Y X.

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

Empirical Application of Panel Data Regression

Empirical Application of Panel Data Regression 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

More information

Section I. Define or explain the following terms (3 points each) 1. centered vs. uncentered 2 R - 2. Frisch theorem -

Section I. Define or explain the following terms (3 points each) 1. centered vs. uncentered 2 R - 2. Frisch theorem - First Exam: Economics 388, Econometrics Spring 006 in R. Butler s class YOUR NAME: Section I (30 points) Questions 1-10 (3 points each) Section II (40 points) Questions 11-15 (10 points each) Section III

More information

Appendix A. Numeric example of Dimick Staiger Estimator and comparison between Dimick-Staiger Estimator and Hierarchical Poisson Estimator

Appendix A. Numeric example of Dimick Staiger Estimator and comparison between Dimick-Staiger Estimator and Hierarchical Poisson Estimator Appendix A. Numeric example of Dimick Staiger Estimator and comparison between Dimick-Staiger Estimator and Hierarchical Poisson Estimator As described in the manuscript, the Dimick-Staiger (DS) estimator

More information

use conditional maximum-likelihood estimator; the default constraints(constraints) apply specified linear constraints

use conditional maximum-likelihood estimator; the default constraints(constraints) apply specified linear constraints Title stata.com ivtobit Tobit model with continuous endogenous regressors Syntax Menu Description Options for ML estimator Options for two-step estimator Remarks and examples Stored results Methods and

More information

Mediation Analysis: OLS vs. SUR vs. 3SLS Note by Hubert Gatignon July 7, 2013, updated November 15, 2013

Mediation Analysis: OLS vs. SUR vs. 3SLS Note by Hubert Gatignon July 7, 2013, updated November 15, 2013 Mediation Analysis: OLS vs. SUR vs. 3SLS Note by Hubert Gatignon July 7, 2013, updated November 15, 2013 In Chap. 11 of Statistical Analysis of Management Data (Gatignon, 2014), tests of mediation are

More information

ADVANCED ECONOMETRICS I. Course Description. Contents - Theory 18/10/2017. Theory (1/3)

ADVANCED ECONOMETRICS I. Course Description. Contents - Theory 18/10/2017. Theory (1/3) ADVANCED ECONOMETRICS I Theory (1/3) Instructor: Joaquim J. S. Ramalho E.mail: jjsro@iscte-iul.pt Personal Website: http://home.iscte-iul.pt/~jjsro Office: D5.10 Course Website: http://home.iscte-iul.pt/~jjsro/advancedeconometricsi.htm

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

ECON Introductory Econometrics. Lecture 11: Binary dependent variables

ECON Introductory Econometrics. Lecture 11: Binary dependent variables ECON4150 - Introductory Econometrics Lecture 11: Binary dependent variables Monique de Haan (moniqued@econ.uio.no) Stock and Watson Chapter 11 Lecture Outline 2 The linear probability model Nonlinear probability

More information

ECON Introductory Econometrics. Lecture 4: Linear Regression with One Regressor

ECON Introductory Econometrics. Lecture 4: Linear Regression with One Regressor ECON4150 - Introductory Econometrics Lecture 4: Linear Regression with One Regressor Monique de Haan (moniqued@econ.uio.no) Stock and Watson Chapter 4 Lecture outline 2 The OLS estimators The effect of

More information

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

xtseqreg: Sequential (two-stage) estimation of linear panel data models xtseqreg: Sequential (two-stage) estimation of linear panel data models and some pitfalls in the estimation of dynamic panel models Sebastian Kripfganz University of Exeter Business School, Department

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

Recent Developments in Multilevel Modeling

Recent Developments in Multilevel Modeling Recent Developments in Multilevel Modeling Roberto G. Gutierrez Director of Statistics StataCorp LP 2007 North American Stata Users Group Meeting, Boston R. Gutierrez (StataCorp) Multilevel Modeling August

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

Problem Set #3-Key. wage Coef. Std. Err. t P> t [95% Conf. Interval]

Problem Set #3-Key. wage Coef. Std. Err. t P> t [95% Conf. Interval] Problem Set #3-Key Sonoma State University Economics 317- Introduction to Econometrics Dr. Cuellar 1. Use the data set Wage1.dta to answer the following questions. a. For the regression model Wage i =

More information

Confidence intervals for the variance component of random-effects linear models

Confidence intervals for the variance component of random-effects linear models The Stata Journal (2004) 4, Number 4, pp. 429 435 Confidence intervals for the variance component of random-effects linear models Matteo Bottai Arnold School of Public Health University of South Carolina

More information

Homework Solutions Applied Logistic Regression

Homework Solutions Applied Logistic Regression Homework Solutions Applied Logistic Regression WEEK 6 Exercise 1 From the ICU data, use as the outcome variable vital status (STA) and CPR prior to ICU admission (CPR) as a covariate. (a) Demonstrate that

More information