procrustes_loadings {nzilbb.vowels}R Documentation

Generate distribution of (index) loadings using the bootstrap and Procrustes rotation.

Description

[Experimental] 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().

Usage

procrustes_loadings(pca_data, max_pcs, index = TRUE, n = 500, scale = TRUE)

Arguments

pca_data

data fed to the prcomp function.

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 pca_data should be scaled before PCA (default: TRUE)

Value

a tibble, with columns:

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
   )


[Package nzilbb.vowels version 0.4.1 Index]