This is a collection of references on simulation in statistical modeling and methods research, with practical examples for coding in R (and occasionally other statistical programming languages).
SAS and R: Data Management, Statistical Analysis, and Graphics by Ken Kleinman and Nicholas J. Horton
- Chapter 10 in 2nd edition 2014; link (behind paywall/works on OHSU campus); chapter preview
- Chapter 6 in 1st edition 2009, simulation-based power calculations, generate data from generalized linear effects model, generate correlated binary data, missing data multiple imputation: link (behind paywall/works on OHSU campus)
Givens, G. H. and Hoeting, J. A. (2013). Simulation and Monte Carlo Integration. In Computational Statistics (eds G. H. Givens and J. A. Hoeting). doi:10.1002/9781118555552.ch6
- book; chapter 6 link
- introduces Monte Carlo methods and sampling methods in the context of statistics and probability distributions
Simulation - Generating Random Numbers
Simulation - Simulating a Linear Model
W. J. Braun and D. J. Murdoch, A First Course in Statistical Programming with R. Cambridge: Cambridge University Press, 2007.
M. L. Rizzo.Statistical Computing with R. CRC Press, Boca Raton, FL, 2007.
O. Jones, R. Maillardet, and A. Robinson, Introduction to Scientific Programming and Simulation Using R. Boca Raton: Chapman and Hall, 2009. pdf - Chapter 20: Simulation
Gentle, J. E. (2013). Random number generation and Monte Carlo methods. Springer Science & Business Media. google books
Slides by C. Robert and G. Casella on Monte Carlo methods with R., related to their book Monte Carlo Statistical Methods
Very useful blog posts by Ariel Muldoon - Simulation in R
Getting started simulating data in R: some helpful functions and how to use them
- full PDF version
- discussion on random number generation
- overview of many useful functions for simulating data
- simulating character/string data
- simulate differences between/among groups
Simulate! Simulate! Part 1: A linear model
- Simulation from a linear model
- Using
tidyverseandbroomto extract results from simulations - Estimating standard deviation from simulations
Simulate! Simulate! Part 2: A linear mixed model
- Simulation from a linear mixed model
Simulate! Simulate! Part3: The Poisson edition
- Simulation from Poisson regression
Using DHARMa for residual checks of unsupported models
- Using simulations for model checking, examples of simulating from zero-inflated negative binomial model
A closer look at replicate() and purrr::map() for simulations
- deep dive on
replicate()andmap()methods for simulation
RUNNING A SIMULATION | STATA CODE FRAGMENTS
MONTE CARLO POWER SIMULATION OF A MULTILEVEL MODEL | STATA FAQ
MONTE CARLO SIMULATION FOR FACTORIAL ANOVA | STATA FAQ
R ADVANCED: SIMULATING THE HOSPITAL DOCTOR PATIENT DATASET | R CODE FRAGMENTS
- Useful simulation example of complex data with multiple predictors and a three-level hierarchical structure