pcatune(X, ncomp = NULL, center = TRUE, scale. = FALSE, max.iter = 500, tol = 1e-09)NULL,
function sets ncomp = min(nrow(X),ncol(X))X can be supplied.
The value is passed to sprcomp
function, but in general scaling is advisable. Alternativelypcatune returns a list with class "pcatune" containing the following components:princomp, the print method for these objects prints the results in a nice format and the
plot method produces a bar plot of the percentage of variance explained by the principal
components (PCs).
Wehn using NIPALS (missing values), we make the assumption that the first (min(ncol(X),nrow(X))principal components will account for
100 % of the explained variance.
Note that scale. = TRUE cannot be used if there are zero or constant (for center = TRUE) variables.nipals, biplot,
plotIndiv, plotVar,
plot3dIndiv, plot3dVar.data(liver.toxicity)
tune <- pcatune(liver.toxicity$gene, center=TRUE, scale.=TRUE)Run the code above in your browser using DataLab