MegaLMM_priors.Rd
Function to create list of priors for MegaLMM model.
MegaLMM_priors(
tot_Y_var = list(V = 0.5, nu = 3),
tot_F_var = list(V = 18/20, nu = 20),
h2_priors_resids_fun = function(h2s, n) 1,
h2_priors_factors_fun = function(h2s, n) 1,
Lambda_prior = list(sampler = sample_Lambda_prec_horseshoe, prop_0 = 0.1, delta_l =
list(shape = 3, rate = 1), delta_iterations_factor = 100),
B2_prior = list(sampler = sample_B2_prec_horseshoe, prop_0 = 0.1),
cis_effects_prior = list(prec = 1)
)
List of parameters of inverse gamma distribution for residual variances, specifically:
V
and nu
, give shape = nu-1
and scale = 1/(nu*V)
, so mean = ~V
List of parameters of inverse gamma distribution for factor variances. See tot_Y_var
.
This parameter provides the parameter extension of Ghosh and Dunson (2009), but is removed
from all Factor parameters before they are saved in Posterior
function that returns prior probability for a given vector of variance component proportions for each random effect
The function must take two arguments - a vector of variance component proportions: h2
,
and n
- the number of discrete levels of the prior.
Alternatively, can be a scalar or vector of (relative) prior values for each value of the
discrete prior.
see h2_priors_resids_fun
. Same, but for the h2s of the factors.
A list with elements:
1) sampler
: a function that draws samples of the precision matrix for Lambda. Ex: sample_Lambda_prec_reg_horseshoe
; 2)
any other hyperparameters and control parameters for sampler
Currently accepts a list with a single value giving the precision of each cis_effect variable
A list with elements:
1) sampler
: a function that draws samples of the precision matrix for B and B_F Ex: sample_B2_prec_reg_horseshoe
; 2)
any other hyperparameters and control parameters for sampler
a list with each of the prior components specified above.
Default values are provided, but any can be replaced. Note: h2_priors_resids
and
h2_priors_factors
can be set after calling MegaLMM_init
and before sample_MegaLMM
if that is easier. See Vignette.