make.bd.params {treats} | R Documentation |
Make birth death parameters
Description
Making bd.params objects for treats.
Usage
make.bd.params(
speciation = NULL,
extinction = NULL,
joint = NULL,
absolute = NULL,
speciation.args = NULL,
extinction.args = NULL,
test = TRUE,
update = NULL
)
Arguments
speciation |
The speciation parameter. Can be a single |
extinction |
The extinction parameter. Can be a single |
joint |
Logical, whether to estimate both birth and death parameter jointly with speciation > extinction ( |
absolute |
Logical, whether always return absolute values ( |
speciation.args |
If |
extinction.args |
If |
test |
Logical whether to test if the bd.params object will work (default is |
update |
Optional, another previous |
Details
When using update
, the provided arguments (to make.bd.params
) will be the ones updated in the "bd.params"
object.
Value
This function outputs a treats
object that is a named list of elements handled internally by the treats
function.
Author(s)
Thomas Guillerme
See Also
Examples
## A default set of birth death parameters
make.bd.params()
## Speciation is randomly picked between 1, 10 and 100
## and extinction is always 2
make.bd.params(speciation = c(1,10,100), extinction = 2)
## Speciation is a normal distribution(with sd = 0.75)
## and extinction is a lognormal distribution always lower than
## speciation (joint). Both are always positive values (absolute)
my_bd_params <- make.bd.params(speciation = rnorm,
speciation.args = list(sd = 0.75),
extinction = rlnorm,
joint = TRUE,
absolute = TRUE)
my_bd_params
## Visualising the distributions
plot(my_bd_params)