# NOT RUN {
summary(hspider)
# }
# NOT RUN {
# Standardize the environmental variables:
hspider[, 1:6] <- scale(subset(hspider, select = WaterCon:ReflLux))
# Fit a rank-1 binomial CAO
hsbin <- hspider # Binary species data
hsbin[, -(1:6)] <- as.numeric(hsbin[, -(1:6)] > 0)
set.seed(123)
ahsb1 <- cao(cbind(Alopcune, Arctlute, Auloalbi, Zoraspin) ~
WaterCon + ReflLux,
family = binomialff(multiple.responses = TRUE),
df1.nl = 2.2, Bestof = 3, data = hsbin)
par(mfrow = 2:1, las = 1)
lvplot(ahsb1, type = "predictors", llwd=2, ylab="logitlink(p)", lcol=1:9)
persp(ahsb1, rug = TRUE, col = 1:10, lwd = 2)
coef(ahsb1)
# }
Run the code above in your browser using DataLab