get_posterior_mean.Rd
The synthetic parameter can be pre-calculated using get_posterior_FUN, or provided directly as an array with the first dimension the samples.
get_posterior_mean(X, FUN, bychunk = FALSE, mc.cores = 1, ...)
either an array of posterior samples (either a parameter from Posterior
, or
an object generated by get_posterior_fun), or the MegaLMM_state object with re-loaded Posterior
(optional) if X
is a MegaLMM_state object, the function to calculate the synthetic parameter
(optional) if TRUE
, will re-load each chunk of the Posterior separately
and calculate the posterior mean of FUN
separately for each chunk, and then return
the overall posterior mean. This saves memory because the whole posterior does not need to be
loaded into memory at once. Only necessary terms from Posterior are loaded.
posterior mean matrix