1  Introduction

The following technical setup is needed to pursue a local simulation on your computer:

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:

It uses and builds upon:

You can install the necessary packages by:

# to install {fidelitysim} we need the {remotes}-package
install.packages("remotes")

# then install {fidelitysim} from GitHub
remotes::install_github("INS-Basel/fidelitysim")

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.