setPriors | R Documentation |
Set the values of the parameters for the priors
setPriors( x, alphaMu = 0, alphaSigma = 1, betaMu = -2, betaSigma = 1.8, gammaMu = 0, gammaSigma = 0.5, uSigma = 0.5, pSigma = 1000, cor = 0 )
x |
an object of type bayesFst |
alphaMu |
(expected) mean of Normal distribution for prior of the locus effect alpha[i] |
alphaSigma |
(expected) mean of Normal distribution for prior of locus effect alpha[i] |
betaMu |
mean of Normal distribution for prior of the population effect beta[j] |
betaSigma |
sd of Normal distribution for prior of the population effect beta[j] |
gammaMu |
mean of Normal distribution for prior of the locus x population interaction effect gamma[i,j] |
gammaSigma |
sd of Normal distribution for prior the locus x population interaction effect of gamma[i,j] |
uSigma |
scale param for Normal updates |
pSigma |
scale param for Dirichlet updates of the allele frequencies p[i,j] |
cor |
The correlation parameter (fixed) between adjacent loci |
This function directly affects a C++ object and therefore DOES NOT return anything.
getPriors
bd = readData(system.file("extdata", "data_BB04.json", package = "rbayesfst")) bf = init(bd) print(bf) ## change the alpha mean only setPriors(bf, alphaMu = 1) ## note how the mean has changed even though there is no reassignment print(bf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.