diagnosticsJagsMix {polySegratioMM}R Documentation

MCMC diagnostics for polyploid segregation ratio mixture models

Description

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

Usage

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 p.baker1@uq.edu.au

See Also

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

Examples

## 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)

[Package polySegratioMM version 0.5-2 Index]