View source: R/procrustes_loadings.R
procrustes_loadings | R Documentation |
Generate distribution of loadings or
signed index loadings for Principal Components. These are used in order to
estimate confidence intervals for loadings and, if signed index loadings
are used, also a null distribution for tests of statistical significance.
Plot the results using
plot_procrustes_loadings()
.
procrustes_loadings(pca_data, max_pcs, index = TRUE, n = 500, scale = TRUE)
pca_data |
data fed to the |
max_pcs |
maximum number of PCs to rotate. |
index |
whether to use signed index loadings rather than loadings (default: TRUE) |
n |
the number of bootstrapped and permuted samples. |
scale |
whether the variables in |
a tibble, with columns:
source
either "Sampling", "Null" or "Original", identifying where the
loadings comes from. "Original" identifies loadings from the full dataset,
"Sampling" identifies loadings from the bootstrapped samples, "Null" identifes
loadings from permuted versions of the data.
id
identifies which iteration of either permutation or bootstrapping the
loading comes from.
variable
indicates the variable corresponding to the loading.
a column containing the loading for each PC
up to max_pcs
.
proc_loadings <- procrustes_loadings(
pca_data = onze_intercepts |> dplyr::select(-speaker),
max_pcs = 3,
index = TRUE,
n = 10, # set this to at least 100 in actual use.
scale = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.