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

Description Usage Arguments Value Author(s) See Also Examples

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

1
2
3
4
5
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 R data file

inits.file

name of R 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)

Value

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

bugs.file

name of .bug file

data.file

name of R data file

inits.file

name of R inits file

monitor.var

which variables to be monitored

call

function call

Author(s)

Peter Baker p.baker1@uq.edu.au

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

1
2
3
4
5
6
7
8
9
## 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)

polySegratioMM documentation built on May 2, 2019, 4:41 p.m.