## R Programming for Simulation and Monte Carlo Methods

### What you’ll learn

Use R software to program probabilistic simulations, often called Monte Carlo simulations.

Use R software to program mathematical simulations and to create novel mathematical simulation functions.

Use existing R functions and understand how to write their own R functions to perform simulated inference estimates, including likelihoods and confidence intervals, and to model other cases of stochastic simulation.

Be able to generate different different families (and moments) of both discrete and continuous random variables.

Be able to simulate parameter estimation, Monte-Carlo Integration of both continuous and discrete functions, and variance reduction techniques.

### Requirements

Students will need to install the popular no-cost R Console and RStudio software (instructions provided).

### Description

R Programming for Simulation and Monte Carlo Methods focuses on using R software to program probabilistic simulations, often called Monte Carlo Simulations. Typical simplified “real-world” examples include simulating the probabilities of a baseball player having a ‘streak’ of twenty sequential season games with ‘hits-at-bat’ or estimating the likely total number of taxicabs in a strange city when one observes a certain sequence of numbered cabs pass a particular street corner over a 60 minute period. In addition to detailing half a dozen (sometimes amusing) ‘real-world’ extended example applications, the course also explains in detail how to use existing R functions, and how to write your own R functions, to perform simulated inference estimates, including likelihoods and confidence intervals, and other cases of stochastic simulation. Techniques to use R to generate different characteristics of various families of random variables are explained in detail. The course teaches skills to implement various approaches to simulate continuous and discrete random variable probability distribution functions, parameter estimation, Monte-Carlo Integration, and variance reduction techniques. The course partially utilizes the Comprehensive R Archive Network (CRAN) spuRs package to demonstrate how to structure and write programs to accomplish mathematical and probabilistic simulations using R statistical software.

### Overview

Section 1: Review of Vectors, Matrices, Lists and Functions

Lecture 1 Course Introduction

Lecture 2 Install R and RStudio

Lecture 3 Review: Vectors, Matrices, Lists (part 1)

Lecture 4 Review: Vectors, Matrices, Lists (part 2)

Lecture 5 Sequences and Replications (part 1)

Lecture 6 Sequences and Replications (part 2)

Lecture 7 Sort and Order

Lecture 8 Creating a Matrix (part 1)

Lecture 9 Using Matrices (part 2)

Lecture 10 List Structures and Horsekicks (part 1)

Lecture 11 Dpois() Function and Horsekicks (part 2)

Lecture 12 Sampling from a Dataframe

Lecture 13 Section 1 Exercises

Section 2: Simulation Examples: Tossing a Coin

Lecture 14 R Expressions Exercises Answers (part 1)

Lecture 15 R Expressions Exercises Answers (part 2)

Lecture 16 Introduction to Simulation: A Game of Tossing a Coin (part 1)

Lecture 17 Introduction to Simulation: A Game of Tossing a Coin (part 2)

Lecture 18 Write a Simulation Function (part 1)

Lecture 19 Write a Simulation Function (part 2)

Lecture 20 Continue Coin Tossing Simulation (part 3)

Lecture 21 Continue Coin Tossing Simulation (part 4)

Section 3: Simulation Examples: Returning Checked Hats

Lecture 22 Random Permutations: Hat Problem (part 1)

Lecture 23 Random Permutations: Hat Problem (part 2 )

Lecture 24 Random Permutations: Hat Problem (part 3)

Lecture 25 Random Permutations: Hat Problem (part 4)

Lecture 26 Random Permutations: Hat Problem (part 5)

Lecture 27 Random Permutations: Hat Problem (part 6)

Lecture 28 Checking Hats Exercise

Section 4: Simulation Examples: Collecting Baseball Cards and “Streaky” Behavior

Lecture 29 Solution to Checking Hats Exercise

Lecture 30 Collecting Baseball Cards Simulation (part 1)

Lecture 31 Collecting Baseball Cards Simulation (part 2)

Lecture 32 Collecting Baseball Cards Simulation (part 3)

Lecture 33 Collecting Baseball Cards Simulation (part 4)

Lecture 34 Collecting Quarters Exercise

Lecture 35 Collecting State Quarters Exercise Solution

Lecture 36 “Streaky” Baseball Batting Behavior (part 1)

Lecture 37 “Streaky” Baseball Batting Behavior (part 2)

Lecture 38 “Streaky” Baseball Batting Behavior (part 3)

Lecture 39 “Streaky” Behavior Exercise

Section 5: Monte Carlo Methods for Inference

Lecture 40 Solution to “Streaky” Behavior Exercise

Lecture 41 Using Monte Carlo Simulation to Estimate Inference

Lecture 42 Sleepless in Seattle (part 1)

Lecture 43 Sleepless in Seattle (part 2)

Lecture 44 Applying Monte Carlo Methods to Inference (part 1)

