powered by
Perform PCA on data and return list of candidate covariance matrices
cov_pca(data, npc, subset = NULL)
a mash data object
the number of PCs to use
indices of the subset of data to use (set to NULL for all data)
Returns a list of covariance matrices: the npc rank-one covariance matrices based on the first npc PCs, and the rank npc covariance matrix
# NOT RUN { data = mash_set_data(Bhat = cbind(c(1,2),c(3,4)), Shat = cbind(c(1,1),c(1,1))) cov_pca(data,2) # }
Run the code above in your browser using DataLab