if (FALSE) set.seed(1234)
hspider[, 1:6] <- scale(hspider[, 1:6]) # Standardize the X vars
p1 <- cqo(cbind(Alopacce, Alopcune, Alopfabr, Arctlute,
Arctperi, Auloalbi, Pardlugu, Pardmont,
Pardnigr, Pardpull, Trocterr, Zoraspin) ~
WaterCon + BareSand + FallTwig + CoveMoss + CoveHerb + ReflLux,
poissonff, data = hspider, Crow1positive = FALSE, I.toler = TRUE)
sort(deviance(p1, history = TRUE)) # A history of all the iterations
head(predict(p1))
# The following should be all 0s:
max(abs(predict(p1, newdata = head(hspider)) - head(predict(p1))))
max(abs(predict(p1, newdata = head(hspider), type = "res")-head(fitted(p1))))
Run the code above in your browser using DataLab