hnp (version 1.2-6)

cbb: Coffee berry borer trapping data

Description

Data on counts of coffee berry borer obtained using different traps through time.

Usage

data(cbb)

Arguments

Format

A data frame with 288 observations on the following 4 variables.

week numeric week of observation (1 to 24)
block factor levels I II III IV
trap factor levels CV F SF

Details

The coffee berry borer is a major pest of commercial coffee. The insect directly attacks the coffee fruit in development causing severe losses in bean production and quality. This data set was obtained in an experiment conducted by Mota (2013), where three types of traps (SF, F, CV) were randomized in each of four equidistant lines (blocks) of a coffee field. Each week, over a 24 week period, the insects were removed from the traps and counted.

References

Mota, L. H. C. (2013) Desenvolvimento de armadilha de auto-inoculacao para o controlde de Hypothenemus hampei (Ferrari, 1867) (Coleoptera: Curculionidae) com Beauveria bassiana (Bals.) Vuil (Ascomycota: Hypocreales) em tecido sinetico. Master's dissertation, ESALQ-USP

Examples

Run this code
# NOT RUN {
data(cbb)
# exploratory plot
require(latticeExtra)
trellis.par.set(strip.background=list(col="lightgrey"))
useOuterStrips(xyplot(count ~ week | block + trap, data=cbb,
  layout=c(3,1),type="l", col=1, xlab="Week", ylab="Insect counts"))

# Poisson fit
model1 <- glm(count ~ block + trap*factor(week),
              data=cbb, family=poisson)
anova(model1, test="Chisq")
sum(resid(model1, ty="pearson")^2)
summary(model1)
hnp(model1, sim=19, conf=1)

# }
# NOT RUN {
hnp(model1) # default call
# }
# NOT RUN {
# Quasi-Poisson fit
model2 <- glm(count ~ block + trap*factor(week), data=cbb,
              family=quasipoisson)
anova(model2, test="F")
summary(model2)
hnp(model2, sim=19, conf=1)

# }
# NOT RUN {
hnp(model2) # default call
# }
# NOT RUN {
## for discussion on the analysis of this data set,
## see Demetrio et al. (2014)
# }

Run the code above in your browser using DataLab