Compute dosages under specified Bayesian mixture model
Compute dosages under specified Bayesian mixture model
Computes and returns estimated dosages under specified model using posterior probabilities derived from mcmc chains by the proportion of samples in each dosage class.
jags.control: Object of class jagsControl for setting up JAGS command file
seg.ratio: Object of class segRatio contains the segregation ratios for dominant markers and other information such as the number of dominant markers per individual
chain: Which chain to use when compute dosages (Default: 1)
max.post.prob: Logical for producing dose allocations based on the maximum posterior probability (Default: TRUE)
thresholds: Numeric vector of thresholds for allocating dosages when the posterior probabilty to a particular dosage class is above the threshold
print: Logical indicating whether or not to print intermediate results (Default: FALSE)
print.warning: Logical to print warnings if there is more than one marker with the maximum posterior probability
index.sample: Numeric vector indicating which markers to print if print is TRUE. If index.sample is of length 1 then a random sample of size index.sample is selected
Returns
An object of class dosagesMCMC is returned with components: - p.dosage: Matrix of posterior probabilities of dosages for each marker dosage
dosage: Matrix of allocated dosages based on posterior probabilities. The columns correspond to different 'thresholds' and if requested, the last column is allocated on basis of max.post
thresholds: vector of cutoff probabilities for dosage class
chain: Chain used to compute dosages
max.post: maximum dosage posterior probabilties for each marker
index.sample: Numeric vector indicating which markers to print if print is TRUE. If index.sample is of length 1 then a random sample of size index.sample is selected