Learn R Programming

agridat (version 1.12)

beall.webworms: Counts of webworms in a beet field, with insecticide treatments.

Description

Counts of webworms in a beet field, with insecticide treatments.

Usage

data(beall.webworms)

Arguments

Format

A data frame with 1300 observations on the following 7 variables.

row

row

col

column

y

count of webworms

block

block factor

trt

treatment factor

spray

spray treatment Yes/No

lead

lead treatment Yes/No

Details

The beet webworm lays egg masses as small as 1 egg, seldom exceeding 5 eggs. The larvae can move freely, but usually mature on the plant on which they hatch.

Each plot contained 25 unit areas, each 1 row by 3 feet long.

Treatment 1 = None. Treatment 2 = Contact spray. Treatment 3 = Lead arsenate. Treatment 4 = Both spray, lead arsenate.

Examples

Run this code
# NOT RUN {
data(beall.webworms)
dat <- beall.webworms

# Match Beall table 1
with(dat, table(y,trt))
# histogram(~y|trt, data=dat, layout=c(1,4), as.table=TRUE)

# Visualize Beall tble 6.  Block effects may exist, but barely.
desplot(y ~ col*row, data=dat, out1=block, out2=trt, num=trt, flip=TRUE,
        main="beall.webworms (count of worms)",
        col.regions=colorRampPalette(c("white","black"))(9))

# Following plot suggests interaction is needed
# with(dat, interaction.plot(spray, lead, y))

# Just a simple model here...
m1 <- glm(y ~ block+spray*lead, data=dat, family="poisson")
summary(m1)

# }

Run the code above in your browser using DataLab