## Data set from Agresti, 2007. # Data: Study of nesting horseshoe crabs (J. Brockman, Ethology, 1996). # Each female crab in the study had a male crab attached to her in her nest. # The study investigated factors that affect whether the female crab had # any other males, called satellites, residing nearby her. # Explanatory variables thought possibly to affect this included the # female crab's color, spine condition, weight, and carapace width. # The response outcome for each female crab is her number of satellites. # We will look at the response has a binary random variable: # 0 = no satellites, 1 = at least one satellite # Variable descriptions: # color: 1 - light medium, 2 - medium, 3 - dark medium, 4 - dark # spine: 1 - both good, 2 - one worn or broken, 3 - both worn or broken # width: carapace width in cm # satell: number of satellites # weight: weight in kg crab <- read.table("http://www.math.montana.edu/shancock/courses/stat539/data/horseshoe.txt",header=T) # Consider both binary and count responses: crab$sat.ind <- as.numeric(crab$satell > 0)