PCAs4clust | R Documentation |
PCAs4clust runs a two-steps process to prepare the data to be clustered
PCAs4clust(obj2process = NULL, cumul_var_threshold = 0.9, filename = "", ...)
obj2process |
SpatRaster object (or its file name). Each layer is one variable |
cumul_var_threshold |
Numeric. Optional (default = 0.9). Threshold of cumulative variance to select the number of useful PCs |
filename |
Character. Output filename. Optional |
... |
Optional. Arguments for |
Firstly, a Principal Component Analysis ('screening PCA') with all the variables in
'obj2process' is run in order to know the optimal number of variables to be used in a subsequent
PCA, as well as the most associated variable to those Principal Components (PCs). A threshold
of cumulative variance (cumul_var_threshold; default = 0.9) is needed. Secondly, a 'final PCA'
is run with the results of the 'screening PCA' (i.e. number of PC axes and their most associated
variables). PCAs4clust uses prcomp
to run PCAs
SpatRaster object
Xavier Rotllan-Puig
rm_multicol
; prcomp
dirctry <- paste0(system.file(package='LPDynR'), "/extdata")
variables_noCor <- rm_multicol(dir2process = dirctry,
multicol_cutoff = 0.7)
PCAs4clust(obj2process = variables_noCor,
cumul_var_threshold = 0.9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.