Lecture 45 Applying Monte Carlo Methods to Inference (part 2)

Lecture 46 Applying Monte Carlo Methods to Inference (part 3)

Lecture 47 Applying Monte Carlo Methods to Inference (part 4)

Lecture 48 Applying Monte Carlo Methods to Inference (part 5)

Lecture 49 Comparing Estimators: The Taxi Problem (part 1)

Lecture 50 Comparing Estimators: The Taxi Problem (part 2)

Lecture 51 Late to Class Again ? Exercise

Section 6: Stochastic Simulation and Random Variable Generation

Lecture 52 Late to Class Again Exercise Solution

Lecture 53 What is Stochastic Simulation ?

Lecture 54 Simulation and Random Variable Generation (part 1)

Lecture 55 Simulation and Random Variable Generation (part 2)

Lecture 56 Simulation and Random Variable Generation (part 3)

Lecture 57 Simulating Discrete Random Variables (part 1)

Lecture 58 Simulating Discrete Random Variables (part 2)

Lecture 59 Simulating Discrete Random Variables (part 3)

Lecture 60 Root Finding: Newton-Raphson Technique (part 1)

Lecture 61 Root Finding: Newton-Raphson Technique (part 2)

Lecture 62 Create Random Variables Exercise

Section 7: Inverse and General Transforms

Lecture 63 Create Random Variables Exercise Solution (part 1)

Lecture 64 Create Random Variables Exercise Solution (part 2)

Lecture 65 Inverse Transforms (part 1)

Lecture 66 Inverse Transforms (part 2)

Lecture 67 General Transformations (part 1)

Lecture 68 General Transformations (part 2)

Lecture 69 Accept-Reject Method (part 1)

Lecture 70 Accept-Reject Method (part 2)

Lecture 71 Accept-Reject Methods (part 3)

Lecture 72 Random Variable (Poisson) Exercise 2

Section 8: Simulating Numerical Integration

Lecture 73 Random Variable Exercise Solution (part 1)

Lecture 74 Random Variable Exercise Solution (part 2)

Lecture 75 Introduction to Simulating Numerical Integration (part 1)

Lecture 76 Introduction to Simulating Numerical Integration (part 2)

Lecture 77 Simpson’s Rule for Trapezoidal Approximation

Lecture 78 Simulating Numerical Integration (part 1)

Lecture 79 Simulating Numerical Integration (part 2)

Lecture 80 More on Simpson’s Rule

Lecture 81 Simpson’s Rule with phi Functions

Lecture 82 Phi Functions Exercises

Lecture 83 Hit and Miss (part 1)

Lecture 84 Hit and Miss (part 2)

Section 9: Permutation Tests

Lecture 85 Phi Functions (Numerical Integration) Exercise Solution

Lecture 86 Permutation Tests on a Distribution: Chckwts Example (part 1)

Lecture 87 Permutation Tests on a Distribution: Chckwts Example (part 2)

Lecture 88 Permutation Tests on a Distribution: Chckwts Example (part 3)

Lecture 89 Permutation Tests on a Distribution: Chckwts Example (part 4)

Lecture 90 Finish Permutation Tests and an Exercise

Section 10: Simulation Case Studies: Seed Dispersal

Lecture 91 Solution to Permutation Tests Exercises

Lecture 92 Seed Dispersal Case Study: Object Orientation

Lecture 93 Seed Dispersal Case: Creating Classes and Functions (part 1)

Lecture 94 Seed Dispersal Case: Creating Classes and Functions (part 2)

Lecture 95 Seed Dispersal Case (part 1)

Lecture 96 Seed Dispersal Case (part 2)

Lecture 97 Seed Dispersal Case (part 3)

Lecture 98 Seed Dispersal Case (part 4)

Lecture 99 Finish Seed Dispersal Case

Section 11: Simulation Case Studies: The Spread of Epidemics and Forest Fires

Lecture 100 Spread of Epidemics Simulation Case Introduction

Lecture 101 Spread of Epidemics Case (part 2)

Lecture 102 Spread of Epidemics (part 3)

Lecture 103 Spread of Epidemics (part 4)

Lecture 104 Spread of Epidemics (part 5)

Lecture 105 Visualizing the Branching Process

Lecture 106 Finish Spread of Epidemics Model

Lecture 107 Forest First Model Simulation

You do NOT need to be experienced with R software and you do NOT need to be an experienced programmer.,Course is good for practicing quantitative analysis professionals.,Course is good for graduate students seeking research data and scenario analysis skills.,Anyone interested in learning more about programming statistical applications with R software would benefit from this course.

#### Course Information:

Udemy | English | 11h 42m | 3.85 GB

Created by: Geoffrey Hubona, Ph.D.

You Can See More Courses in the Developer >> Greetings from CourseDown.com