### ECON 21410: Computational Methods for Economics (2014)

This course introduces the empirical and computational techniques necessary for numerical estimation and simulation in economics. Through examples in economics, the course covers topics such as optimization, function approximation, and monte carlo techniques. Emphasis will be placed on developing effective programming and research practices. The course is structured through a series of applications in topics such as segregation, occupational choice, and repeated games. The course will be taught in R. Though helpful, no previous experience with R is required.

• Here

• #### Problem Sets

• Problem Set 1, (solution) , (solution code)
• Problem Set 2, (code for pset2), (solution) , (solution code)
• Problem Set 3, (solution) , (solution code)
• Problem Set 4, (solution) , (solution code)
• Problem Set 5, (partial solution) , (partial solution code)
• Problem Set 6, (data) , (partial solution) , (partial solution code)
• Problem Set 7, (partial solution) , (partial solution code)

• #### Class Examples

• Maximization Example Code from First Class: 1 , 2 , 3
• Example knitr file that calls outside code: example.Rnw , example.R , example.pdf
• Example Schelling Segregation Model: example_schelling.R
• Example of Sorting on Property Price: econ21410_example_landpricemodel.R
• Examples of using apply functions: apply_examples.R
• Selection Class Notes
• Regression and Function Approximation Code: econ21410RegressionExamples.R
• Example Ordered Probit Model: econ21410ProbitMLE.R
• Integration: econ21410ExampleIntegration.R
• Time Series: econ21410ARMAexample.R
• Selection with Random Coefficient: Example.R , Example_v2.R , Example_v2.cpp

• Software Overview
• Basic Operations in R

• These files are also on our github page here.

### ECON 21410: Computational Methods for Economics (2015)

This course introduces the empirical and computational techniques necessary for numerical estimation and simulation in economics. Through examples in economics, the course covers topics such as optimization, function approximation, and monte carlo techniques. Emphasis will be placed on developing effective programming and research practices. The course is structured through a series of applications in topics such as segregation, occupational choice, and repeated games. The course will be taught in R. Though helpful, no previous experience with R is required.

• Here

• #### Problem Sets

• Problem Set 1, (solution), (code)
• Problem Set 2, (code for pset2), (solution), (code)
• Problem Set 3, (solution), (code)
• Problem Set 4
• Problem Set 5, (solution), (code)
• Problem Set 6, (data)
• Problem Set 7

• #### Class Examples

• Example knitr file that calls outside code: example.Rnw , example.R , example.pdf
• Example Schelling Segregation Model: example_schelling.R
• Examples of nleqslv, optimize, and optim: example_nleqslv.R
• Examples of regression, data summary, and function approximation: example_workingWithData.R
• Examples of Maximum Likelihood Estimation: example_mle.R
• Examples of Numerical Integration: example_integration.R
• Examples of Apply: example_apply_commands.R
• Examples of dplyr: example_dplyr.R
• Examples of a random coefficients model (includes parallel and cpp implementation): example_randomCoefficients.R , example_randomCoefficients.cpp ,

• Software Overview
• Basic Operations in R
• Segregation slides from class
• Housing slides from class

• Additional files and help are also on our github page here.

### Econ 61800: Practical Computing for Economists (2014)

This colloquium covers the computer tools and programming techniques to implement and test economic ideas and theories quantitatively. It is more of an “engineering” than a “theory” course, focusing on the practical – working on problems and solutions. The goal is not only to provide students with an introduction to two valuable programming languages (R and C++) but also to introduce good programming, data, and project management techniques.

#### Class Examples

• Rapid Intro To R: code
• Working with Data in R: code
• Writing Programs in R: code
• MCMC Factor Analysis in R: code
• ### Econ 61800: Practical Computing for Economists (2015)

This colloquium covers the computer tools and programming techniques to implement and test economic ideas and theories quantitatively. It is more of an “engineering” than a “theory” course, focusing on the practical – working on problems and solutions. The goal is not only to provide students with an introduction to two valuable programming languages (R and C++) but also to introduce good programming, data, and project management techniques.

#### Class Examples

• An Applied Introduction to R: code
• Working with Functions in R: code
• ### Econ 61800: Practical Computing for Economists (2016)

This colloquium covers the computer tools and programming techniques to implement and test economic ideas and theories quantitatively. It is more of an “engineering” than a “theory” course, focusing on the practical – working on problems and solutions. The goal is not only to provide students with an introduction to a number of valuable programming languages, but also to introduce good programming, data, and project management techniques.

#### Class Examples

• Day 1: code
• Day 2: code
• Day 3: R , faster R , C++ for faster R , R and C++ basics , R and Armadillo basics
• ### Economic REU: Microeconomics with R (2014 - 2017)

This will be an interactive session covering R basics and standard programming techniques in R. Students should bring their computers to participate if possible.Comparisons will be drawn between R, Stata, and Matlab. Using the tools covered in the previous session in the second session will live-code a simulation of Schelling's Segregation model. This will cover control flow, random number generation, matrix manipulation, functions, proper coding etiquette, and plotting in R.

Please install R and Rstudio and run this code prior to arrival (code).

Files from Past Years (including Stata intro): Stata code | Stata data | CPI data | R code

### Teaching Experience

• Teaching 2014

#### Computational Methods in Economics

University of Chicago (B.A.)

• Teaching 2015

#### Computational Methods in Economics

University of Chicago (B.A.)

• Teaching 2014

#### Practical Computing for Economists

University of Chicago (co-teaching, Ph.D.)

• Teaching 2015

#### Practical Computing for Economists

University of Chicago (co-teaching, Ph.D.)

• Teaching 2016

#### Practical Computing for Economists

University of Chicago (co-teaching, Ph.D.)

• Teaching 2014

#### Economic REU: Microeconomics with R

University of Chicago (co-teaching, B.A.)

• Teaching 2015

#### Economic REU: Microeconomics with R

University of Chicago (co-teaching, B.A.)

• Teaching 2016

#### Economic REU: Microeconomics with R

University of Chicago (co-teaching, B.A.)

• Teaching 2017

#### Economic REU: Microeconomics with R

University of Chicago (co-teaching, B.A.)

• Teaching 2018

#### Econometrics and Data Science

Yale University (teaching, B.A.)

• Teaching 2019

#### Data Analysis and Econometrics

Yale University (teaching, B.A.)

### T.A. Experience

• T.A. 2013

#### Price Theory I

University of Chicago (Becker and Murphy; Ph.D.)

• T.A. 2014

#### Price Theory II

University of Chicago (Becker and Murphy; Ph.D.)

• T.A. 2014

#### Price Theory I

University of Chicago (Murphy; Ph.D.)

• T.A. 2014