| runJags | R Documentation |
Runs external program JAGS and returns MCMC list for processing
by coda.
runJags(jags.control, jags = "jags", quiet = FALSE,
cmd.file = paste(jags.control$stem, ".cmd", sep = ""), timing = TRUE)
jags.control |
Object of class |
jags |
Name of |
quiet |
Locial to return program output (Default: FALSE) |
cmd.file |
|
timing |
Logical to return timing information such as date started and ended and elapsed user and system time |
Returns object of class runJAGS with components
jags.control |
Object of class |
exit |
integer indicating return error (0 if no errors) |
cmd.file |
|
start.time |
time JAGS run started |
end.time |
time JAGS run finished |
elapsed.time |
elapsed user and system time |
call |
function call |
Peter Baker drpetebaker@gmail.com
setPriors setInits
expected.segRatio
segRatio
setControl
dumpData dumpInits or for an easier way to
run a segregation ratio mixture model see
runSegratioMM
## simulate small autooctaploid data set
a1 <- sim.autoMarkers(8,c(0.7,0.2,0.1),n.markers=100,n.individuals=50)
sr <- segregationRatios(a1$markers)
## set up model with 3 components
x <- setModel(3,8)
x2 <- setPriors(x)
## Not run:
## write control files for JAGs run
dumpData(sr, x)
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
print(rj)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.