# Versão da função apmc() para modelos que usam a matriz do modelo ao
# invés da formula.
apmc2 <- function(X,
...
...
@@ -233,11 +225,14 @@ cap <-
"Estimated probability of surviving at 24h for each inseticide on two parasiods and two hosts. Segment is a confidence interval for the probability of surviving. Parasitoids estimates followed by the same lower letters in a insetice and host combination are not different at 5%. Inseticides estimates followed by the same lower letters in a parasitoid and host combination are not different at 5%."
cap <- fgn_("surv", cap)
pred$vjust <- -0.5
pred$vjust[pred$cld == "ABa"] <- 1.5
# Gráfico de segmentos.
segplot(I ~ lwr + upr | P,
centers = fit,
data = pred,
xlab = "Insticides",
xlab = "Insecticides",
ylab = "Probability of surviving a 24h period",
draw = FALSE,
horizontal = FALSE,
...
...
@@ -253,20 +248,21 @@ segplot(I ~ lwr + upr | P,
layer({
a <- cld[which.max(nchar(cld))]
l <- cld[subscripts]
x <- as.integer(z)[subscripts] + gap(groups[subscripts], gap)
v <- pred$vjust[subscripts]
x <- as.integer(z)[subscripts] + centfac(groups[subscripts], gap)
L <- by(lsm, INDICES = with(grid, interaction(I, P)), FUN = as.matrix)
L <- lapply(L, "rownames<-", levels(egg$H))
cmp <- lapply(L, apmc, model = m0, focus = "H")
cmp <- lapply(L, apmc2, model = m0, focus = "H")
pred <- ldply(cmp)
cmp <- ldply(strsplit(pred$.id, "\\."))
...
...
@@ -320,7 +316,7 @@ comp[[1]] <- pred
# Inseticidas dentro de parasitóide e hospedeiro.
L <- by(lsm, INDICES = with(grid, interaction(H, P)), FUN = as.matrix)
L <- lapply(L, "rownames<-", levels(egg$I))
cmp <- lapply(L, apmc, model = m0, focus = "I", test = "fdr")
cmp <- lapply(L, apmc2, model = m0, focus = "I", test = "fdr")
pred <- ldply(cmp)
cmp <- ldply(strsplit(pred$.id, "\\."))
...
...
@@ -378,11 +374,14 @@ cap <-
"Estimated proportion of of parasitated eggs for each inseticide on two parasiods and two hosts. Segment is a confidence interval for the probability of surviving. Parasitoids estimates followed by the same lower letters in a insetice and host combination are not different at 5%. Inseticides estimates followed by the same lower letters in a parasitoid and host combination are not different at 5%."
cap <- fgn_("opar", cap)
pred$vjust <- -0.5
pred$vjust[pred$cld == "ABCDa"] <- 1.5
# Gráfico de segmentos.
segplot(I ~ lwr + upr | P,
centers = fit,
data = pred,
xlab = "Insticides",
xlab = "Insecticides",
ylab = "Proportion of parasited eggs",
draw = FALSE,
horizontal = FALSE,
...
...
@@ -395,28 +394,24 @@ segplot(I ~ lwr + upr | P,
cld = pred$cld,
panel = panel.groups.segplot,
pch = key$points$pch[as.integer(pred$H)]) +
# layer(panel.text(y = centers[subscripts],
# x = as.integer(z)[subscripts] +
# gap(groups[subscripts], gap),
# labels = round(centers[subscripts], 3),
# pos = 1)) +
layer({
a <- cld[which.max(nchar(cld))]
l <- cld[subscripts]
x <- as.integer(z)[subscripts] + gap(groups[subscripts], gap)
v <- pred$vjust[subscripts]
x <- as.integer(z)[subscripts] + centfac(groups[subscripts], gap)