estimate_null_correlation_simple: Estimate null correlations (simple)

Description Usage Arguments Details Examples

View source: R/est_cor.R

Description

Estimates a null correlation matrix from data using simple z score threshold

Usage

1
estimate_null_correlation_simple(data, z_thresh = 2, est_cor = TRUE)

Arguments

data

a mash data object, eg as created by mash_set_data

z_thresh

the z score threshold below which to call an effect null

est_cor

whether to estimate correlation matrix (TRUE) or the covariance matrix (FALSE).

Details

Returns a simple estimate of the correlation matrix (or covariance matrix) among conditions under the null. Specifically, the simple estimate is the empirical correlation (or covariance) matrix of the z scores for those effects that have (absolute) z score < z_thresh in all conditions.

Examples

1
2
3
simdata = simple_sims(50,5,1)
data = mash_set_data(simdata$Bhat, simdata$Shat)
estimate_null_correlation_simple(data)

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