This GitHub site provides materials for the one-day workshop on Linear Mdoels as part of the University of Melbourne's Environment and Evolution PhD programme.
Below you will find the planned schedule for the day, instructions on installing required software, and links to data and worksheets.
Here's a link to the data you'll be using: [ link ]
- Introduction to linear regression and linear models [ download ]
- Working on exercises in R [ download ]
- Introduction to random effects and mixed models [ download ]
- Working on exercises using
lme4
[ download ]
- Introduction to Bayesian inference (MCMC, priors, challenges) [ download ]
- Working on exercises using
rstanarm
[ download ]
- Working in small groups (3-4 people) to solve some open-ended problems using linear models. This will be assessed (whether the group has gained knowledge in using linear models) for E&E PhD program accreditation.
The workshop exercises will require you to have three pieces of software installed:
- R version 3.4.0 or higher
- the
lme4
R package - the
rstanarm
R package
You can check your R version by typing sessionInfo()
at your R console, the version will be listed in the first line. If you need to install or update R, you can download the latest version (3.5.1) from these links: [download for mac] [download for windows]. If you use linux and have trouble installing R, please let us know.
Once you have R installed, you can install the other packages from the CRAN repositories with the following R command:
install.packages(c("lme4", "rstanarm"))