mash_update_data: Update the data object for mash analysis.

Description Usage Arguments Value Examples

View source: R/set_data.R

Description

This function can update two parts of the mash data. The first one is setting the reference group, so the mash data can be used for commonbaseline analysis. The other one is updating the null correlation matrix.

Usage

1
mash_update_data(mashdata, ref = NULL, V = NULL)

Arguments

mashdata

mash data object ontaining the Bhat matrix, standard errors, V; created using mash_set_data

ref

the reference group. It could be a number between 1,..., R, R is number of conditions, or the name of reference group. If there is no reference group, it can be the string 'mean'.

V

an R by R matrix / [R x R x J] array of correlation matrix of error correlations

Value

a updated mash data object

Examples

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

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