12 views

Uploaded by Audrey Soedjito

none

- 9+Sampling+Distribution+and+Point+Estimation+of+Parameters.docx
- Poduri S.R.S. Rao Sampling Methodologies With Applications (Texts in Statistical Science) 2000
- Statistical Methods in Surveyingby Trilateration
- Blind Deblurring and Denoising of Images
- Rare pics !!
- chap6_2017.pdf
- Assignment 4 - Engineering Statistics.pdf
- 03 Estimation 0422
- Option Pricing with Time-Changed Levy Processes
- CEtutorial_MIT.pdf
- J 1707 PAPER II.doc
- McDonald1995
- IIT JAM MATHEMATICAL STATISTICS QUESTION PAPER 2015
- Hansen_kindle.pdf
- glm
- 2012 Reuters Ipsos Daily Election Tracking 11.01.12
- RJournal 2012-1 Holmes~Et~Al (1)
- Neumann Type a Posteriori Error Estimation for Steady Convection Diffusion Equation
- ANR
- Mpn Equations

You are on page 1of 31

GMM in Applied Settings

Ashvin Gandhi

1

Harvard University

2

1

agandhi@fas.harvard.edu

2

Based on previous notes by Daniel Pollmann, Tom Wollmann, and Michael

Sinkinson.

Harvard University Generalized Method of Moments September 16, 2015 1 / 31

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Lectures

I Go to the lectures.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Readings

I Do the reading.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Problem Sets

I Start early.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Sections

I Not weekly.

I Not required.

I Potentially long.

I Hopefully helpful.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Oce Hours

I By appointment.

I Email: agandhi@fas.harvard.edu

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Seminars

I Go to as many as possible.

I Familiarize yourself with the tools and how they are used.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Overview

I Objective:

techniques?

I Some technical details, and translating models into moments.

Chamberlain's ECON 2120 Lecture Note 16 and Alberto

Abadie's ECON 2140 Extremum Estimators Handout. There

are also a number of great texts out there.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

What is GMM?

I GMM is a framework for identifying parameters by leveraging

relations the econometrician would like to hold in expectation:

E [ψ (wi ; θ0 )] = 0.

May not be possible to impose all of these identifying

moments simultaneously.

0

θ0 = argminθ E [ψ (wi ; θ)] W E [ψ (wi ; θ)] ,

where W is positive semidenite.

identifying moments the econometrician wants to hold?

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

familiar with:

I Regression:

E [xi i ] = 0.

I Instrumental Variables:

E [zi i ] = 0.

I Maximum likelihood:

∂ log f (Yi |Zi , θ)

E = 0.

∂θ

I Others, less so:

semi-parametric analysis.)

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

that is somewhere between highly parametric techniques (like

MLE) and highly non-parametric ones (like kernel density

estimators). Sometimes people will even refer to GMM as

semiparametric. (This is a less-common use of the term.)

known up to a parameter).

I GMM makes assumptions about the moments of the

I Non-parametrics make almost no assumptions about the

distributions.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

estimate policy invariant parameters that can be used to

assess counterfactuals.

I Producer optimality conditions.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Moment restriction

E [ψ (wi ; θ)] = 0,

where we call the M -vector ψ (wi ; θ) the moment function, wi

is an observation in the data, and θ is our parameter vector we

want to estimate (dim (θ) = K ).

data, and our parameter vector θ

K parameters. If

contains

M = K , then we say we are just-identied. If M > K , then

we are over-identied. Finally, if M < K , we are

under-identied (and cannot recover point estimates of the

parameters).

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

A Simple Example

I Suppose we have the following model:

yi = xi0 β + i ,

where E (i |xi ) = 0.

I 0 0

Then, E (yi − xi β|xi ) = 0 ⇒ E [(yi − xi β) h (xi )] = 0 for any

function h (·), in particular h (x) = x .

I Hence,

E [ψ (wi ; θ)] = 0,

0

where ψ (wi ; θ) = (yi − xi β) xi .

I In a more general problem, using optimal instruments means

optimal choice of h (·). (See Chamberlain 1987.)

Ω− 1 ,

∂ρjt (θ)

I h∗ (zt ) =

∂θ 0 |zt where E (ρjt |zt ) = 0 and

0

Ω = E ρjt ρjt |zt .

I See, e.g., Berry, Levinsohn, and Pakes (EMA, 1995) (BLP),

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Identication

θ

is only true i θ 0 = θ0 , the true value. That is, the likelihood is

uniquely maximized at the true value.

E [ψ (wi ; θ)] = 0

only holds at the true value θ = θ0 , and that at all other values of

the parameter vector, it does not hold.

parametric likelihood, we see that GMM nests Maximum Likelihood.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Consistency

know whether it converges to the true value in probability:

p

θ̂ −

→ θ0

I Formally, this is the same as saying

h i

lim Pr θ̂ − θ0 > ε = 0, ∀ε > 0.

