calc_lik_matrix_common_cov: calc_lik_matrix_common_cov

View source: R/likelihoods_scaleddata.R

calc_lik_matrix_common_covR Documentation

calc_lik_matrix_common_cov

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

calc_lik_matrix_common_cov(data, Ulist, log = FALSE)

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 Oct. 18, 2023, 5:08 p.m.