Run a Bayesian mixture model for marker dosage with minimal effort
Run a Bayesian mixture model for marker dosage with minimal effort
Given segregation ratios and a ploidy level, a mixture model is constructed with default priors and initial values and JAGS run to produce an MCMC sample for statistical inference. Returns an object of S3 class runJagsWrapper
contains the segregation ratios for dominant markers and other information such as the number of dominant markers per individual
model: object of class modelSegratioMM specifying model parameters, ploidy etc
priors: object of class priorsSegratioMM indicating priors that are vague , strong or specified
inits: A list of initial values usually produced by setInits
jags.control: Object of class jagsControl containing MCMC burn in, sample and thinning as well as relavant files for BUGS commands, inits and data
burn.in: size of MCMC burn in (Default: 2000)
sample: size of MCMC sample (default: 5000)
thin: thinning interval between consecutive observations (default: 1 or no thinning)
stem: text to be used as part of JAGS .cmd file name
fix.one: Logical to fix the dosage of the observation closest to the centre of each component on the logit scale. This can greatly assist with convergence (Default: TRUE)
print: logical for printing monitoring and summary information (default: TRUE)
plots: logical to plotting MCMC posterior distributions (default: TRUE)
print.diagnostics: logical for printing disagnostic statistics (default: TRUE)
plot.diagnostics: logical for diagnostic plots (default: TRUE)
run.diagnostics.later: should diagnostics be run later which may help if there are convergence problems (Default: FALSE)
Returns
Returns object of class runJagsWrapper with components - seg.ratios: Object of class segRatio
contains the segregation ratios for dominant markers
model: object of class modelSegratioMM specifying model parameters, ploidy etc
priors: Object of class priorsSegratioMM specifying prior distributions
inits: A list of initial values usually produced by setInits
jags.control: Object of class jagsControl containing MCMC burn in, sample and thinning as well as relavant files for BUGS commands, inits and data
stem: text to be used as part of JAGS .cmd file name and other files
fix.one: Logical to fix the dosage of the observation closest to the centre of each component on the logit scale. This can greatly assist with convergence (Default: TRUE)
run.jags: object of class runJAGS produced by running JAGS
mcmc.mixture: Object of type segratioMCMC
produced by coda usually by using readJags
diagnostics: list containing various diagnostic summaries and statistics produced by coda
summary: summaries of posterior distributions of model parameters
doses: object of class dosagesMCMC containing posterior probabilities of dosages for each marker dosage and allocated dosages
## simulate small autooctaploid data seta1 <- 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 hitx.run <- runSegratioMM(sr, x, burn.in=200, sample=500)print(x.run)## End(Not run)