N→∞

I Under appropriate assumptions, GMM and ML are consistent.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Eciency

I We want to know whether our estimates are as precise as

possible. The ML estimator achieves the smallest variance

among all unbiased estimators in the parametric setting:

2

∂

= (θ) = −E ln f (X |θ)

∂θ∂θ0

I We call = (θ) the Fisher Information matrix, and we call

−1

= (θ0 ) the Cramer-Rao lower bound on variance

bound (Chamberlain, JoE, 1987), which is the lower bound on

variance for an estimator using only the information contained

in the moment restrictions. In practice, the over-identied case

will require a two-step estimator (which we will discuss shortly)

for eciency.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Estimation

select θ̂ = arg minθ QC ,n (θ), where

" n #0 " n #

1 X 1 X

QC ,n (θ) = ψ (wi , θ) C ψ (wi , θ)

n n

i=1 i=1

for some positive denite M × M -matrix C .

I The weighting matrix matrix C assigns importance to

satisfying the dierent moment conditions.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Asymptotic variance

I Under appropriate assumptions,

√

d

n θ̂ − θ0 −→ N (0, V ) ,

where

−1 0 − 1

V = Γ0 C Γ Γ C ∆C Γ Γ0 C Γ .

h i

∂ψ

I Γ=E ∂θ (x, θ0 ) (M × K ): gradient of the moment function

∆ = E ψ (x, θ0 ) ψ (x, θ0 )0 (M × M ):

I outer product of the

moments

Chamberlain's ECON 2120 Lecture Note 16.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Just-identied case

−1 −1

V = Γ0 C Γ Γ0 C ∆C Γ Γ0 C Γ

= Γ−1 C −1 Γ0−1 Γ0 C ∆C ΓΓ−1 C −1 Γ0−1

= Γ−1 ∆Γ0−1

− 1

= Γ0 ∆−1 Γ ,

drops out because we can set the moments to zero (at least in the

limit), so we do not need to trade o dierent elements of the

moment function vector.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Over-identied case

For C = ∆−1 ,

−1 − 1

V = Γ0 C Γ Γ0 C ∆C Γ Γ0 C Γ

− 1 0 − 1 −1

= Γ0 ∆−1 Γ Γ ∆ ∆∆−1 Γ Γ0 ∆−1 Γ

− 1

= Γ0 ∆−1 Γ

− 1

The proof that (Γ0 C Γ)−1 Γ0 C ∆C Γ (Γ0 C Γ)−1 − Γ0 ∆−1 Γ ≥0

(positive semi-denite) can be found in virtually every econometrics

text or lecture notes. This proves that C = ∆−1 is indeed optimal.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

the outer product of the moments at θ0 .

I Problem: we don't know θ0 .

I Solution: Form a consistent estimate ˆ

∆ using a consistent

though inecient estimate of θ0 .

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Two-step GMM

arbitrary choice of (positive semi-denite) C , such as the

identity matrix.

0 −1

ˆ −1 =

∆ En ψ wi , θ̂GMM 1 ψ w , θ̂GMM 1

ˆ −1 (θ).

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

large dispersion.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

ψ (wi ; θ) = (yi − xi0 β) xi .

I Just-identied GMM sets 1

Pn

n i=1 ψ w i ; θ̂ = 0.

1 Pn 0 −1 1 n

P

I Solving this, we get θ̂ = n i=1 xi xi n i=1 xi yi , which is

the same as OLS.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Linear IV example

instrument z such that E (i |zi ) = 0 (exclusion restriction).

I Standard tool is TSLS

ψ (wi , θ) = (yi − xi0 β) zi .

I If only some elements of the K -vector xi zi

are endogenous,

will also include the remaining subset. If dim (zi ) = dim (xi ),

the model is just-identied; for dim (zi ) > dim (xi ), it is

over-identied.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

conditions. One obvious example is the unobserved

heterogeneity term, ξ, in BLP. Look at what it is uncorrelated

with and form a moment from that.

average of some function of the data and parameters.

producer is usually optimizing some objective function. Even

without continuous controls, inequalities can be used.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

I The primary Matlab functions you should be familiar with are

fminsearch and fminunc.

observation

I The answer will be stored in a variable beta

I @(b) means the routine will attempt to minimize the

I The starting guess for b will be the value held in the vector

betastart

I The routine will follow the specications in the options set

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

I The fminsearch command can also evaluate a named

function. This is useful if your moments are hard to evaluate.

In that case, you would create a separate .m le for the

function. Here's an example of moment_function.m le:

...

val = mean(moment);

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Evaluating gradients

to numerical dierentiation due to approximation error. This is

also runs much faster.

10

−6 :

f (x + h) − f (x)

f 0 (x) ≈

h

I Symmetric dierence formula (more accurate):

f (x + h) − f (x − h)

f 0 (x) ≈

2h

I See Judd (1998, Ch. 7) for details.

