diagnosticsJagsMix: MCMC diagnostics for polyploid segregation ratio mixture...

Description Usage Arguments Value Author(s) See Also Examples

Description

Produce and/or plot various diagnostic measures from coda package for Bayesian mixture models for assessing marker dosage in autopolyploids

Usage

1
2
3
4
5
6
diagnosticsJagsMix(mcmc.mixture, diagnostics = TRUE, plots = FALSE,
 index = -c( grep("T\\[",varnames(mcmc.mixture$mcmc.list)),
             grep("b\\[",varnames(mcmc.mixture$mcmc.list)) ),
 trace.plots = FALSE, auto.corrs = FALSE, density.plots = FALSE,
 xy.plots = FALSE, hpd.intervals = FALSE, hdp.prob = 0.95,
 return.results = FALSE)

Arguments

mcmc.mixture

Object of class segratioMCMC or runJagsWrapper after JAGS run produced by coda

diagnostics

if TRUE then print several coda dignostic tests

plots

if TRUE then produce several coda dignostic plots

index

index of parameters for disgnostic tests/plots (Default: mixture model (and random effects) parameters)

trace.plots

if TRUE plot mcmc traces (default: FALSE)

auto.corrs

if TRUE produce autocorrelations of mcmc's (default: FALSE)

density.plots

if TRUE plot parameter densities (default: FALSE)

xy.plots

if TRUE plot traces using 'lattice' (default: FALSE)

hpd.intervals

if TRUE print and return highest posterior density intervals for parameters specified by index

hdp.prob

probability for hpd.intervals

return.results

if TRUE return results as list

Value

If return.results is TRUE then a list is returned with components depending on various settings of arguments

Author(s)

Peter Baker [email protected]

See Also

mcmc autocorr.diag raftery.diag geweke.diag gelman.diag trellisplots

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## 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)

## Not run: 
## fit simple model in one hit

x.run <- runSegratioMM(sr, x, burn.in=200, sample=500)
print(x.run)
diagnosticsJagsMix(x.run)
diagnosticsJagsMix(x.run, plot=TRUE)

## End(Not run)

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