Assignment 3

Due Date

Friday, February 3, 2012

Data Source

The data for this assignment is the RIKZ data set, the same data set that was used in Assignment 1.

Overview

Some of you have noticed that three of the Simpson diversity values calculated by the diversity function of the vegan package are incorrect. There are three sites with no animals present and the diversity function assigns them a Simpson's diversity index of 1. Because these sites also had high values of NAP this assignment has a big effect on the regression results. (Examine the graph you made in Assignment 1 to see this.)

An examination of the code used by the diversity function makes it clear that this calculation is a mistake. The authors of the code didn't bother to consider the special limiting case of no species present. (To see the code that underlies the diversity function load the vegan package, type diversity at the R command prompt, and press the return key.) When no animals are present diversity could be sensibly assigned either a missing value or a value of zero. The problem with setting diversity equal to zero is that then the zero sites are heterogeneous—some of them are zero because they have no species while others are zero because they have a single species present.

In this HW exercise we will assign these three sites a diversity of zero and refit the models from Assignment 1. The final model you get will be different from Assignment 1. Furthermore by redefining the week variable the model can be simplified even further.

Questions

  1. Use the ifelse function of R to change the diversity values of those sites for which currently diversity = 1 to diversity = 0.
  2. Refit your models from Assignment 1 and find the best model that relates diversity to NAP and week. It will be different from what you found before.
  3. Based on the summary output of the model, which weeks appear to be different from each other?
  4. Based on your answer to Question 3 create a new "week" variable that dichotomizes the weeks into similar groups so that there are only two groups of weeks. Fit your best model from Question 2 using this week variable instead of the old week variable.
  5. The two "best" models with different versions of the week variable are nested models. Demonstrate this by formulating a null hypothesis that tests whether the four-week model can be reduced to the model with just two week categories. Clearly indicate what the nature of the simplification is in terms of the model parameters. Use R to formally test this null hypothesis. State your conclusions.
  6. Graph your final model from Question 5.
  7. Based on your final model from Question 5 and using all the appropriate statistical jargon, quantify and explain the effect that "week" appears to have on diversity.

Hints

ifelse(Boolean condition, value to return if TRUE, value to return if FALSE).

Course Home Page


Jack Weiss
Phone: (919) 962-5930
E-Mail: jack_weiss@unc.edu
Address: Curriculum in Ecology and the Environment, Box 3275, University of North Carolina, Chapel Hill, 27599
Copyright © 2012
Last Revised--Jan 27, 2012
URL: https://sakai.unc.edu/access/content/group/2842013b-58f5-4453-aa8d-3e01bacbfc3d/public/Ecol562_Spring2012/docs/assignments/assign3.htm