Description Usage Arguments Value Examples
Posterior samples and Bayes Factors using the TIMBR model
1 2 3 4 5 6 7 8 9 10 11 12 13 |
y |
vector of phenotype values for each strain |
prior.D |
list of inputs for the prior distribution of strain diplotype states; see data(mcv.data) for an example |
prior.M |
list of inputs for the prior distribution of the allelic series model; see data(mcv.data) for examples |
prior.phi.v |
degrees of freedom for the half-t prior distribution on the variance component |
samples |
number of samples to draw from the full posterior |
Z |
design matrix for intercept and covariates; first column must be a vector of ones, which is the default |
W |
vector of replicates for each strain; one replicate per strain by default |
calc.lnBF |
option to calculate the lnBF, which is often computationally demanding |
samples.ml |
number of samples to draw from the conditional posterior (if necessary) when calc.lnBF=T |
verbose |
optionally report function progress |
stop.on.error |
stop function if error is encountered when using 'integrate'. errors related to roundoff and small values may occur during edge cases |
a list of input parameters, posterior samples and marginal densities, and the marginal likelihood
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #example data
data(mcv.data)
str(mcv.data)
#call TIMBR using CRP
results <- TIMBR(mcv.data$y, mcv.data$prior.D, mcv.data$prior.M$crp)
#report the Bayes Factor
results$ln.BF
#report posterior probabilities for the top allelic series models
head(results$p.M.given.y)
#report mean posterior haplotype effects
colMeans(results$post.hap.effects)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.