estimate_null_correlation_simple: Estimate null correlations (simple)

View source: R/est_cor.R

estimate_null_correlation_simpleR Documentation

Estimate null correlations (simple)

Description

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

Usage

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

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


mashr documentation built on Oct. 18, 2023, 5:08 p.m.