Description Usage Arguments Value References Examples
This function simulates evolution of a function-valued trait (glm with logit link) under Brownian motion.
1  | sim.curves(nspecies = 30, x_length = 20, startree = FALSE, lambda = 1, seed)
 | 
nspecies | 
 Number of species  | 
x_length | 
 Number of points on the curve to simulate  | 
startree | 
 Simulate using a star tree  | 
lambda | 
 Pagel's lambda tree transformation parameter (lambda = 0 for star tree; lambda = 1 for original tree)  | 
seed | 
 Optional seed to set for reproducibility  | 
data  | 
 Data frame with simulated curves formatted appropriately for phylocurve()  | 
tree  | 
 Phylogenetic tree of class "phylo"  | 
true_coefs  | 
 True tip and ancestral coefficients for glm logit link  | 
Pagel, M. 1999. "Inferring the historical patterns of biological evolution". Nature 401:877-884.
1 2 3 4 5 6 7 8 9 10 11 12  | # simulate evolution of a function-valued trait (glm with logit link)
sim_data <- sim.curves()
# perform ancestral curve reconstruction
anc_recon <- phylocurve(y~x,tree = sim_data$tree,data = sim_data$data)
# get tip coefficients and aligned function data
tip.coefficients <- get.tip.coefficients(formula = y~x,tree = sim_data$tree,data = sim_data$data)
data <- get.aligned.function.data(tip.coefficients)
# estimate evolutionary rates
evo.model.fitted <- evo.model(sim_data$tree,data)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.