Simulation Studies in R

R is a unique statistical application that combines programming language and statistical packages almost perfectly. This course will show how to use R for a Monte Carlo simulation. The class covered all steps in a Monte Carlo simulation, including:

  • Specifying design conditions.
  • Generating data from a desired model.
  • Analyzing data.
  • Selecting target statistics from the results.
  • Summarizing the statistics across design conditions for publication.

Furthermore, the class included debugging techniques, running R in high-performance computers, and communication with other statistical packages.

Note

The articles written in English have blue links or blue table cells. The articles written in Thai have red links or red table cells.

Summer 2015 (R SIM; Graduate, TTU)

Lectures Videos Materials
Getting Started
Getting and Organizing Outputs
The if Statement and the apply Function
Communication with External Programs Using R
The Apply Family in R
Data Generation and Debugging
Quick Start of Using High Performance Computing (HPC)*
Build R package to Run Simulation in HPC*
Expectation and Variance
Optimization
Plotting

*I taught this class using HPC in Texas Tech University. Running in other HPCs could be slightly different.

Assignments Materials
Assignment 1
Assignment 2
Assignment 3
Assignment 4