R/get_posterior.R
getPosteriorSamples.RdThis is an optional step in an analysis using limorhyde2, and is useful for
quantifying uncertainty in posterior estimates of fitted curves and rhythmic
statistics. The function calls mashr::mash_compute_posterior_matrices().
getPosteriorSamples(fit, nPosteriorSamples = 200L, overwrite = FALSE)
| fit | A `limorhyde2' object containing posterior fits. |
|---|---|
| nPosteriorSamples | Number of samples to draw from each posterior distribution. |
| overwrite | Logical indicating whether to recompute posterior samples if they already exist. |
A limorhyde2 object containing everything in fit with added or
updated element:
mashPosteriorSamples: a three-dimensional array of coefficients, with dim
1 corresponding to features, dim 2 to model terms, and dim 3 to posterior
samples.