Individuals 3D representation
In this plot the samples are represented as point placed according to their relation to two dimensions among those chosen in the analysis (the ncomp parameter). Such points tends to aggregate together when they are share similarities.
Usage in mixOmics
Individual 3D plots can be obtained in mixOmics via the function plot3DIndiv as displayed below:
## We consider that we have the results of a sPLS computation on liver.toxicity data(liver.toxicity) X <- liver.toxicity$gene Y <- liver.toxicity$clinic result <- spls(X, Y, ncomp = 3, keepX = c(50, 50, 50), keepY = c(10, 10, 10)) ## Same purpose as in 2D plots col <- rep(c("blue", "red", "darkgreen", "darkviolet"), c(16, 16, 16, 16)) pch <- rep(c("c", "s", "t", "o"), c(16, 16, 16, 16)) ## axes.box is responsible for the type of box ("box", "bbox" or "both") plot3dIndiv(result, ind.names = FALSE, col = col, cex = 0.3, pch = pch, axes.box = "box")
You should obtain something like this:
Due to the 3D and its interactivity mixOmics can not display a legend on it as in the 2D plots.