R/get_posterior.R
getPosteriorFit.RdThis 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: mash data object
mashFit: mash fit object
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.