Description Usage Arguments Details Value Author(s) See Also Examples
Runs a MCMCglmm
model to impute delta
1 2 3 |
mulTree.data |
output from |
formula |
an object of class |
random.terms |
Optional. An object of class |
parameters |
a list of three numerical values to be used respectively as: (1) the number of iterations, (2) the sampling value, (3) the burnin. |
priors |
optional list of prior specifications (see details). |
chains |
The number of MCMC for each run ( |
convergence |
limits set for the point estimates of the potential scale
reduction factor (see |
ESS |
effective sample size of MCMC iterations for each model estimate
( |
output |
The name of the output files ( |
save.model |
whether to save the models out of R environment (default) or just get the estimates. |
verbose |
whether to be verbose or not ( |
... |
any optional arguments to be passed to
|
The priors
argument must be of 3 possible elements: R
(R-structure) G (G-structure) and B (fixed effects). B is a list containing
the expected value (mu) and a (co)variance matrix (V) representing the
strength of belief: the defaults are B$mu = 0
and B$V =
I*1e+10
, where where I is an identity matrix of appropriate dimension. The
priors for the variance structures (R and G) are lists with the expected
(co)variances (V) and degree of belief parameter (nu) for the
inverse-Wishart, and also the mean vector (alpha.mu) and covariance matrix
(alpha.V) for the redundant working parameters. The defaults are nu =
0
, V = 1
, alpha.mu = 0
, and alpha.V = 0
. When alpha.V
is non-zero, parameter expanded algorithms are used.
list containing Posterior Distributions of imputed discrimination factors including a posterior distribution for each individual chain in Tef.est and a combined chain in Tef.global.
Kevin Healy
recipeSider
, prepareSider
,
combined_trees
, isotope_data
,
as.mulTree
, mulTree
,
MCMCglmm
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Loading data
data(combined_trees); data(isotope_data)
## Setting up the isotope estimation for one species
taxa_estimate <- recipeSider(species = "Meles_meles", habitat = "terrestrial",
taxonomic.class = "mammalia", tissue = "blood", diet.type = "omnivore",
tree = combined_trees)
## Generating the "mulTree" object for the estimation
taxa_est_mulTree <- prepareSider(data.estimate = taxa_estimate,
data.isotope = isotope_data, tree = combined_trees, isotope = "carbon")
## Setting up the MCMCglmm parameters
MCMC_parameters <- c(1200, 200, 5)
MCMC_formula <- delta13C ~ diet.type + habitat
isotope_estimate <- imputeSider(taxa_est_mulTree, formula = MCMC_formula,
parameters = MCMC_parameters, save.model = FALSE)
## Print out the results
summary(isotope_estimate$tdf_global)
plot(isotope_estimate$tdf_global)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.