Chapter 13 Simulations
I decided to put this unit in here because I want to know how to simulate data for both my RMS classes and this class if I want to give you random stuff to do. So, here we go.
Goals
use the
samplefunction when working with nominal or ordinal data to…..take a sample…..of a defined datasetuse
replicateto run your sample a specific number of timesrun a Monte Carlo simulation with 10k samples
graph the outcomes of your simulations with
ggplotuse
rnormto simulate continuous data that fall on a normal distributionSimulate a dataset of a continuous variable with 5k observations
use the
repfunction to repeat a number or character string x amount of timescreate datasets from objects that have the same number of rows using
tibble