
Generate distribution of (index) loadings using the bootstrap and Procrustes rotation.
Source:R/procrustes_loadings.R
procrustes_loadings.Rd
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()
.
Value
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 tomax_pcs
.
Examples
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
)