findPC | R Documentation |
Automatic selection of number of principal components
findPC( sdev, number = 30, method = "perpendicular line", aggregate = NULL, figure = FALSE )
sdev |
A vector of the standard deviations explained by each principal component |
number |
A vector including number of PCs used in the function (default is 30) |
method |
Methods include 'all', 'piecewise linear model', 'first derivative', 'second derivative', 'preceding residual', 'perpendicular line (default)', 'k-means clustering' |
aggregate |
An option to report the mean, median, or voting (median if all are different, otherwise mode) of the results |
figure |
Whether to draw a heatmap showing the results |
findPC returns a list of results for one or multiple methods with different total numbers of PCs. It also supports the aggregation of results from multiple methods and total numbers of PCs by taking the average, median, or mode. For users who want to visually inspect the results, findPC can also display the elbow plot with the automatically identified elbow points.
A numeric value (matrix) including the number of PCs.
Haotian Zhuang, Zhicheng Ji haotian.zhuang@duke.edu
Return the default result (Perpendicular line with 30 PCs) findPC(sdev = sdev) Return the results based on Piecewise linear model with 24,36 and 48 PCs findPC(sdev = sdev,number = c(24,36,48),method = 'piecewise linear model') Return the results based on six methods with 24,36 and 48 PCs findPC(sdev = sdev,number = c(24,36,48),method = 'all') Return voting (median if all are different, otherwise mode) of the results from six methods with 24,36 and 48 PCs findPC(sdev = sdev,number = c(24,36,48),method = 'all',aggregate = 'voting') Return a heatmap based on six methods with 24,36 and 48 PCs findPC(sdev = sdev,number = c(24,36,48),method = 'all',figure = T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.