Skip to content

katherinemillar02/simulation-practise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exploring Simulations in R 🕹

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.

Scripts 📝

This includes links to the relevant workbooks and resources and my scripted solutions for task completion.

1. peng_simulation_chapter.R ✅

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

2. stanford_simulation_chapter.R ✅

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

3. parker_simulation_chapter.R

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)

4. intro_to_sims_in_R_github.R ✅

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

5. miami_simulations_chapter.R ✅

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages