runSegratioMM {polySegratioMM} | R Documentation |
Run a Bayesian mixture model for marker dosage with minimal effort
Description
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
Usage
runSegratioMM(seg.ratios, model, priors = setPriors(model),
inits = setInits(model, priors), jags.control =
setControl(model, stem, burn.in = burn.in, sample = sample, thin = thin),
burn.in = 2000, sample = 5000, thin = 1, stem = "test", fix.one = TRUE,
print = TRUE, plots = TRUE, print.diagnostics = TRUE,
plot.diagnostics = TRUE, run.diagnostics.later=FALSE )
Arguments
seg.ratios |
Object of class |
model |
object of class |
priors |
object of class |
inits |
A list of initial values usually produced by |
jags.control |
Object of class |
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 |
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: |
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) |
Value
Returns object of class runJagsWrapper
with components
seg.ratios |
Object of class |
model |
object of class |
priors |
Object of class |
inits |
A list of initial values usually produced by |
jags.control |
Object of class |
stem |
text to be used as part of |
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: |
run.jags |
object of class |
mcmc.mixture |
Object of type |
diagnostics |
list containing various diagnostic summaries and
statistics produced by |
summary |
summaries of posterior distributions of model parameters |
doses |
object of class |
DIC |
Deviance Information Critereon |
Author(s)
Peter Baker p.baker1@uq.edu.au
See Also
setPriors
setInits
expected.segRatio
segRatio
setControl
dumpData
dumpInits
and
diagnosticsJagsMix
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)
## End(Not run)