Set up controls for a JAGS segregation ratio model run
Set up controls for a JAGS segregation ratio model run
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
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 data file
inits.file: name of inits 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)
Returns
Returns an object of class jagsControl which is a list with components - jags.code: Text containing control statements for JAGS
.cmd file
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
dumpDatadumpInits or for an easier way to run a segregation ratio mixture model see runSegratioMM
Examples
## simulate small autooctaploid data seta1 <- sim.autoMarkers(8,c(0.7,0.2,0.1),n.markers=100,n.individuals=50)## set up model with 3 componentsx <- setModel(3,8)x2 <- setPriors(x)jc <- setControl(x)print(jc)