Ecological Modeling
PBIO 294 (3 credits)

Fall 2017 Wednesday 12:00-15:00 PM

Instructor: Brian Beckage (Brian.Beckage@uvm.edu)

Location: Jeffords 326

Office Hours by Appointment: Tuesdays 15:30-17:30 pm; Thursdays 14:30-15:30 pm; Jeffords 352


Course Description

This course will provide an introduction to data modeling and Bayesian statistics. Students will learn to develop computer programs to analyze and model data, with an emphasis on ecological and environmental data. We will focus on likelihood and Bayesian approaches to data modeling. Students will use the programming language R (R project website) in an interactive class environment that is based on application, in-class problem solving, and discussions rather than lectures. Class time will consist of discussions and explanation of assigned material driven by student questions (with limited lecturing), reinforced by instructional videos, and in-class exercises that require a laptop computer (please bring a laptop computer to class!). This course is designed to provide students with the analytical tools required for independent research. Students will develop proficiency in utilizing R for data analysis, gain a basic understanding of Bayesian statistics, and become familiar with using Bayesian software packages (Stan, JAGS).

Course Prerequisites

Introductory ecology (BCOR 102) or permission of the instructor. The course is intended for advanced undergraduates and graduate students.


Course Texts and Readings


Computing

Computing is central to this class and we will be doing lots of computer programming. We will have programming exercises in R during class time as well as programming assignments to be completed outside of class. Homework will largely be to develop programs to complete assigned problems. Students need to bring their laptops to class! We will primarily use the programming language R but we may also utilize bits of Python and Mathematica.

I have posted videos detailing the process for installing the R software (below). To obtain R for your own machine, go to the R project website, follow the link beneath 'Download' on the left, choose a site near your geographic location, download the pre-compiled binary distribution for your operating system, and then follow the instructions for installation. After installing R, please install the integrated development environment (IDE) for R called RStudio. Information on downloading and installing RStudio can be found at RStudio.


Grading for Undergraduate students

Grading for Graduate students

  1. In class quizzes on assigned readings: 10% of course grade.
  2. Class participation: 10% of course grade.
  3. Homework assignments: 60% of course grade.
  4. Final exam (take home): 20% of course grade.
  1. In class quizzes on assigned readings: 10% of course grade.
  2. Class participation: 10% of course grade.
  3. Homework assignments: 50% of course grade.
  4. Data analysis project: 10% of course grade.
  5. Final exam (take home): 20% of course grade.

 

 

Links

Advanced R Stan documentation
Stan warnings
JAGS user manual CODA user manual STAN: A probabilistic programming language Stan: Gelman et. al. 2015

 

Installing R


Install R: Windows Install R: Mac Install RStudio Setting Working Dir: Windows Setting Working Dir: Mac

 

 

Schedule*

(K1~Kruschke Chapter 1; L1~Lavine Chapter 1)

Week Date Topic Reading Exercises Assignments Videos & etc
1 Aug 30 Introduction and Background K2; L Preface R In Class Exercises
Solutions
Kruschke Chapter 2
Solutions
History of R
R data types (1)
R data types (2)
2 Sep 6 R programming Language K3 R In Class Exercises
Weight data
Solutions  
Monty Hall problem
Monty Hall on Monty Hall
Monty Hall background
Solution
R data types (3)
Subsetting (1)
Subsetting (2)
3 Sep 13 Probability K4; L1.5, 1.6, 1.9   Lavine Exercises
Solutions
Vectorization
Reading and Writing (1)
Reading and Writing (2)
4 Sep 20 Likelihood L2.3- 2.6   Likelihood Exercises
Solutions
Control Structures (1)
Control Structures (2)
Writing first function
5 Sep 27 Bayes Rule K5   Functions (1)
Functions (2)
6 Oct 4 Binomial Probability K6,L1.3.1 Function minimization Likelihood 2 Exercises
Solutions Graduate data analysis description due
Scoping rules (1)
Scoping rules (2)
7 Oct 11 MCMC K7.1-7.3     Scoping rules (3)
Coding standards
8 Oct 18 MCMC K7.4-7.6, L6.2 Metropolis MCMC Exercise
Solutions
Dates and times
9 Oct 25 MCMC     Normal Regression via MCMC
Model template
Invgamma Conjugate Prior
Solution
lapply
apply
mapply
tapply
10 Nov 1 JAGS K8  Rjags download
Rjags Example
split
11 Nov 8 Stan  K14   RStan Installation 1
RStan Installation 2
RStan Getting Started
Stan documentation
Stan exercises
Stan solution
  Debugging (1)
Debugging (2)
Debugging (3)
12 Nov   GLMs  K15 GLM exercises and HW
(due 1 Dec)

Solutions
  str (2)
Simulation (1)
Simulation (2)
13 Nov 22 Thanksgiving Break   Thanksgiving Break    Thanksgiving Break 
14 Nov 29 Hierarchical Models  K9  JAGS code
Data
Model structure
Solutions
  Rprofiler (1)
Rprofiler (2)
 
15 Dec 6 Hierarchical Models  Hierarchical Models
Link to book
Owl fecundity diagrams
Marina: Meta-Analysis
Marina: Plotting function
 
  Dec 11 Final Exam due by midnight (all)
Data analysis project due by midnight (graduate students)
Emailed to me Final exam  

*We will adjust the class schedule during the semester based on our rate of progress.