This is my GitHub repository dedicated to learning more about simulations in R. Within this repository are scripts with detailed comments going through different Simulation Chapters, sourced from R workbooks, as well Simulation GitHub repositories.
This includes links to the relevant workbooks and resources and my scripted solutions for task completion.
Link to Workbook: https://bookdown.org/rdpeng/rprogdatascience/simulation.html
📅 Date: 31/05/20222 - Roger D. Peng
📚 Workbook: "R Programming for Data Science"
In this script, I have covered the Simulation Chapter (Chapter 20) from the workbook "R Programming for Data Science" by Roger D. Peng. The chapter delves into the following topics:
- Random Number Generator
- Setting the seed: controls randomness or repeatability
- Simulating a linear model: simulating values from a specific model
- Random Sampling: taking from specified objects
This is a script for my progress through a workbook on Simulations in R, by Stanford University 🏛️.
Link to Workbook: https://web.stanford.edu/class/bios221/labs/simulation/Lab_3_simulation.html
📅 Date: 11/05/2023 (Last Updated) - Stanford University
📚 Workbook: "Lab 3: Simulations in R"
This covers:
- General random number generation
- Utilising the apply() function (avoiding for loops and enhancing efficieny)
- Generating and manipulating random 'normal' variables
- Experimenting with DNA string genration (old 'out of date' package used)
- Generating Multivariate normal clusters
- Exploring Monte Carlo Simulations
- Sampling from Gamma distribution and generating Poisson distribution
- Generating information of power of statistical tests
Link to Workbook: https://users.phhp.ufl.edu/rlp176/Courses/PHC6089/R_notes/simulations.html#standard-probability-distributions
📅 Date: 31/08/2020 - Dr. Robert Parker
📚 Workbook: "Introduction to R, lecture Notes"
Simulation Chapter (Chapter 13) covers:
- Standard probability distributions (normal, binomial, beta, exponential, gamma, hypergeometric)
- Sampling from complex distributions (accept-reject, student's t-test)
- Doing simulations from studies and experiments (including from models)
Link to Workbook: https://github.com/MalikaIhle/Introduction-Simulations-in-R
📅 Date: 14/12/2022 (Last Updated) - Malika Ihle
📚 Workbook: "Introduction to Simulations in R" (GitHub Workbook)
This covers:
- Random number generators/ sampling theory
- Functions
- Simulating an effect (t-tests)
- Simulating for a preregistration
Link to Workbook: https://ds4world.cs.miami.edu/building-simulations.html
📅 Date: ../../2021 - University of Miami
📚 Workbook: “Exploring Data Science with R and the Tidyverse: A Concise Introduction”
Simulation Chapter (Chapter 4) Building Simulations covers:
- sample() function
- the if/ else if() statement
- comparing strings
- for loops - avoiding writing too much code
- Replicates/ outcomes