View source: R/get_posterior.R
getPosteriorSamples | R Documentation |
This 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.
getPosteriorFit()
, getRhythmStats()
, getExpectedMeas()
,
getStatsIntervals()
library('data.table')
y = GSE54650$y
metadata = GSE54650$metadata
fit = getModelFit(y, metadata)
fit = getPosteriorFit(fit)
fit = getPosteriorSamples(fit, nPosteriorSamples = 10L)
rhyStatsSamps = getRhythmStats(
fit, features = c('13170', '13869'), fitType = 'posterior_samples')
rhyStatsInts = getStatsIntervals(rhyStatsSamps)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.