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
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 )
Object of class segRatio
contains the
segregation ratios for dominant markers and other information
such as the number of dominant markers per individual
object of class modelSegratioMM
specifying model
parameters, ploidy etc
object of class priorsSegratioMM
indicating
priors that are “vague”, “strong” or “specified”
A list of initial values usually produced by setInits
Object of class jagsControl
containing MCMC
burn in, sample and thinning as well as relavant files for BUGS
commands, inits and data
size of MCMC burn in (Default: 2000)
size of MCMC sample (default: 5000)
thinning interval between consecutive observations (default: 1 or no thinning)
text to be used as part of JAGS
.cmd file name
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
)
logical for printing monitoring and summary information (default: TRUE)
logical to plotting MCMC posterior distributions (default: TRUE)
logical for printing disagnostic statistics (default: TRUE)
logical for diagnostic plots (default: TRUE)
should diagnostics be run later which may help if there are convergence problems (Default: FALSE)
Returns object of class runJagsWrapper
with components
Object of class segRatio
contains the
segregation ratios for dominant markers
object of class modelSegratioMM
specifying model
parameters, ploidy etc
Object of class priorsSegratioMM
specifying prior
distributions
A list of initial values usually produced by setInits
Object of class jagsControl
containing MCMC
burn in, sample and thinning as well as relavant files for BUGS
commands, inits and data
text to be used as part of JAGS
.cmd file name and
other files
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
)
object of class runJAGS
produced by running JAGS
Object of type segratioMCMC
produced by coda
usually by using readJags
list containing various diagnostic summaries and
statistics produced by coda
summaries of posterior distributions of model parameters
object of class dosagesMCMC
containing
posterior probabilities of dosages for each
marker dosage and allocated dosages
Deviance Information Critereon
setPriors
setInits
expected.segRatio
segRatio
setControl
dumpData
dumpInits
and
diagnosticsJagsMix
# NOT RUN {
## 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)
# }
Run the code above in your browser using DataLab