# to install {fidelitysim} we need the {remotes}-package
install.packages("remotes")
# then install {fidelitysim} from GitHub
::install_github("INS-Basel/fidelitysim") remotes
1 Introduction
The following technical setup is needed to pursue a local simulation on your computer:
A local installation of the R statistical programming language (R Core Team 2022) is required.
The current version can be downloaded from https://cran.r-studio.org.In addition, we recommend the use of RStudio Desktop (an integrated development environment) which provides an excellent user interface for working with R.
It is available from here: https://www.rstudio.com/products/rstudio/download/.
Both R and RStudio (as well as further used R packages) are free software.
To follow this tutorial, we assume basic familiarity with the use of the R language.
1.1 Required R packages
The following R packages are needed to run the simulation:
- {fidelitysim} (Trutschel and Blatter 2022) - holds packaged code for the simulation experiment
It uses and builds upon:
{samplingDataCRT} v1.0 (Trutschel and Treutler 2017) - for sampling data matrices
{lme4} (Bates et al. 2015) - for linear model estimation
{ggplot2} (Wickham 2016) - for visualizing the results
You can install the necessary packages by:
The other packages are installed from CRAN:
# install packages from CRAN
install.packages(c("samplingDataCRT", "lme4", "ggplot2"))
Consequently, to start the calculation the package needs to be loaded by:
library(fidelitysim)
1.2 Other considerations
The local simulation can - depending on the number of clusters and the computational power - take up to 10-12 hours when the commenly recommended number of iterations of 10,000 is used. We suggest the user to start own simulations with a small number and than increase, when it is clear the code is running.