data(hspider)
hspider[,1:6] = scale(hspider[,1:6]) # Standardized environmental vars
set.seed(123)
ap1 = cao(cbind(Pardlugu, Pardmont, Pardnigr, Pardpull, Zoraspin) ~
WaterCon + BareSand + FallTwig +
CoveMoss + CoveHerb + ReflLux,
family = poissonff, data = hspider,
df1.nl = c(Zoraspin=2.3, 2.1),
Bestof = 10, Crow1positive = FALSE)
sort(ap1@misc$deviance.Bestof) # A history of all the iterations
Coef(ap1)
par(mfrow=c(2,3)) # All or most of the curves are unimodal; some are
plot(ap1, lcol="blue") # quite symmetric. Hence a CQO model should be ok
par(mfrow=c(1,1), las=1)
index = 1:ncol(ap1@y) # lvplot is jagged because only 28 sites
lvplot(ap1, lcol=index, pcol=index, y=TRUE)
trplot(ap1, label=TRUE, col=index)
abline(a=0, b=1, lty=2)
persp(ap1, label=TRUE, col=1:4)
Run the code above in your browser using DataLab