setRunParams: Set the parameters for the MCMC run

View source: R/setRunParams.R

setRunParamsR Documentation

Set the parameters for the MCMC run

Description

Set the parameters for the MCMC run

Usage

setRunParams(
  x,
  numOut = 2001,
  keepPpn = 0.2,
  discardPpn = 0.05,
  acceptPpn = 0.02,
  print = FALSE
)

Arguments

x

an object of class bayesFst

numOut

the desired numbers of samples to be taken from the posterior

keepPpn

π_k a thinning proportion used to calculate the interval between successive outputs k = π_k(n_P+n_L) where n_P is the number of populations and n_L is the number of loci. This number is in turn used to calculate the number of interations after burn-in n_{iter}=k\times n_out

discardPpn

π_{discard} the proportion of iterations to be used as burn-in used to calculate d = n_{iter}π_d. The total number of iterations is d+n_{iter}

acceptPpn

π_a used to calculate the gap between output of acceptance rates a = π_a(d+n_iter)

print

controls the output of something but I forget what at this point

Note

This function sets values in a C++ object. As a consequence it DOES NOT need to be re-assigned.

Examples

bd = readData(system.file("extdata", "data_BB04.json", package = "rbayesfst"))
bf = init(bd)
## set things up for a short test run
setRunParams(bf, numOut = 20)

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