Monday, December 10, 2012
Same rules and policies apply to this "exam" as apply to ordinary assignments.
The data for this assignment are contained in moths.csv, a comma-delimited text file. They appear as Table 12 in Bishop (1971).
The phenomenon of industrial melanism is one of the textbook examples of natural selection in action. The relative prevalence of two natural color morphs of the moth Biston betularia in England has changed over time apparently in response to industrial air pollution. The dark morph flourishes in polluted areas where tree trunks are darkened by soot while the light morph flourishes in less polluted areas where tree trunks are lighter. Bishop (1971) investigated a naturally occurring cline of Biston betularia extending from industrial Liverpool (most polluted) to the rural countryside of North Wales (least polluted). One of the analyses he carried out is the subject of this exam question.
Bishop selected seven woodlands (Location) at varying distances (Distance) from Liverpool (in km). He describes his experimental protocol as follows, p. 224–225.
In June and early July 1966 and 1967, eight trees (occasionally sixteen) were selected at random at each of several localities every day. Equal numbers of frozen typical and carbonaria moths were glued to these in life-like positions. It was assumed that these moths would be subject to predation by birds in the manner observed by Kettlewell (1955). The moths were placed on a different aspect of the tree-trunks each day at heights of from 0.5 to 2. m. The position of each moth was noted and after 24 hrs a record was made as to whether or not it had been removed (or preyed upon). Remaining moths were then detached and the process was repeated with fresh moths on a different random series of trees. The long duration of the experiment meant that predation occurred over a range of weather conditions.
Unfortunately the raw data are unavailable. Instead we have the results summarized by site for each Morph. The variable Num_moths records how many total moths of a particular Morph were exposed to predation at a particular site and the variable Num_removed records the number of these individuals that was removed presumably by predators. The question of interest is whether the predation rate varies with the distance from Liverpool and, more importantly, whether this relationship is different for the two color morphs.
Hint 1: I'm looking for an expression of the form β0 + β1x + …, where you should include as many terms as are needed to describe the basic outlines of the experiment and answer the researcher's question. Be sure to identify what the variables in your expression represent.
Hint 2: I'm not asking you to include the complications discussed in Question 6 at this point.
Hint 1: Unfortunately, the log-likelihood reported by the lmer function for non-normal models is not comparable to the log-likelihood reported by the glm function. But it is the case that the deviances reported by lmer and glm are comparable. So, to compare these two models you can use their deviances. You can use the deviance function to extract it.
Hint 2: If you elect to carry out a statistical test using the deviances you need to be aware that in the hypothesis test you're carrying out, H0: τ2 = 0, zero is a boundary value for τ2. The usual distribution of the likelihood ratio statistic is incorrect for boundary values. The p-value adjustment that we used for testing H0: θ = 0 in a negative binomial model (lecture 18) is the same adjustment you need to carry out here.
Hint 3: If you prefer to use AIC to compare the models then you'll need to compute the correct log-likelihood of the lmer model. This is not hard to do using the definition of the deviance. Here is an outline of the necessary steps.
- Use the glm model to find the log-likelihood of the saturated model.
- You can do this by using the reported deviance and log-likelihood of the glm model along with the equation that defines the deviance. Just solve for the log-likelihood of the saturated model in this equation.
- Alternatively use glm to fit the saturated model and extract the log-likelihood from the saturated model.
- Having obtained the log-likelihood of the saturated model and knowing the deviance of the lmer model, calculate the log-likelihood of the lmer model using the equation that defines the deviance.
- Use this log-likelihood in the formula for AIC to calculate the AIC of the lmer model.
Jack Weiss Phone: (919) 962-5930 E-Mail: jack_weiss@unc.edu Address: Curriculum in Ecology, Box 3275, University of North Carolina, Chapel Hill, 27599 Copyright © 2012 Last Revised--December 3, 2012 URL: https://sakai.unc.edu/access/content/group/3d1eb92e-7848-4f55-90c3-7c72a54e7e43/public/docs/assignments/finalpart2.htm |