sim.punc | R Documentation |

Simulates punctuated trait evolution with punctuations that are rapid relative to the spacing of samples. In practice, the time-series is divided into two or more segments, each of which has its own mean and variance.

sim.punc( ns = c(10, 10), theta = c(0, 1), omega = rep(0, length(theta)), nn = rep(30, sum(ns)), tt = 0:(sum(ns) - 1), vp = 1 )

`ns` |
vector of the number of samples in each segment |

`theta` |
vector of means, one for each segment |

`omega` |
vector of variances, one for each segment. |

`nn` |
vector of sample sizes, one for each population |

`tt` |
vector of times (ages), one for each population |

`vp` |
phenotypic variance within each population |

Segments are separated by punctuations. Population means in the ith segment are
drawn randomly from a normal distribution with a mean equal to ith element of `theta`

and variance equal to the ith element of `omega`

. The magnitudes of punctuations are
determined by the differences in adjacent `theta`

values.

a `paleoTS`

object with the simulated time-series.

`fitGpunc`

x <- sim.punc(ns = c(15, 15), theta = c(0,3), omega = c(0.1, 0.1)) plot(x)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.