Bayesian statistics, simulation and software

Preparing for the course

Please come back and visit this section again before the course starts because we might provide more updates on installations you have to make.

You are expected to bring a laptop with all relevant software installed. There is wireless access in the lecture room. Before the course starts it is important that you install the relevant software yourself (it is quite important that you go through these steps yourself prior to the first course module because there will not be time to help with this when we meet the first day).

Before showing up for the first session we expect that you have installed R and RStudio (the editor/IDE that we will use in the course). See https://asta.math.aau.dk/software/R-installation for help.

In some cases you may experience that R packages are being installed in a directory that is either on a network drive (which is very bad) or e.g. copied to the cloud with OneDrive or similar (which is wasteful). Contact the teacher in the beginning of the course if this is the case for you. Then you may benefint from this command (only run if instructed to do so):

cat('R_LIBS_USER="C:/RFolder/R/%p-library/%v"\n', append = TRUE, file = "~/.Renviron")

You also have to install JAGS and the R package rjags:

  1. On Linux install JAGS from the package manager. On Windows/Mac go to https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/ and choose Windows/Mac OS X, and download and run the installer for JAGS 4.3. For OSX please note: There are install instructions on the download page, regarding running this non-signed image, so please read it.

  2. Open R and install rjags with the following command:
    install.packages("rjags")

  3. Test that it works by loading the rjags package (there should be a message about linking to JAGS when the package loads):
    library(rjags)

We might need to install more software as we move along; it is therefore essential that you have administrative rights to your computer.

For first time R users

If you never used R before we highly recommend that you go through the first three pages of Getting Started in R: Tinyverse Edition and run the commands and solve the exercises on your own computer.

Cheatsheets (quick references)

These two-sided cheatsheets can be helpful to have readily available (maybe even physical copies duplex printed if you are old school).