bcss
home
Workshop materials

Bayesian data analysis with JAGS and R

 

Software and materials for the workshop on Bayesian analysis with JAGS and R in Kuala Lumpur, from 4 to 10 March 2018.

Extra materials

Extra files for Monday

Click on image to see larger version.

Before the workshop

  1. Check your laptop specs! Your computer should have 4 or 8 'logical' cores. To check the number of cores available, open R and do: parallel::detectCores(). We will be generating some very large objects, so you will need at least 4 Gb of installed RAM, preferably 8 or 16 Gb.

    We will be doing a lot of heavy-duty number crunching, so if your laptop tends to overheat, you may need a cooling system.
     
  2. Check your operating system: You can use Windows 7, 8 or 10, provided it uses a 64-bit processor. You can use a Mac with OS X 10.11 (El Capitan) or later; if you have a Mac, you will need the XQuartz utility installed.
     
  3. Check that you have recent versions of necessary software: R 3.4.1 or later and JAGS 4.2.0 or later. The version of R appears at the top of the console window when you open R; also check that you are running the 64-bit version of R. Doing library(rjags) will produce a message with the version of JAGS in use.
     
  4. Download and preview the workshop materials (see below).
     
  5. Look through the R Skills Review again - both your answers and the suggested answers - and make sure you have these skills at your finger-tips.

Software:

You will need the following software installed on your laptop:

R, JAGS and rjags

  • You should have R 3.4.1 or later; 3.4.x is faster than previous versions but R 3.4.0 had a bug; if you have an old version please install the newest.
     
  • You will also need JAGS 4.2.0 or later. Look for the download link just below the menu bar here.
     
  • Install the rjags package and check that it loads correctly: When you do library(rjags) you should get a message telling you that rjags has linked to JAGS 4.2.0 or 4.3.0.

Other R packages

  • You should have the following CRAN packages installed:
    install.packages(c("jagsUI", "AHMbook", "secr", "wiqid", "shiny", "githubinstall", "loo", "rgdal"))
  • Also install the makeJAGSmask package from Github with
    githubinstall::githubinstall("makeJAGSmask")
  • If you have problems installing R packages, don't worry: we can fix this at the beginning of the workshop.

A spreadsheet program

  • You should have either LibreOffice Calc (which is free software) or Microsoft Excel.
     

A PDF reader

  • You need a PDF Reader which allows you to annotate PDFs, such as Adobe Reader.
     

Materials:

The outline schedule for the workshop is here (PDF, 23KB).

Click here to download the materials for days 1 to 3 (ZIP, 323KB)

Materials for days 4 to 6 will be distributed on USB drives at the workshop.

After downloading, extract the files and put them in a folder on your hard disk, eg, in My Documents. Don't put it on the Desktop as some programs can't easily access the desktop.

The instructor team

Ngumbang Juat, BCSS staff and gibbon researcher.

Chee Pheng, senior researcher with WCS Malaysia.

Mike Meredith, BCSS and WCS, background in park and wildlife management.

 

 

Page updated 23 Feb 2018 by Mike Meredith