cov_pca: Perform PCA on data and return list of candidate covariance...

Description Usage Arguments Value Examples

View source: R/data2cov.R

Description

Perform PCA on data and return list of candidate covariance matrices

Usage

1

Arguments

data

a mash data object

npc

the number of PCs to use

subset

indices of the subset of data to use (set to NULL for all data)

Value

Returns a list of covariance matrices: the npc rank-one covariance matrices based on the first npc PCs, and the rank npc covariance matrix

Examples

1
2
data = mash_set_data(Bhat = cbind(c(1,2),c(3,4)), Shat = cbind(c(1,1),c(1,1)))
cov_pca(data,2)

mashr documentation built on May 24, 2021, 1:06 a.m.