QERM 598: Computational Methods in Quantitative Ecology

From QERM Wiki
(Difference between revisions)
Jump to: navigation, search
(→Week by Week: Homeworks, Labs, Data and Notes for QERM 598)
m
 
(26 intermediate revisions by one user not shown)
Line 1: Line 1:
* '''Location:''' [http://www.washington.edu/home/maps/northcentral.html?OUG Odegaard Undergraduate Library] Computer Lab 102
+
[[Image:SuperMosaic.png|right|thumb|300px|Mosaic plot of Steller sea lion birth probabilities]]
* '''Times:''' Wednesday - 1:30-3:30
+
* '''Instructor:''' [http://students.washington.edu/eliezg/ Eli Gurarie] with the possible participation of [http://depts.washington.edu/qerm/people/people_students.html guest lecturers], under the benevolent auspices of [http://www.stat.washington.edu/tilmann/ Dr. Tilmann Gneiting].
+
* ''' Office Hours:''' all day Wednesday in Loew 328 and by appointment. 
+
* '''Target Audience:''' First-year [http://depts.washington.edu/qerm/ QERM] students and other qualified students interested in Quantitative Ecology.
+
* '''Prerequisites:''' Statistical Inference (STAT 512), Mathematical biology (AMATH 420)
+
 
+
 
+
=== The Course ===
+
[[Image:SuperMosaic.png|right|thumb|width=300px|Mosaic plot of Steller sea lion birth probabilities]]
+
  
 
* This course is designed to introduce students to computational methods in '''Ecological Modeling'''.  Commonly used techniques in '''Applied Statistics''' will be covered, as well as some deterministic and stochastic models encountered in '''Mathematical Biology'''.  While we cover the mechanics of doing various statistical analyses, the goal of the course is to develop the ability to use computational tools creatively to help visualize and grasp statistical concepts and modeled processes.  There will be lots of emphasis on '''simulation''' and '''graphical visualization''', since these are such an important tools in practice but scantily touched upon in other courses.   
 
* This course is designed to introduce students to computational methods in '''Ecological Modeling'''.  Commonly used techniques in '''Applied Statistics''' will be covered, as well as some deterministic and stochastic models encountered in '''Mathematical Biology'''.  While we cover the mechanics of doing various statistical analyses, the goal of the course is to develop the ability to use computational tools creatively to help visualize and grasp statistical concepts and modeled processes.  There will be lots of emphasis on '''simulation''' and '''graphical visualization''', since these are such an important tools in practice but scantily touched upon in other courses.   
Line 14: Line 5:
 
* Our primary tool will be [http://cran.r-project.org/ '''R'''].   
 
* Our primary tool will be [http://cran.r-project.org/ '''R'''].   
  
* Each week will consist of a lecture, an R lab and an assignment.  One of the practical goals is to create a body of labs, assignments and datasets that can be used as a basis for a continuation of this course in years to come.  All of these materials will be stored on this website on [HomeWorksAndLabs this page].
+
* Each week will consist of a lecture, an R lab and an assignment.  One of the practical goals is to create a body of labs, assignments and datasets that can be used as a basis for a continuation of this course in years to come.  All of these materials will be stored on this website.
  
* There will be a final project involving some combination of analysis and presentation using R. These will be presented on the last day of class, aka: <a href="http://qerm.pbwiki.com/FinalProjects">Annual QERM Miniconference on Computational Methods in Quantitative Ecology </a>.
+
* There will be a final project involving some combination of analysis and presentation using R. These will be presented on the last day of class, aka: [http://qerm.pbwiki.com/FinalProjects Annual QERM Miniconference on Computational Methods in Quantitative Ecology].
 +
 
 +
 
 +
=== Practical Details===
 +
 
 +
* '''Location:''' [http://www.washington.edu/home/maps/northcentral.html?OUG Odegaard Undergraduate Library] Computer Lab 102
 +
* '''Times:''' Wednesday - 1:30-3:30
 +
* '''Instructor:''' [http://students.washington.edu/eliezg/ Eli Gurarie] with the possible participation of [http://depts.washington.edu/qerm/people/people_students.html guest lecturers], under the benevolent auspices of [http://www.stat.washington.edu/tilmann/ Dr. Tilmann Gneiting].
 +
* ''' Office Hours:''' all day Wednesday in Loew 328 and by appointment. 
 +
* '''Target Audience:''' First-year [http://depts.washington.edu/qerm/ QERM] students and other qualified students interested in Quantitative Ecology.
 +
* '''Prerequisites:''' Statistical Inference (STAT 512), Mathematical biology (AMATH 420)
  
---
 
  
 
=== Week by Week: Homeworks, Labs, Data and Notes for QERM 598 ===
 
=== Week by Week: Homeworks, Labs, Data and Notes for QERM 598 ===
[[Image:boxplot.jpg|right|thumb|width=300px|Box-plots]]
+
[[Image:boxplot.jpg|right|thumb|300px|Box-plots]]
  
(For an archived version of this page from last year, see HomeWorksAndLabs2007.)
 
  
 
===== Week 0: Basic Introduction to R =====
 
===== Week 0: Basic Introduction to R =====
Line 33: Line 32:
 
Thankfully, there is lots of expertise at QERM!  To start off, download or open the file below, print it out, read it, and walk through the examples.  There is a brief assignment at the end of the lab for practice.   
 
Thankfully, there is lots of expertise at QERM!  To start off, download or open the file below, print it out, read it, and walk through the examples.  There is a brief assignment at the end of the lab for practice.   
  
* [http://qerm.pbwiki.com/f/LabHomework0.txt Lab/Homework 0] (due Wednesday, January 9).
+
* {{Rcode | LabHomework0.txt | Lab/Homework 0}} (due Wednesday, January 9).
 +
 
  
 
===== Week 1: Distributions and the Central Limit Theorem =====
 
===== Week 1: Distributions and the Central Limit Theorem =====
 
Obtaining quantiles and p-values from distributions.  Plotting cdfs and pdfs.  Generating random data.  Introducing plotting functions and loops.  Illustrating the Central Limit Theorem numerically.
 
Obtaining quantiles and p-values from distributions.  Plotting cdfs and pdfs.  Generating random data.  Introducing plotting functions and loops.  Illustrating the Central Limit Theorem numerically.
  
* [http://qerm.pbwiki.com/f/Week01_DistributionsAndCLT.r In-class lecture/lab 1]
+
* {{Rcode | Week01 DistributionsAndCLT.r | Lab 1: Distributions and the Central Limit Theorem}} (due Wednesday, January 9).
* [http://qerm.pbwiki.com/f/Homework01.pdf Homework 1] (due Wednesday, January 16).
+
* {{Pdf |QERM598_Homework01.pdf | Homework 1}} (due Wednesday, January 16).
  
  
 
===== Week 2: Comparing two samples: Monte Carlo and t-tests =====
 
===== Week 2: Comparing two samples: Monte Carlo and t-tests =====
  
* Lecture presentation on comparing two samples of ant-size data:  [http://qerm.pbwiki.com/f/TwoSamples.pdf TwoSamples.pdf]
+
* {{Pdf | TwoSamples.pdf | Lecture on comparing Two Samples}}
* R Lab on loading data and comparing samples:  [http://qerm.pbwiki.com/f/Week02_TwoSampleComparison.r Week02_TwoSampleComparison.r]  
+
* {{Rcode| Week02_TwoSampleComparison.r | R Lab on comparing two samples}}  
* Homework: [http://qerm.pbwiki.com/f/HW2.pdf HW2.pdf]
+
* {{Pdf|QERM598_Homework01.pdf|Homework 1}}
 
+
You will need to download the following data files to perform the lab and the homeworks:
You will need to download the following data files to perform the lab and the homeworks.
+
** {{Data|Weight.txt|Ant Weight data}} (Single column of weight data)
* Single column of weight data:  [http://qerm.pbwiki.com/f/Weight.dat Weight.dat]: 
+
** {{Data| ants.csv | ants.csv}} (Comma-delimited data file)
* Comma-delimited data file:  [http://qerm.pbwiki.com/f/ants.csv ants.csv]
+
** {{Data| ants.dat | ants.dat}} (Space-delimited data file)
*  Space-delimited data file:  [http://qerm.pbwiki.com/f/ants.dat ants.dat]
+
You will also need to read Mike Keim's {{Pdf | NotesOnNonparametricTests.pdf | notes on non-parametric tests}}.
You will also need to read Mike Keim's [http://qerm.pbwiki.com/f/NoteOnNonparametricTests.pdf notes on non-parametric tests].
+
  
  
 
===== Week 3: Introduction to Analysis of Variance =====
 
===== Week 3: Introduction to Analysis of Variance =====
  
* Lecture presentation: [http://qerm.pbwiki.com/f/ANOVA.pdf ANOVA.pdf]
+
* {{Pdf | QERM598_ANOVA.pdf | Intro to ANOVA lecture}}
* In-class R lab: [http://qerm.pbwiki.com/f/Week03_IntroToAnova.r Week03_IntroToANOVA.r]
+
* {{Rcode| QERM598_IntroToAnovaLab.r | Intro to Anova lab}}
* Homework: [http://qerm.pbwiki.com/f/HW3.pdf HW3.pdf]
+
* {{Pdf | QERM598_HW3.pdf | Homework 3}}
* Sea Lion data for homework: [http://qerm.pbwiki.com/f/SeaLionBirth.dat SeaLionBirth.dat]
+
* {{Data | QERM598_SealionBirthData.dat | Sea Lion data for homework}}
* Math Facts for ANOVA: [http://qerm.pbwiki.com/f/MathFacts.pdf MathFacts.pdf]
+
* {{Pdf | QERM598_MathFacts.pdf | Math Facts for ANOVA}}
  
  
 
===== Week 4: Linear Regression =====
 
===== Week 4: Linear Regression =====
  
* Lecture presentation: [http://qerm.pbwiki.com/f/LinearRegression.pdf LinearRegression.pdf]
+
* {{Pdf | QERM598_LinearRegression.pdf |  Linear Regression lecture}}
* In-class R lab: [http://qerm.pbwiki.com/f/Week04_LinearRegression.r Week04_LinearRegression.r]
+
* {{Rcode| QERM598_Week04_LinearRegression.r‎ |In-class R lab}}
* Data files for lab: [http://qerm.pbwiki.com/f/Sleep.dat Sleep.dat] and [http://qerm.pbwiki.com/f/PieSleep.dat PieSleep.dat]
+
* Data for lecture/lab
* Homework: [http://qerm.pbwiki.com/f/HW4.pdf HW4.pdf]
+
** {{Data | QERM598_Sleep.dat | Sleep experiment}},
* Sea Lion inter-parturition data for homework: [http://qerm.pbwiki.com/f/SealionIPP.dat SealionIPP.dat]
+
** {{Data | QERM598_PieSleep.dat | Pie/sleep data}}
 +
* {{Pdf | QERM598_HW4.pdf | Homework 4}}
 +
* {{Data | QERM598_SealionIPP.dat | Sea Lion inter-parturition data for homework}}
  
  
 
===== Week 5: Chi-squared Contingency Tables =====
 
===== Week 5: Chi-squared Contingency Tables =====
  
* Lecture presentation: [http://qerm.pbwiki.com/f/Chi2.pdf Chi2.pdf]
+
* {{Pdf | QERM598_Chi2.pdf | Lecture on contingency tables and Chi-squared tests}}
* In-class R lab: [http://qerm.pbwiki.com/f/Week05_ChiSquared.r Week05_ChiSquared.r]
+
* {{Rcode| QERM598_Week5Chi2lab.r | In-class R lab}}
* Data files for lab: [http://qerm.pbwiki.com/f/Clams.csv Clams.csv] and [http://qerm.pbwiki.com/f/KurilBirths.csv KurilBirths.csv]
+
* Data files for lecture/lab:  
* Homework: [http://qerm.pbwiki.com/f/HW5.pdf HW5.pdf]
+
** {{Data | QERM598_Clams.csv | Clams.csv}}
 +
** {{Data | QERM598_KurilBirths.csv | SealionBirths.dat}}
 +
* {{Pdf | QERM598_HW5.pdf | Homework}}
 +
 
 
There is, by the way, a great explanation/derivation of the theory behind Chi-Squared contingency tests and other applications of the central limit theorem [http://www.cefe.cnrs.fr/BIOM/pdf/mt2004-part2.pdf  here].
 
There is, by the way, a great explanation/derivation of the theory behind Chi-Squared contingency tests and other applications of the central limit theorem [http://www.cefe.cnrs.fr/BIOM/pdf/mt2004-part2.pdf  here].
 +
 +
Also, visit this link on making mosaic plots of categorical data: [[R tips/Contingency Tables]].
 +
  
 
===== Week 6: Introduction to Stochastic Modelling =====
 
===== Week 6: Introduction to Stochastic Modelling =====
  
* Lecture presentation: [http://qerm.pbwiki.com/f/StochasticModelling.pdf StochasticModelling.pdf]
+
* {{Pdf | StochasticModelling.pdf | Introductory lecture on Stochastic Modeling}}
* In-class R codes: [http://qerm.pbwiki.com/f/MarkovMatrix.r MarkovMatrix.r] and [http://qerm.pbwiki.com/f/RandomWalks.r RandomWalks.r]
+
* In-class R codes:  
* Homework: [http://qerm.pbwiki.com/f/HW6.pdf HW6.pdf]
+
** {{Rcode| MarkovMatrix.r | MarkovMatrix.r}}
 +
** {{Rcode| RandomWalks.r |RandomWalks.r}}
 +
* {{Pdf | QERM598_HW6.pdf | Homework}}
 +
 
  
 
===== Week 7: Population Dynamics Models and MCMC =====
 
===== Week 7: Population Dynamics Models and MCMC =====
  
* Lecture presentation: [http://qerm.pbwiki.com/f/Week7_Ian.pdf Week7_Ian.pdf]
+
* {{Pdf | Week7_PopulationsAndMCMC.pdf | Lecture presentation}}
* In-class R codes: [http://qerm.pbwiki.com/f/fibo.r fibo.r]
+
* {{Rcode | Week7_FibonacciPopulations.r | R code}}
 
* No homework
 
* No homework
 +
  
 
===== Week 8: Project Discussions =====
 
===== Week 8: Project Discussions =====
Line 100: Line 111:
 
===== Week 9: Fitting models and optimization =====
 
===== Week 9: Fitting models and optimization =====
  
* Lecture: [http://qerm.pbwiki.com/f/Fitting.pdf Fitting.pdf]
+
* {{Pdf| QERM598_OptimizationAndFitting.pdf | Lecture}}
* Cassava disease data for in-class lab: [http://qerm.pbwiki.com/f/CassavaDisease.csv CassavaDisease.csv]
+
* Data:
* White fly data for in-class lab: [http://qerm.pbwiki.com/f/WhiteFly.csv WhiteFly.csv]
+
** {{Data | QERM598_CassavaDisease.csv |Cassava disease data}}
* Rough R-code for Cassava analysis: [http://qerm.pbwiki.com/f/CassavaCode.r CassavaCode.r]
+
** {{Data | QERM598_WhiteFly.csv | White fly data}}
 +
* {{Rcode | QERM598_CassavaCode.r | Rough R-code for Cassava analysis}}
 +
 
  
 
===== Week 10: Final project presentations =====
 
===== Week 10: Final project presentations =====
  
* Please visit the FinalProjects page to browse through final project presentations and R code.
+
* Please visit the [[QERM 598/Final Projects | Final Projects]] page to browse through final project presentations and R code.
 +
 
 +
 
 +
[[Category: Courses]]

Latest revision as of 19:35, 8 February 2011

Mosaic plot of Steller sea lion birth probabilities
  • This course is designed to introduce students to computational methods in Ecological Modeling. Commonly used techniques in Applied Statistics will be covered, as well as some deterministic and stochastic models encountered in Mathematical Biology. While we cover the mechanics of doing various statistical analyses, the goal of the course is to develop the ability to use computational tools creatively to help visualize and grasp statistical concepts and modeled processes. There will be lots of emphasis on simulation and graphical visualization, since these are such an important tools in practice but scantily touched upon in other courses.
  • Our primary tool will be R.
  • Each week will consist of a lecture, an R lab and an assignment. One of the practical goals is to create a body of labs, assignments and datasets that can be used as a basis for a continuation of this course in years to come. All of these materials will be stored on this website.


Contents

Practical Details

  • Location: Odegaard Undergraduate Library Computer Lab 102
  • Times: Wednesday - 1:30-3:30
  • Instructor: Eli Gurarie with the possible participation of guest lecturers, under the benevolent auspices of Dr. Tilmann Gneiting.
  • Office Hours: all day Wednesday in Loew 328 and by appointment.
  • Target Audience: First-year QERM students and other qualified students interested in Quantitative Ecology.
  • Prerequisites: Statistical Inference (STAT 512), Mathematical biology (AMATH 420)


Week by Week: Homeworks, Labs, Data and Notes for QERM 598

Box-plots


Week 0: Basic Introduction to R

If you don't have R already, you can download it from this website. You'll need to download the executable binaries: For Windows users they are here; for MacOS users they are here. Install R and run it.

R is an open source program, which means it's free, efficient and no-frills. It also means that documentation is patchy at best and learning how to use it involves poking around the internet, blindly groping around the internal help file, and, whenever possible, stealing other people's code.

Thankfully, there is lots of expertise at QERM! To start off, download or open the file below, print it out, read it, and walk through the examples. There is a brief assignment at the end of the lab for practice.


Week 1: Distributions and the Central Limit Theorem

Obtaining quantiles and p-values from distributions. Plotting cdfs and pdfs. Generating random data. Introducing plotting functions and loops. Illustrating the Central Limit Theorem numerically.


Week 2: Comparing two samples: Monte Carlo and t-tests

You will need to download the following data files to perform the lab and the homeworks:

You will also need to read Mike Keim's Pdf10.png notes on non-parametric tests.


Week 3: Introduction to Analysis of Variance


Week 4: Linear Regression


Week 5: Chi-squared Contingency Tables

There is, by the way, a great explanation/derivation of the theory behind Chi-Squared contingency tests and other applications of the central limit theorem here.

Also, visit this link on making mosaic plots of categorical data: R tips/Contingency Tables.


Week 6: Introduction to Stochastic Modelling


Week 7: Population Dynamics Models and MCMC


Week 8: Project Discussions


Week 9: Fitting models and optimization


Week 10: Final project presentations
  • Please visit the Final Projects page to browse through final project presentations and R code.
Personal tools