makeVariance: makeVariance: Create variances for the components in data...

Description Usage Arguments Value Examples

View source: R/makeData.R

Description

A function that creates realistic variances for J components. The variances of the first Q components are set by the user, the remaining J - Q variances are decreasing on a reversed log scale.

Usage

1
makeVariance(varianceOfComps, J, error)

Arguments

J

The total number of components (the number of variables)

error

The total variance of J-Q components compared to the variance of the Q components

varianceOfcomp

The variances of the first Q components of interest

Value

A vector with J variances (eigenvalues) to simulate data from.

Examples

1
2
variances <- makeVariance(c(120, 100, 80), J = 50, error = 0.05) 
plot(variances) #realistic eigenvalues of a data matrix X

trbKnl/sparseWeightBasedPCA documentation built on July 22, 2020, 10:29 p.m.