View source: R/sim.multi.URW.R
sim.multi.URW | R Documentation |
Function to simulate multivariate evolutionary sequence data that evolve according to an Unbiased Random Walk
sim.multi.URW(
ns = 30,
anc = c(0, 0),
R = matrix(c(0.5, 0, 0, 0.5), nrow = 2, byrow = TRUE),
vp = 0.1,
nn = rep(30, ns),
tt = 0:(ns - 1)
)
ns |
number of samples in time-series |
anc |
the ancestral trait values |
R |
the drift matrix |
vp |
within-population trait variance |
nn |
vector of the number of individuals in each sample (identical sample sizes for all time-series is assumed) |
tt |
vector of sample ages, increases from oldest to youngest |
A multivariate evolutionary sequence (time-series) data set.
Kjetil Lysne Voje
## Create a multivariate dataset
data_set<-sim.multi.URW(40, R = matrix(c(0.2,0.1,0.1,0.3), nrow=2, byrow = TRUE))
## plot the data
plotevoTS.multivariate(data_set)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.