General Advice Introduction Theory Estimation and inference Implementation (Matlab) Conclusion

Conclusion

presentation or beyond, feel free to ask me.

I Questions?

- 9+Sampling+Distribution+and+Point+Estimation+of+Parameters.docxUploaded byJohn Carlo Herrero
- Poduri S.R.S. Rao Sampling Methodologies With Applications (Texts in Statistical Science) 2000Uploaded byAnna Rácz
- Statistical Methods in Surveyingby TrilaterationUploaded byDenz Choe
- Blind Deblurring and Denoising of ImagesUploaded byTechnos_Inc
- Rare pics !!Uploaded byBharathi Kamath
- chap6_2017.pdfUploaded bylau flo
- Assignment 4 - Engineering Statistics.pdfUploaded byNamra Fatima
- 03 Estimation 0422Uploaded byRasim Ozan Somali
- Option Pricing with Time-Changed Levy ProcessesUploaded bylycancapital
- CEtutorial_MIT.pdfUploaded byMilagros Laynes
- J 1707 PAPER II.docUploaded bysaurav
- McDonald1995Uploaded byjennajennjenjej
- IIT JAM MATHEMATICAL STATISTICS QUESTION PAPER 2015Uploaded byNilotpal Chattoraj
- Hansen_kindle.pdfUploaded byEskay Hong
- glmUploaded byCao Haoqing
- 2012 Reuters Ipsos Daily Election Tracking 11.01.12Uploaded byCasey Michel
- RJournal 2012-1 Holmes~Et~Al (1)Uploaded bySacha Paricide
- Neumann Type a Posteriori Error Estimation for Steady Convection Diffusion EquationUploaded byijteee
- ANRUploaded byAfaq Sana
- Mpn EquationsUploaded byonlyravian_gikian
- MLE for Spatial Stochastic Frontier ModelsUploaded byNurus Sa'adiyah
- Sta Tug LogisticUploaded bydurabil
- Anselin Smoothing 06Uploaded byharvivas
- Does Country MatterUploaded byKathalinaOs
- Lampiran ReliabilityUploaded byFaradhilla Nst
- ContentServer.pdfUploaded byCarolina Gelfon
- risk_assessment_methodology.pdfUploaded byAnonymous RuB6o4
- RegressionUploaded byptarwatkar
- lect9.pdfUploaded byAndrei Szuder
- statisticsUploaded byPrabhamohanraj Mohanraj

- Problem Set Qs, Nordhaus, March 2018Uploaded byAudrey Soedjito
- Read Me DataUploaded byAudrey Soedjito
- DeterministicUploaded byAudrey Soedjito
- lecsl4w08Uploaded byAudrey Soedjito
- Kloeden, P. Numerical Solution of Stochastic Differential Equations.pdfUploaded byAudrey Soedjito
- Easterly Ch. 3Uploaded byAudrey Soedjito

- The Muscular SystemUploaded bygalaxyduck
- Richer Sounds Case StudyUploaded byHarry Patel
- Chandra+NamaskarUploaded bySwati Rohan Jadhav
- Cognition and Second Language InstructionUploaded byFabian
- GHG Inventory and Mitigation Analysis in MongoliaUploaded byTA7465
- Jh AnswerUploaded bynislam57
- 233 2.0-litre Engine.pdfUploaded byAllan Cancino
- 21011edu5816Synopsis_Sem2_10_11Uploaded byZamZarina Ibrahim
- Optimal Sizing of Counterflow Cooler for PelletsUploaded byChristian Mavarez
- # Analysis of the IDH1 Codon 132 Mutation in Brain TumorsUploaded bylombardiedoardo
- Nissan+Skyline+GT-RUploaded byIbrahim Ab Ras
- California Tax Board: 97 11Uploaded byTaxman
- Some Examples of Time-DelayUploaded byhardem
- 0099_Bosch_Batteries_AU.pdfUploaded byandresboy123
- 9 7 technology lpUploaded byapi-249598233
- Strategic ManagementUploaded byRuslan A Gani
- Values StatementsUploaded byfcsnyder
- Risk Communication ModeUploaded byChandra Bhushan Gupta
- Book Review - The Edgeless CitiesUploaded bykaterhine
- Happy Rhetorical AnalysisUploaded byDaniel Jimenez
- THE PIPIT BIRD AND THE KING.docxUploaded byVijayRaggu
- Malaria Vaccine Presentation by Deluxini and SaidUploaded byDeluxini Sundralingam
- Manual 2005 SantafeUploaded bycaen
- asw0610Uploaded byPrathik Murali
- Prenatal Care VerificationUploaded byRashella DAmico
- 1123_s12_in_22Uploaded byFarah Noreen
- rh+ Preposition Soruları 1.pdfUploaded byBoris
- Corelatii in Stil APAUploaded bymefistofela1
- The Observing OneUploaded byscholar786
- Bio TransformationUploaded byrawatpooran05