jagsAMmv | R Documentation |
Given T traits, I genotypes, Q covariates and N=I*Q phenotypes per trait, fit an "animal model" with the rstan package via the following likelihood: Y = W C + Z G_A + Z G_D + E
, where Y is NxT; W is NxQ; Z is NxI; G_A ~ Normal_IxT(0, A, V_G_A) with A the known matrix of additive genetic relationships; G_D ~ Normal_IxT(0, D, V_G_D) with D the known matrix of dominant genetic relationships; E ~ Normal_NxT(0, Id_N, V_E); Missing phenotypes are jointly imputed with the other unknown variables, and the errors can follow a Student's t distribution to handle outliers.
jagsAMmv(
data,
relmat,
inits = NULL,
nb.chains = 1,
nb.adapt = 10^3,
burnin = 10^2,
nb.iters = 10^3,
thin = 10,
progress.bar = NULL,
rm.jags.file = TRUE,
verbose = 0
)
data |
data.frame containing the data corresponding to relmat; should have columns grep-able for "response" as well as a column "geno.add" used with matrix A; if a column "geno.dom" exists, it will be used with matrix D; any other column will be interpreted as corresponding to "fixed effects" |
relmat |
list containing the matrices of genetic relationships (see |
inits |
list of initial values (possible to use 1 sub-list per chain, see |
nb.chains |
number of independent chains to run (see |
nb.adapt |
number of iterations for adaptation (see |
burnin |
number of initial iterations to discard (see the update function of the rjags package) |
nb.iters |
number of iterations to monitor (see |
thin |
thinning interval for monitored iterations (see |
progress.bar |
type of progress bar (text/gui/none or NULL) |
rm.jags.file |
remove the file specifying the model written in the JAGS-dialect of the BUGS language |
verbose |
verbosity level (0/1) |
Timothee Flutre, inspired by code from Najla Saad Elhezzani (arXiv:1507.08638)
jagsAM
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.