set.seed(0)
# Sample eigenvalues of a covariance matrix of a 10 sample study with 1000 variables such that
# the top two (underlying true distribution of the data, not sample) principal components
# have SDs of 100 and 10 and the remaining 98 have 1
sample_spiked_wishart(
spiked_sd = c(500, 100),
num_variables = 1000,
num_observations = 10-1,
num_eigs = 3
)
Run the code above in your browser using DataLab