# NOT RUN {
## predictive CoCA
data(beetles)
data(plants)
## log transform the beetle data
beetles <- log(beetles + 1)
## predictive CoCA using SIMPLS and formula interface
bp.pred <- coca(beetles ~ ., data = plants)
## draw the plot for the response scores
plot(bp.pred)
## plot of both
layout(matrix(1:2, ncol = 2))
plot(bp.pred, which = "response", main = "Beetles")
plot(bp.pred, which = "predictor", main = "Plants")
layout(1)
# }
Run the code above in your browser using DataLab