setPriors: Set the values of the parameters for the priors

View source: R/setPriors.R

setPriorsR Documentation

Set the values of the parameters for the priors

Description

Set the values of the parameters for the priors

Usage

setPriors(
  x,
  alphaMu = 0,
  alphaSigma = 1,
  betaMu = -2,
  betaSigma = 1.8,
  gammaMu = 0,
  gammaSigma = 0.5,
  uSigma = 0.5,
  pSigma = 1000,
  cor = 0
)

Arguments

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

Note

This function directly affects a C++ object and therefore DOES NOT return anything.

See Also

getPriors

Examples

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)

jmcurran/rbayesfst documentation built on June 4, 2022, 9:57 a.m.