Description Usage Arguments Value
View source: R/simulation_functions.R
Create a simulated tree from a noise sd, named vectors of leaf effects, volumes, individual effects, metadata, and an initial tree
1 2 | create_tree(noise_sd, leaf_effects, leaf_volumes, indiv_effects, metadata,
base_tree, intercept_sd = 0, extra_effects = NA)
|
noise_sd |
What should the sd of the gaussian noise added to observations be |
leaf_effects |
A named vector of effects to apply to the leaves |
indiv_effects |
A vector of individual level effects |
metadata |
A vector containing a covariate with elements matching the elements of the indiv effects / tree volumes. |
base_tree |
A tree indicating the ontology, should contain volumes already to be overwritten. |
extra_effects |
A named vector of extra effects to be applied
at nodes. Default |
leaf_volume |
A named vector of scaling constants to
be applied to the leaf nodes, converting them to |
A two element list containing
The simulated tree
A vector with the composite leaf_effects
generated by adding
extra_effects
to leaf_effects
where applicable.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.