## symmetric CoCA
data(beetles)
data(plants)
## log transform the beetle data
beetles <- log(beetles + 1)
## fit the model
bp.sym <- coca(beetles ~ ., data = plants, method = "symmetric")
## draw a plot of the response scores
plot(bp.sym)
## plot of both
layout(matrix(1:2, ncol = 2))
plot(bp.sym, which = "response", main = "Beetles")
plot(bp.sym, which = "predictor", main = "Plants")
layout(1)
Run the code above in your browser using DataLab