Budworm: Counting Data: Sex Response to Dose

Description Usage Format Source References Examples

Description

An experiment examined the toxicity of the pyrethroid trans=cypermethrin on the tobacco budworm Heliothis virescens. Batches of 20 budworm moths of each sex were exposed to the toxin for three days; the number dead or knocked down were reported.

Usage

1

Format

A data frame with 194 observations on 4 variables.

[,1] ldose numeric log base 2 of dose
[,2] dead numeric number dead of 20
[,3] sex factor sex (M/F)

Source

Venables and Ripley (1999) Modern Applied Statistics with S-PLUS, 3rd ed., ch. 7.

References

Collett (1991, p. 75) Modelling Binary Data, Chapman \& Hall, London.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
data( Budworm )

Budworm.fit <- glm( dead ~ sex * ldose, data = Budworm,
   weight = total, family = binomial )
summary( Budworm.fit )

# Plot of Logit by Sex

plot( c(1,32), c(0,1), type = "n", xlab = "dose",
   ylab = "prob", log = "x" )
text( 2^Budworm$ldose, Budworm$dead, as.character( Budworm$sex ))
Budworm.ld <- seq( 0, 5, 0.1 )
for( i in levels( Budworm$sex ))
   lines( 2^Budworm.ld, predict( Budworm.fit,
      data.frame( ldose = Budworm.ld,
         sex = factor( rep (i, length( Budworm.ld )),
         levels = levels( Budworm$sex ))),
      type = "response" ))
rm( Budworm.ld )

# Parameters for Lines

summary( glm( dead ~ sex + ldose - 1, data = Budworm,
   weight = total, family = binomial ))$coefficients

byandell/pda documentation built on May 13, 2019, 9:27 a.m.