readJags {polySegratioMM} | R Documentation |
Read MCMC sample(s) from a JAGS run
Description
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
Usage
readJags(run.jags, quiet = TRUE, ...)
Arguments
run.jags |
object of class |
quiet |
logical to return program output (Default: TRUE) |
... |
other options for |
Value
Returns object of class segratioMCMC
with components
run.jags |
object of class |
mcmc.list |
object of class |
Author(s)
Peter Baker p.baker1@uq.edu.au
See Also
mcmc.list
setPriors
setInits
expected.segRatio
segRatio
setControl
dumpData
dumpInits
or for an easier way to
run a segregation ratio mixture model see
runSegratioMM
Examples
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")
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)
## Not run:
rj <- runJags(small) ## just run it
xj <- readJags(rj)
print(xj)
## End(Not run)
[Package polySegratioMM version 0.6-4 Index]