setBM | R Documentation |
The function setBM
is wrapper around phytools
fastBM
function, which generates BM simulated phenotypes with or
without a trend.
setBM(tree, nY = 1, s2 = 1, a = 0, type = c("", "brown","trend",
"drift"), trend.type = c("linear", "stepwise"),tr = 10, t.shift = 0.5,
es=2, ds=1)
tree |
a phylogenetic tree. |
nY |
the number of phenotypes to simulate. |
s2 |
value of the Brownian rate to use in the simulations. |
a |
the phenotype at the tree root. |
type |
the type of phenotype to simulate. With the option |
trend.type |
two kinds of heteroscedastic residuals are generated under
the |
tr |
the intensity of the trend with the |
t.shift |
the relative time distance from the tree root where the stepwise change in the rate of evolution is indicated to apply. |
es |
when |
ds |
a scalar indicating the change in phenotypic mean in the unit time,
in |
Note that setBM
differs from fastBM
in that the
produced phenotypes are checked for the existence of a temporal trend in
the phenotype. The user may specify whether she wants trendless data
(option "brown"
), phenotypes trending in time (option
"drift"
), or phenotypes whose variance increases/decreases
exponentially over time, consistently with the existence of a trend in the
rate of evolution (option "trend"
). In the latter case, the user may
indicate the intensity of the trend (by applying different values of
es
), and whether it should occur after a given proportion of the
tree height (hence a given point back in time, specified by the argument
t.shift
). Trees in setBM
are treated as non ultrametric. If
an ultrametric tree is fed to the function, setBM
alters slightly
the leaf lengths multiplying randomly half of the leaves by 1 * 10e-3,in
order to make it non-ultrametric.
Either an object of class 'array'
containing a single
phenotype or an object of class 'matrix'
of n phenotypes as
columns, where n is indicated as nY
= n.
Pasquale Raia, Silvia Castiglione, Carmela Serio, Alessandro Mondanaro, Marina Melchionna, Mirko Di Febbraro, Antonio Profico, Francesco Carotenuto
data("DataOrnithodirans")
DataOrnithodirans$treedino->treedino
setBM(tree=treedino, nY= 1, type="brown")
setBM(tree=treedino, nY= 1, type="drift", ds=2)
setBM(tree=treedino, nY= 1, type="trend", trend.type="linear", es=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.