charadriiformes | R Documentation |
An example of a MCMCglmm
model.
one data.frame
, one phylo
and one MCMCglmm
.
This dataset is based on a random subset of 359 Charadriiformes (gulls, plovers and sandpipers) from Cooney et al 2017 and trees from Jetz et al 2012. It contains:
data
A "data.frame"
.
tree
A consensus tree of 359 charadriiformes species ("phylo"
).
posteriors
The posteriors from a "MCMCglmm"
model (see example below).
tree_distribution
A random distribution of 10 trees of the 359 charadriiformes species ("multiPhylo"
).
Cooney CR, Bright JA, Capp EJ, Chira AM,Hughes EC, Moody CJ, Nouri LO, Varley ZK, Thomas GH. Mega-evolutionary dynamics of the adaptive radiation of birds. Nature. 2017 Feb;542(7641):344-7.
Jetz W, Thomas GH, Joy JB, Hartmann K, Mooers AO. The global diversity of birds in space and time. Nature. 2012 Nov;491(7424):444-8.
## Not run: ## Reproducing the MCMCglmm model require(MCMCglmm) data(charadriiformes) ## Setting up the model parameters: ## 1 - The formula (the first three PC axes) model_formula <- cbind(PC1, PC2, PC3) ~ trait:clade-1 ## 2 - The residual term model_residuals <- ~us(trait):units ## 3 - The random terms ## (one per clade and one for the whole phylogeny) model_randoms <- ~ us(at.level(clade,1):trait):animal + us(at.level(clade,2):trait):animal + us(at.level(clade,3):trait):animal + us(trait):animal ## Flat priors for the residuals and random terms flat_priors <- list( ## The residuals priors R = list( R1 = list(V = diag(3), nu = 0.002)), ## The random priors (the phylogenetic terms) G = list( G1 = list(V = diag(3), nu = 0.002), G2 = list(V = diag(3), nu = 0.002), G3 = list(V = diag(3), nu = 0.002), G4 = list(V = diag(3), nu = 0.002))) ## Run the model for 110000 iterations ## sampled every 100 with a burnin (discard) ## of the first 10000 iterations) model <- MCMCglmm(formula = model_formula, rcov = model_residual, random = model_randoms, family = rep("gaussian", 3), prior = flat_priors, nitt = 110000, burnin = 10000, thin = 100, pedigree = charadriiformes$tree, data = charadriiformes$data) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.