Learn R Programming

polySegratioMM (version 0.6-2)

setControl: Set up controls for a JAGS segregation ratio model run

Description

Sets up directives for running JAGS which are subsequently put into a .cmd file. MCMC attributes such as the size of burn in, length of MCMC and thinning may be specified

Usage

setControl(model, stem = "test", burn.in = 2000, sample = 5000, thin = 1,
 bugs.file = paste(stem, ".bug", sep = ""),
 data.file = paste(stem, "-data.R", sep = ""),
 inits.file = paste(stem, "-inits.R", sep = ""),
 monitor.var = model$monitor.var, seed=1)

Arguments

model
object of class modelSegratioMM specifying model parameters, ploidy etc
stem
text to be used as part of JAGS .cmd file name
burn.in
size of MCMC burn in (Default: 2000)
sample
size of MCMC sample (default: 5000)
thin
thinning interval between consecutive observations. Thinning may be a scalar or specified for each variable set by specifying a vector (default: 1 or no thinning)
bugs.file
name of .bug file
data.file
name of Rdata file
inits.file
name of Rinits file
monitor.var
which variables to be monitored (Default: as per model)
seed
seed for JAGS run for Windows only (for unix set seed in setInits)

Value

  • Returns an object of class jagsControl which is a list with components
  • jags.codeText containing control statements for JAGS .cmd file
  • modelobject of class modelSegratioMM specifying model parameters, ploidy etc
  • stemtext to be used as part of JAGS .cmd file name
  • burn.insize of MCMC burn in (Default: 2000)
  • samplesize of MCMC sample (default: 5000)
  • thinthinning interval between consecutive observations
  • bugs.filename of .bug file
  • data.filename of Rdata file
  • inits.filename of Rinits file
  • monitor.varwhich variables to be monitored
  • callfunction call

concept

  • segregation ratio
  • dominant marker
  • autopolyploid

See Also

setModel setInits expected.segRatio segRatio setControl dumpData dumpInits or for an easier way to run a segregation ratio mixture model see runSegratioMM

Examples

Run this code
## simulate small autooctaploid data set
a1 <- sim.autoMarkers(8,c(0.7,0.2,0.1),n.markers=100,n.individuals=50)

## set up model with 3 components
x <- setModel(3,8)
x2 <- setPriors(x)

jc <- setControl(x)
print(jc)

Run the code above in your browser using DataLab