Day 5: Functions, Loops, and Monte Carlo Simulations

Monte Carlo simulations are potent tools in Econometrics and Statistics. From the student’s perspective, they are helpful in understanding statistical and econometric theories, properties of the various estimators, and inference techniques. This class will teach you how to write R code to conduct Monte Carlo simulations.

Learning Objectives

Learning Objectives

  • To be abel to write your own R functions.
  • To be able to use for loop function.
  • To be able to write R code for simple Monte Carlo Simulations to test statistical properties.

Preparation

Take a look at the following sections in the book of R for Data Science:

Lecture Slides

Click here for Lecture 5’s slides.

Exercise problems: Exercise problems for Lecture 5. Solution is attached.


Quick view of the lecture slides:

Supplementary Materials

  • Exercise Problems
  • Solutions for the Exercise Problems