sim.multi.URW {evoTS} | R Documentation |
Simulate multivariate evolutionary sequence data that evolve according to an Unbiased Random Walk
Description
Function to simulate multivariate evolutionary sequence data that evolve according to an Unbiased Random Walk
Usage
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)
)
Arguments
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 |
Value
A multivariate evolutionary sequence (time-series) data set.
Author(s)
Kjetil Lysne Voje
Examples
## 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)
[Package evoTS version 1.0.3 Index]