calc_lik_matrix_common_cov: calc_lik_matrix_common_cov

Description Usage Arguments Details Value

View source: R/likelihoods_scaleddata.R

Description

computes matrix of likelihoods for each of J rows of Bhat for each of P prior covariances; special case when standard errors and variances are all same across j.

This is an internal (non-exported) function. This help page provides additional documentation mainly intended for developers and expert users.

Usage

1

Arguments

data

a mash data object, eg as created by mash_set_data

Ulist

list of prior covariance matrices

log

if true computes log-likelihood

Details

Compared with calc_lik_matrix this function exploits fact that observations are iid in this case, so the inverse covariance matrices only need to be done once, reducing computation to R^3 + JR^2 instead of JR^3

Value

J x P vector of multivariate normal likelihoods, p(bhat | Ulist[p], V), where V is same for each bhat


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