Monte Carlo Simulations and the PcNaive Software

Similar documents
Monte Carlo Simulations and PcNaive

Econometrics 2, Class 1

Linear Regression with Time Series Data

Linear Regression with Time Series Data

Linear Regression with Time Series Data

Dynamic Regression Models (Lect 15)

This note analyzes OLS estimation in a linear regression model for time series

Econometrics Spring School 2016 Econometric Modelling. Lecture 6: Model selection theory and evidence Introduction to Monte Carlo Simulation

Generalized Method of Moments (GMM) Estimation

This note introduces some key concepts in time series econometrics. First, we

Statistical inference

E 31501/4150 Properties of OLS estimators (Monte Carlo Analysis)

MA Advanced Econometrics: Applying Least Squares to Time Series

Economics 583: Econometric Theory I A Primer on Asymptotics

This note discusses some central issues in the analysis of non-stationary time

Maximum Likelihood (ML) Estimation

SUPPLEMENTARY TABLES FOR: THE LIKELIHOOD RATIO TEST FOR COINTEGRATION RANKS IN THE I(2) MODEL

Recitation 1: Regression Review. Christina Patterson

Linear models. Linear models are computationally convenient and remain widely used in. applied econometric research

Econometrics of Panel Data

MFin Econometrics I Session 4: t-distribution, Simple Linear Regression, OLS assumptions and properties of OLS estimators

EC212: Introduction to Econometrics Review Materials (Wooldridge, Appendix)

COMPSCI 240: Reasoning Under Uncertainty

Lecture 3 Stationary Processes and the Ergodic LLN (Reference Section 2.2, Hayashi)

If we want to analyze experimental or simulated data we might encounter the following tasks:

The regression model with one stochastic regressor.

Statistics - Lecture One. Outline. Charlotte Wickham 1. Basic ideas about estimation

ECONOMETRICS FIELD EXAM Michigan State University May 9, 2008

11. Further Issues in Using OLS with TS Data

A Robust Approach to Estimating Production Functions: Replication of the ACF procedure

Notes on Asymptotic Theory: Convergence in Probability and Distribution Introduction to Econometric Theory Econ. 770

Nonstationary Time Series:

Eksamen på Økonomistudiet 2006-II Econometrics 2 June 9, 2006

Lecture 1: August 28

Chapter 6: Endogeneity and Instrumental Variables (IV) estimator

Introduction to Economic Time Series

MA 575 Linear Models: Cedric E. Ginestet, Boston University Bootstrap for Regression Week 9, Lecture 1

Non-Stationary Time Series, Cointegration, and Spurious Regression

Chapter 2. Dynamic panel data models

Econometrics I Lecture 3: The Simple Linear Regression Model

Sequential Monte Carlo Methods for Bayesian Computation

Econ 623 Econometrics II Topic 2: Stationary Time Series

Christopher Dougherty London School of Economics and Political Science

Linear Models in Econometrics

Robustness to Parametric Assumptions in Missing Data Models

1 Appendix A: Matrix Algebra

