choosePC: A function to choose principal components

Description Usage Arguments Examples

Description

This function chooses an optimal number of principal components to explain the variance in your data. The amount of variance explained by the principal components is compared to the amount of variance explained by the principle components of a random reshuffing of the columns of the original dataframe.

Usage

1
choosePC(data, perms, plot, seed, center, scale)

Arguments

data

The data on which PCA will be performed

perms

How many permutations to perform on the data, default is 10

plot

Whether or not a plot should be returned comparing the two PCA, default is FALSE

seed

The seed to use for reshuffling dataframe columns, default is 629

center

Whether or not data should be centered prior to PCA, default is TRUE

scale

Whether or not data should be scaled prior to PCA, default is TRUE

Examples

1
choosePC(data = my_df, plot = TRUE, center = TRUE, scale = FALSE)

jr-leary7/jackknife documentation built on April 19, 2021, 2:18 a.m.