View source: R/get_posterior.R
getPosteriorFit | R Documentation |
This is the second step in an analysis using limorhyde2
, the first is to
fit linear models using getModelFit()
. This function obtains posterior
estimates of coefficients using multivariate adaptive shrinkage (mash), which
learns patterns in the data and accounts for noise in the original fits. The
defaults for arguments should work well in most cases, so only change them if
you know what you're doing.
getPosteriorFit(
fit,
covMethod = c("data-driven", "canonical", "both"),
getSigResArgs = list(),
npc = fit$nKnots,
covEdArgs = list(),
overwrite = FALSE,
...
)
fit |
A |
covMethod |
String indicating the type(s) of covariance matrices to use for the mash fit. |
getSigResArgs |
List of arguments passed to
|
npc |
Number of principal components passed to |
covEdArgs |
List of arguments passed to |
overwrite |
Logical for whether to recompute the mash fit if it already exists. |
... |
Additional arguments passed to |
A limorhyde2
object containing everything in fit
with added or
updated elements:
mashData
: list of mash
data objects
mashFits
: list of mash
fit objects
mashCoefficients
: Matrix of posterior mean coefficients, with rows
corresponding to features and columns to model terms.
mashIdx
: Vector indicating which model terms were included in the mash
fit.
getModelFit()
, getRhythmStats()
, getExpectedMeas()
library('data.table')
# rhythmicity in one condition
y = GSE54650$y
metadata = GSE54650$metadata
fit = getModelFit(y, metadata)
fit = getPosteriorFit(fit)
rhyStats = getRhythmStats(fit, features = c('13170', '13869'))
# rhythmicity and differential rhythmicity in multiple conditions
y = GSE34018$y
metadata = GSE34018$metadata
fit = getModelFit(y, metadata, nKnots = 3L, condColname = 'cond')
fit = getPosteriorFit(fit)
rhyStats = getRhythmStats(fit, features = c('13170', '12686'))
diffRhyStats = getDiffRhythmStats(fit, rhyStats)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.