R/posterior_common_cov.R
compute_posterior_matrices_common_cov_R.Rd
This is an internal (non-exported) function. This help page provides additional documentation mainly intended for developers and expert users.
compute_posterior_matrices_common_cov_R(
data,
A,
Ulist,
posterior_weights,
output_posterior_cov = FALSE,
posterior_samples = 0,
seed = 123
)
a mash data object, eg as created by
mash_set_data
or mash_set_data_contrast
the linear transformation matrix, Q x R matrix. This is used to compute the posterior for Ab.
a list of P covariance matrices for each mixture component
the JxP posterior probabilities of each mixture component in Ulist for the data
whether or not to output posterior covariance matrices for all effects
the number of samples to be drawn from the posterior distribution of each effect.
a random number seed to use when sampling from the
posteriors. It is used when posterior_samples > 0
.
PosteriorMean JxQ matrix of posterior means
PosteriorSD JxQ matrix of posterior (marginal) standard deviations
NegativeProb JxQ matrix of posterior (marginal) probability of being negative
ZeroProb JxQ matrix of posterior (marginal) probability of being zero
lfsr JxQ matrix of local false sign rates
PosteriorCov QxQxJ array of posterior covariance matrices,
if the output_posterior_cov = TRUE
PosteriorSamples JxQxM array of samples, if the
posterior_samples = M > 0
The computations are performed without allocating an excessive amount of memory.