Final Exam November 24, Problem-1: Consider random walk with drift plus a linear time trend: ( t

Computer Intensive Methods in Mathematical Statistics

1. The OLS Estimator. 1.1 Population model and notation


Uses of Asymptotic Distributions: In order to get distribution theory, we need to norm the random variable; we usually look at n 1=2 ( X n ).

HT Introduction. P(X i = x i ) = e λ λ x i

Lecture: Testing Stationarity: Structural Change Problem

L09. PARTICLE FILTERING. NA568 Mobile Robotics: Methods & Algorithms

1 Probability Model. 1.1 Types of models to be discussed in the course

Regression #4: Properties of OLS Estimator (Part 2)

Econometrics - ECON4160 Exercises (GiveWin & PcGive) 1. Exercises to PcGive lectures 5th February 2004

Chapter 3. Point Estimation. 3.1 Introduction

Lecture 4: Heteroskedasticity

A Course in Applied Econometrics Lecture 18: Missing Data. Jeff Wooldridge IRP Lectures, UW Madison, August Linear model with IVs: y i x i u i,

Economics 671: Applied Econometrics Department of Economics, Finance and Legal Studies University of Alabama

1. Stochastic Processes and Stationarity

Stochastic Optimization One-stage problem

Making sense of Econometrics: Basics

Lecture 7: Dynamic panel models 2

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

ECONOMETRIC MODELS. The concept of Data Generating Process (DGP) and its relationships with the analysis of specication.

Econometrics - ECON4160 Exercises (GiveWin & PcGive) 1. Exercises to PcGive lectures 15. January 2009

Monte Carlo Simulations

Introduction to Bayesian Inference

Monte Carlo Studies. The response in a Monte Carlo study is a random variable.

So far our focus has been on estimation of the parameter vector β in the. y = Xβ + u

Regression #3: Properties of OLS Estimator

2. Linear regression with multiple regressors

Non-Stationary Time Series and Unit Root Testing

Lecture 2: Review of Probability

A Primer on Asymptotics

INFERENCE APPROACHES FOR INSTRUMENTAL VARIABLE QUANTILE REGRESSION. 1. Introduction

Short Questions (Do two out of three) 15 points each

Introduction to Estimation Methods for Time Series models. Lecture 1

Introduction to Rare Event Simulation

Quick Review on Linear Multiple Regression

BCT Lecture 3. Lukas Vacha.

1 Correlation between an independent variable and the error

Math Camp II. Calculus. Yiqing Xu. August 27, 2014 MIT

Bootstrapping Heteroskedasticity Consistent Covariance Matrix Estimator

ESUP Accept/Reject Sampling

Reliability of inference (1 of 2 lectures)

Long-Run Covariability

F9 F10: Autocorrelation

LECTURE 11. Introduction to Econometrics. Autocorrelation

Gaussian processes. Chuong B. Do (updated by Honglak Lee) November 22, 2008

Computer Intensive Methods in Mathematical Statistics

Nonresponse weighting adjustment using estimated response probability

Graduate Econometrics I: Asymptotic Theory

Problem set 1 - Solutions

interval forecasting

Bootstrapping Long Memory Tests: Some Monte Carlo Results

Reminders. Thought questions should be submitted on eclass. Please list the section related to the thought question

ECON 3150/4150, Spring term Lecture 6

Transcription:

Econometrics 2 Monte Carlo Simulations and the PcNaive Software Heino Bohn Nielsen 1of21

Monte Carlo Simulations MC simulations were introduced in Econometrics 1. Formalizing the thought experiment underlying the data sampling. Mimic the data generation and study the behaviour. In this course we will frequently use MC simulations. Standard tool in econometrics. Underlying the econometric results is a layer of difficult statistical theory. (1) Many asymptotic results are technically demanding. Sometimes also difficult to firmly understand. Use MC simulations to obtain intuition. (2) The finite sample properties are often analytically intractable. Analyze finite sample properties. 2of21

Outline of the Lecture (1) The basic idea in Monte Carlo simulations. (2) Example 1: Sample mean(ols)of IID normals. (3) Example 2: Illustration of a Central Limit Theorem. (4) Introduction to PcNaive. (5) Example 3: Consistency and unbiasedness of OLS in a cross-sectional regression. Genereal-to-Specific orspecific-to-general? 3of21

The Monte Carlo Idea The basic idea of the Monte Carlo method: Replace a difficult deterministic problem with a stochastic problem with the same solution. If we can solve the stochastic problem by simulations, labour intensive work can be replaced by cheap capital intensive simulations. How can we be sure that deterministic and stochastic problems have same solution? General answer is the law of large numbers (LLN). As an example, consider a stochastic variable x f(x). Calculation of the mean is a (potentially difficult) deterministic problem: Z E[x] = xf(x)dx. If we can draw realizations x 1,x 2,...,x m,...,x M from f(x), wecanuse M 1 M X m=1 x m E[x] for M. 4of21

Consider a regression Example y t = x 0 tβ + t, t =1, 2,..., T, ( ) where x t and t have some specified properties; and the OLS estimator à TX! 1 à TX! bβ = x t x 0 t x t y t. t=1 We are often interested in E[ b β] to check for bias. This is difficult in most situations. But if we could draw realizations of b β, then we could estimate E[ b β]. MC simulation: (1) Construct M artificial data sets from the model ( ). (2) Find the estimate, b β m, for each data set, m =1, 2,...,M. Then from the LLN: M 1 M X m=1 t=1 bβ m E[ b β] for M. 5of21

Note of Caution The Monte Carlo method is a useful tool in econometrics. BUT: (1) Simulations do not replace theory. Simulation can illustrate but not prove theorems. (2) Simulations results are not general. Results are specific to the chosen setup. We have to totally specify the model. (3) Work like good examples. In this course we hope to give you a Monte Carlo intuition. 6of21

Example 1: Mean of IID Normals Consider a model where we know the finite sample properties: y t = µ + t, t N(0,η 2 ), t =1, 2,...,T. ( ) The OLS estimator bµ of µ isthesamplemean TX bµ = T 1 y t. Note, that bµ is consistent, unbiased and (exactly) normally distributed t=1 bµ N(µ, T 1 η 2 ). The standard deviation of the estimate, in PcNaive called the estimated standard error, can be calculated as v q u TX ESE(bµ) = T 1 bη 2 = t T 2 (y t bµ) 2. t=1 7of21

Ex. 1 (cont.): Illustration by Simulation We can illustrate the results, if we can generate data from ( ). We need: (1) A fully specified Data Generating Process (DGP), e.g. y t = µ + t, t N(0,η 2 ), t =1, 2,...,T (#) µ = 5 η 2 = 1. An algorithm for drawing random numbers from N(, ). Specify a sample length, e.g. T =50or T {10, 20, 30,..., 100}. (2) An estimation model for y t and an estimator. Consider OLS in y t = β + u t. (##) Note that the statistical model (#) and the DGP(##) need not coincide; but here they do. 8of21

Ex. 1 (cont.): Four Realizations Supposewedraw 1,..., 50 from N(0, 1) and construct a data set, y 1,..., y 50. We then apply OLS to the regression model y t = β + u t, to obtain the sample mean and the standard deviation in one realization, bβ =4.98013, ESE( b β)=0.1477. Wecanlookatmorerealizations Realization, m βm b ESE( β b m ) 1 4.98013 0.1477 2 5.04104 0.1320 3 4.99815 0.1479 4 4.82347 0.1504 Mean 4.96070 0.1445 9of21

Four Realization First realization, Mean=4.98013 Second realization, Mean=5.04104 7.5 7.5 5.0 5.0 2.5 2.5 Third realization, Mean=4.99815 Fourth realization, Mean=4.82347 7.5 7.5 5.0 5.0 2.5 2.5 10 of 21

Ex. 1 (cont.): Formalization Now suppose we generate data from (#) M times, y1 m,..., y50, m m =1, 2,..., M. For each m we obtain a sample mean β b m. We look at the mean estimate and the Monte Carlo standard deviation: MEAN( β) b X M = M 1 bβ m MCSD( b β) = m=1 v u t M 1 MX ³ bβm MEAN( β) 2 b m=1 For large M we expect: MEAN( b β) to be close to the true µ (LLN). The bias is defined as BIAS = MEAN( b β) µ. 11 of 21

Ex. 1 (cont.): Measures of Uncertainty Note, that MEAN( b β) is also an estimator (stochastic variable). The standard deviation of MEAN( b β) is the Monte Carlo standard error MCSE( b β)=m 1 2 MCSD( b β). Note the difference MCSD( b β) measures the uncertainty of b β ( ESE( b β m )). The variation between replications. MCSE( b β) measures the uncertainty of MEAN( b β) in the simulation. The variation between experiments. MCSE( b β) 0 for M. 12 of 21

Ex. 1 (cont.): Results Consider the results for T =50, M = 5000 : bβ m ESE( β b m ) 1 4.98013 0.1477 2 5.04104 0.1320... 5000 4.92140 0.1254 MEAN( β)=4.9985 b MEAN(ESE)=0.14083 MCSD( β)=0.14061 b MCSE( b β)=0.0019886 13 of 21

Ex. 1 (cont.): Results for Different T 1.0 Density, T=5 Density, T=10 1.0 0.5 0.5 3 2 1 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 Density, T=50 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 5.5 5.0 4.5 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 Estimates, different T 0 50 100 150 200 250 14 of 21

Example 2: A Central Limit Theorem (CLT) Recall the idea of a CLT (Lindeberg-Levy): Let z 1,..., z T be IID with E [z t ]=µ and V [z t ]=σ 2.Then 1 T TX t=1 z t µ σ N (0, 1) for T. This can be extended to Heterogeneous processes. (Limited) time dependence. We will illustrate this for two examples Uniform distribution. Exponential distribution. 15 of 21

Ex. 2 (cont.): Uniform Distribution Consider as an example z t Uniform (0 : 1), t =1, 2,..., T. It holds that E [z t ] = 1 2 V [z t ] = (1 0)2 = 1 12 12. We look at the estimated distribution of 1 TX z t µ = 1 TX µ 12 z t 1, T σ T 2 t=1 based on M = 20000 replications. t=1 16 of 21

Ex. 2 (cont.): Uniform Distribution T=1 T=2 1.0 0.4 0.5 0.2 0.0-4 -2 0 2 4 0.0-4 -2 0 2 4 0.4 T=5 0.4 T=10 0.2 0.2 0.0-4 -2 0 2 4 0.0-4 -2 0 2 4 17 of 21

Ex. 2 (cont.): Exponential Distribution Consider as a second example z t Exp (1), t =1, 2,..., T. It holds that E [z t ] = 1 V [z t ] = 1 2 =1. We look at the estimated distribution of 1 TX z t µ T σ t=1 based on M = 20000 replications. = 1 T TX (z t 1), t=1 18 of 21

Ex. 2 (cont.): Exponential Distribution T=1 T=2 0.75 0.4 0.50 0.25 0.2 0.00-2.5 0.0 2.5 5.0 7.5 0.0-2.5 0.0 2.5 5.0 T=5 T=50 0.4 0.4 0.2 0.2 0.0-4 -2 0 2 4 6 0.0-4 -2 0 2 4 19 of 21

PcNaive PcNaive is a menu-driven module in GiveWin. Technically, PcNaive generates Ox code, which is then executed by Ox. Output is returned in GiveWin. Outline: (1) SetuptheDGP. AR(1) Static PcNaive General (2) Specify the estimation model. (3) Choose estimators and test statistics to analyze. (4) Set specifications: M, T etc. (5) Select output to generate. (6) Save and run. 20 of 21

Example 3: PcNaive Static DGP DGP: µ x1t x 2t y t = α 1 x 1t + α 2 x 2t + t, t N(0, 1) N µ 0 0, for t =1, 2,..., T,wherec is the correlation. µ 1 c c 1 Estimation model: Apply OLS to the linear regression model Example: y t = β 0 + β 1 x 1t + β 2 x 2t + u t. (1) Unbiasedness and consistency of OLS in this setting. (2) Effect of including a redundant regressor. (3) Effect of excluding a relevant regressor. 21 of 21