Description Usage Arguments Value Author(s) References See Also Examples
Estimates the geographical location of ancestors (at branches or, much less likely, at nodes) at any given point in time integrating over a rase
. It first uses tree.slice
to identify the branches that the slice intersects with and then uses MCMC sampling to approximate the posterior distribution of the ancestor locations.
1 2 | rase.slice(tree, slice, res, polygons,
params0 = NA, niter = 1000, logevery = 10, nGQ = 20)
|
tree |
phylogenetic tree of class |
slice |
the time at which to slice. It should be in the same units of the phylogenetic tree. |
res |
output from |
polygons |
list of polygons in |
params0 |
optional. A vector of initial parameter values in the following order: x ancestors for each branch in the order given by |
niter |
number of MCMC iterations. By default |
logevery |
iteration cycle to print current iteration. By default |
nGQ |
degree of the one-dimensional Gauss-Legendre quadrature rule (default = 20) as given by |
returns a matrix where every column represents one parameter. The first columns (i.e., bX_x
; where X = branch 1, ..., branch i) give the ancestral locations for trait x in the order given by tree.slice
, followed by the ancestral locations of trait y (i.e., bX_y
).
Ignacio Quintero Forrest Crawford
Quintero, I., Keil, P., Jetz, W., Crawford, F. W. 2015 Historical Biogeography Using Species Geographical Ranges. Systematic Biology.doi: 10.1093/sysbio/syv057
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #load data
data(rase_data, package = 'rase')
## Not run:
# check the data we are going to use
# examine the mcmc result from rase
# after it has been applied a burnin
# phase and a thinning
str(mcmc)
# the phylogenetic tree used in the rase run
psophia_tree
# the polygons used in the rase run
str(psophia_poly)
# define the slice of time;
# for now, let's say 1 Million
# years ago (Ma)
slice <- 1
# Species names of polygons (in order)
pnames <- c('dextralis', 'viridis', 'leucoptera', 'interjecta',
'obscura', 'crepitans', 'ochroptera', 'napensis')
# name the polygons
psophia_poly <- name.poly(psophia_poly, psophia_tree, poly.names = pnames)
# run rase slice for 100 iterations
slice_results <- rase.slice(psophia_tree, slice = slice, res = mcmc,
psophia_poly, niter = 100)
#check results
str(slice_results)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.