| readJags | R Documentation |
wrapper to read.openbugs which
returns object of class mcmc.list and so can be used to
specify the start and end iterations for the MCMC sample(s) and also
specify thinning
readJags(run.jags, quiet = TRUE, ...)
run.jags |
object of class |
quiet |
logical to return program output (Default: TRUE) |
... |
other options for |
Returns object of class segratioMCMC with components
run.jags |
object of class |
mcmc.list |
object of class |
Peter Baker drpetebaker@gmail.com
mcmc.list setPriors
setInits
expected.segRatio
segRatio
setControl
dumpData dumpInits or for an easier way to
run a segregation ratio mixture model see
runSegratioMM
library(polySegratio)
## simulate small autooctaploid data set
a1 <- sim.autoMarkers(8,c(0.7,0.2,0.1),n.markers=100,n.individuals=50)
##print(a1)
sr <- segregationRatios(a1$markers)
x <- setModel(3,8)
x2 <- setPriors(x)
cat(x$bugs.code,x2$bugs.code,sep="\n")
x3 <- setModel(3,8, random.effect = TRUE)
x4 <- setPriors(x3, type="strong")
## Not run:
## write control files for JAGs run
dumpData(sr, x3)
inits <- setInits(x,x2)
dumpInits(inits)
##x.priors <- setPriors(x, "vague")
writeJagsFile(x, x2, stem="test")
small <- setControl(x, burn.in=20, sample=50)
writeControlFile(small)
rj <- runJags(small) ## just run it
xj <- readJags(rj)
print(xj)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.