Category Archives: Course Files

Chapter 5 – Mixed Effect Models

Hi class –

Be sure to read the protocol that appears on page 90 for gls models, as Zuur uses it for mixed effect models in general.  A shorter version of it is in chapter 5 (bottom of p. 121).

Tomorrow we’ll start on Chapter 5 – Mixed Effects Models.  The main script I’ll be following is Chapter5_jtf.r .  I’ll also spend a little time simulating the M.lm and M2.lm models for the owls in the simulation script – Chapter5_Simulation.r .  This is the key chapter in the whole book, so be sure to ask questions if you don’t understand something.

Jack

R Script for Chapter 4

Hi,

Here is today’s script: Chapter4_jtf.r .   Be careful of the identify command.  You are supposed to click on the point you want to identify (the outlier) and then press the “Finish” button in the upper left corner of the plot window.  It will then tell you which record is the outlier (it should be 26).

Also, I didn’t get to it, but I have a script to simulate  a dataset for chapter 4 ( Chapter4_Simulation.r ).  Run through it, if you want.

Jack

Welcome to Advanced Statistical Ecology – Eco697SA!

9/6/2012

Welcome to Advanced Statistical Ecology, ECO 697SA!  I hope you enjoy the course.The Syllabus (see the link on the right) has the texts we will be using (both by Alain Zuur).  His web site ( http://www.highstat.com ) has errata, data and links to his other books that may be of interest.  His data comes in two forms: a package (that doesn’t seem to work with the most recent version of R) and a zip file of .txt files.  Code in the book is available in another ZIP file. This code has been updated, but might break as new versions of R come out.

If you are new to R, please look at Zuur’s book “A Beginner’s Guide to R.”  If you are a student, you can download the book through the library. (Look up Springerlink in the electronic databases, and then look up Zuur.  Reduce the number of listings by specifying books only. You can download a chapter at a time as a PDF.)  The book describes downloading and installing R.

I have been using R version 2.15.1.  You may want to update to that version so that we all have the same software.  I am also using the integrated development environment RStudio.  RStudio has several advantages over using the R editor for scripts, including pretty formatting that highlights keywords, ability to store projects separately, and ability to remember, copy and save (inseveral formats) recent plots.  If you are already used to some other system (such as TINN-R, or the built-in editor) then you don’t have to change.  In any case, make sure that whatever you are using is up to date.

We will be going over Appendix A of Zuur’s book “Mixed effects models and extensions in ecology with R” in the first class – a review of exploratory analysis methods and linear regression.  Appendix A is contained in the file call “back-matter.pdf”, which you can download through Springerlink (if you are off-campus, you must go through the library; if you are on-campus, Springerlink recognizes the —.umass.edu web address of your computer and gives you access automatically without going through the library).  You can view the book through the built-in interface on SpringerLink, but it is a little clunky.  Download the PDF for more flexibility in how you view it.

Good luck this semester, and I hope you enjoy it!

Jack Finn

Professor