mash_update_data: Update the data object for mash analysis.

View source: R/set_data.R

mash_update_dataR Documentation

Update the data object for mash analysis.

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

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 N] array of correlation matrix of error correlations

Value

a updated mash data object

Examples

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


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