Compute posterior matrices.
compute_posterior_matrices(
data,
Ulist,
posterior_weights,
algorithm.version = c("Rcpp", "R"),
A = NULL,
output_posterior_cov = FALSE,
mc.cores = 1,
posterior_samples = 0,
seed = 123
)
The return value is a list containing the following components:
J x Q matrix of posterior means.
J x Q matrix of posterior (marginal) standard deviations.
J x Q matrix of posterior (marginal) probability of being negative.
J x Q matrix of posterior (marginal) probability of being zero.
J x Q matrix of local false sign rate estimates.
J x Q matrix of local false discovery rate estimates.
Q x Q x J array of posterior covariance
matrices, if the output_posterior_cov = TRUE
.
M x Q x J array of samples, if the
posterior_samples = M > 0
.
A mash
data object; e.g., created by
mash_set_data
or mash_set_data_contrast
.
List containing the prior covariance matrices.
Vector containing the posterior probability of each mixture component in Ulist for the data.
Indicates whether to use R or Rcpp version.
the linear transformation matrix, Q x R matrix. This is used to compute the posterior for Ab.
whether or not to output posterior covariance matrices for all effects.
The argument supplied to
openmp
specifying the number of cores
to use. Note that this is only has an effect for the Rcpp version.
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
.