Assignment 8

Due Date: Friday, March 31, 2006

Logistic Regression of the Crab Satellite Data

Data 

The file crabs.txt contains the data analyzed by Brockmann (1996). This is a space-delimited text file in which the variable names appear in the first row.

Background 

In a study of nesting horseshoe crabs each female horseshoe crab had a male crab resident in her nest. The study investigated factors affecting whether the female crab had any other males, called satellites, residing nearby. Explanatory variables are the female crab's color, spine condition, weight, and carapace width. The variable width in the file crabs.txt records a female's carapace width in centimeters and the variable num.satellites records the number of satellite males.

In the midterm we used the number of satellite males for each female crab as the response and then carried out a count regression. This time we'll be a bit less ambitious and rather than try to explain the exact number of satellite males around a female we'll see if we can explain merely the presence or absence of satellite males. Create a binary response variable to indicate whether a female crab has any male crabs residing nearby (satellites). Let Y = 1 if she has at least one satellite, and Y = 0 if she has none. As in the midterm we will use the female's width alone as a predictor.

The Questions

Question 1  Graphically investigate whether the presence/absence of satelllite males seems to be linearly related (on a logit scale) to female width.

Question 2  Fit a logistic regression model with Y (as defined above) as the response and width as the predictor using the functional form you decided was appropriate in Question 1.

  1. Test whether there is a significant relationship between the presence-absence of males and the width of the female. Do this significance test in two distinct ways and report the results from both. What's the difference between the two tests?
  2. Interpret in words the coefficient of width that is estimated for the model.

Question 3  Plot the results of the logistic regression model including as much information as possible in your plot.

Question 4  Test your model for lack of fit. Do this in three different ways.

  1. By forming groups using the width variable to form categories and then carrying a Pearson chi-square test or a G2 test.
  2. By grouping the predicted values using deciles and carrying out the Hosmer-Lemeshow test.
  3. By carrying out the alternative to the Hosmer-Lemeshow test contained in Frank Harrell's Design library.

Cited References

Brockmann, H. J. 1996. Satellite male groups in horseshoe crabs, Limulus polyphemus. Ethology 102: 1–21.

Course Home Page


Jack Weiss
Phone: (919) 962-5930
E-Mail: jack_weiss@unc.edu
Address: Curriculum in Ecology, Box 3275, University of North Carolina, Chapel Hill, 27516
Copyright © 2006
Last Revised--March 23, 2006
URL: http://www.unc.edu/courses/2006spring/ecol/145/001/docs/assignments/assign8.htm