setPriors: Set prior distributions for parameters of Bayesian mixture...

Description Usage Arguments Value Author(s) See Also Examples

Description

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

Usage

1
2
3
4
5
6
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)

Arguments

model

object of class modelSegratioMM specifying model parameters, ploidy etc

type.prior

The type of prior required being one of “strong”, “vague”, “strong.tau” “strong.s” or “specified”. The first four prior types will automatically set prior distributions whereas for the last, namely “specified”, the prior distribution parameters must be set explicitly. Note that strong priors get progressively stronger from “strong” to “strong.s”

mean.vague

The mean of Normal priors for a “vague” prior

prec.vague

The precision of Normal priors for a “vague” prior

A.vague

The shape parameter of the Gamma prior for the precision parameters for a “vague” prior

B.vague

The rate (scale) parameter of the Gamma prior for the precision parameters for a “vague” prior

prec.strong

Precision for Normal mean parameters when type.prior is “strong”. Note that on logit scale default is equivalent to having a 95%CI as +/- 0.1

n.individuals

Used for Binomial calculations to set prior precision parameters when type.prior is “strong”.

reffect.A

The shape parameter of the Gamma prior for the precision parameter of the random.effect for a “vague” prior

reffect.B

The rate (scale) parameter of the Gamma prior for the precision parameter of the random.effect for a “vague” prior

M.sd

Approximate standard deviation for the mean segregation ratios on raw probability scale - this is set to 0.025 which would give an approximate 95% interval of 0.1 for the segregation ratio

UPPER

Cutoff for guessing parameters on logit scale noting that logit(1) is undefined

STRONG.PREC

Interval on raw probabilty scale used to set strong priors on the the precision distribution parameters of the segregation ratios by using a 95% interval on the theoretical distribution and equating this on the logit scale (Default: c(0.025, 0.975))

PREC.INT

Multiplier or setting prior for precision on logit scale corresponding to approx confidence region being precision*(1 - PREC.INT, 1 + PREC.INT) Default:0.2

params

if 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 components

segRatio

If specified, this value overides the automatically generated value which is set as the expected segregation ratio given the ploidy level

Value

Returns an object of class priorsSegratioMM which is a list with components

type

Type of prior: one of “vague”, “strong” or “specified”

bugs.code

Text containing prior statements for BUGS file

random.effect

Logical indicating whether model contains random effect (Default: FALSE)

equal.variances

Logical indicating equal or separate variances for each component

params

List containing Normal means on logit scale 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 effect

call

function call

Author(s)

Peter Baker p.baker1@uq.edu.au

See Also

setModel setInits expected.segRatio segRatio setControl dumpData dumpInits or for an easier way to run a segregation ratio mixture model see runSegratioMM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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)

polySegratioMM documentation built on May 2, 2019, 9:49 a.m.