May be used to automatically set up vague or strong priors or
explicitly set them for Bayesian finite mixture model specified as an
object of class modelSegratioMM using
setModel
setPriors(model, type.prior = c("strong", "vague", "strong.tau","strong.s", "specified"),
mean.vague = 0.1, prec.vague = 0.1, A.vague = 0.1, B.vague = 0.1,
prec.strong=400, n.individuals=200, reffect.A = 44, reffect.B = 0.8,
M.sd = 0.025, STRONG.PREC=c(0.025, 0.975), UPPER = 0.995, PREC.INT=0.2,
params = NULL, segRatio = NULL)modelSegratioMM specifying model
parameters, ploidy etctype.prior is strong. Note that on logit scale
default is equivalent to having a 95%CI as +/- 0.1type.prior is strong.type.prior is specified then a list
of priors parameters must be set containing components M for means,
A and B for gamma prior parameters and if the model contains a
random.effect then reffect.A, and reffect.B for the gamma prior for
the precision of random effect taub. Note that the lengths of
M, prec, A and B should be equal to the number of componentspriorsSegratioMM which is a list
with components
BUGS fileFALSE)logit.means, precision on logit scale logit.prec, and
Gamma parameters A and B and finally reffect.A and
reffect.B if the model contains a random effectsetModel setInits
expected.segRatio
segRatio
setControl
dumpData dumpInits or for an easier way to
run a segregation ratio mixture model see
runSegratioMM
## simulate small autooctaploid data set
a1 <- sim.autoMarkers(8,c(0.7,0.2,0.1),n.markers=100,n.individuals=50)
## set up model with 3 components
x <- setModel(3,8)
x2 <- setPriors(x)
print(x2)
x2b <- setPriors(x, "strong")
print(x2b)
Run the code above in your browser using DataLab