posterior_mean_matrix: posterior_mean_matrix

View source: R/posterior.R

posterior_mean_matrixR Documentation

posterior_mean_matrix

Description

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

Usage

posterior_mean_matrix(Bhat, Vinv, U1)

Arguments

Bhat

J by R matrix of observations

Vinv

R x R inverse covariance matrix for the likelihood

U1

R x R posterior covariance matrix, computed using posterior_cov

Details

Computes posterior mean under multivariate normal model for each row of matrix Bhat. Note that if bhat is N_R(b,V) and b is N_R(0,U) then b|bhat N_R(mu1,U1). This function returns a matrix with jth row equal to mu1(bhat) for bhat= Bhat[j,].

Value

R vector of posterior mean


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