simul_process {PhylogeneticEM} | R Documentation |
Simulate a Stochastic Process on a tree
Description
simulate
simulate a stochastic process on a tree.
Usage
simul_process(x, ...)
## S3 method for class 'params_process'
simul_process(
x,
phylo,
simulate_random = TRUE,
checks = TRUE,
U_tree = NULL,
times_shared = NULL,
...
)
## S3 method for class 'PhyloEM'
simul_process(
x,
simulate_random = TRUE,
checks = TRUE,
U_tree = NULL,
times_shared = NULL,
...
)
Arguments
x |
an object of class |
... |
for a |
phylo |
a phylogenetic tree, class |
simulate_random |
set to FALSE if only the expected values are needed (and not the random sample). Default to TRUE. |
checks |
whether to check the entry parameters for consistency. Default to TRUE. |
U_tree |
optional, full incidence matrix of the tree, result of function
|
times_shared |
optional, times of shared ancestry of all nodes and tips,
result of function |
Value
An S3 object of class simul_process
. This contains:
- sim_traits
an array with dimensions p x Nnode x 2 (BM) or p x Nnode x 3 (OU). For each trait t, 1 <= t <= p, sim_traits[t, , ] has tree columns, containing respectively the simulated state, expected value and optimal value for all the nodes.
- phylo
the phylogenetic tree used for the simulations (class
phylo
).- params
the parameters used for the simulations (class
params_proces
).
Methods (by class)
-
simul_process(params_process)
:params_process
object -
simul_process(PhyloEM)
:PhyloEM
object
See Also
params_process
, PhyloEM
, extract.simul_process