Skip to content

Latest commit

 

History

History
141 lines (102 loc) · 5.53 KB

software.md

File metadata and controls

141 lines (102 loc) · 5.53 KB

The required software for this workshop is all free and open source and will run identically on Windows, Mac OS X, and Linux platforms.

There are six main pieces of software to install:

  • R: An environment for statistical computing.
  • Rstudio: An integrated development environment for using R.
  • tidyverse: A bundle of R packages to use R the modern way.
  • Miscellaneous R packages: Other vital, or just handy, R packages.
  • Stan: A Bayesian probabilistic modelling language.
  • brms: An R package to interface with Stan.

All of the above installation should be easy and painless except possibly for the installation of Stan, which can possibly be tricky because it is an external program and requires addition programming tools like c++ libraries and compilers etc. However, in the instructions below there are links to pages that provide ample detail on how to install and test Stan and all its dependencies.

Installing R

Go to the R website and follow the links for downloading. On Windows, this should lead you to

Downloading this and following the usual Windows installation process, you'll then have a full working version of R.

On Macs, the installation procedure is essentially identical. The latest Mac installer should be available at

Download this and follow the usual Mac installation process to get a full working version of R for Macs.

Installing Rstudio

Using Rstudio is not strictly necessary. You can do all you need to do with R without using Rstudio. However, many people have found that using R is more convenient and pleasant when working through Rstudio. To install it, go to the Rstudio website, specifically to

which will list all the available installers. Note that you just want the Rstudio desktop program. The Rstudio server is something else (basically it is for providing remote access to Rstudio hosted on Linux servers).

Again, you'll just follow the usual installation process for Windows or Macs to install Rstudio using these installers.

Installing the tidyverse packages

The so-called tidyverse is a collection of interrelated R packages that implement essentially a new standard library for R. In other words, the tidyverse gives us a bundle tools for doing commonplace data manipulation and visualization and programming. It represents the modern way to use R, and in my opinion, it's the best way to use R. All the tidyverse packages can be installed by typing the following command in R:

install.packages("tidyverse")

The main packages that are contained within the tidyverse bundle are listed here.

Installing Miscellaneous R packages

There are a bunch of other R packages that we either will use. Here are the main ones:

install.packages("lme4")
install.packages("mgcv")

Installing Stan

Stan is a probabilistic programming language. Using the Stan language, you can define arbitrary probabilistic models and then perform Bayesian inference on them using MCMC, specifically using Hamiltonian Monte Carlo.

In general, Stan is a external program to R; it does not need to be used with R. However, one of the most common ways of using Stan is by using it through R and that is what we will be doing in this workshop.

To use Stan with R, you need to install an R package called rstan. However, you also need additional external tools installed in order for rstan to work.

Instructions for installing rstan on can be found here:

Specific instructions for different platforms can be found by following links from this page.

Installing brms

If the installation of R, Rstudio and Stan seemed to go fine, you can get the brms R package, which makes using Stan with R particularly easy when using conventional models.

To get brms, first start Rstudio (whether on Windows, Macs, Linux) and then run

install.packages('brms')

You can test the installation of brms with

library('brms')

If no errors are raised, you can assume the installation was successful.

Installing Git

We will use Git and GitHub to share materials. Although it is possible to use GitHub without using Git, for what we will be doing, it will be far easier to use Git. All we need is one or two commands.

Mac users usually don't have to do anything. Just go to your terminal and type which git, and you should get a oneliner essentially informing you that Git installed. It might look like /usr/bin/git. For Windows users, you should install Git bash from here https://gitforwindows.org/. Just download and install as you would with any Windows installer. When installing just accept all the defaults in the dialog box.