permutation_test {nzilbb.vowels}R Documentation

Run permutation test on PCA analysis.

Description

[Superseded] Permute data fed to PCA a given number of times, collecting the number of significant pairwise correlations in the permuted data and the variances explained for a given number of PCs.

Usage

permutation_test(
  pca_data,
  pc_n = 5,
  n = 100,
  scale = TRUE,
  cor.method = "pearson"
)

Arguments

pca_data

data fed to the prcomp function. Remove non-continuous variables.

pc_n

the number of PCs to collect variance explained from.

n

the number of times to permute that data. Warning: high values will take a long time to compute.

scale

whether the PCA variables should be scaled (default = TRUE).

cor.method

method to use for correlations (default = "pearson"). Alternative is "spearman".

Details

This function is now superseded. Use correlation_test() for pairwise correlations and pca_test() for variance explained and loadings.

Value

object of class permutation_test

Examples

permutation_test(
  onze_intercepts |> dplyr::select(-speaker),
  pc_n = 5,
  n = 10,
  scale = TRUE,
  cor.method = 'pearson'
 )


[Package nzilbb.vowels version 0.3.1 Index]